@cloudbase/js-sdk 3.4.7 → 3.4.9-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/ai/dist/index.esm.js +1 -1
  3. package/ai/dist/index.esm.js.map +1 -1
  4. package/ai/dist/index.js +1 -1
  5. package/ai/dist/index.js.map +1 -1
  6. package/app/dist/index.esm.js +1 -1
  7. package/app/dist/index.esm.js.map +1 -1
  8. package/app/dist/index.js +1 -1
  9. package/app/dist/index.js.map +1 -1
  10. package/auth/dist/index.esm.js +1 -1
  11. package/auth/dist/index.esm.js.map +1 -1
  12. package/auth/dist/index.js +1 -1
  13. package/auth/dist/index.js.map +1 -1
  14. package/cloudrun/dist/index.esm.js +1 -1
  15. package/cloudrun/dist/index.esm.js.map +1 -1
  16. package/cloudrun/dist/index.js +1 -1
  17. package/cloudrun/dist/index.js.map +1 -1
  18. package/container/dist/index.esm.js +1 -1
  19. package/container/dist/index.esm.js.map +1 -1
  20. package/container/dist/index.js +1 -1
  21. package/container/dist/index.js.map +1 -1
  22. package/dist/index.cjs.js +1 -1
  23. package/dist/index.cjs.js.map +1 -1
  24. package/dist/index.esm.js +1 -1
  25. package/dist/index.esm.js.map +1 -1
  26. package/functions/dist/index.esm.js +1 -1
  27. package/functions/dist/index.esm.js.map +1 -1
  28. package/functions/dist/index.js +1 -1
  29. package/functions/dist/index.js.map +1 -1
  30. package/index.d.ts +654 -45
  31. package/miniprogram_dist/ai.js +1 -1
  32. package/miniprogram_dist/app.js +1 -1
  33. package/miniprogram_dist/auth.js +1 -1
  34. package/miniprogram_dist/cloudrun.js +1 -1
  35. package/miniprogram_dist/container.js +1 -1
  36. package/miniprogram_dist/functions.js +1 -1
  37. package/miniprogram_dist/index.js +1 -1
  38. package/miniprogram_dist/model.js +1 -1
  39. package/miniprogram_dist/oauth.js +1 -1
  40. package/miniprogram_dist/storage.js +1 -1
  41. package/model/dist/index.esm.js +1 -1
  42. package/model/dist/index.esm.js.map +1 -1
  43. package/model/dist/index.js +1 -1
  44. package/model/dist/index.js.map +1 -1
  45. package/oauth/dist/index.esm.js +1 -1
  46. package/oauth/dist/index.esm.js.map +1 -1
  47. package/oauth/dist/index.js +1 -1
  48. package/oauth/dist/index.js.map +1 -1
  49. package/package.json +1 -1
  50. package/storage/dist/index.esm.js +1 -1
  51. package/storage/dist/index.esm.js.map +1 -1
  52. package/storage/dist/index.js +1 -1
  53. package/storage/dist/index.js.map +1 -1
  54. package/types/index.d.ts +2 -2
  55. package/types/package.json +1 -1
  56. package/utilities/dist/cjs/adapters/platforms/web.js +12 -4
  57. package/utilities/dist/esm/adapters/platforms/web.js +12 -4
  58. package/utilities/dist/miniprogram/index.js +1 -1
  59. package/utilities/package.json +2 -2
@@ -1,2 +1,2 @@
1
- !function(){var t={863:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContainers=void 0;var r=n(10);e.registerContainers=r.registerContainers;try{window.registerContainers=e.registerContainers}catch(t){}},288:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMPONENT_NAME=void 0,e.COMPONENT_NAME="container"},336:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};if(Object.defineProperty(e,"__esModule",{value:!0}),void 0!==n.g);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}n.g.require;var i=function(){var t=new Error("not implemented");return t.code="ENOSYS",t};if(!n.g.fs){var a="";n.g.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(t,e){var n=(a+=c.decode(e)).lastIndexOf("\n");return-1!=n&&(console.log(a.substr(0,n)),a=a.substr(n+1)),e.length},write:function(t,e,n,r,o,a){0===n&&r===e.length&&null===o?a(null,this.writeSync(t,e)):a(i())},chmod:function(t,e,n){n(i())},chown:function(t,e,n,r){r(i())},close:function(t,e){e(i())},fchmod:function(t,e,n){n(i())},fchown:function(t,e,n,r){r(i())},fstat:function(t,e){e(i())},fsync:function(t,e){e(null)},ftruncate:function(t,e,n){n(i())},lchown:function(t,e,n,r){r(i())},link:function(t,e,n){n(i())},lstat:function(t,e){e(i())},mkdir:function(t,e,n){n(i())},open:function(t,e,n,r){r(i())},read:function(t,e,n,r,o,a){a(i())},readdir:function(t,e){e(i())},readlink:function(t,e){e(i())},rename:function(t,e,n){n(i())},rmdir:function(t,e){e(i())},stat:function(t,e){e(i())},symlink:function(t,e,n){n(i())},truncate:function(t,e,n){n(i())},unlink:function(t,e){e(i())},utimes:function(t,e,n,r){r(i())}}}if(n.g.process||(n.g.process={getuid:function(){return-1},getgid:function(){return-1},geteuid:function(){return-1},getegid:function(){return-1},getgroups:function(){throw i()},pid:-1,ppid:-1,umask:function(){throw i()},cwd:function(){throw i()},chdir:function(){throw i()}}),!n.g.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!n.g.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!n.g.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!n.g.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");var s=new TextEncoder("utf-8"),c=new TextDecoder("utf-8"),u=[];n.g.Go=function(){function t(){var t=this;this._callbackTimeouts=new Map,this._nextCallbackTimeoutID=1;var e=function(){return new DataView(t._inst.exports.memory.buffer)},r=function(t,n){e().setUint32(t+0,n,!0),e().setUint32(t+4,Math.floor(n/4294967296),!0)},o=function(n){var r=e().getFloat64(n,!0);if(0!==r){if(!isNaN(r))return r;var o=e().getUint32(n,!0);return t._values[o]}},i=function(n,r){var o=2146959360;if("number"==typeof r)return isNaN(r)?(e().setUint32(n+4,o,!0),void e().setUint32(n,0,!0)):0===r?(e().setUint32(n+4,o,!0),void e().setUint32(n,1,!0)):void e().setFloat64(n,r,!0);switch(r){case void 0:return void e().setFloat64(n,0,!0);case null:return e().setUint32(n+4,o,!0),void e().setUint32(n,2,!0);case!0:return e().setUint32(n+4,o,!0),void e().setUint32(n,3,!0);case!1:return e().setUint32(n+4,o,!0),void e().setUint32(n,4,!0)}var i=t._ids.get(r);void 0===i&&(void 0===(i=t._idPool.pop())&&(i=t._values.length),t._values[i]=r,t._goRefCounts[i]=0,t._ids.set(r,i)),t._goRefCounts[i]++;var a=1;switch(typeof r){case"string":a=2;break;case"symbol":a=3;break;case"function":a=4}e().setUint32(n+4,o|a,!0),e().setUint32(n,i,!0)},a=function(e,n,r){return new Uint8Array(t._inst.exports.memory.buffer,e,n)},l=function(t,e,n){for(var r=new Array(e),i=0;i<e;i++)r[i]=o(t+8*i);return r},f=function(e,n){return c.decode(new DataView(t._inst.exports.memory.buffer,e,n))},d=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(t,n,r,o){var i=0;if(1==t)for(var a=0;a<r;a++){var s=n+8*a,l=e().getUint32(s+0,!0),f=e().getUint32(s+4,!0);i+=f;for(var d=0;d<f;d++){var p=e().getUint8(l+d);if(13==p);else if(10==p){var h=c.decode(new Uint8Array(u));u=[],console.log(h)}else u.push(p)}}else console.error("invalid file descriptor:",t);return e().setUint32(o,i,!0),0},fd_close:function(){return 0},fd_fdstat_get:function(){return 0},fd_seek:function(){return 0},proc_exit:function(t){if(!n.g.process)throw"trying to exit with code "+t;process.exit(t)},random_get:function(t,e){return crypto.getRandomValues(a(t,e)),0}},env:{"runtime.ticks":function(){return d+performance.now()},"runtime.sleepTicks":function(e){setTimeout(t._inst.exports.go_scheduler,e)},"syscall/js.finalizeRef":function(n){var r=e().getUint32(n,!0);if(t._goRefCounts[r]--,0===t._goRefCounts[r]){var o=t._values[r];t._values[r]=null,t._ids.delete(o),t._idPool.push(r)}},"syscall/js.stringVal":function(t,e,n){var r=f(e,n);i(t,r)},"syscall/js.valueGet":function(t,e,n,r){var a=f(n,r),s=o(e),c=Reflect.get(s,a);i(t,c)},"syscall/js.valueSet":function(t,e,n,r){var i=o(t),a=f(e,n),s=o(r);Reflect.set(i,a,s)},"syscall/js.valueDelete":function(t,e,n){var r=o(t),i=f(e,n);Reflect.deleteProperty(r,i)},"syscall/js.valueIndex":function(t,e,n){i(t,Reflect.get(o(e),n))},"syscall/js.valueSetIndex":function(t,e,n){Reflect.set(o(t),e,o(n))},"syscall/js.valueCall":function(t,n,r,a,s,c,u){var d=o(n),p=f(r,a),h=l(s,c);try{var v=Reflect.get(d,p);i(t,Reflect.apply(v,d,h)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueInvoke":function(t,n,r,a,s){try{var c=o(n),u=l(r,a);i(t,Reflect.apply(c,void 0,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueNew":function(t,n,r,a,s){var c=o(n),u=l(r,a);try{i(t,Reflect.construct(c,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueLength":function(t){return o(t).length},"syscall/js.valuePrepareString":function(t,e){var n=String(o(e)),a=s.encode(n);i(t,a),r(t+8,a.length)},"syscall/js.valueLoadString":function(t,e,n,r){var i=o(t);a(e,n).set(i)},"syscall/js.valueInstanceOf":function(t,e){return o(t)instanceof o(e)},"syscall/js.copyBytesToGo":function(t,n,i,s,c){var u=t,l=t+4,f=a(n,i),d=o(c);if(d instanceof Uint8Array||d instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)},"syscall/js.copyBytesToJS":function(t,n,i,s,c){var u=t,l=t+4,f=o(n),d=a(i,s);if(f instanceof Uint8Array||f instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)}}}}return t.prototype.run=function(t){return r(this,void 0,void 0,(function(){var e,r=this;return o(this,(function(o){switch(o.label){case 0:this._inst=t,this._values=[NaN,0,null,!0,!1,n.g,this],this._goRefCounts=[],this._ids=new Map,this._idPool=[],this.exited=!1,new DataView(this._inst.exports.memory.buffer),o.label=1;case 1:return e=new Promise((function(t){r._resolveCallbackPromise=function(){if(r.exited)throw new Error("bad callback: Go program has already exited");setTimeout(t,0)}})),this._inst.exports._start(),this.exited?[3,3]:[4,e];case 2:return o.sent(),[3,1];case 3:return[2]}}))}))},t.prototype._resume=function(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()},t.prototype._makeFuncWrapper=function(t){var e=this;return function(){var n={id:t,this:this,args:arguments};return e._pendingEvent=n,e._resume(),n.result}},t}(),e.default=n.g.Go},10:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},s=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},c=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},l=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.registerContainers=e.CloudbaseContainers=e.t=void 0;var f=n(388),d=n(877),p=n(455),h=n(288),v=d.constants.ERRORS,y=d.constants.COMMUNITY_SITE_URL,b=d.utils.execCallback,g=d.utils.printWarn,m=d.helpers.catchErrorsDecorator;e.t=function(t){return t};var w=function(){throw new Error("getExportFunction ".concat((0,e.t)("未实现")))},_=function(){throw new Error("loadJSExportFunction ".concat((0,e.t)("未实现")))};if(globalThis.IS_MP_BUILD)w=function(){new Error((0,e.t)("小程序不支持 wasm 加载"))},_=function(t){return t&&new Error((0,e.t)("小程序不支持动态 js 加载")),{initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}};else{var O=n(584);w=O.getExportFunction,_=O.loadJSExportFunction}var E=function(t){function e(e,n){var r=this,o=JSON.stringify({code:v.INVALID_PARAMS,msg:"[".concat(e,"] ").concat(n)});return(r=t.call(this,o)||this).code=v.INVALID_PARAMS,r}return o(e,t),e.prototype.toJSON=function(){return{code:this.code,message:this.message}},e}(Error);function j(t,e,n){void 0===e&&(e=h.COMPONENT_NAME),void 0===n&&(n="call container error");var r=t instanceof Error?t:new Error("[".concat(e,"] ").concat((null==t?void 0:t.message)||n));return r.code=(null==t?void 0:t.code)||"UNKNOWN_ERROR",r}var P=e.CloudbaseContainers=function(){function t(t){var n,r,o=this;if(this.config=i(i({},t),{jsUrl:"string"==typeof t.jsUrl?{vm:t.jsUrl}:t.jsUrl}),e.t=(null===(n=t.i18n)||void 0===n?void 0:n.t)||function(t){return t},!this.config.wasmUrl&&this.config.publicKey);else if(!this.config.wasmUrl&&!(null===(r=this.config.jsUrl)||void 0===r?void 0:r.vm)&&!globalThis.cloudbase_private_link)throw new E("".concat(h.COMPONENT_NAME),(0,e.t)("缺少 privatelink sdk 地址"));this.config.wasmUrl?this.wasm=w(this.config.wasmUrl).catch((function(t){if(o.config.jsUrl)return console.warn("load wams error, fall back to use js",t),_(o.config.jsUrl);if(globalThis.cloudbase_private_link)return globalThis.cloudbase_private_link;throw t})):this.config.jsUrl||this.config.publicKey?this.wasm=_(this.config.jsUrl):this.wasm=Promise.resolve({initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}),d.langEvent.bus.on(d.langEvent.LANG_CHANGE_EVENT,(function(t){var n,r,a,s,c;e.t=(null===(a=null===(r=t.data)||void 0===r?void 0:r.i18n)||void 0===a?void 0:a.t)||function(t){return t},o.defaultHeaders=i(i({},o.defaultHeaders),((n={})[d.langEvent.LANG_CHANGE_EVENT]=null===(c=null===(s=t.data)||void 0===s?void 0:s.i18n)||void 0===c?void 0:c.lang,n))}))}var n,r;return t.prototype.callContainer=function(t,e){return c(this,void 0,void 0,(function(){var n,r,o,a,s,c,f,d,v,y,g,m,w,_,O,P,x;return u(this,(function(u){switch(u.label){case 0:return[4,this.initContainer(this.config)];case 1:return u.sent(),n="".concat(h.COMPONENT_NAME,".callContainer"),[4,this.wasm];case 2:if(r=u.sent().callContainer,o=i({},t),a=o.url,_=o.method,s=void 0===_?"GET":_,c=o.data,O=o.timeout,f=void 0===O?6e4:O,P=o.dataType,d=void 0===P?"json":P,x=o.responseType,v=void 0===x?"text":x,y=l(o,["url","method","data","timeout","dataType","responseType"]),!a)throw new E(n,"invalid request url");if(!s)throw new E(n,"invalid request method");g=i(i({},this.defaultHeaders),t.header),u.label=3;case 3:return u.trys.push([3,5,,6]),[4,new Promise((function(t,e){var o=i({url:a,method:s,header:g,data:(0,p.serializeRequestBody)(g,c,s),timeout:f,dataType:d,responseType:v},y);if(c&&((0,p.isBuffer)(o.data)||"string"==typeof o.data)&&(null==c?void 0:c.length)>1024e4)e(new E(n,"body too large"));else{if("GET"===s){var u=o.data;if(u&&(o.data=void 0),!(0,p.isBuffer)(u)&&"string"!=typeof u){var l=Object.entries(u||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(r)))),t}),[]);l.length&&(u=l.join("&"))}if("string"==typeof o.data){var h=(0,p.parseURL)(a);h.search?h.search+="&".concat(o.data):h.search="?".concat(o.data),o.url=h.href,o.data=void 0}}r(i(i({},o),{success:t,fail:function(t){var r=(t||{}).data;e(j(r,n,"call container error"))}}))}}))];case 4:return m=u.sent(),[2,b(e,null,m)];case 5:return w=u.sent(),b(e,w),[3,6];case 6:return[2]}}))}))},t.prototype.initContainer=function(t){return c(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.wasm];case 1:return e=r.sent().initContainer,this.containerInitPromise||(this.containerInitPromise=new Promise((function(r,o){e({config:t,success:function(t){"200"!==String(t.statusCode)&&o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),r(t)},fail:function(t){o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),n.containerInitPromise=null}})}))),[2,this.containerInitPromise]}}))}))},a([m({customInfo:{className:"Cloudbase",methodName:"callContainer"},title:"调用失败",messages:["请确认以下各项:"," 1 - 调用 callContainer() 的语法或参数是否正确"," 2 - 域名 & 路径是否存在","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(y)]}),s("design:type",Function),s("design:paramtypes",["function"==typeof(n=void 0!==f.ICallContainerOptions&&f.ICallContainerOptions)?n:Object,"function"==typeof(r="undefined"!=typeof Function&&Function)?r:Object]),s("design:returntype",Promise)],t.prototype,"callContainer",null),t}(),x={name:h.COMPONENT_NAME,namespace:"container",entity:function(t){if(this.containerInstance)return g(v.INVALID_OPERATION,"every cloudbase instance should has only one container object"),this.containerInstance;var e=new P(t);return this.containerInstance=e,this.callContainer=e.callContainer.bind(e),this.containerInstance}};try{cloudbase.registerComponent(x)}catch(t){}e.registerContainers=function(t){try{t.registerComponent(x)}catch(t){console.warn(t)}}},455:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeRequestBody=e.isBuffer=e.parseURL=void 0;var r=n(877),o=n(288),i=r.constants.ERRORS;function a(t){return t instanceof ArrayBuffer||ArrayBuffer.isView(t)}function s(t){var e=Object.entries(t||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))),t}),[]);if(e.length)return e.join("&")}e.parseURL=function(t){if(document){var e=document.createElement("a");return e.href=t,e}return new URL(new Request(t).url)},e.isBuffer=a,e.serializeRequestBody=function(t,e,n){void 0===n&&(n="POST");var r=e,c="Content-Type";if("object"==typeof e&&!a(e)){t[c]||t["content-type"]||(t[c]="application/json");var u=t[c]||t["content-type"];if("GET"===n)try{return s(e)||""}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data in query method, ").concat(t.message)}))}switch(u){case"application/json":try{r=JSON.stringify(e)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/json, ").concat(t.message)}))}break;case"application/x-www-form-urlencoded":try{var l=s(e);l&&(r=l)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/x-www-form-urlencoded,").concat(t.message)}))}}}return r}},584:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.loadJSExportFunction=e.getExportFunction=void 0;var s=a(n(336)),c=n(455);function u(t,e,n){return void 0===n&&(n=!1),o(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return!n&&WebAssembly.instantiateStreaming?[3,3]:[4,t];case 1:return[4,i.sent().arrayBuffer()];case 2:if(r=i.sent(),n)throw new Error("do not support *.br");return o=r,[2,WebAssembly.instantiate(o,e)];case 3:return[2,WebAssembly.instantiateStreaming(t,e)]}}))}))}function l(t,e,n){return void 0===n&&(n=document),new Promise((function(r,o){var i=n.defaultView,a=n.createElement("script");a.setAttribute("src",t),a.setAttribute("class",e),a.addEventListener("load",(function(){if(Object.prototype.hasOwnProperty.call(i,e))return r(i[e]);var n=new Error("Fail to load UMD module ".concat(e," from [").concat(t,"]."));return o(n)})),a.addEventListener("error",(function(n){var r=new Error("main bundle [".concat(e,"] load failed from [").concat(t,"]: ").concat((null==n?void 0:n.message)||""));o(r)})),n.body?n.body.appendChild(a):n.head.appendChild(a)}))}e.getExportFunction=function(t,e,n){return void 0===n&&(n="go"),o(this,void 0,void 0,(function(){var o,a,l,f;return i(this,(function(i){switch(i.label){case 0:return o=r({env:{memoryBase:0,tableBase:0,memory:new WebAssembly.Memory({initial:256})}},e),l=function(t){var e=!1,n="";try{n=(0,c.parseURL)(t).pathname}catch(e){n=t}return/\.br$/.test(n)&&(e=!0),e}(t),"go"===n&&((a=new s.default)._initedModulePromise=new Promise((function(t){a._initedModuleResolve=t})),o=r(r({},a.importObject),{env:r(r({},a.importObject.env),{exportModule:function(t){return a._initedModuleResolve(t)}})})),[4,u(fetch(t),o,l)];case 1:return f=i.sent(),"go"!==n?[3,3]:[4,Promise.race([a.run(f.instance),new Promise((function(t){return setTimeout((function(){t(null)}),500)}))])];case 2:return i.sent(),[2,{callContainer:window.callContainer,initContainer:window.initContainer}];case 3:return[2,f.instance.exports]}}))}))},e.loadJSExportFunction=function(t){return o(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:return n=(e=t||{}).vm,r=e.vender,o="cloudbase_private_link_vender",!r&&Object.prototype.hasOwnProperty.call(document.defaultView,o)?[3,2]:[4,l(r||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink-vender@0.0.2/dist/cdn/cloudbase.privatelink.vender.js",o)];case 1:i.sent(),i.label=2;case 2:return[2,l(n||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink@0.0.1/dist/cdn/cloudbase.privatelink.vm.js","cloudbase_private_link")]}}))}))}},563:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var s,c=a(n(92)),u=n(962);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(s=e.RUNTIME||(e.RUNTIME={})),e.useAdapters=function(t,e){for(var n=0,o=(0,u.isArray)(t)?t:[t];n<o.length;n++){var i=o[n],a=i.isMatch,s=i.genAdapter,c=i.runtime;if(a())return{adapter:r({isMatch:a},s(e)),runtime:c}}},e.useDefaultAdapter=function(){return{adapter:r({},c.genAdapter()),runtime:s.WEB}}},92:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebRequest=e.genAdapter=void 0;var c=n(764),u=n(962),l=n(464),f=function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}return o(e,t),e.prototype.get=function(t){return this.request(i(i({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(i(i({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(i(i({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,a=t.headers,s=void 0===a?{}:a,c={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",u=new FormData;return"post"===c?(Object.keys(e).forEach((function(t){u.append(t,e[t])})),u.append("key",r),u.append("file",n),this.request(i(i({},t),{data:u,method:c}),this.restrictedMethods.includes("upload"))):this.request(i(i({},t),{method:"put",headers:s,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return a(this,void 0,Promise,(function(){var e,n,r,o;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(i(i({},t),{headers:{},responseType:"blob"}))];case 1:return e=a.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return a(this,void 0,Promise,(function(){var n,r,o,c,u,l,f,d,p,h,v,y,b,g=this;return s(this,(function(m){switch(m.label){case 0:return n=new AbortController,r=t.url,o=t.enableAbort,c=void 0!==o&&o,u=t.stream,l=void 0!==u&&u,f=t.signal,d=t.timeout,p=t.shouldThrowOnError,h=void 0===p||p,v=null!=d?d:this.timeout,f&&(f.aborted&&n.abort(),f.addEventListener("abort",(function(){return n.abort()}))),y=null,c&&v&&(y=setTimeout((function(){console.warn(g.timeoutMsg),n.abort(new Error(g.timeoutMsg))}),v)),[4,fetch(r,i(i({},t),{signal:n.signal})).then((function(t){return a(g,void 0,void 0,(function(){var e,n,r;return s(this,(function(o){switch(o.label){case 0:return clearTimeout(y),h?t.ok?(e=t,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,t.json()];case 2:e=r.apply(n,[o.sent()]),o.label=3;case 3:return[2,e];case 4:return[2,t]}}))}))})).catch((function(t){if(clearTimeout(y),h)return Promise.reject(t)}))];case 1:return b=m.sent(),[2,{data:l?b.body:(null===(e=b.headers.get("content-type"))||void 0===e?void 0:e.includes("application/json"))?b.json():b.text(),statusCode:b.status,header:b.headers}]}}))}))},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i,a,s=t.url,c=t.headers,f=void 0===c?{}:c,d=t.data,p=t.responseType,h=t.withCredentials,v=t.body,y=t.onUploadProgress,b=(0,u.formatUrl)((0,l.getProtocol)(),s,"get"===r?d:{}),g=new XMLHttpRequest;g.open(r,b),p&&(g.responseType=p),Object.keys(f).forEach((function(t){g.setRequestHeader(t,f[t])})),y&&g.upload.addEventListener("progress",y),g.onreadystatechange=function(){var t={};if(4===g.readyState){var e=g.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=g.status;try{t.data="blob"===p?g.response:JSON.parse(g.responseText)}catch(e){t.data="blob"===p?g.response:g.responseText}clearTimeout(i),o(t)}},e&&n.timeout&&(i=setTimeout((function(){console.warn(n.timeoutMsg),g.abort()}),n.timeout)),a=(0,u.isFormData)(d)?d:"application/x-www-form-urlencoded"===f["content-type"]?(0,u.toQueryString)(d):v||(d?JSON.stringify(d):void 0),h&&(g.withCredentials=!0),g.send(a)}))},e}(c.AbstractSDKRequest);e.WebRequest=f,e.genAdapter=function(){return{type:"default",root:window,reqClass:f,wsClass:WebSocket,localStorage:localStorage}}},464:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMMUNITY_SITE_URL=e.IS_DEBUG_MODE=e.getProtocol=e.setProtocol=e.getSdkName=e.setSdkName=void 0;var n="@cloudbase/js-sdk";e.setSdkName=function(t){n=t},e.getSdkName=function(){return n};var r="https:";e.setProtocol=function(t){r=t},e.getProtocol=function(){return r},e.IS_DEBUG_MODE=!1,e.COMMUNITY_SITE_URL="https://support.qq.com/products/148793"},519:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERRORS=void 0,e.ERRORS={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"}},778:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.OATUH_LOGINTYPE=void 0,o(n(464),e),o(n(519),e),e.OATUH_LOGINTYPE="constants"},517:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.catchErrorsDecorator=void 0;var i=n(962),a=n(778),s=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(s=-1!==navigator.userAgent.indexOf("Firefox"));var c=s?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,u=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function l(t){var e=t.err,n=t.className,r=t.methodName,o=t.sourceLink;if(!o)return null;var i,a=e.stack.split("\n"),c=s?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]\\s*\\(.*\\)$")),l=s?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]")),f=a.findIndex((function(t){return c.test(t)}));if(-1!==f){var d=a.filter((function(t,e){return e>f}));d.unshift(a[f].replace(l,"".concat(n,".").concat(r)).replace(u,o)),(i=new Error).stack="".concat(s?"@debugger":"Error","\n").concat(d.join("\n"))}return i}e.catchErrorsDecorator=function(t){var e=t.mode,n=void 0===e?"async":e,s=t.customInfo,f=void 0===s?{}:s,d=t.title,p=t.messages,h=void 0===p?[]:p;return function(t,e,s){if(a.IS_DEBUG_MODE){var p=f.className||t.constructor.name,v=f.methodName||e,y=s.value,b=function(){var t="",e=(new Error).stack.split("\n"),n=e.findIndex((function(t){return c.test(t)}));if(-1!==n){var r=u.exec(e[n+1]||"");t=r?r[0]:""}return t}();s.value="sync"===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=l({err:new Error,className:p,methodName:v,sourceLink:b});try{return y.apply(this,t)}catch(t){var r=t,o=t.message,a=t.error,s=t.error_description,c={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var u=JSON.parse(o);c.subtitle=o,u.code&&(n?(n.code=u.code,n.msg=u.msg):(t.code=u.code,t.message=u.msg),r=n||t,c.content=h.map((function(t){return{type:"info",body:t}})))}throw a&&s&&(c.subtitle=s,n?(n.code=a,n.msg=s):(t.code=a,t.message=s),r=n||t,c.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(c),r}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,a,s,c,u,f;return o(this,(function(o){switch(o.label){case 0:e=l({err:new Error,className:p,methodName:v,sourceLink:b}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,y.apply(this,t)];case 2:return[2,o.sent()];case 3:throw n=o.sent(),r=n,a=n.message,s=n.error,c=n.error_description,u={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:n}]},a&&/^\{.*\}$/.test(a)&&(f=JSON.parse(a),u.subtitle=f,f.code&&(e?(e.code=f.code,e.message=f.msg):(n.code=f.code,n.message=f.msg),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}})))),s&&c&&(u.subtitle=c,e?(e.code=s,e.msg=c):(n.code=s,n.message=c),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(u),r;case 4:return[2]}}))}))}}}}},260:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(517),e)},877:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.langEvent=e.AbortController=e.jwt=e.helpers=e.utils=e.events=e.cache=e.adapters=e.constants=void 0;var s=i(n(778));e.constants=s;var c=i(n(563));e.adapters=c;var u=i(n(865));e.cache=u;var l=i(n(940));e.events=l;var f=i(n(991));e.langEvent=f;var d=i(n(962));e.utils=d;var p=i(n(260));e.helpers=p;var h=a(n(829));e.AbortController=h.default;var v={decode:a(n(107)).default};e.jwt=v},829:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){var t=this;this.listeners=[],this.signal={aborted:!1,addEventListener:function(e,n){"abort"===e&&t.listeners.push(n)}}}return t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.listeners.forEach((function(t){return t()})))},t}();e.default=n},865:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CloudbaseCache=void 0;var s=n(764),c=n(962),u=n(778),l=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return o(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}(s.AbstractStorage),f=function(){function t(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,i=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:((0,c.printWarn)(u.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new l(e.root));case"none":return new l(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}return Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:u.ERRORS.OPERATION_FAIL,msg:"[".concat((0,u.getSdkName)(),"][").concat(u.ERRORS.OPERATION_FAIL,"]setStore failed"),info:t}))}}else(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,n){return i(this,void 0,void 0,(function(){var r;return a(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n={IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0})||void 0===n?void 0:n.tcb_token))return{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var r=this.storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var n;return i(this,void 0,void 0,(function(){var r;return a(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n={IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0})||void 0===n?void 0:n.tcb_token))return[2,{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(r=o.sent())&&r.indexOf(e)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},t}();e.CloudbaseCache=f},940:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.removeEventListener=e.activateEvent=e.addEventListener=e.CloudbaseEventEmitter=e.IErrorEvent=e.CloudbaseEvent=void 0;var a=n(962),s=function(t,e){this.data=e||null,this.name=t};e.CloudbaseEvent=s;var c=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return o(e,t),e}(s);e.IErrorEvent=c;var u=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if((0,a.isInstanceOf)(t,c))return console.error(t.error),this;var n=(0,a.isString)(t)?new s(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,u=this.listeners[r]?i([],this.listeners[r],!0):[];o<u.length;o++)u[o].call(this,n)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}();e.CloudbaseEventEmitter=u;var l=new u;e.addEventListener=function(t,e){l.on(t,e)},e.activateEvent=function(t,e){void 0===e&&(e={}),l.fire(t,e)},e.removeEventListener=function(t,e){l.off(t,e)}},991:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LANG_CHANGE_EVENT=e.bus=void 0;var r=n(940);e.bus=new r.CloudbaseEventEmitter,e.LANG_CHANGE_EVENT="lang_change"},962:function(t,e,n){"use strict";var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.parseCaptcha=e.parseQueryString=e.transformPhone=e.sleep=e.printGroupLog=e.throwError=e.printInfo=e.printError=e.printWarn=e.execCallback=e.createPromiseCallback=e.removeParam=e.getHash=e.getQuery=e.toQueryString=e.formatUrl=e.generateRequestId=e.genSeqId=e.isFormData=e.isInstanceOf=e.isNull=e.isPalinObject=e.isUndefined=e.isString=e.isArray=void 0;var o=n(778);e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isString=function(t){return"string"==typeof t},e.isUndefined=function(t){return void 0===t},e.isPalinObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isNull=function(t){return"[object Null]"===Object.prototype.toString.call(t)},e.isInstanceOf=function(t,e){return t instanceof e},e.isFormData=function(t){return"[object FormData]"===Object.prototype.toString.call(t)},e.genSeqId=function(){return Math.random().toString(16).slice(2)},e.generateRequestId=function(){var t=(new Date).getTime(),e=(null===Date||void 0===Date?void 0:Date.now)&&1e3*Date.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),("x"===n?r:7&r|8).toString(16)}))},e.formatUrl=function(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(n[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)},e.toQueryString=function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push("".concat(n,"=").concat(encodeURIComponent(t[n])))})),e.join("&")},e.getQuery=function(t,e){if("undefined"==typeof window)return!1;var n=e||decodeURIComponent(window.location.search),r=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""},e.getHash=function(t){if("undefined"==typeof window)return"";var e=window.location.hash.match(new RegExp("[#?&/]".concat(t,"=([^&#]*)")));return e?e[1]:""},e.removeParam=function(t,e){var n=e.split("?")[0],r=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===t&&r.splice(i,1);n="".concat(n,"?").concat(r.join("&"))}return n},e.createPromiseCallback=function(){var t={};if(!Promise){(t=function(){}).promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var n=new Promise((function(e,n){t=function(t,r){return t?n(t):e(r)}}));return t.promise=n,t},e.execCallback=function(t,e,n){if(void 0===n&&(n=null),t&&"function"==typeof t)return t(e,n);if(e)throw e;return n},e.printWarn=function(t,e){console.warn("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.printError=function(t,e){console.error({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)})},e.printInfo=function(t,e){console.log("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.throwError=function(t,e){throw new Error(JSON.stringify({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)}))},e.printGroupLog=function(t){var e,n=t.title,r=t.subtitle,o=void 0===r?"":r,i=t.content,a=void 0===i?[]:i,s=t.printTrace,c=void 0!==s&&s,u=t.collapsed;void 0!==u&&u?(console.groupCollapsed||console.error)(n,o):(console.group||console.error)(n,o);for(var l=0,f=a;l<f.length;l++){var d=f[l],p=d.type,h=d.body;switch(p){case"info":console.log(h);break;case"warn":console.warn(h);break;case"error":console.error(h)}}c&&(console.trace||console.log)("stack trace:"),null===(e=console.groupEnd)||void 0===e||e.call(console)},e.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},e.transformPhone=function(t){return"+86".concat(t)},e.parseQueryString=function(t){t=t.replace(/^\?/,"");var e={};return t.split("&").forEach((function(t){var n=t.split("="),r=n[0],o=n[1];r=decodeURIComponent(r),o=decodeURIComponent(o),r&&(e[r]?Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]:e[r]=o)})),e},e.parseCaptcha=function(t){var n={},o=t.match(/^(data:.*?)(\?[^#\s]*)?$/);if(o){t=o[1];var i=o[2];i&&(n=(0,e.parseQueryString)(i))}var a=n.token,s=r(n,["token"]);return/^data:/.test(t)&&!a?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:a?{state:s.state,token:a,captchaData:t}:{error:"unimplemented",error_description:"need to impl captcha data"}}},388:function(t){t.exports={}},764:function(t){"use strict";t.exports=require("@cloudbase/adapter-interface")},107:function(t){"use strict";t.exports=require("jwt-decode")}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var r=n(863);module.exports=r}();
1
+ !function(){var t={863:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContainers=void 0;var r=n(10);e.registerContainers=r.registerContainers;try{window.registerContainers=e.registerContainers}catch(t){}},288:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMPONENT_NAME=void 0,e.COMPONENT_NAME="container"},336:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};if(Object.defineProperty(e,"__esModule",{value:!0}),void 0!==n.g);else if("undefined"!=typeof window)window.global=window;else{if("undefined"==typeof self)throw new Error("cannot export Go (neither global, window nor self is defined)");self.global=self}n.g.require;var i=function(){var t=new Error("not implemented");return t.code="ENOSYS",t};if(!n.g.fs){var a="";n.g.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(t,e){var n=(a+=c.decode(e)).lastIndexOf("\n");return-1!=n&&(console.log(a.substr(0,n)),a=a.substr(n+1)),e.length},write:function(t,e,n,r,o,a){0===n&&r===e.length&&null===o?a(null,this.writeSync(t,e)):a(i())},chmod:function(t,e,n){n(i())},chown:function(t,e,n,r){r(i())},close:function(t,e){e(i())},fchmod:function(t,e,n){n(i())},fchown:function(t,e,n,r){r(i())},fstat:function(t,e){e(i())},fsync:function(t,e){e(null)},ftruncate:function(t,e,n){n(i())},lchown:function(t,e,n,r){r(i())},link:function(t,e,n){n(i())},lstat:function(t,e){e(i())},mkdir:function(t,e,n){n(i())},open:function(t,e,n,r){r(i())},read:function(t,e,n,r,o,a){a(i())},readdir:function(t,e){e(i())},readlink:function(t,e){e(i())},rename:function(t,e,n){n(i())},rmdir:function(t,e){e(i())},stat:function(t,e){e(i())},symlink:function(t,e,n){n(i())},truncate:function(t,e,n){n(i())},unlink:function(t,e){e(i())},utimes:function(t,e,n,r){r(i())}}}if(n.g.process||(n.g.process={getuid:function(){return-1},getgid:function(){return-1},geteuid:function(){return-1},getegid:function(){return-1},getgroups:function(){throw i()},pid:-1,ppid:-1,umask:function(){throw i()},cwd:function(){throw i()},chdir:function(){throw i()}}),!n.g.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!n.g.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!n.g.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!n.g.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");var s=new TextEncoder("utf-8"),c=new TextDecoder("utf-8"),u=[];n.g.Go=function(){function t(){var t=this;this._callbackTimeouts=new Map,this._nextCallbackTimeoutID=1;var e=function(){return new DataView(t._inst.exports.memory.buffer)},r=function(t,n){e().setUint32(t+0,n,!0),e().setUint32(t+4,Math.floor(n/4294967296),!0)},o=function(n){var r=e().getFloat64(n,!0);if(0!==r){if(!isNaN(r))return r;var o=e().getUint32(n,!0);return t._values[o]}},i=function(n,r){var o=2146959360;if("number"==typeof r)return isNaN(r)?(e().setUint32(n+4,o,!0),void e().setUint32(n,0,!0)):0===r?(e().setUint32(n+4,o,!0),void e().setUint32(n,1,!0)):void e().setFloat64(n,r,!0);switch(r){case void 0:return void e().setFloat64(n,0,!0);case null:return e().setUint32(n+4,o,!0),void e().setUint32(n,2,!0);case!0:return e().setUint32(n+4,o,!0),void e().setUint32(n,3,!0);case!1:return e().setUint32(n+4,o,!0),void e().setUint32(n,4,!0)}var i=t._ids.get(r);void 0===i&&(void 0===(i=t._idPool.pop())&&(i=t._values.length),t._values[i]=r,t._goRefCounts[i]=0,t._ids.set(r,i)),t._goRefCounts[i]++;var a=1;switch(typeof r){case"string":a=2;break;case"symbol":a=3;break;case"function":a=4}e().setUint32(n+4,o|a,!0),e().setUint32(n,i,!0)},a=function(e,n,r){return new Uint8Array(t._inst.exports.memory.buffer,e,n)},l=function(t,e,n){for(var r=new Array(e),i=0;i<e;i++)r[i]=o(t+8*i);return r},f=function(e,n){return c.decode(new DataView(t._inst.exports.memory.buffer,e,n))},d=Date.now()-performance.now();this.importObject={wasi_snapshot_preview1:{fd_write:function(t,n,r,o){var i=0;if(1==t)for(var a=0;a<r;a++){var s=n+8*a,l=e().getUint32(s+0,!0),f=e().getUint32(s+4,!0);i+=f;for(var d=0;d<f;d++){var p=e().getUint8(l+d);if(13==p);else if(10==p){var h=c.decode(new Uint8Array(u));u=[],console.log(h)}else u.push(p)}}else console.error("invalid file descriptor:",t);return e().setUint32(o,i,!0),0},fd_close:function(){return 0},fd_fdstat_get:function(){return 0},fd_seek:function(){return 0},proc_exit:function(t){if(!n.g.process)throw"trying to exit with code "+t;process.exit(t)},random_get:function(t,e){return crypto.getRandomValues(a(t,e)),0}},env:{"runtime.ticks":function(){return d+performance.now()},"runtime.sleepTicks":function(e){setTimeout(t._inst.exports.go_scheduler,e)},"syscall/js.finalizeRef":function(n){var r=e().getUint32(n,!0);if(t._goRefCounts[r]--,0===t._goRefCounts[r]){var o=t._values[r];t._values[r]=null,t._ids.delete(o),t._idPool.push(r)}},"syscall/js.stringVal":function(t,e,n){var r=f(e,n);i(t,r)},"syscall/js.valueGet":function(t,e,n,r){var a=f(n,r),s=o(e),c=Reflect.get(s,a);i(t,c)},"syscall/js.valueSet":function(t,e,n,r){var i=o(t),a=f(e,n),s=o(r);Reflect.set(i,a,s)},"syscall/js.valueDelete":function(t,e,n){var r=o(t),i=f(e,n);Reflect.deleteProperty(r,i)},"syscall/js.valueIndex":function(t,e,n){i(t,Reflect.get(o(e),n))},"syscall/js.valueSetIndex":function(t,e,n){Reflect.set(o(t),e,o(n))},"syscall/js.valueCall":function(t,n,r,a,s,c,u){var d=o(n),p=f(r,a),h=l(s,c);try{var v=Reflect.get(d,p);i(t,Reflect.apply(v,d,h)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueInvoke":function(t,n,r,a,s){try{var c=o(n),u=l(r,a);i(t,Reflect.apply(c,void 0,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueNew":function(t,n,r,a,s){var c=o(n),u=l(r,a);try{i(t,Reflect.construct(c,u)),e().setUint8(t+8,1)}catch(n){i(t,n),e().setUint8(t+8,0)}},"syscall/js.valueLength":function(t){return o(t).length},"syscall/js.valuePrepareString":function(t,e){var n=String(o(e)),a=s.encode(n);i(t,a),r(t+8,a.length)},"syscall/js.valueLoadString":function(t,e,n,r){var i=o(t);a(e,n).set(i)},"syscall/js.valueInstanceOf":function(t,e){return o(t)instanceof o(e)},"syscall/js.copyBytesToGo":function(t,n,i,s,c){var u=t,l=t+4,f=a(n,i),d=o(c);if(d instanceof Uint8Array||d instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)},"syscall/js.copyBytesToJS":function(t,n,i,s,c){var u=t,l=t+4,f=o(n),d=a(i,s);if(f instanceof Uint8Array||f instanceof Uint8ClampedArray){var p=d.subarray(0,f.length);f.set(p),r(u,p.length),e().setUint8(l,1)}else e().setUint8(l,0)}}}}return t.prototype.run=function(t){return r(this,void 0,void 0,(function(){var e,r=this;return o(this,(function(o){switch(o.label){case 0:this._inst=t,this._values=[NaN,0,null,!0,!1,n.g,this],this._goRefCounts=[],this._ids=new Map,this._idPool=[],this.exited=!1,new DataView(this._inst.exports.memory.buffer),o.label=1;case 1:return e=new Promise((function(t){r._resolveCallbackPromise=function(){if(r.exited)throw new Error("bad callback: Go program has already exited");setTimeout(t,0)}})),this._inst.exports._start(),this.exited?[3,3]:[4,e];case 2:return o.sent(),[3,1];case 3:return[2]}}))}))},t.prototype._resume=function(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()},t.prototype._makeFuncWrapper=function(t){var e=this;return function(){var n={id:t,this:this,args:arguments};return e._pendingEvent=n,e._resume(),n.result}},t}(),e.default=n.g.Go},10:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},s=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},c=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},l=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.registerContainers=e.CloudbaseContainers=e.t=void 0;var f=n(388),d=n(877),p=n(455),h=n(288),v=d.constants.ERRORS,y=d.constants.COMMUNITY_SITE_URL,b=d.utils.execCallback,g=d.utils.printWarn,m=d.helpers.catchErrorsDecorator;e.t=function(t){return t};var w=function(){throw new Error("getExportFunction ".concat((0,e.t)("未实现")))},_=function(){throw new Error("loadJSExportFunction ".concat((0,e.t)("未实现")))};if(globalThis.IS_MP_BUILD)w=function(){new Error((0,e.t)("小程序不支持 wasm 加载"))},_=function(t){return t&&new Error((0,e.t)("小程序不支持动态 js 加载")),{initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}};else{var O=n(584);w=O.getExportFunction,_=O.loadJSExportFunction}var E=function(t){function e(e,n){var r=this,o=JSON.stringify({code:v.INVALID_PARAMS,msg:"[".concat(e,"] ").concat(n)});return(r=t.call(this,o)||this).code=v.INVALID_PARAMS,r}return o(e,t),e.prototype.toJSON=function(){return{code:this.code,message:this.message}},e}(Error);function j(t,e,n){void 0===e&&(e=h.COMPONENT_NAME),void 0===n&&(n="call container error");var r=t instanceof Error?t:new Error("[".concat(e,"] ").concat((null==t?void 0:t.message)||n));return r.code=(null==t?void 0:t.code)||"UNKNOWN_ERROR",r}var P=e.CloudbaseContainers=function(){function t(t){var n,r,o=this;if(this.config=i(i({},t),{jsUrl:"string"==typeof t.jsUrl?{vm:t.jsUrl}:t.jsUrl}),e.t=(null===(n=t.i18n)||void 0===n?void 0:n.t)||function(t){return t},!this.config.wasmUrl&&this.config.publicKey);else if(!this.config.wasmUrl&&!(null===(r=this.config.jsUrl)||void 0===r?void 0:r.vm)&&!globalThis.cloudbase_private_link)throw new E("".concat(h.COMPONENT_NAME),(0,e.t)("缺少 privatelink sdk 地址"));this.config.wasmUrl?this.wasm=w(this.config.wasmUrl).catch((function(t){if(o.config.jsUrl)return console.warn("load wams error, fall back to use js",t),_(o.config.jsUrl);if(globalThis.cloudbase_private_link)return globalThis.cloudbase_private_link;throw t})):this.config.jsUrl||this.config.publicKey?this.wasm=_(this.config.jsUrl):this.wasm=Promise.resolve({initContainer:globalThis.cloudbase_private_link.initContainer,callContainer:globalThis.cloudbase_private_link.callContainer}),d.langEvent.bus.on(d.langEvent.LANG_CHANGE_EVENT,(function(t){var n,r,a,s,c;e.t=(null===(a=null===(r=t.data)||void 0===r?void 0:r.i18n)||void 0===a?void 0:a.t)||function(t){return t},o.defaultHeaders=i(i({},o.defaultHeaders),((n={})[d.langEvent.LANG_CHANGE_EVENT]=null===(c=null===(s=t.data)||void 0===s?void 0:s.i18n)||void 0===c?void 0:c.lang,n))}))}var n,r;return t.prototype.callContainer=function(t,e){return c(this,void 0,void 0,(function(){var n,r,o,a,s,c,f,d,v,y,g,m,w,_,O,P,x;return u(this,(function(u){switch(u.label){case 0:return[4,this.initContainer(this.config)];case 1:return u.sent(),n="".concat(h.COMPONENT_NAME,".callContainer"),[4,this.wasm];case 2:if(r=u.sent().callContainer,o=i({},t),a=o.url,_=o.method,s=void 0===_?"GET":_,c=o.data,O=o.timeout,f=void 0===O?6e4:O,P=o.dataType,d=void 0===P?"json":P,x=o.responseType,v=void 0===x?"text":x,y=l(o,["url","method","data","timeout","dataType","responseType"]),!a)throw new E(n,"invalid request url");if(!s)throw new E(n,"invalid request method");g=i(i({},this.defaultHeaders),t.header),u.label=3;case 3:return u.trys.push([3,5,,6]),[4,new Promise((function(t,e){var o=i({url:a,method:s,header:g,data:(0,p.serializeRequestBody)(g,c,s),timeout:f,dataType:d,responseType:v},y);if(c&&((0,p.isBuffer)(o.data)||"string"==typeof o.data)&&(null==c?void 0:c.length)>1024e4)e(new E(n,"body too large"));else{if("GET"===s){var u=o.data;if(u&&(o.data=void 0),!(0,p.isBuffer)(u)&&"string"!=typeof u){var l=Object.entries(u||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(String(r)))),t}),[]);l.length&&(u=l.join("&"))}if("string"==typeof o.data){var h=(0,p.parseURL)(a);h.search?h.search+="&".concat(o.data):h.search="?".concat(o.data),o.url=h.href,o.data=void 0}}r(i(i({},o),{success:t,fail:function(t){var r=(t||{}).data;e(j(r,n,"call container error"))}}))}}))];case 4:return m=u.sent(),[2,b(e,null,m)];case 5:return w=u.sent(),b(e,w),[3,6];case 6:return[2]}}))}))},t.prototype.initContainer=function(t){return c(this,void 0,void 0,(function(){var e,n=this;return u(this,(function(r){switch(r.label){case 0:return[4,this.wasm];case 1:return e=r.sent().initContainer,this.containerInitPromise||(this.containerInitPromise=new Promise((function(r,o){e({config:t,success:function(t){"200"!==String(t.statusCode)&&o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),r(t)},fail:function(t){o(j(t.data,"".concat(h.COMPONENT_NAME,".initContainer"),"init container fail")),n.containerInitPromise=null}})}))),[2,this.containerInitPromise]}}))}))},a([m({customInfo:{className:"Cloudbase",methodName:"callContainer"},title:"调用失败",messages:["请确认以下各项:"," 1 - 调用 callContainer() 的语法或参数是否正确"," 2 - 域名 & 路径是否存在","如果问题依然存在,建议到官方问答社区提问或寻找帮助:".concat(y)]}),s("design:type",Function),s("design:paramtypes",["function"==typeof(n=void 0!==f.ICallContainerOptions&&f.ICallContainerOptions)?n:Object,"function"==typeof(r="undefined"!=typeof Function&&Function)?r:Object]),s("design:returntype",Promise)],t.prototype,"callContainer",null),t}(),x={name:h.COMPONENT_NAME,namespace:"container",entity:function(t){if(this.containerInstance)return g(v.INVALID_OPERATION,"every cloudbase instance should has only one container object"),this.containerInstance;var e=new P(t);return this.containerInstance=e,this.callContainer=e.callContainer.bind(e),this.containerInstance}};try{cloudbase.registerComponent(x)}catch(t){}e.registerContainers=function(t){try{t.registerComponent(x)}catch(t){console.warn(t)}}},455:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeRequestBody=e.isBuffer=e.parseURL=void 0;var r=n(877),o=n(288),i=r.constants.ERRORS;function a(t){return t instanceof ArrayBuffer||ArrayBuffer.isView(t)}function s(t){var e=Object.entries(t||{}).reduce((function(t,e){var n=e[0],r=e[1];return t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))),t}),[]);if(e.length)return e.join("&")}e.parseURL=function(t){if(document){var e=document.createElement("a");return e.href=t,e}return new URL(new Request(t).url)},e.isBuffer=a,e.serializeRequestBody=function(t,e,n){void 0===n&&(n="POST");var r=e,c="Content-Type";if("object"==typeof e&&!a(e)){t[c]||t["content-type"]||(t[c]="application/json");var u=t[c]||t["content-type"];if("GET"===n)try{return s(e)||""}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data in query method, ").concat(t.message)}))}switch(u){case"application/json":try{r=JSON.stringify(e)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/json, ").concat(t.message)}))}break;case"application/x-www-form-urlencoded":try{var l=s(e);l&&(r=l)}catch(t){throw new Error(JSON.stringify({code:i.INVALID_PARAMS,msg:"[".concat(o.COMPONENT_NAME,".callContainer] invalid data with content-type: application/x-www-form-urlencoded,").concat(t.message)}))}}}return r}},584:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.loadJSExportFunction=e.getExportFunction=void 0;var s=a(n(336)),c=n(455);function u(t,e,n){return void 0===n&&(n=!1),o(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return!n&&WebAssembly.instantiateStreaming?[3,3]:[4,t];case 1:return[4,i.sent().arrayBuffer()];case 2:if(r=i.sent(),n)throw new Error("do not support *.br");return o=r,[2,WebAssembly.instantiate(o,e)];case 3:return[2,WebAssembly.instantiateStreaming(t,e)]}}))}))}function l(t,e,n){return void 0===n&&(n=document),new Promise((function(r,o){var i=n.defaultView,a=n.createElement("script");a.setAttribute("src",t),a.setAttribute("class",e),a.addEventListener("load",(function(){if(Object.prototype.hasOwnProperty.call(i,e))return r(i[e]);var n=new Error("Fail to load UMD module ".concat(e," from [").concat(t,"]."));return o(n)})),a.addEventListener("error",(function(n){var r=new Error("main bundle [".concat(e,"] load failed from [").concat(t,"]: ").concat((null==n?void 0:n.message)||""));o(r)})),n.body?n.body.appendChild(a):n.head.appendChild(a)}))}e.getExportFunction=function(t,e,n){return void 0===n&&(n="go"),o(this,void 0,void 0,(function(){var o,a,l,f;return i(this,(function(i){switch(i.label){case 0:return o=r({env:{memoryBase:0,tableBase:0,memory:new WebAssembly.Memory({initial:256})}},e),l=function(t){var e=!1,n="";try{n=(0,c.parseURL)(t).pathname}catch(e){n=t}return/\.br$/.test(n)&&(e=!0),e}(t),"go"===n&&((a=new s.default)._initedModulePromise=new Promise((function(t){a._initedModuleResolve=t})),o=r(r({},a.importObject),{env:r(r({},a.importObject.env),{exportModule:function(t){return a._initedModuleResolve(t)}})})),[4,u(fetch(t),o,l)];case 1:return f=i.sent(),"go"!==n?[3,3]:[4,Promise.race([a.run(f.instance),new Promise((function(t){return setTimeout((function(){t(null)}),500)}))])];case 2:return i.sent(),[2,{callContainer:window.callContainer,initContainer:window.initContainer}];case 3:return[2,f.instance.exports]}}))}))},e.loadJSExportFunction=function(t){return o(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:return n=(e=t||{}).vm,r=e.vender,o="cloudbase_private_link_vender",!r&&Object.prototype.hasOwnProperty.call(document.defaultView,o)?[3,2]:[4,l(r||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink-vender@0.0.2/dist/cdn/cloudbase.privatelink.vender.js",o)];case 1:i.sent(),i.label=2;case 2:return[2,l(n||"https://qbase.cdn-go.cn/lcap/lcap-resource-cdngo/-/release/_npm/@cloudbase/privatelink@0.0.1/dist/cdn/cloudbase.privatelink.vm.js","cloudbase_private_link")]}}))}))}},563:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&o(e,t,n);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.useDefaultAdapter=e.useAdapters=e.RUNTIME=void 0;var s,c=a(n(92)),u=n(962);!function(t){t.WEB="web",t.WX_MP="wx_mp"}(s=e.RUNTIME||(e.RUNTIME={})),e.useAdapters=function(t,e){for(var n=0,o=(0,u.isArray)(t)?t:[t];n<o.length;n++){var i=o[n],a=i.isMatch,s=i.genAdapter,c=i.runtime;if(a())return{adapter:r({isMatch:a},s(e)),runtime:c}}},e.useDefaultAdapter=function(){return{adapter:r({},c.genAdapter()),runtime:s.WEB}}},92:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WebRequest=e.genAdapter=void 0;var c=n(764),u=n(962),l=n(464),f=function(t){function e(e){var n=t.call(this)||this,r=e.timeout,o=e.timeoutMsg,i=e.restrictedMethods;return n.timeout=r||0,n.timeoutMsg=o||"请求超时",n.restrictedMethods=i||["get","post","upload","download"],n}return o(e,t),e.prototype.get=function(t){return this.request(i(i({},t),{method:"get"}),this.restrictedMethods.includes("get"))},e.prototype.post=function(t){return this.request(i(i({},t),{method:"post"}),this.restrictedMethods.includes("post"))},e.prototype.put=function(t){return this.request(i(i({},t),{method:"put"}))},e.prototype.upload=function(t){var e=t.data,n=t.file,r=t.name,o=t.method,a=t.headers,s=void 0===a?{}:a,c={post:"post",put:"put"}[null==o?void 0:o.toLowerCase()]||"put",u=new FormData;return"post"===c?(Object.keys(e).forEach((function(t){u.append(t,e[t])})),u.append("key",r),u.append("file",n),this.request(i(i({},t),{data:u,method:c}),this.restrictedMethods.includes("upload"))):this.request(i(i({},t),{method:"put",headers:s,body:n}),this.restrictedMethods.includes("upload"))},e.prototype.download=function(t){return a(this,void 0,Promise,(function(){var e,n,r,o;return s(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.get(i(i({},t),{headers:{},responseType:"blob"}))];case 1:return e=a.sent().data,n=window.URL.createObjectURL(new Blob([e])),r=decodeURIComponent(new URL(t.url).pathname.split("/").pop()||""),(o=document.createElement("a")).href=n,o.setAttribute("download",r),o.style.display="none",document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o),[3,3];case 2:return a.sent(),[3,3];case 3:return[2,new Promise((function(e){e({statusCode:200,tempFilePath:t.url})}))]}}))}))},e.prototype.fetch=function(t){var e;return a(this,void 0,Promise,(function(){var n,r,o,c,u,l,f,d,p,h,v,y,b,g=this;return s(this,(function(m){switch(m.label){case 0:return n=new AbortController,r=t.url,o=t.enableAbort,c=void 0!==o&&o,u=t.stream,l=void 0!==u&&u,f=t.signal,d=t.timeout,p=t.shouldThrowOnError,h=void 0===p||p,v=null!=d?d:this.timeout,f&&(f.aborted&&n.abort(),f.addEventListener("abort",(function(){return n.abort()}))),y=null,c&&v&&(y=setTimeout((function(){console.warn(g.timeoutMsg),n.abort(new Error(g.timeoutMsg))}),v)),[4,fetch(r,i(i({},t),{signal:n.signal})).then((function(t){return a(g,void 0,void 0,(function(){var e,n,r;return s(this,(function(o){switch(o.label){case 0:return clearTimeout(y),h?t.ok?(e=t,[3,3]):[3,1]:[3,4];case 1:return r=(n=Promise).reject,[4,t.json()];case 2:e=r.apply(n,[o.sent()]),o.label=3;case 3:return[2,e];case 4:return[2,t]}}))}))})).catch((function(t){return clearTimeout(y),Promise.reject(t)}))];case 1:return b=m.sent(),[2,{data:l?b.body:(null===(e=b.headers.get("content-type"))||void 0===e?void 0:e.includes("application/json"))?b.json():b.text(),statusCode:b.status,header:b.headers,response:b}]}}))}))},e.prototype.request=function(t,e){var n=this;void 0===e&&(e=!1);var r=String(t.method).toLowerCase()||"get";return new Promise((function(o){var i=t.url,a=t.headers,s=void 0===a?{}:a,c=t.data,f=t.responseType,d=t.withCredentials,p=t.body,h=t.onUploadProgress,v=(0,u.formatUrl)((0,l.getProtocol)(),i,"get"===r?c:{}),y=new XMLHttpRequest;y.open(r,v),f&&(y.responseType=f);var b,g,m=t.signal;m&&(m.aborted?y.abort():m.addEventListener("abort",(function(){return y.abort()}),{once:!0})),Object.keys(s).forEach((function(t){y.setRequestHeader(t,s[t])})),h&&y.upload.addEventListener("progress",h),y.onreadystatechange=function(){var t={};if(4===y.readyState){var e=y.getAllResponseHeaders().trim().split(/[\r\n]+/),n={};e.forEach((function(t){var e=t.split(": "),r=e.shift().toLowerCase(),o=e.join(": ");n[r]=o})),t.header=n,t.statusCode=y.status;try{t.data="blob"===f?y.response:JSON.parse(y.responseText)}catch(e){t.data="blob"===f?y.response:y.responseText}clearTimeout(b),o(t)}},e&&n.timeout&&(b=setTimeout((function(){console.warn(n.timeoutMsg),y.abort()}),n.timeout)),g=(0,u.isFormData)(c)?c:"application/x-www-form-urlencoded"===s["content-type"]?(0,u.toQueryString)(c):p||(c?JSON.stringify(c):void 0),d&&(y.withCredentials=!0),y.send(g)}))},e}(c.AbstractSDKRequest);e.WebRequest=f,e.genAdapter=function(){return{type:"default",root:window,reqClass:f,wsClass:WebSocket,localStorage:localStorage}}},464:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMMUNITY_SITE_URL=e.IS_DEBUG_MODE=e.getProtocol=e.setProtocol=e.getSdkName=e.setSdkName=void 0;var n="@cloudbase/js-sdk";e.setSdkName=function(t){n=t},e.getSdkName=function(){return n};var r="https:";e.setProtocol=function(t){r=t},e.getProtocol=function(){return r},e.IS_DEBUG_MODE=!1,e.COMMUNITY_SITE_URL="https://support.qq.com/products/148793"},519:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERRORS=void 0,e.ERRORS={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"}},778:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.OATUH_LOGINTYPE=void 0,o(n(464),e),o(n(519),e),e.OATUH_LOGINTYPE="constants"},517:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.catchErrorsDecorator=void 0;var i=n(962),a=n(778),s=!1;"undefined"!=typeof navigator&&navigator.userAgent&&(s=-1!==navigator.userAgent.indexOf("Firefox"));var c=s?/(\.js\/)?__decorate(\$\d+)?<@.*\d$/:/(\/\w+\.js\.)?__decorate(\$\d+)?\s*\(.*\)$/,u=/https?:\/\/.+:\d*\/.*\.js:\d+:\d+/;function l(t){var e=t.err,n=t.className,r=t.methodName,o=t.sourceLink;if(!o)return null;var i,a=e.stack.split("\n"),c=s?/^catchErrorsDecorator\/<\/descriptor.value@.*\d$/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]\\s*\\(.*\\)$")),l=s?/^catchErrorsDecorator\/<\/descriptor.value/:new RegExp("".concat(n,"\\.descriptor.value\\s*\\[as\\s").concat(r,"\\]")),f=a.findIndex((function(t){return c.test(t)}));if(-1!==f){var d=a.filter((function(t,e){return e>f}));d.unshift(a[f].replace(l,"".concat(n,".").concat(r)).replace(u,o)),(i=new Error).stack="".concat(s?"@debugger":"Error","\n").concat(d.join("\n"))}return i}e.catchErrorsDecorator=function(t){var e=t.mode,n=void 0===e?"async":e,s=t.customInfo,f=void 0===s?{}:s,d=t.title,p=t.messages,h=void 0===p?[]:p;return function(t,e,s){if(a.IS_DEBUG_MODE){var p=f.className||t.constructor.name,v=f.methodName||e,y=s.value,b=function(){var t="",e=(new Error).stack.split("\n"),n=e.findIndex((function(t){return c.test(t)}));if(-1!==n){var r=u.exec(e[n+1]||"");t=r?r[0]:""}return t}();s.value="sync"===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=l({err:new Error,className:p,methodName:v,sourceLink:b});try{return y.apply(this,t)}catch(t){var r=t,o=t.message,a=t.error,s=t.error_description,c={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:t}]};if(o&&/^\{.*\}$/.test(o)){var u=JSON.parse(o);c.subtitle=o,u.code&&(n?(n.code=u.code,n.msg=u.msg):(t.code=u.code,t.message=u.msg),r=n||t,c.content=h.map((function(t){return{type:"info",body:t}})))}throw a&&s&&(c.subtitle=s,n?(n.code=a,n.msg=s):(t.code=a,t.message=s),r=n||t,c.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(c),r}}:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r(this,void 0,void 0,(function(){var e,n,r,a,s,c,u,f;return o(this,(function(o){switch(o.label){case 0:e=l({err:new Error,className:p,methodName:v,sourceLink:b}),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,y.apply(this,t)];case 2:return[2,o.sent()];case 3:throw n=o.sent(),r=n,a=n.message,s=n.error,c=n.error_description,u={title:d||"".concat(p,".").concat(v," failed"),content:[{type:"error",body:n}]},a&&/^\{.*\}$/.test(a)&&(f=JSON.parse(a),u.subtitle=f,f.code&&(e?(e.code=f.code,e.message=f.msg):(n.code=f.code,n.message=f.msg),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}})))),s&&c&&(u.subtitle=c,e?(e.code=s,e.msg=c):(n.code=s,n.message=c),r=e||n,u.content=h.map((function(t){return{type:"info",body:t}}))),(0,i.printGroupLog)(u),r;case 4:return[2]}}))}))}}}}},260:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(517),e)},877:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.langEvent=e.AbortController=e.jwt=e.helpers=e.utils=e.events=e.cache=e.adapters=e.constants=void 0;var s=i(n(778));e.constants=s;var c=i(n(563));e.adapters=c;var u=i(n(865));e.cache=u;var l=i(n(940));e.events=l;var f=i(n(991));e.langEvent=f;var d=i(n(962));e.utils=d;var p=i(n(260));e.helpers=p;var h=a(n(829));e.AbortController=h.default;var v={decode:a(n(107)).default};e.jwt=v},829:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){var t=this;this.listeners=[],this.signal={aborted:!1,addEventListener:function(e,n){"abort"===e&&t.listeners.push(n)}}}return t.prototype.abort=function(){this.signal.aborted||(this.signal.aborted=!0,this.listeners.forEach((function(t){return t()})))},t}();e.default=n},865:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.CloudbaseCache=void 0;var s=n(764),c=n(962),u=n(778),l=function(t){function e(e){var n=t.call(this)||this;return n.root=e,e.tcbCacheObject||(e.tcbCacheObject={}),n}return o(e,t),e.prototype.setItem=function(t,e){this.root.tcbCacheObject[t]=e},e.prototype.getItem=function(t){return this.root.tcbCacheObject[t]},e.prototype.removeItem=function(t){delete this.root.tcbCacheObject[t]},e.prototype.clear=function(){delete this.root.tcbCacheObject},e}(s.AbstractStorage),f=function(){function t(t){this.keys={};var e=t.persistence,n=t.platformInfo,r=void 0===n?{}:n,o=t.keys,i=void 0===o?{}:o;this.platformInfo=r,this.storage||(this.persistenceTag=this.platformInfo.adapter.primaryStorage||e,this.storage=function(t,e){switch(t){case"local":default:return e.localStorage?e.localStorage:((0,c.printWarn)(u.ERRORS.INVALID_PARAMS,"localStorage is not supported on current platform"),new l(e.root));case"none":return new l(e.root)}}(this.persistenceTag,this.platformInfo.adapter),this.keys=i)}return Object.defineProperty(t.prototype,"mode",{get:function(){return this.storage.mode||"sync"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"persistence",{get:function(){return this.persistenceTag},enumerable:!1,configurable:!0}),t.prototype.setStore=function(t,e,n){if("async"!==this.mode){if(this.storage)try{var r={version:n||"localCachev1",content:e};this.storage.setItem(t,JSON.stringify(r))}catch(t){throw new Error(JSON.stringify({code:u.ERRORS.OPERATION_FAIL,msg:"[".concat((0,u.getSdkName)(),"][").concat(u.ERRORS.OPERATION_FAIL,"]setStore failed"),info:t}))}}else(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use setStoreAsync insteed")},t.prototype.setStoreAsync=function(t,e,n){return i(this,void 0,void 0,(function(){var r;return a(this,(function(o){switch(o.label){case 0:if(!this.storage)return[2];o.label=1;case 1:return o.trys.push([1,3,,4]),r={version:n||"localCachev1",content:e},[4,this.storage.setItem(t,JSON.stringify(r))];case 2:return o.sent(),[3,4];case 3:return o.sent(),[2];case 4:return[2]}}))}))},t.prototype.getStore=function(t,e){var n;if("async"!==this.mode){try{if("undefined"!=typeof process&&(null===(n={IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0})||void 0===n?void 0:n.tcb_token))return{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token;if(!this.storage)return""}catch(t){return""}e=e||"localCachev1";var r=this.storage.getItem(t);return r&&r.indexOf(e)>=0?JSON.parse(r).content:""}(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},t.prototype.getStoreAsync=function(t,e){var n;return i(this,void 0,void 0,(function(){var r;return a(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n={IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0})||void 0===n?void 0:n.tcb_token))return[2,{IS_MP_BUILD:!1,IS_BROWSER_BUILD:!0}.tcb_token];if(!this.storage)return[2,""]}catch(t){return[2,""]}return e=e||"localCachev1",[4,this.storage.getItem(t)];case 1:return(r=o.sent())&&r.indexOf(e)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},t.prototype.removeStore=function(t){"async"!==this.mode?this.storage.removeItem(t):(0,c.printWarn)(u.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},t.prototype.removeStoreAsync=function(t){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.storage.removeItem(t)];case 1:return e.sent(),[2]}}))}))},t}();e.CloudbaseCache=f},940:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.removeEventListener=e.activateEvent=e.addEventListener=e.CloudbaseEventEmitter=e.IErrorEvent=e.CloudbaseEvent=void 0;var a=n(962),s=function(t,e){this.data=e||null,this.name=t};e.CloudbaseEvent=s;var c=function(t){function e(e,n){var r=t.call(this,"error",{error:e,data:n})||this;return r.error=e,r}return o(e,t),e}(s);e.IErrorEvent=c;var u=function(){function t(){this.listeners={}}return t.prototype.on=function(t,e){return function(t,e,n){n[t]=n[t]||[],n[t].push(e)}(t,e,this.listeners),this},t.prototype.off=function(t,e){return function(t,e,n){if(null==n?void 0:n[t]){var r=n[t].indexOf(e);-1!==r&&n[t].splice(r,1)}}(t,e,this.listeners),this},t.prototype.fire=function(t,e){if((0,a.isInstanceOf)(t,c))return console.error(t.error),this;var n=(0,a.isString)(t)?new s(t,e||{}):t,r=n.name;if(this.listens(r)){n.target=this;for(var o=0,u=this.listeners[r]?i([],this.listeners[r],!0):[];o<u.length;o++)u[o].call(this,n)}return this},t.prototype.listens=function(t){return this.listeners[t]&&this.listeners[t].length>0},t}();e.CloudbaseEventEmitter=u;var l=new u;e.addEventListener=function(t,e){l.on(t,e)},e.activateEvent=function(t,e){void 0===e&&(e={}),l.fire(t,e)},e.removeEventListener=function(t,e){l.off(t,e)}},991:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LANG_CHANGE_EVENT=e.bus=void 0;var r=n(940);e.bus=new r.CloudbaseEventEmitter,e.LANG_CHANGE_EVENT="lang_change"},962:function(t,e,n){"use strict";var r=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.parseCaptcha=e.parseQueryString=e.transformPhone=e.sleep=e.printGroupLog=e.throwError=e.printInfo=e.printError=e.printWarn=e.execCallback=e.createPromiseCallback=e.removeParam=e.getHash=e.getQuery=e.toQueryString=e.formatUrl=e.generateRequestId=e.genSeqId=e.isFormData=e.isInstanceOf=e.isNull=e.isPalinObject=e.isUndefined=e.isString=e.isArray=void 0;var o=n(778);e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isString=function(t){return"string"==typeof t},e.isUndefined=function(t){return void 0===t},e.isPalinObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)},e.isNull=function(t){return"[object Null]"===Object.prototype.toString.call(t)},e.isInstanceOf=function(t,e){return t instanceof e},e.isFormData=function(t){return"[object FormData]"===Object.prototype.toString.call(t)},e.genSeqId=function(){return Math.random().toString(16).slice(2)},e.generateRequestId=function(){var t=(new Date).getTime(),e=(null===Date||void 0===Date?void 0:Date.now)&&1e3*Date.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),("x"===n?r:7&r|8).toString(16)}))},e.formatUrl=function(t,e,n){void 0===n&&(n={});var r=/\?/.test(e),o="";return Object.keys(n).forEach((function(t){""===o?!r&&(e+="?"):o+="&",o+="".concat(t,"=").concat(encodeURIComponent(n[t]))})),/^http(s)?:\/\//.test(e+=o)?e:"".concat(t).concat(e)},e.toQueryString=function(t){void 0===t&&(t={});var e=[];return Object.keys(t).forEach((function(n){e.push("".concat(n,"=").concat(encodeURIComponent(t[n])))})),e.join("&")},e.getQuery=function(t,e){if("undefined"==typeof window)return!1;var n=e||decodeURIComponent(window.location.search),r=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""},e.getHash=function(t){if("undefined"==typeof window)return"";var e=window.location.hash.match(new RegExp("[#?&/]".concat(t,"=([^&#]*)")));return e?e[1]:""},e.removeParam=function(t,e){var n=e.split("?")[0],r=[],o=-1!==e.indexOf("?")?e.split("?")[1]:"";if(""!==o){for(var i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===t&&r.splice(i,1);n="".concat(n,"?").concat(r.join("&"))}return n},e.createPromiseCallback=function(){var t={};if(!Promise){(t=function(){}).promise={};var e=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(t.promise,"then",{get:e}),Object.defineProperty(t.promise,"catch",{get:e}),t}var n=new Promise((function(e,n){t=function(t,r){return t?n(t):e(r)}}));return t.promise=n,t},e.execCallback=function(t,e,n){if(void 0===n&&(n=null),t&&"function"==typeof t)return t(e,n);if(e)throw e;return n},e.printWarn=function(t,e){console.warn("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.printError=function(t,e){console.error({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)})},e.printInfo=function(t,e){console.log("[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e))},e.throwError=function(t,e){throw new Error(JSON.stringify({code:t,msg:"[".concat((0,o.getSdkName)(),"][").concat(t,"]:").concat(e)}))},e.printGroupLog=function(t){var e,n=t.title,r=t.subtitle,o=void 0===r?"":r,i=t.content,a=void 0===i?[]:i,s=t.printTrace,c=void 0!==s&&s,u=t.collapsed;void 0!==u&&u?(console.groupCollapsed||console.error)(n,o):(console.group||console.error)(n,o);for(var l=0,f=a;l<f.length;l++){var d=f[l],p=d.type,h=d.body;switch(p){case"info":console.log(h);break;case"warn":console.warn(h);break;case"error":console.error(h)}}c&&(console.trace||console.log)("stack trace:"),null===(e=console.groupEnd)||void 0===e||e.call(console)},e.sleep=function(t){return void 0===t&&(t=0),new Promise((function(e){return setTimeout(e,t)}))},e.transformPhone=function(t){return"+86".concat(t)},e.parseQueryString=function(t){t=t.replace(/^\?/,"");var e={};return t.split("&").forEach((function(t){var n=t.split("="),r=n[0],o=n[1];r=decodeURIComponent(r),o=decodeURIComponent(o),r&&(e[r]?Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]:e[r]=o)})),e},e.parseCaptcha=function(t){var n={},o=t.match(/^(data:.*?)(\?[^#\s]*)?$/);if(o){t=o[1];var i=o[2];i&&(n=(0,e.parseQueryString)(i))}var a=n.token,s=r(n,["token"]);return/^data:/.test(t)&&!a?{error:"invalid_argument",error_description:"invalid captcha data: ".concat(t)}:a?{state:s.state,token:a,captchaData:t}:{error:"unimplemented",error_description:"need to impl captcha data"}}},388:function(t){t.exports={}},764:function(t){"use strict";t.exports=require("@cloudbase/adapter-interface")},107:function(t){"use strict";t.exports=require("jwt-decode")}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}();var r=n(863);module.exports=r}();
2
2
  //# sourceMappingURL=index.js.map