pages-index-detail.ea4484f4.js
127.3 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-detail"],{"0745":function(e,t,n){var r=n("d642");"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("4f06").default;i("2698832e",r,!0,{sourceMap:!1,shadowMode:!1})},"0b58":function(e,t,n){"use strict";var r;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.show?n("v-uni-view",{staticClass:"u-loading-icon",class:[e.vertical&&"u-loading-icon--vertical"],style:[e.$u.addStyle(e.customStyle)]},[e.webviewHide?e._e():n("v-uni-view",{ref:"ani",staticClass:"u-loading-icon__spinner",class:["u-loading-icon__spinner--"+e.mode],style:{color:e.color,width:e.$u.addUnit(e.size),height:e.$u.addUnit(e.size),borderTopColor:e.color,borderBottomColor:e.otherBorderColor,borderLeftColor:e.otherBorderColor,borderRightColor:e.otherBorderColor,"animation-duration":e.duration+"ms","animation-timing-function":"semicircle"===e.mode||"circle"===e.mode?e.timingFunction:""}},["spinner"===e.mode?e._l(e.array12,(function(e,t){return n("v-uni-view",{key:t,staticClass:"u-loading-icon__dot"})})):e._e()],2),e.text?n("v-uni-text",{staticClass:"u-loading-icon__text",style:{fontSize:e.$u.addUnit(e.textSize),color:e.textColor}},[e._v(e._s(e.text))]):e._e()],1):e._e()},a=[]},"0d9a":function(e,t,n){"use strict";n.r(t);var r=n("0b58"),i=n("2431");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("8434");var o,s=n("f0c5"),u=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,"8d43a062",null,!1,r["a"],o);t["default"]=u.exports},1367:function(e,t,n){"use strict";n.r(t);var r=n("dfc8"),i=n("8854");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("f37b");var o,s=n("f0c5"),u=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,"2dcc20f1",null,!1,r["a"],o);t["default"]=u.exports},"14ba":function(e,t,n){"use strict";n("d3b7"),Object.defineProperty(t,"__esModule",{value:!0}),t.request=t.baseURL=void 0;var r="http://yuanjie.n.broing.cn/api/";t.baseURL=r;var i=function(e){return new Promise((function(t,n){uni.request({url:r+e.url,method:e.method||"GET",data:e.data||{},header:{"Content-Type":"application/x-www-form-urlencoded",token:uni.getStorageSync("token")||""},success:function(e){console.log(e,uni.getStorageSync("token")),1==e.data.code?t(e.data.data):(401==e.data.code&&(uni.navigateTo({url:"/login/login"}),uni.clearStorageSync()),n(e.data.msg))},fail:function(e){console.log(e),n(e)}})}))};t.request=i},"1d33":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={appid:"__UNI__D80DC8B"};t.default=r},2431:function(e,t,n){"use strict";n.r(t);var r=n("f905"),i=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=i.a},"257e":function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},"262e":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=i(n("b380"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,r.default)(e,t)}},2909:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=s(n("6005")),i=s(n("db90")),a=s(n("06c5")),o=s(n("3427"));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){return(0,r.default)(e)||(0,i.default)(e)||(0,a.default)(e)||(0,o.default)()}},"2caf":function(e,t,n){"use strict";n("4ae1"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var r=o(n("7e84")),i=o(n("d967")),a=o(n("99de"));function o(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=(0,i.default)();return function(){var n,i=(0,r.default)(e);if(t){var o=(0,r.default)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return(0,a.default)(this,n)}}},3039:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAQAAAAkGDomAAAAAXNSR0IArs4c6QAABXpJREFUeNrt2s+rXGcdx/HX85wzc3/fJrcJaXKJpS3RUi1d+HPRunJTSxO1pe2iQhV0oW4sov4LCu4sSMVWSauWSJEotKAbLW4sLmpKF1IqSZrkXpIbb5PeXzPnnEc4CGOZe5h7Qyczi/t+mAMH5vnynu/zeR7ODGOPPUZM0EQUENBMklSNlYNIM4PrNavlcjslE9wwg+sF/XpUotssmJRpIsm976IVSZDQo753uyPKHeonlZa1Xr1mQXK5uxx3r33amkjaVvzJS66KKgDqu+gTnvQZHZHB1HMmXO6vl/e9jWOe8JAF+YAUle5xzLQXLKtn6lU55Ic+LwmCQVRyEzIdH3fMrJOWevWyvk9+n2963FEToojQOJLcjGn/cFGUAEEl+KynHLEuEzSPKKJtzowJbZMmRX+31KuXg57gPt/wSN3sDFGGZoJSR6F/+ZmWqwYua7fuXguVWFebNonQv8RBhY/6gnkXTQkiSs0kwYpXnEMCkLR0veWMaUHSTEcyYcakgHpFTCoVSNsL3urTdfkcSXTZeVGUGnbxur/4jVWZUo8ClzztKffbEht6n7vmgHu1FaJQvypFL/f9gix6QLQh1tffesV1qVEws2HZNVR9nU3e9qw/qgQ9ej0urPqkJ3V0dbTNUC/4liQ0C846rKWqla74vdfkCoMP1tSnQHTeuYbuJcw57ohNdDAls2VTCdsLJpQ2QVRZ1UEmoZmk1JzQuK0ehUU/cNycdVFbW7SlXi1o6mDv2lMulG6MJDVkr+tO3/FFczbVhxI61hTaTR3sJ9TjwyaTdH3M15ywr85fbto5y+Ytakn6iG4emVLlqK973JwNWyZMue7XTroiiKMWhEO+61EzNpBrueq0n3vDvEzF6ASDltKdvu9ht+jIlNre8wc/smq+J7ejDA4xe1+qs1fITVnzO89YgtEKZkrq7D1WL25hQtuqU553ru5swegEe9k7Uetl/pc9z3pHW4UwKsHeufftOnubMqWpOns/tizTlcGoBJuz91PLIEkDBEeUvfOioEQYIDii7LUUKgaTjyx7GI3g4Oztinw02duF4LhmDyAfefYSSBKCpJKGJxjsPnsBQVarVaJJOQJA/JD1OOSrnvjA895Lnquzlyn1U+GS13HAogmvOYtqGB3MFKZ9y6Nmre04e0lw1ouOus+Mf3rOBZlyeIIPusNSQ/aaBHnT0+4RvWUJ1TA3SVDYMG3G+055xrJBJFSWXEYJEsPIYInrXvSOO+x32Que18ve4N1fqeQCDKeDJTadNOcrrvirXzm343MvKQQUDE8wgRU/8TOlTZvo7nb+MAUB1q2DKKrskuELBpkMlULa1TxIwxdMCsUNzduWaDwIIIj9u3jU9H6OO2TDBfX9eAnCYY85Zs0bXrUiSOMjGFX2OeF79otWJC/bFKRxyWDAXR7WsmZd7rhjiOPTwYBJczoguc0swvgIJnStCyIqW0qk8TlmAoLs/w+acTwHMd4H9Z7gnuDYsie4Jzhq4sBn3EZGK5hUEpJhk0Da/be6CrSG3sNcKfR067GtYEKhI4kKLbebRaEwfFr2iUpRMCFrfh7sWFVqqbDgIV1dlSgZDkElmPOgBSTRpkvWkLbv4GVnfM6kTaXgyx7wHoJhEZUqH7GgUCnNW/c3F7YXrGSWnPaIg0q5ZMpRi4ZPJgmSQkvX61ZE/YKISv/2qgP2W5GL9Rg6dYwo3eqaP/sXoqJn3yOh9K5b3O2gtuTmkGmbNes/XvYLZyUk+gWJKisuaTtoSyWTDJ9SYc27TvmlN6XaAkDQTzTvbp9yv8O2BMNmyzVnnPa2QgkM/otosGDRrMLwBUsbrlpWiahgUAejpHRzyVGpGCwIoR43j6Syxx5jyX8BQcIzfN594JAAAAAASUVORK5CYII="},3427:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},"34c1":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABlVJREFUWEetmFWopVUUx393xu5uxVb0wcDufnEUE+zCRAXBwH4wsH1QQREdc1QwMV5sxVaMBwd7dOzWsWuU32Gty57vnvN9+1zccDn3nrv32v+94r9ihPGtCcAIMBP4t0PEMHvHiPKSYZb7E1ieE8B8wELxOTvwI/A58Fc8wr2ec2/No0Yx1QJUsEvhrkWArYENgHWBVYA5AoQy1erPwIfAa8AL8SnofGQpb6CSagCW4FYEjgC2BdYG/gH+Ds3MFpd7mQB9jP9To673gPuAa4Bv40wnyC6AaZJ5gaOAY0N7AtN88wB/AJ8B3wC/BbC5gEWBFYA5gV8BH+DPxwHyFuCnwux9tdgGMMGtBlwWJlWgF6qZd4AHgZeATwqAgp8bWAxYHtgY2BlYKwD6oPmBR4ATgWltIAcBnBjm2xSYDCwRWlgAeBy4HHgu9tQEmY/dFTgc2AT4HVDLXwOHAc8Deecs8voBzI0KuglYME5ovguBG8OsZWTqc026yWBIf3S/mj0AOAXwsf7PiD84AmkMyCbAjMBVgQeAheNlRt+RhZDy0hoNusfLXbqAj78WWDp89jtgd+CtprlLgAlOTrsZ2CqEfQHsB7wZPuQFg8i5SUdN8MmFypAFbgOWjEh/FtgX+CXYoHdHCTCD4jjgAmBGbD4U8HBfHykQ5ANTbluGSVlbhDKkIk1+TgRkYhkFmMKNvCciAj10ZlBCF7jEuVlo45mKAEqZx4RvyxBG+A4R2T1MqUH5Seo4HTg5hMv+ewB/lirv43D5Wh3dIPLvE4DbOzgulSJt3QGoTUFfDZyRFivzow57P2C20Ec09V1DmPaKCCTfcF2cL83eL5jycWamKZEu3wZ2CwqaoIBUtWR6a3CU0bRTZIuuKM3zGwU/+rhTg9tGfalDiHlc4l49spPWMC1OLLlKBz0+APv7pV1pqM+luopLd6ld+Qhd66w4m2YeSR90k4jlJ7/bC3iqwrzJb+sHXeivgjRTeF5tdq20gLSmS7leAXbxfAI07bwMLAt8EAAtldpMlIK3BJ4OwRlQZh0D7LEKK+Qdlmx3A8tFXtdlZiTAlSLHmjleBPaMeq7NyVOwFcvZIdhLjEr/Z459uAJg3mFKFaA1ppllG2B6AlwnTGyJZDEgQM3TFYVpYvduDtwZZyyv5MQvK2TkHQaKADW1AA3aqQnQUuihqPU0lwC7+C99KznUNHV9JH9ZYMfKYEmAuowAt4uCVqp5IwFqpicDoA6q/5jqajSYey4KHrSSlqTl0ZpV1gACtH78PoBOS4DmQQtPU53Fpxp8v8J/EoCvt/oxmi1GT4qMUJMi05dNEEbxysCnwIayQUkzXuCXfidATd11Qb5eULKAju6Fnjcfd50vfVjfU4MWGaZZTTyzJOrzARO3PnUucEmFBvP1Vt7mU/82QNTEq+HXcmING6h12cCAuzJ+7xF1vlLEVtBeYL+hkxsobSsB7h1n9T+/S6rZPlihS5NWTlLSmtEKWHUbtL1Ul5csHlSzRgDbP0qvNrJOzdgnnxadnN2eZ/QjNWGLOUiDCdzMdVUoywRh/2IV3ysWSj9IM6tmfWifqNFqorkmYss9Jf/dE2lWwNYA4ujRVwLMzWaUR8NEOr5ViYm7y0TpKk2QbUVDyjwaOC8qJ3trSy8/e5gSoILTlPaqOqs8qLkOGiIia7WY4Mw+NwAOBqQ63URTjyn5FZxadLPNjBWuAE1X2TQpeKjhTwNxalrNZtO0VFhIWjuwrWkqtWg03RuZxdc020731pRSJT7lCLDZdvq3mcPyyvnNLP5emrjMCikkG3f3afKLo+q2nMoHpcBBjXupcennkPBtm3jXUI17E2SOPqSgHFfI8vYc9i85juvyPV3D6kb/Ngh8rIOnr8Yz+sjL0lGNbEPfHqUcHk0NMrV+dGKV0y3B5PDI4tPCc1L0G1JHDo+suAX87niGR02QUo4OLCU4sdLJ/VELZpvpAVAt+7AEuEwxfjNbCN5az0h19OEUobWx6ueDTXOV4wwLWueEzlGc37iMdDWTQeB3+qMP0AX8n8AcnTgUENhH/9cAs9RkXuzl9tDrBfs7AtYNnOmUAaNmLdlejyZIk6q9DC4/O324RoOlRsvcnVGr5jSfoC231Kjz6R/iswTh3n6juoFBNizAFJRAa8Zww+wdA/Q/A5zNRJSBif4AAAAASUVORK5CYII="},4478:function(e,t,n){"use strict";n("4ae1"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=a(n("b380")),i=a(n("d967"));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,n,a){return(0,i.default)()?t.default=o=Reflect.construct:t.default=o=function(e,t,n){var i=[null];i.push.apply(i,t);var a=Function.bind.apply(e,i),o=new a;return n&&(0,r.default)(o,n.prototype),o},o.apply(null,arguments)}},4766:function(e,t,n){"use strict";var r=n("a91b"),i=n.n(r);i.a},5377:function(e,t,n){var r=n("83ab"),i=n("9bf2"),a=n("ad6d"),o=n("9f7f").UNSUPPORTED_Y;r&&("g"!=/./g.flags||o)&&i.f(RegExp.prototype,"flags",{configurable:!0,get:a})},"53ca":function(e,t,n){"use strict";function r(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?t.default=r=function(e){return typeof e}:t.default=r=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},5604:function(e,t,n){"use strict";n.r(t);var r=n("a85c"),i=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=i.a},"5d29":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIoSURBVHgB7ZdBTxNBFMf/b3ZXU3SlamIkHiBRzj3oRYPpoUQjF4K900TvHPwAHPwAJvQbLHcwqCGa0AMh8eaBb7BelERNWg0mwM4MMxN2KWyXdmmZXvhdutlO+3775u3MG5JSOhgiDEPmUsDN+iKaKZdZFM1CiLIEiuYmISRi28wvLGFl43s/42MoVYS1l0X+Y+cdpJzHGRCjgPkjb3H9RivX+FMiJwT25ioT7r//DXU5jh4gIJTmo/fxbPRapV3iRA3kCa5RwSfyjhet3VWd5ZRA9GxqMc+fnRclURI/dxZSAiR4DZaQAgtxFowAfzE1CwtP36ZQjH79KSUCxEUJlmHRQTkRkNIUk23GEwEiasI61EoElEEI2xzFNALCcbZhGXYUM1kJ+fST37o6YQEChWzj6wMjktxkrA5LCCY/xNeJABu7owRsFCM1Xf/2UkoAwWrTRhaIoY6VT8lmlNqOxfTjb3q9xgXQPvcxqY7owL9ZvYipMMFHb1VS9zt1xbq7of39BgaIKIw89D42Uq97x57QXd/cFI77GoPCdV91Cp4poPG+bAXwnD6nQ/3Wu1J1Pm8tZ47odjDZm5tRbVpTTYfMtV3rOeeFQjXryWO6tuVX36+HkV+sqLV7Gb1CtMbuTT7qFtwMzXM048+f1sD5YnY2VMpd581ZKe9LQKOnxNv9Oy+FqB2LkFnE2Nj9OoIgV81QP4dTkxFwOHcn1/IGHojAIBj62fAQPPnclXS6TSoAAAAASUVORK5CYII="},6005:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=i(n("6b75"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e))return(0,r.default)(e)}},"64e4":function(e,t,n){"use strict";var r;n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"uni-stat__select"},[e.label?n("span",{staticClass:"uni-label-text hide-on-phone"},[e._v(e._s(e.label+":"))]):e._e(),n("v-uni-view",{class:{"uni-stat__actived":e.current}},[n("v-uni-view",{staticClass:"uni-select"},[n("v-uni-view",{staticClass:"uni-select__input-box",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleSelector.apply(void 0,arguments)}}},[e.current?n("v-uni-view",{staticClass:"uni-select__input-text"},[e._v(e._s(e.current))]):n("v-uni-view",{staticClass:"uni-select__input-text uni-select__input-placeholder"},[e._v(e._s(e.typePlaceholder))]),e.current&&e.clear?n("uni-icons",{attrs:{type:"clear",color:"#e1e1e1",size:"18"},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.clearVal.apply(void 0,arguments)}}}):n("uni-icons",{attrs:{type:e.showSelector?"top":"bottom",size:"14",color:"#999"}})],1),e.showSelector?n("v-uni-view",{staticClass:"uni-select--mask",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.toggleSelector.apply(void 0,arguments)}}}):e._e(),e.showSelector?n("v-uni-view",{staticClass:"uni-select__selector"},[n("v-uni-view",{staticClass:"uni-popper__arrow"}),n("v-uni-scroll-view",{staticClass:"uni-select__selector-scroll",attrs:{"scroll-y":"true"}},[0===e.mixinDatacomResData.length?n("v-uni-view",{staticClass:"uni-select__selector-empty"},[n("v-uni-text",[e._v(e._s(e.emptyTips))])],1):e._l(e.mixinDatacomResData,(function(t,r){return n("v-uni-view",{key:r,staticClass:"uni-select__selector-item",on:{click:function(n){arguments[0]=n=e.$handleEvent(n),e.change(t)}}},[n("v-uni-text",[e._v(e._s(e.formatItemName(t)))])],1)}))],2)],1):e._e()],1)],1)],1)},a=[]},"66c6":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABWtJREFUWEfNmHeIJUUQxn9nzhkMGM8IYgAVwQQmDKh3nopiQBFEjKCiGFAwJzCgKPqHIogJPVA5MQcMmAMqh/HMKGI6z6x38luqlt7ZmXnz3lsXHzx29k1319dfVX1V3VP4n3+m9IHPsfnNaQviYX7DOgvF76Ud5+S3p/leADXgmH96rgQJJoc2gS6Xck4r2DaAaVBDjlsD2BJYB1gW8PevgHeA94HfKptYBNgc2BhYDVgcmAt8CrwZcwVX2hnHQxNAJwlgOWA/4MAwthjgd+FY6Y9g93PgbuBeYCngIGDv2IxjFw0gesI5fwFvALcBj8Xm0uYYkHUAc+BWwMXAdgU7Ghf438GqhjX2ZwD7MMCsC/waz45xvOB8FrBsy54svwScD7wYmxgTGlWACe7IALcE8DuwAvAl8BrwSbjKsbp7w2BXg4LQgIb9vAu8B3wNzANWAdYGNgE2iHXc9C/AGcCdVZAlwASnO28OBoybb4HrgCeAj2oSZnlgJ+B4YOtg6FngWuB14MdKYGlzTWD/mLNSeEGgx0SYjLo7AfpXBjYFZkbs6Y6XgWMBYywlJjMv7WaG+/4QQNZlQub9LZXA9f1fhjNzZfLyCCPD4CdgX+CDGLsgASbiG4FDY3F3r0EnZVLUyU2CqL5zToKpZqf2/ApKBk2wLSJG7weOCoAjO3IhF9c998Ug/z8gGKzNrgZdbNtI3ZS0vU2wvmTYnw68ILbcvTs9GzgrZMAdnZA0dxDpYYYkAbraGBS0z5fIcrrYHx8KIfZZ9p4p2B0GQK+5yeKuwF0RFm8DexoCCdBMfBVYOQJUgF/U6VIvawO8TwbNbENM2foOUIfnJkDL0cMRsM8Fg5mF2RAMYLvTlFSQZQLgtsD3gIzOSYCbAQ8Eg08FwKwWkwVQV8vgLgFwGvBWAlwfeBxYMUqPYv3zJCVJMmgGC3B74AdgL2B2ArQ7sSauGqJsDFo1+pGYTv6sGZQ2JEmAa0Vp1NXzSqFO9NbRwyOrM8MGNd5lXtrYPQTb5kOy1ML5pQ5arM8J0b4dOHmSXXwDcHAI9RXARamD1Upig2B52yM6l4yRLmz0Oybda2M7K7og+8UZ0WiMVJJ0s9l6RwDT0C3A6f9xHCY5smfdF8OD1VosmNzJzqHmxoGxaF/4SDwrOxP5SXA7AIaUnbol97CoYiOYyn4wXelusqOZA+wTyj6RGZ1r2cnYvVgoJMRSZ185GlZ1Det6EQ9qort6FDi67dzQJ60JTmkzjBRmPWbPaebauY9rWNNGvpC1W6MvtAS5SxtXA3iYpMm5JuJNgNXCo4BN7hFRbsd4qnomKePxRODCqCju1lp9XLTwg+hjzvF8Y2Nst2K1kgAl5aq6zdcBLEGeApwbC9nxPBkgv+kzcRKclUpwutUzshu/ALi6SS2aAJYgTwXOC1dYLz8DZPf5WLTtZiBlzOy0xl4fpzqPna6lh65pk7I2gKU+Gh+6waTxdw1cFnFUgijzpbzWsFO2YxdUHk/dtElS2hmXb20Ac3C6xwO8x9HVA6Cxc0+w67k3AeWasuaVhy60O/IgL0Cz1DL6dJeOvQvArNcepJSgKwELu+XQGPKI6BnCZqNkY7c4/G9UxLCgjOuPA1zTqW+UyS4AqxIkC6cBJ4Xy+16R9SxskXdN3yv2eY2hFzz8Xxqa11n0+wGYiZNJYUOpwamRkUvHLZcaJ9NmqWEwO+5eLJlN8dqo9f0CdKHSiHctXvwouCZQgs8rNcXeZLJD7sxaiXYQgFWXa3hH4EzAA7hrvhJZ7+FbNw8i7CN2hgGY8wWYV2s2nFn0PRW2XX90KuHDAqy6vDQ6NLiJYLDKQr93Mz1ZnAgGexoZZsC/e8RrRE5yE3QAAAAASUVORK5CYII="},"6c57":function(e,t,n){var r=n("23e7"),i=n("da84");r({global:!0},{globalThis:i})},"7e84":function(e,t,n){"use strict";function r(e){return t.default=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n("3410"),n("131a"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},"7f25":function(e,t,n){var r=n("9bc3");"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("4f06").default;i("6fdb2f64",r,!0,{sourceMap:!1,shadowMode:!1})},8434:function(e,t,n){"use strict";var r=n("7f25"),i=n.n(r);i.a},8854:function(e,t,n){"use strict";n.r(t);var r=n("cf14"),i=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=i.a},9072:function(e,t,n){"use strict";n("4ec9"),n("d3b7"),n("3ca3"),n("ddb0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var r=s(n("7e84")),i=s(n("b380")),a=s(n("fa95")),o=s(n("4478"));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var n="function"===typeof Map?new Map:void 0;return t.default=u=function(e){if(null===e||!(0,a.default)(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return(0,o.default)(e,arguments,(0,r.default)(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),(0,i.default)(t,e)},u(e)}},"99de":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=a(n("53ca")),i=a(n("257e"));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return!t||"object"!==(0,r.default)(t)&&"function"!==typeof t?(0,i.default)(e):t}},"9bc3":function(e,t,n){var r=n("24fb");t=r(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */uni-view[data-v-8d43a062], uni-scroll-view[data-v-8d43a062], uni-swiper-item[data-v-8d43a062]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-loading-icon[data-v-8d43a062]{flex-direction:row;align-items:center;justify-content:center;color:#c8c9cc}.u-loading-icon__text[data-v-8d43a062]{margin-left:4px;color:#606266;font-size:14px;line-height:20px}.u-loading-icon__spinner[data-v-8d43a062]{width:30px;height:30px;position:relative;box-sizing:border-box;max-width:100%;max-height:100%;-webkit-animation:u-rotate-data-v-8d43a062 1s linear infinite;animation:u-rotate-data-v-8d43a062 1s linear infinite}.u-loading-icon__spinner--semicircle[data-v-8d43a062]{border-width:2px;border-color:transparent;border-top-right-radius:100px;border-top-left-radius:100px;border-bottom-left-radius:100px;border-bottom-right-radius:100px;border-style:solid}.u-loading-icon__spinner--circle[data-v-8d43a062]{border-top-right-radius:100px;border-top-left-radius:100px;border-bottom-left-radius:100px;border-bottom-right-radius:100px;border-width:2px;border-top-color:#e5e5e5;border-right-color:#e5e5e5;border-bottom-color:#e5e5e5;border-left-color:#e5e5e5;border-style:solid}.u-loading-icon--vertical[data-v-8d43a062]{flex-direction:column}[data-v-8d43a062]:host{font-size:0;line-height:1}.u-loading-icon__spinner--spinner[data-v-8d43a062]{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.u-loading-icon__text[data-v-8d43a062]:empty{display:none}.u-loading-icon--vertical .u-loading-icon__text[data-v-8d43a062]{margin:6px 0 0;color:#606266}.u-loading-icon__dot[data-v-8d43a062]{position:absolute;top:0;left:0;width:100%;height:100%}.u-loading-icon__dot[data-v-8d43a062]:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(1){-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.u-loading-icon__dot[data-v-8d43a062]:nth-of-type(12){-webkit-transform:rotate(1turn);transform:rotate(1turn);opacity:.3125}@-webkit-keyframes u-rotate-data-v-8d43a062{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes u-rotate-data-v-8d43a062{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}',""]),e.exports=t},a85c:function(e,t,n){"use strict";(function(e){n("99af"),n("7db0"),n("c975"),n("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={name:"uni-stat-select",mixins:[e.mixinDatacom||{}],data:function(){return{showSelector:!1,current:"",mixinDatacomResData:[],apps:[],channels:[]}},props:{localdata:{type:Array,default:function(){return[]}},value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},label:{type:String,default:""},placeholder:{type:String,default:"请选择"},emptyTips:{type:String,default:"无选项"},clear:{type:Boolean,default:!0},defItem:{type:Number,default:0}},created:function(){this.last="".concat(this.collection,"_last_selected_option_value"),this.collection&&!this.localdata.length&&this.mixinDatacomEasyGet()},computed:{typePlaceholder:function(){var e={"opendb-stat-app-versions":"版本","opendb-app-channels":"渠道","opendb-app-list":"应用"},t="请选择",n=e[this.collection];return n?t+n:t}},watch:{localdata:{immediate:!0,handler:function(e,t){Array.isArray(e)&&!t&&(this.mixinDatacomResData=e)}},value:function(){this.initDefVal()},mixinDatacomResData:{immediate:!0,handler:function(e){e.length&&this.initDefVal()}}},methods:{initDefVal:function(){var e="";if(this.value||0===this.value)e=this.value;else if(this.modelValue||0===this.modelValue)e=this.modelValue;else{var t;if(this.collection&&(t=uni.getStorageSync(this.last)),t||0===t)e=t;else{var n="";this.defItem>0&&this.defItem<this.mixinDatacomResData.length&&(n=this.mixinDatacomResData[this.defItem-1].value),e=n}this.emit(e)}var r=this.mixinDatacomResData.find((function(t){return t.value===e}));this.current=r?this.formatItemName(r):""},clearVal:function(){this.emit(""),this.collection&&uni.removeStorageSync(this.last)},change:function(e){this.showSelector=!1,this.current=this.formatItemName(e),this.emit(e.value)},emit:function(e){this.$emit("change",e),this.$emit("input",e),this.$emit("update:modelValue",e),this.collection&&uni.setStorageSync(this.last,e)},toggleSelector:function(){this.showSelector=!this.showSelector},formatItemName:function(e){var t=e.text,n=e.value,r=e.channel_code;return r=r?"(".concat(r,")"):"",this.collection.indexOf("app-list")>0?"".concat(t,"(").concat(n,")"):t||"未命名".concat(r)}}};t.default=r}).call(this,n("a9ff")["default"])},a91b:function(e,t,n){var r=n("e34f");"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("4f06").default;i("a2bdebfc",r,!0,{sourceMap:!1,shadowMode:!1})},a9ff:function(e,t,n){"use strict";(function(e){var r=n("4ea4");n("a4d3"),n("e01a"),n("99af"),n("4de4"),n("7db0"),n("4160"),n("a630"),n("caad"),n("c975"),n("baa5"),n("d81d"),n("13d5"),n("26e9"),n("fb6a"),n("4e82"),n("a434"),n("f4b3"),n("6c57"),n("a9e3"),n("b64b"),n("d3b7"),n("e25e"),n("4d63"),n("ac1f"),n("5377"),n("25f0"),n("3ca3"),n("466d"),n("5319"),n("841c"),n("1276"),n("498a"),n("159b"),n("ddb0"),n("bf19"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("96cf");var i=r(n("1da1")),a=r(n("2909")),o=r(n("b85c")),s=r(n("bee2")),u=r(n("5530")),c=r(n("257e")),l=r(n("d4ec")),f=r(n("262e")),d=r(n("2caf")),h=r(n("9072")),p=n("37dc");function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function v(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof e||"undefined"!=typeof self&&self;var m=v((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},a=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},a=0;a<t;a+=4){var s=i(4294967296*(n||e.random()));n=987654071*s(),r.push(4294967296*s()|0)}return new o.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*u,i);if(u){for(var l=0;l<u;l+=a)this._doProcessBlock(r,l);var f=r.splice(0,u);n.sigBytes-=c}return new o.init(f,c)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=f.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=r.algo={};return r}(Math),n)})),y=(v((function(e,t){var n;e.exports=(n=m,function(e){var t=n,r=t.lib,i=r.WordArray,a=r.Hasher,o=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var u=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var a=this._hash.words,o=e[t+0],u=e[t+1],h=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],m=e[t+6],y=e[t+7],w=e[t+8],b=e[t+9],_=e[t+10],k=e[t+11],A=e[t+12],x=e[t+13],S=e[t+14],C=e[t+15],T=a[0],P=a[1],I=a[2],O=a[3];T=c(T,P,I,O,o,7,s[0]),O=c(O,T,P,I,u,12,s[1]),I=c(I,O,T,P,h,17,s[2]),P=c(P,I,O,T,p,22,s[3]),T=c(T,P,I,O,g,7,s[4]),O=c(O,T,P,I,v,12,s[5]),I=c(I,O,T,P,m,17,s[6]),P=c(P,I,O,T,y,22,s[7]),T=c(T,P,I,O,w,7,s[8]),O=c(O,T,P,I,b,12,s[9]),I=c(I,O,T,P,_,17,s[10]),P=c(P,I,O,T,k,22,s[11]),T=c(T,P,I,O,A,7,s[12]),O=c(O,T,P,I,x,12,s[13]),I=c(I,O,T,P,S,17,s[14]),T=l(T,P=c(P,I,O,T,C,22,s[15]),I,O,u,5,s[16]),O=l(O,T,P,I,m,9,s[17]),I=l(I,O,T,P,k,14,s[18]),P=l(P,I,O,T,o,20,s[19]),T=l(T,P,I,O,v,5,s[20]),O=l(O,T,P,I,_,9,s[21]),I=l(I,O,T,P,C,14,s[22]),P=l(P,I,O,T,g,20,s[23]),T=l(T,P,I,O,b,5,s[24]),O=l(O,T,P,I,S,9,s[25]),I=l(I,O,T,P,p,14,s[26]),P=l(P,I,O,T,w,20,s[27]),T=l(T,P,I,O,x,5,s[28]),O=l(O,T,P,I,h,9,s[29]),I=l(I,O,T,P,y,14,s[30]),T=f(T,P=l(P,I,O,T,A,20,s[31]),I,O,v,4,s[32]),O=f(O,T,P,I,w,11,s[33]),I=f(I,O,T,P,k,16,s[34]),P=f(P,I,O,T,S,23,s[35]),T=f(T,P,I,O,u,4,s[36]),O=f(O,T,P,I,g,11,s[37]),I=f(I,O,T,P,y,16,s[38]),P=f(P,I,O,T,_,23,s[39]),T=f(T,P,I,O,x,4,s[40]),O=f(O,T,P,I,o,11,s[41]),I=f(I,O,T,P,p,16,s[42]),P=f(P,I,O,T,m,23,s[43]),T=f(T,P,I,O,b,4,s[44]),O=f(O,T,P,I,A,11,s[45]),I=f(I,O,T,P,C,16,s[46]),T=d(T,P=f(P,I,O,T,h,23,s[47]),I,O,o,6,s[48]),O=d(O,T,P,I,y,10,s[49]),I=d(I,O,T,P,S,15,s[50]),P=d(P,I,O,T,v,21,s[51]),T=d(T,P,I,O,A,6,s[52]),O=d(O,T,P,I,p,10,s[53]),I=d(I,O,T,P,_,15,s[54]),P=d(P,I,O,T,u,21,s[55]),T=d(T,P,I,O,w,6,s[56]),O=d(O,T,P,I,C,10,s[57]),I=d(I,O,T,P,m,15,s[58]),P=d(P,I,O,T,x,21,s[59]),T=d(T,P,I,O,g,6,s[60]),O=d(O,T,P,I,k,10,s[61]),I=d(I,O,T,P,h,15,s[62]),P=d(P,I,O,T,b,21,s[63]),a[0]=a[0]+T|0,a[1]=a[1]+P|0,a[2]=a[2]+I|0,a[3]=a[3]+O|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var a=e.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function l(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}t.MD5=a._createHelper(u),t.HmacMD5=a._createHmacHelper(u)}(Math),n.MD5)})),v((function(e,t){var n,r,i;e.exports=(r=(n=m).lib.Base,i=n.enc.Utf8,void(n.algo.HMAC=r.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,u=o.words,c=0;c<n;c++)s[c]^=1549556828,u[c]^=909522486;a.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))})),v((function(e,t){e.exports=m.HmacMD5})));function w(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function b(e){return"object"===w(e)}var _=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(e,r){var i;return(0,l.default)(this,n),i=t.call(this,e),i.code=r,i}return n}((0,h.default)(Error));function k(e){return e&&"string"==typeof e?JSON.parse(e):e}var A=!1,x="h5",S=k(void 0),C=k([]),T=!0,P="";try{var I=n("1d33").default||n("1d33");P=I.appid}catch(Mt){}var O={};function E(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t=O,n=e,Object.prototype.hasOwnProperty.call(t,n)||(O[e]=r),O[e]}"app-plus"===x&&(O=uni._globalUniCloudObj?uni._globalUniCloudObj:uni._globalUniCloudObj={});var R=["invoke","success","fail","complete"],D=E("_globalUniCloudInterceptor");function U(e,t){D[e]||(D[e]={}),b(t)&&Object.keys(t).forEach((function(n){R.indexOf(n)>-1&&function(e,t,n){var r=D[e][t];r||(r=D[e][t]=[]),-1===r.indexOf(n)&&"function"==typeof n&&r.push(n)}(e,n,t[n])}))}function F(e,t){D[e]||(D[e]={}),b(t)?Object.keys(t).forEach((function(n){R.indexOf(n)>-1&&function(e,t,n){var r=D[e][t];if(r){var i=r.indexOf(n);i>-1&&r.splice(i,1)}}(e,n,t[n])})):delete D[e]}function M(e,t){return e&&0!==e.length?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function L(e,t){return D[e]&&D[e][t]||[]}function q(e,t){return t?function(n){var r,i=this,a="callFunction"===t&&"DCloud-clientDB"===(n&&n.name);r=this.isReady?Promise.resolve():this.initUniCloud,n=n||{};var o=r.then((function(){return a?Promise.resolve():M(L(t,"invoke"),n)})).then((function(){return e.call(i,n)})).then((function(e){return a?Promise.resolve(e):M(L(t,"success"),e).then((function(){return M(L(t,"complete"),e)})).then((function(){return Promise.resolve(e)}))}),(function(e){return a?Promise.reject(e):M(L(t,"fail"),e).then((function(){return M(L(t,"complete"),e)})).then((function(){return Promise.reject(e)}))}));if(!(n.success||n.fail||n.complete))return o;o.then((function(e){n.success&&n.success(e),n.complete&&n.complete(e)}),(function(e){n.fail&&n.fail(e),n.complete&&n.complete(e)}))}:function(t){if(!((t=t||{}).success||t.fail||t.complete))return e.call(this,t);e.call(this,t).then((function(e){t.success&&t.success(e),t.complete&&t.complete(e)}),(function(e){t.fail&&t.fail(e),t.complete&&t.complete(e)}))}}var N,j=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(e){var r;return(0,l.default)(this,n),r=t.call(this,e.message),r.errMsg=e.message||"",Object.defineProperties((0,c.default)(r),{code:{get:function(){return e.code}},requestId:{get:function(){return e.requestId}},message:{get:function(){return this.errMsg},set:function(e){this.errMsg=e}}}),r}return n}((0,h.default)(Error));function B(){var e=uni.getLocale&&uni.getLocale()||"en";if(N)return(0,u.default)((0,u.default)({},N),{},{LOCALE:e});var t=uni.getSystemInfoSync(),n=t.deviceId,r=t.platform;return N={PLATFORM:x,OS:r,APPID:P,DEVICEID:n,CLIENT_SDK_VERSION:"1.0.21"},(0,u.default)((0,u.default)({},N),{},{LOCALE:e})}var z,K={sign:function(e,t){var n="";return Object.keys(e).sort().forEach((function(t){e[t]&&(n=n+"&"+t+"="+e[t])})),n=n.slice(1),y(n,t).toString()},wrappedRequest:function(e,t){return new Promise((function(n,r){t(Object.assign(e,{complete:function(e){e||(e={}),A&&"h5"===x&&e.errMsg&&0===e.errMsg.indexOf("request:fail")&&console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");var t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400)return r(new j({code:"SYS_ERR",message:e.errMsg||"request:fail",requestId:t}));var i=e.data;if(i.error)return r(new j({code:i.error.code,message:i.error.message,requestId:t}));i.result=i.data,i.requestId=t,delete i.data,n(i)}}))}))}},W={request:function(e){return uni.request(e)},uploadFile:function(e){return uni.uploadFile(e)},setStorageSync:function(e,t){return uni.setStorageSync(e,t)},getStorageSync:function(e){return uni.getStorageSync(e)},removeStorageSync:function(e){return uni.removeStorageSync(e)},clearStorageSync:function(){return uni.clearStorageSync()}},H={"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},Y=(0,p.initVueI18n)({"zh-Hans":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},"zh-Hant":{"uniCloud.init.paramRequired":"缺少参数:{param}","uniCloud.uploadFile.fileError":"filePath应为File对象"},en:H,fr:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},es:{"uniCloud.init.paramRequired":"{param} required","uniCloud.uploadFile.fileError":"filePath should be instance of File"},ja:H},"zh-Hans"),J=Y.t,V=function(){function e(t){(0,l.default)(this,e),["spaceId","clientSecret"].forEach((function(e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new Error(J("uniCloud.init.paramRequired",{param:e}))})),this.config=Object.assign({},{endpoint:"https://api.bspapp.com"},t),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=W,this._getAccessTokenPromise=null,this._getAccessTokenPromiseStatus=null}return(0,s.default)(e,[{key:"setAccessToken",value:function(e){this.accessToken=e}},{key:"requestWrapped",value:function(e){return K.wrappedRequest(e,this.adapter.request)}},{key:"requestAuth",value:function(e){return this.requestWrapped(e)}},{key:"request",value:function(e,t){var n=this;return Promise.resolve().then((function(){return n.hasAccessToken?t?n.requestWrapped(e):n.requestWrapped(e).catch((function(t){return new Promise((function(e,n){!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?n(t):e()})).then((function(){return n.getAccessToken()})).then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))})):n.getAccessToken().then((function(){var t=n.rebuildRequest(e);return n.request(t,!0)}))}))}},{key:"rebuildRequest",value:function(e){var t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=K.sign(t.data,this.config.clientSecret),t}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};return"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=K.sign(n,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:r}}},{key:"getAccessToken",value:function(){var e=this;return"pending"===this._getAccessTokenPromiseStatus||(this._getAccessTokenPromiseStatus="pending",this._getAccessTokenPromise=this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((function(t){return new Promise((function(n,r){t.result&&t.result.accessToken?(e.setAccessToken(t.result.accessToken),e._getAccessTokenPromiseStatus="fulfilled",n(e.accessToken)):(e._getAccessTokenPromiseStatus="rejected",r(new j({code:"AUTH_FAILED",message:"获取accessToken失败"})))}))}),(function(t){return e._getAccessTokenPromiseStatus="rejected",Promise.reject(t)}))),this._getAccessTokenPromise}},{key:"authorize",value:function(){this.getAccessToken()}},{key:"callFunction",value:function(e){var t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}},{key:"getOSSUploadOptionsFromPath",value:function(e){var t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,a=e.filePath,o=e.fileType,s=e.onUploadProgress;return new Promise((function(e,u){var c=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:a,fileType:o,header:{"X-OSS-server-side-encrpytion":"AES256"},success:function(t){t&&t.statusCode<400?e(t):u(new j({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){u(new j({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"reportOSSUpload",value:function(e){var t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}},{key:"uploadFile",value:function(e){var t=this,n=e.filePath,r=e.cloudPath,i=e.fileType,a=void 0===i?"image":i,o=e.onUploadProgress,s=e.config;if("string"!==w(r))throw new j({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(r=r.trim()))throw new j({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});if(/:\/\//.test(r))throw new j({code:"INVALID_PARAM",message:"cloudPath不合法"});var u,c,l=s&&s.envType||this.config.envType;return this.getOSSUploadOptionsFromPath({env:l,filename:r}).then((function(e){var r=e.result;u=r.id,c="https://"+r.cdnDomain+"/"+r.ossPath;var i={url:"https://"+r.host,formData:{"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:r.accessKeyId,Signature:r.signature,host:r.host,id:u,key:r.ossPath,policy:r.policy,success_action_status:200},fileName:"file",name:"file",filePath:n,fileType:a};return t.uploadFileToOSS(Object.assign({},i,{onUploadProgress:o}))})).then((function(){return t.reportOSSUpload({id:u})})).then((function(e){return new Promise((function(t,r){e.success?t({success:!0,filePath:n,fileID:c}):r(new j({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({id:t[0]})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList;return new Promise((function(e,n){Array.isArray(t)&&0!==t.length||n(new j({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),e({fileList:t.map((function(e){return{fileID:e,tempFileURL:e}}))})}))}},{key:"hasAccessToken",get:function(){return!!this.accessToken}}]),e}(),G={init:function(e){var t=new V(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}},X="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";!function(e){e.local="local",e.none="none",e.session="session"}(z||(z={}));var Q,Z=function(){},$=function(){var e;if(!Promise){e=function(){},e.promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e};function ee(e){return void 0===e}function te(e){return"[object Null]"===Object.prototype.toString.call(e)}function ne(e){var t,n,r=(t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]),i=(0,o.default)(r);try{for(i.s();!(n=i.n()).done;){var a=n.value,s=a.isMatch,u=a.genAdapter,c=a.runtime;if(s())return{adapter:u(),runtime:c}}}catch(l){i.e(l)}finally{i.f()}}!function(e){e.WEB="web",e.WX_MP="wx_mp"}(Q||(Q={}));var re={adapter:null,runtime:void 0},ie=["anonymousUuidKey"],ae=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){var e;return(0,l.default)(this,n),e=t.call(this),re.adapter.root.tcbObject||(re.adapter.root.tcbObject={}),e}return(0,s.default)(n,[{key:"setItem",value:function(e,t){re.adapter.root.tcbObject[e]=t}},{key:"getItem",value:function(e){return re.adapter.root.tcbObject[e]}},{key:"removeItem",value:function(e){delete re.adapter.root.tcbObject[e]}},{key:"clear",value:function(){delete re.adapter.root.tcbObject}}]),n}(Z);function oe(e,t){switch(e){case"local":return t.localStorage||new ae;case"none":return new ae;default:return t.sessionStorage||new ae}}var se=function(){function e(t){if((0,l.default)(this,e),!this._storage){this._persistence=re.adapter.primaryStorage||t.persistence,this._storage=oe(this._persistence,re.adapter);var n="access_token_".concat(t.env),r="access_token_expire_".concat(t.env),i="refresh_token_".concat(t.env),a="anonymous_uuid_".concat(t.env),o="login_type_".concat(t.env),s="user_info_".concat(t.env);this.keys={accessTokenKey:n,accessTokenExpireKey:r,refreshTokenKey:i,anonymousUuidKey:a,loginTypeKey:o,userInfoKey:s}}}return(0,s.default)(e,[{key:"updatePersistence",value:function(e){if(e!==this._persistence){var t="local"===this._persistence;this._persistence=e;var n=oe(e,re.adapter);for(var r in this.keys){var i=this.keys[r];if(!t||!ie.includes(r)){var a=this._storage.getItem(i);ee(a)||te(a)||(n.setItem(i,a),this._storage.removeItem(i))}}this._storage=n}}},{key:"setStore",value:function(e,t,n){if(this._storage){var r={version:n||"localCachev1",content:t},i=JSON.stringify(r);try{this._storage.setItem(e,i)}catch(e){throw e}}}},{key:"getStore",value:function(e,t){try{if(!this._storage)return}catch(e){return""}t=t||"localCachev1";var n=this._storage.getItem(e);return n&&n.indexOf(t)>=0?JSON.parse(n).content:""}},{key:"removeStore",value:function(e){this._storage.removeItem(e)}}]),e}(),ue={},ce={};function le(e){return ue[e]}var fe=function e(t,n){(0,l.default)(this,e),this.data=n||null,this.name=t},de=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(e,r){var i;return(0,l.default)(this,n),i=t.call(this,"error",{error:e,data:r}),i.error=e,i}return n}(fe),he=new(function(){function e(){(0,l.default)(this,e),this._listeners={}}return(0,s.default)(e,[{key:"on",value:function(e,t){return function(e,t,n){n[e]=n[e]||[],n[e].push(t)}(e,t,this._listeners),this}},{key:"off",value:function(e,t){return function(e,t,n){if(n&&n[e]){var r=n[e].indexOf(t);-1!==r&&n[e].splice(r,1)}}(e,t,this._listeners),this}},{key:"fire",value:function(e,t){if(e instanceof de)return console.error(e.error),this;var n="string"==typeof e?new fe(e,t||{}):e,r=n.name;if(this._listens(r)){n.target=this;var i,s=this._listeners[r]?(0,a.default)(this._listeners[r]):[],u=(0,o.default)(s);try{for(u.s();!(i=u.n()).done;){var c=i.value;c.call(this,n)}}catch(l){u.e(l)}finally{u.f()}}return this}},{key:"_listens",value:function(e){return this._listeners[e]&&this._listeners[e].length>0}}]),e}());function pe(e,t){he.on(e,t)}function ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.fire(e,t)}function ve(e,t){he.off(e,t)}var me,ye="loginStateChanged",we="loginStateExpire",be="loginTypeChanged",_e="anonymousConverted",ke="refreshAccessToken";!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(me||(me={}));var Ae=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],xe={"X-SDK-Version":"1.3.5"};function Se(e,t,n){var r=e[t];e[t]=function(t){var i={},a={};n.forEach((function(n){var r=n.call(e,t),o=r.data,s=r.headers;Object.assign(i,o),Object.assign(a,s)}));var o=t.data;return o&&function(){var e;if(e=o,"[object FormData]"!==Object.prototype.toString.call(e))t.data=(0,u.default)((0,u.default)({},o),i);else for(var n in i)o.append(n,i[n])}(),t.headers=(0,u.default)((0,u.default)({},t.headers||{}),a),r.call(e,t)}}function Ce(){var e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:(0,u.default)((0,u.default)({},xe),{},{"x-seqid":e})}}var Te=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,l.default)(this,e),this.config=n,this._reqClass=new re.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:"请求在".concat(this.config.timeout/1e3,"s内未完成,已中断"),restrictedMethods:["post"]}),this._cache=le(this.config.env),this._localCache=(t=this.config.env,ce[t]),Se(this._reqClass,"post",[Ce]),Se(this._reqClass,"upload",[Ce]),Se(this._reqClass,"download",[Ce])}return(0,s.default)(e,[{key:"post",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.post(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"upload",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.upload(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"download",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._reqClass.download(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refreshAccessToken",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken()),e.prev=1,e.next=4,this._refreshAccessTokenPromise;case 4:t=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e["catch"](1),n=e.t0;case 10:if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,!n){e.next=12;break}throw n;case 12:return e.abrupt("return",t);case 13:case"end":return e.stop()}}),e,this,[[1,7]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"_refreshAccessToken",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n,r,i,a,o,s,u,c,l,f,d,h;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey,a=t.loginTypeKey,o=t.anonymousUuidKey,this._cache.removeStore(n),this._cache.removeStore(r),s=this._cache.getStore(i),s){e.next=5;break}throw new Error("未登录CloudBase");case 5:return u={refresh_token:s},e.next=8,this.request("auth.fetchAccessTokenWithRefreshToken",u);case 8:if(c=e.sent,!c.data.code){e.next=21;break}if(l=c.data.code,"SIGN_PARAM_INVALID"!==l&&"REFRESH_TOKEN_EXPIRED"!==l&&"INVALID_REFRESH_TOKEN"!==l){e.next=20;break}if(this._cache.getStore(a)!==me.ANONYMOUS||"INVALID_REFRESH_TOKEN"!==l){e.next=19;break}return f=this._cache.getStore(o),d=this._cache.getStore(i),e.next=17,this.send("auth.signInAnonymously",{anonymous_uuid:f,refresh_token:d});case 17:return h=e.sent,e.abrupt("return",(this.setRefreshToken(h.refresh_token),this._refreshAccessToken()));case 19:ge(we),this._cache.removeStore(i);case 20:throw new Error("刷新access token失败:".concat(c.data.code));case 21:if(!c.data.access_token){e.next=23;break}return e.abrupt("return",(ge(ke),this._cache.setStore(n,c.data.access_token),this._cache.setStore(r,c.data.access_token_expire+Date.now()),{accessToken:c.data.access_token,accessTokenExpire:c.data.access_token_expire}));case 23:c.data.refresh_token&&(this._cache.removeStore(i),this._cache.setStore(i,c.data.refresh_token),this._refreshAccessToken());case 24:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"getAccessToken",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n,r,i,a,o,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey,this._cache.getStore(i)){e.next=3;break}throw new Error("refresh token不存在,登录状态异常");case 3:if(a=this._cache.getStore(n),o=this._cache.getStore(r),s=!0,e.t0=this._shouldRefreshAccessTokenHook,!e.t0){e.next=9;break}return e.next=8,this._shouldRefreshAccessTokenHook(a,o);case 8:e.t0=!e.sent;case 9:if(e.t1=e.t0,!e.t1){e.next=12;break}s=!1;case 12:return e.abrupt("return",(!a||!o||o<Date.now())&&s?this.refreshAccessToken():{accessToken:a,accessTokenExpire:o});case 13:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"request",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n,r){var i,a,o,s,c,l,f,d,h,p,g,v,m,y,w,b;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i="x-tcb-trace_".concat(this.config.env),a="application/x-www-form-urlencoded",o=(0,u.default)({action:t,env:this.config.env,dataVersion:"2019-08-16"},n),-1!==Ae.indexOf(t)){e.next=10;break}if(s=this._cache.keys.refreshTokenKey,e.t0=this._cache.getStore(s),!e.t0){e.next=10;break}return e.next=9,this.getAccessToken();case 9:o.access_token=e.sent.accessToken;case 10:if("storage.uploadFile"===t){for(l in c=new FormData,c)c.hasOwnProperty(l)&&void 0!==c[l]&&c.append(l,o[l]);a="multipart/form-data"}else for(f in a="application/json",c={},o)void 0!==o[f]&&(c[f]=o[f]);return d={headers:{"content-type":a}},r&&r.onUploadProgress&&(d.onUploadProgress=r.onUploadProgress),h=this._localCache.getStore(i),h&&(d.headers["X-TCB-Trace"]=h),p=n.parse,g=n.inQuery,v=n.search,m={env:this.config.env},p&&(m.parse=!0),g&&(m=(0,u.default)((0,u.default)({},g),m)),y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=/\?/.test(t),i="";for(var a in n)""===i?!r&&(t+="?"):i+="&",i+="".concat(a,"=").concat(encodeURIComponent(n[a]));return/^http(s)?\:\/\//.test(t+=i)?t:"".concat(e).concat(t)}(X,"//tcb-api.tencentcloudapi.com/web",m),v&&(y+=v),e.next=22,this.post((0,u.default)({url:y,data:c},d));case 22:if(w=e.sent,b=w.header&&w.header["x-tcb-trace"],b&&this._localCache.setStore(i,b),(200===Number(w.status)||200===Number(w.statusCode))&&w.data){e.next=26;break}throw new Error("network request error");case 26:return e.abrupt("return",w);case 27:case"end":return e.stop()}}),e,this)})));function t(t,n,r){return e.apply(this,arguments)}return t}()},{key:"send",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){var n,r,i,a=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 3:if(r=e.sent,"ACCESS_TOKEN_EXPIRED"!==r.data.code||-1!==Ae.indexOf(t)){e.next=13;break}return e.next=7,this.refreshAccessToken();case 7:return e.next=9,this.request(t,n,{onUploadProgress:n.onUploadProgress});case 9:if(i=e.sent,!i.data.code){e.next=12;break}throw new Error("[".concat(i.data.code,"] ").concat(i.data.message));case 12:return e.abrupt("return",i.data);case 13:if(!r.data.code){e.next=15;break}throw new Error("[".concat(r.data.code,"] ").concat(r.data.message));case 15:return e.abrupt("return",r.data);case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}}]),e}(),Pe={};function Ie(e){return Pe[e]}var Oe=function(){function e(t){(0,l.default)(this,e),this.config=t,this._cache=le(t.env),this._request=Ie(t.env)}return(0,s.default)(e,[{key:"setRefreshToken",value:function(e){var t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,i=t.refreshTokenKey;this._cache.removeStore(n),this._cache.removeStore(r),this._cache.setStore(i,e)}},{key:"setAccessToken",value:function(e,t){var n=this._cache.keys,r=n.accessTokenKey,i=n.accessTokenExpireKey;this._cache.setStore(r,e),this._cache.setStore(i,t)}},{key:"refreshUserInfo",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e)}}]),e}(),Ee=function(){function e(t){if((0,l.default)(this,e),!t)throw new Error("envId is not defined");this._envId=t,this._cache=le(this._envId),this._request=Ie(this._envId),this.setUserInfo()}return(0,s.default)(e,[{key:"linkWithTicket",value:function(e){if("string"!=typeof e)throw new Error("ticket must be string");return this._request.send("auth.linkWithTicket",{ticket:e})}},{key:"linkWithRedirect",value:function(e){e.signInWithRedirect()}},{key:"updatePassword",value:function(e,t){return this._request.send("auth.updatePassword",{oldPassword:t,newPassword:e})}},{key:"updateEmail",value:function(e){return this._request.send("auth.updateEmail",{newEmail:e})}},{key:"updateUsername",value:function(e){if("string"!=typeof e)throw new Error("username must be a string");return this._request.send("auth.updateUsername",{username:e})}},{key:"getLinkedUidList",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getLinkedUidList",{});case 2:return t=e.sent,n=t.data,r=!1,i=n.users,e.abrupt("return",(i.forEach((function(e){e.wxOpenId&&e.wxPublicId&&(r=!0)})),{users:i,hasPrimaryUid:r}));case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setPrimaryUid",value:function(e){return this._request.send("auth.setPrimaryUid",{uid:e})}},{key:"unlink",value:function(e){return this._request.send("auth.unlink",{platform:e})}},{key:"update",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){var n,r,i,a,o,s,u,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.nickName,r=t.gender,i=t.avatarUrl,a=t.province,o=t.country,s=t.city,e.next=8,this._request.send("auth.updateUserInfo",{nickName:n,gender:r,avatarUrl:i,province:a,country:o,city:s});case 8:u=e.sent,c=u.data,this.setLocalUserInfo(c);case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"refresh",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.send("auth.getUserInfo",{});case 2:return t=e.sent,n=t.data,e.abrupt("return",(this.setLocalUserInfo(n),n));case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"setUserInfo",value:function(){var e=this,t=this._cache.keys.userInfoKey,n=this._cache.getStore(t);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((function(t){e[t]=n[t]})),this.location={country:n.country,province:n.province,city:n.city}}},{key:"setLocalUserInfo",value:function(e){var t=this._cache.keys.userInfoKey;this._cache.setStore(t,e),this.setUserInfo()}}]),e}(),Re=function(){function e(t){if((0,l.default)(this,e),!t)throw new Error("envId is not defined");this._cache=le(t);var n=this._cache.keys,r=n.refreshTokenKey,i=n.accessTokenKey,a=n.accessTokenExpireKey,o=this._cache.getStore(r),s=this._cache.getStore(i),u=this._cache.getStore(a);this.credential={refreshToken:o,accessToken:s,accessTokenExpire:u},this.user=new Ee(t)}return(0,s.default)(e,[{key:"isAnonymousAuth",get:function(){return this.loginType===me.ANONYMOUS}},{key:"isCustomAuth",get:function(){return this.loginType===me.CUSTOM}},{key:"isWeixinAuth",get:function(){return this.loginType===me.WECHAT||this.loginType===me.WECHAT_OPEN||this.loginType===me.WECHAT_PUBLIC}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),De=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){return(0,l.default)(this,n),t.apply(this,arguments)}return(0,s.default)(n,[{key:"signIn",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n,r,i,a,o,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._cache.updatePersistence("local"),t=this._cache.keys,n=t.anonymousUuidKey,r=t.refreshTokenKey,i=this._cache.getStore(n)||void 0,a=this._cache.getStore(r)||void 0,e.next=8,this._request.send("auth.signInAnonymously",{anonymous_uuid:i,refresh_token:a});case 8:if(o=e.sent,!o.uuid||!o.refresh_token){e.next=20;break}return this._setAnonymousUUID(o.uuid),this.setRefreshToken(o.refresh_token),e.next=14,this._request.refreshAccessToken();case 14:return ge(ye),ge(be,{env:this.config.env,loginType:me.ANONYMOUS,persistence:"local"}),s=new Re(this.config.env),e.next=19,s.user.refresh();case 19:return e.abrupt("return",s);case 20:throw new Error("匿名登录失败");case 21:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){var n,r,i,a,o,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=this._cache.keys,r=n.anonymousUuidKey,i=n.refreshTokenKey,a=this._cache.getStore(r),o=this._cache.getStore(i),e.next=7,this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:a,refresh_token:o,ticket:t});case 7:if(s=e.sent,!s.refresh_token){e.next=16;break}return this._clearAnonymousUUID(),this.setRefreshToken(s.refresh_token),e.next=13,this._request.refreshAccessToken();case 13:return ge(_e,{env:this.config.env}),ge(be,{loginType:me.CUSTOM,persistence:"local"}),e.abrupt("return",{credential:{refreshToken:s.refresh_token}});case 16:throw new Error("匿名转化失败");case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"_setAnonymousUUID",value:function(e){var t=this._cache.keys,n=t.anonymousUuidKey,r=t.loginTypeKey;this._cache.removeStore(n),this._cache.setStore(n,e),this._cache.setStore(r,me.ANONYMOUS)}},{key:"_clearAnonymousUUID",value:function(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}]),n}(Oe),Ue=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){return(0,l.default)(this,n),t.apply(this,arguments)}return(0,s.default)(n,[{key:"signIn",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("ticket must be a string");case 2:return n=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signInWithTicket",{ticket:t,refresh_token:this._cache.getStore(n)||""});case 5:if(r=e.sent,!r.refresh_token){e.next=15;break}return this.setRefreshToken(r.refresh_token),e.next=10,this._request.refreshAccessToken();case 10:return ge(ye),ge(be,{env:this.config.env,loginType:me.CUSTOM,persistence:this.config.persistence}),e.next=14,this.refreshUserInfo();case 14:return e.abrupt("return",new Re(this.config.env));case 15:throw new Error("自定义登录失败");case 16:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}]),n}(Oe),Fe=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){return(0,l.default)(this,n),t.apply(this,arguments)}return(0,s.default)(n,[{key:"signIn",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){var r,i,a,o,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("email must be a string");case 2:return r=this._cache.keys.refreshTokenKey,e.next=5,this._request.send("auth.signIn",{loginType:"EMAIL",email:t,password:n,refresh_token:this._cache.getStore(r)||""});case 5:if(i=e.sent,a=i.refresh_token,o=i.access_token,s=i.access_token_expire,!a){e.next=22;break}if(this.setRefreshToken(a),!o||!s){e.next=15;break}this.setAccessToken(o,s),e.next=17;break;case 15:return e.next=17,this._request.refreshAccessToken();case 17:return e.next=19,this.refreshUserInfo();case 19:return ge(ye),ge(be,{env:this.config.env,loginType:me.EMAIL,persistence:this.config.persistence}),e.abrupt("return",new Re(this.config.env));case 22:throw i.code?new Error("邮箱登录失败: [".concat(i.code,"] ").concat(i.message)):new Error("邮箱登录失败");case 23:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"activate",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.activateEndUserMail",{token:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"resetPasswordWithToken",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.resetPasswordWithToken",{token:t,newPassword:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(Oe),Me=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){return(0,l.default)(this,n),t.apply(this,arguments)}return(0,s.default)(n,[{key:"signIn",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){var r,i,a,o,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("username must be a string");case 2:return"string"!=typeof n&&(n="",console.warn("password is empty")),r=this._cache.keys.refreshTokenKey,e.next=6,this._request.send("auth.signIn",{loginType:me.USERNAME,username:t,password:n,refresh_token:this._cache.getStore(r)||""});case 6:if(i=e.sent,a=i.refresh_token,o=i.access_token_expire,s=i.access_token,!a){e.next=23;break}if(this.setRefreshToken(a),!s||!o){e.next=16;break}this.setAccessToken(s,o),e.next=18;break;case 16:return e.next=18,this._request.refreshAccessToken();case 18:return e.next=20,this.refreshUserInfo();case 20:return ge(ye),ge(be,{env:this.config.env,loginType:me.USERNAME,persistence:this.config.persistence}),e.abrupt("return",new Re(this.config.env));case 23:throw i.code?new Error("用户名密码登录失败: [".concat(i.code,"] ").concat(i.message)):new Error("用户名密码登录失败");case 24:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()}]),n}(Oe),Le=function(){function e(t){(0,l.default)(this,e),this.config=t,this._cache=le(t.env),this._request=Ie(t.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),pe(be,this._onLoginTypeChanged)}return(0,s.default)(e,[{key:"anonymousAuthProvider",value:function(){return new De(this.config)}},{key:"customAuthProvider",value:function(){return new Ue(this.config)}},{key:"emailAuthProvider",value:function(){return new Fe(this.config)}},{key:"usernameAuthProvider",value:function(){return new Me(this.config)}},{key:"signInAnonymously",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new De(this.config).signIn());case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signInWithEmailAndPassword",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Fe(this.config).signIn(t,n));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"signInWithUsernameAndPassword",value:function(e,t){return new Me(this.config).signIn(e,t)}},{key:"linkAndRetrieveDataWithTicket",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this._anonymousAuthProvider||(this._anonymousAuthProvider=new De(this.config)),pe(_e,this._onAnonymousConverted),e.next=3,this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"signOut",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t,n,r,i,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.loginType!==me.ANONYMOUS){e.next=2;break}throw new Error("匿名用户不支持登出操作");case 2:if(t=this._cache.keys,n=t.refreshTokenKey,r=t.accessTokenKey,i=t.accessTokenExpireKey,a=this._cache.getStore(n),a){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,this._request.send("auth.logout",{refresh_token:a});case 7:return o=e.sent,e.abrupt("return",(this._cache.removeStore(n),this._cache.removeStore(r),this._cache.removeStore(i),ge(ye),ge(be,{env:this.config.env,loginType:me.NULL,persistence:this.config.persistence}),o));case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"signUpWithEmailAndPassword",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.signUpWithEmailAndPassword",{email:t,password:n}));case 1:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"sendPasswordResetEmail",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",this._request.send("auth.sendPasswordResetEmail",{email:t}));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"onLoginStateChanged",value:function(e){var t=this;pe(ye,(function(){var n=t.hasLoginState();e.call(t,n)}));var n=this.hasLoginState();e.call(this,n)}},{key:"onLoginStateExpired",value:function(e){pe(we,e.bind(this))}},{key:"onAccessTokenRefreshed",value:function(e){pe(ke,e.bind(this))}},{key:"onAnonymousConverted",value:function(e){pe(_e,e.bind(this))}},{key:"onLoginTypeChanged",value:function(e){var t=this;pe(be,(function(){var n=t.hasLoginState();e.call(t,n)}))}},{key:"getAccessToken",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this._request.getAccessToken();case 2:return e.t0=e.sent.accessToken,e.t1=this.config.env,e.abrupt("return",{accessToken:e.t0,env:e.t1});case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"hasLoginState",value:function(){var e=this._cache.keys.refreshTokenKey;return this._cache.getStore(e)?new Re(this.config.env):null}},{key:"isUsernameRegistered",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("string"==typeof t){e.next=2;break}throw new Error("username must be a string");case 2:return e.next=4,this._request.send("auth.isUsernameRegistered",{username:t});case 4:return n=e.sent,r=n.data,e.abrupt("return",r&&r.isRegistered);case 7:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getLoginState",value:function(){return Promise.resolve(this.hasLoginState())}},{key:"signInWithTicket",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",new Ue(this.config).signIn(t));case 1:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"shouldRefreshAccessToken",value:function(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}},{key:"getUserInfo",value:function(){return this._request.send("auth.getUserInfo",{}).then((function(e){return e.code?e:(0,u.default)((0,u.default)({},e.data),{},{requestId:e.seqId})}))}},{key:"getAuthHeader",value:function(){var e=this._cache.keys,t=e.refreshTokenKey,n=e.accessTokenKey,r=this._cache.getStore(t);return{"x-cloudbase-credentials":this._cache.getStore(n)+"/@@/"+r}}},{key:"_onAnonymousConverted",value:function(e){var t=e.data.env;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}},{key:"_onLoginTypeChanged",value:function(e){var t=e.data,n=t.loginType,r=t.persistence,i=t.env;i===this.config.env&&(this._cache.updatePersistence(r),this._cache.setStore(this._cache.keys.loginTypeKey,n))}},{key:"currentUser",get:function(){var e=this.hasLoginState();return e&&e.user||null}},{key:"loginType",get:function(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}]),e}(),qe=function(e,t){t=t||$();var n=Ie(this.config.env),r=e.cloudPath,i=e.filePath,a=e.onUploadProgress,o=e.fileType,s=void 0===o?"image":o;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){var o=e.data,u=o.url,c=o.authorization,l=o.token,f=o.fileId,d=o.cosFileId,h=e.requestId,p={key:r,signature:c,"x-cos-meta-fileid":d,success_action_status:"201","x-cos-security-token":l};n.upload({url:u,data:p,file:i,name:r,fileType:s,onUploadProgress:a}).then((function(e){201===e.statusCode?t(null,{fileID:f,requestId:h}):t(new Error("STORAGE_REQUEST_FAIL: ".concat(e.data)))})).catch((function(e){t(e)}))})).catch((function(e){t(e)})),t.promise},Ne=function(e,t){t=t||$();var n=Ie(this.config.env),r=e.cloudPath;return n.send("storage.getUploadMetadata",{path:r}).then((function(e){t(null,e)})).catch((function(e){t(e)})),t.promise},je=function(e,t){var n=e.fileList;if(t=t||$(),!n||!Array.isArray(n))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};var r,i=(0,o.default)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!a||"string"!=typeof a)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"}}}catch(u){i.e(u)}finally{i.f()}var s={fileid_list:n};return Ie(this.config.env).send("storage.batchDeleteFile",s).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},Be=function(e,t){var n=e.fileList;t=t||$(),n&&Array.isArray(n)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});var r,i=[],a=(0,o.default)(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;"object"==typeof s?(s.hasOwnProperty("fileID")&&s.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),i.push({fileid:s.fileID,max_age:s.maxAge})):"string"==typeof s?i.push({fileid:s}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"})}}catch(c){a.e(c)}finally{a.f()}var u={file_list:i};return Ie(this.config.env).send("storage.batchGetDownloadUrl",u).then((function(e){e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((function(e){t(e)})),t.promise},ze=function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){var r,i,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=t.fileID,e.next=3,Be.call(this,{fileList:[{fileID:r,maxAge:600}]});case 3:if(i=e.sent.fileList[0],"SUCCESS"===i.code){e.next=6;break}return e.abrupt("return",n?n(i):new Promise((function(e){e(i)})));case 6:if(a=Ie(this.config.env),o=i.download_url,o=encodeURI(o),n){e.next=10;break}return e.abrupt("return",a.download({url:o}));case 10:return e.t0=n,e.next=13,a.download({url:o});case 13:e.t1=e.sent,(0,e.t0)(e.t1);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),Ke=function(e,t){var n,r=e.name,i=e.data,a=e.query,o=e.parse,s=e.search,u=t||$();try{n=i?JSON.stringify(i):""}catch(r){return Promise.reject(r)}if(!r)return Promise.reject(new Error("函数名不能为空"));var c={inQuery:a,parse:o,search:s,function_name:r,request_data:n};return Ie(this.config.env).send("functions.invokeFunction",c).then((function(e){if(e.code)u(null,e);else{var t=e.data.response_data;if(o)u(null,{result:t,requestId:e.requestId});else try{t=JSON.parse(e.data.response_data),u(null,{result:t,requestId:e.requestId})}catch(e){u(new Error("response data must be json"))}}return u.promise})).catch((function(e){u(e)})),u.promise},We={timeout:15e3,persistence:"session"},He={},Ye=function(){function e(t){(0,l.default)(this,e),this.config=t||this.config,this.authObj=void 0}return(0,s.default)(e,[{key:"init",value:function(t){switch(re.adapter||(this.requestClient=new re.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"请求在".concat((t.timeout||5e3)/1e3,"s内未完成,已中断")})),this.config=(0,u.default)((0,u.default)({},We),t),!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new e(this.config)}},{key:"auth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.persistence;if(this.authObj)return this.authObj;var n,r=t||re.adapter.primaryStorage||We.persistence;return r!==this.config.persistence&&(this.config.persistence=r),function(e){var t=e.env;ue[t]=new se(e),ce[t]=new se((0,u.default)((0,u.default)({},e),{},{persistence:"local"}))}(this.config),n=this.config,Pe[n.env]=new Te(n),this.authObj=new Le(this.config),this.authObj}},{key:"on",value:function(e,t){return pe.apply(this,[e,t])}},{key:"off",value:function(e,t){return ve.apply(this,[e,t])}},{key:"callFunction",value:function(e,t){return Ke.apply(this,[e,t])}},{key:"deleteFile",value:function(e,t){return je.apply(this,[e,t])}},{key:"getTempFileURL",value:function(e,t){return Be.apply(this,[e,t])}},{key:"downloadFile",value:function(e,t){return ze.apply(this,[e,t])}},{key:"uploadFile",value:function(e,t){return qe.apply(this,[e,t])}},{key:"getUploadMetadata",value:function(e,t){return Ne.apply(this,[e,t])}},{key:"registerExtension",value:function(e){He[e.name]=e}},{key:"invokeExtension",value:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r=He[t],r){e.next=3;break}throw Error("扩展".concat(t," 必须先注册"));case 3:return e.next=5,r.invoke(n,this);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e,this)})));function t(t,n){return e.apply(this,arguments)}return t}()},{key:"useAdapters",value:function(e){var t=ne(e)||{},n=t.adapter,r=t.runtime;n&&(re.adapter=n),r&&(re.runtime=r)}}]),e}(),Je=new Ye;function Ve(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),i="";for(var a in n)""===i?!r&&(t+="?"):i+="&",i+=a+"="+encodeURIComponent(n[a]);return/^http(s)?:\/\//.test(t+=i)?t:""+e+t}var Ge=function(){function e(){(0,l.default)(this,e)}return(0,s.default)(e,[{key:"post",value:function(e){var t=e.url,n=e.data,r=e.headers;return new Promise((function(e,i){W.request({url:Ve("https:",t),data:n,method:"POST",header:r,success:function(t){e(t)},fail:function(e){i(e)}})}))}},{key:"upload",value:function(e){return new Promise((function(t,n){var r=e.url,i=e.file,a=e.data,o=e.headers,s=e.fileType,u=W.uploadFile({url:Ve("https:",r),name:"file",formData:Object.assign({},a),filePath:i,fileType:s,header:o,success:function(e){var n={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&a.success_action_status&&(n.statusCode=parseInt(a.success_action_status,10)),t(n)},fail:function(e){A&&"mp-alipay"===x&&console.warn("支付宝小程序开发工具上传腾讯云时无法准确判断是否上传成功,请使用真机测试"),n(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&u&&"function"==typeof u.onProgressUpdate&&u.onProgressUpdate((function(t){e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}]),e}(),Xe={setItem:function(e,t){W.setStorageSync(e,t)},getItem:function(e){return W.getStorageSync(e)},removeItem:function(e){W.removeStorageSync(e)},clear:function(){W.clearStorageSync()}},Qe={genAdapter:function(){return{root:{},reqClass:Ge,localStorage:Xe,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};Je.useAdapters(Qe);var Ze=Je,$e=Ze.init;Ze.init=function(e){e.env=e.spaceId;var t=$e.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;var n=t.auth;return t.auth=function(e){var t=n.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((function(e){t[e]=q(t[e]).bind(t)})),t},t.customAuth=t.auth,t};var et=Ze;function tt(){return{token:W.getStorageSync("uni_id_token")||W.getStorageSync("uniIdToken"),tokenExpired:W.getStorageSync("uni_id_token_expired")}}function nt(){A&&"h5"===x&&uni.getStorageSync("__LAST_DCLOUD_APPID")!==P&&(uni.setStorageSync("__LAST_DCLOUD_APPID",P),console.warn("检测到当前项目与上次运行到此端口的项目不一致,自动清理uni-id保存的token信息(仅开发调试时生效)"),W.removeStorageSync("uni_id_token"),W.removeStorageSync("uniIdToken"),W.removeStorageSync("uni_id_token_expired"))}var rt=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){return(0,l.default)(this,n),t.apply(this,arguments)}return(0,s.default)(n,[{key:"getAccessToken",value:function(){var e=this;return new Promise((function(t,n){var r="Anonymous_Access_token";e.setAccessToken(r),t(r)}))}},{key:"setupRequest",value:function(e,t){var n=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),r={"Content-Type":"application/json"};"auth"!==t&&(n.token=this.accessToken,r["x-basement-token"]=this.accessToken),r["x-serverless-sign"]=K.sign(n,this.config.clientSecret);var i=B();r["x-client-info"]=JSON.stringify(i);var a=tt(),o=a.token;return r["x-client-token"]=o,{url:this.config.requestUrl,method:"POST",data:n,dataType:"json",header:JSON.parse(JSON.stringify(r))}}},{key:"uploadFileToOSS",value:function(e){var t=this,n=e.url,r=e.formData,i=e.name,a=e.filePath,o=e.fileType,s=e.onUploadProgress;return new Promise((function(e,u){var c=t.adapter.uploadFile({url:n,formData:r,name:i,filePath:a,fileType:o,success:function(t){t&&t.statusCode<400?e(t):u(new j({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail:function(e){u(new j({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof s&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((function(e){s({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}},{key:"uploadFile",value:function(e){var t,n=this,r=e.filePath,i=e.cloudPath,a=e.fileType,o=void 0===a?"image":a,s=e.onUploadProgress;if(!i)throw new j({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});return this.getOSSUploadOptionsFromPath({cloudPath:i}).then((function(e){var i=e.result,a=i.url,u=i.formData,c=i.name;t=e.result.fileUrl;var l={url:a,formData:u,name:c,filePath:r,fileType:o};return n.uploadFileToOSS(Object.assign({},l,{onUploadProgress:s}))})).then((function(){return n.reportOSSUpload({cloudPath:i})})).then((function(e){return new Promise((function(n,i){e.success?n({success:!0,filePath:r,fileID:t}):i(new j({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))}))}},{key:"deleteFile",value:function(e){var t=e.fileList,n={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}},{key:"getTempFileURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fileList,n={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:t})};return this.request(this.setupRequest(n))}}]),n}(V),it={init:function(e){var t=new rt(e),n={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return n},t.customAuth=t.auth,t}};function at(e){var t,n=e.data;t=B();var r=JSON.parse(JSON.stringify(n||{}));if(Object.assign(r,{clientInfo:t}),!r.uniIdToken){var i=tt(),a=i.token;a&&(r.uniIdToken=a)}return r}function ot(e){var t=this,n=e.name,r=e.data,i=this.localAddress,a=this.localPort,o={aliyun:"aliyun",tencent:"tcb"}[this.config.provider],s=this.config.spaceId,u="http://".concat(i,":").concat(a,"/system/check-function"),c="http://".concat(i,":").concat(a,"/cloudfunctions/").concat(n);return new Promise((function(e,t){W.request({method:"POST",url:u,data:{name:n,platform:x,provider:o,spaceId:s},timeout:3e3,success:function(t){e(t)},fail:function(){e({data:{code:"NETWORK_ERROR",message:"连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"}})}})})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data,n=t||{},r=n.code,i=n.message;return{code:0===r?0:r||"SYS_ERR",message:i||"SYS_ERR"}})).then((function(e){var i=e.code,a=e.message;if(0!==i){switch(i){case"MODULE_ENCRYPTED":console.error("此云函数(".concat(n,")依赖加密公共模块不可本地调试,自动切换为云端已部署的云函数"));break;case"FUNCTION_ENCRYPTED":console.error("此云函数(".concat(n,")已加密不可本地调试,自动切换为云端已部署的云函数"));break;case"ACTION_ENCRYPTED":console.error(a||"需要访问加密的uni-clientDB-action,自动切换为云端环境");break;case"NETWORK_ERROR":var s="连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";throw console.error(s),new Error(s);case"SWITCH_TO_CLOUD":break;default:var u="检测本地调试服务出现错误:".concat(a,",请检查网络环境或重启客户端再试");throw console.error(u),new Error(u)}return t._originCallFunction({name:n,data:r})}return new Promise((function(e,n){var i=at.call(t,{data:r});W.request({method:"POST",url:c,data:{provider:o,platform:x,param:i},success:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.statusCode,i=t.data;return!r||r>=400?n(new j({code:i.code||"SYS_ERR",message:i.message||"request:fail"})):e({result:i})},fail:function(e){n(new j({code:e.code||e.errCode||"SYS_ERR",message:e.message||e.errMsg||"request:fail"}))}})}))}))}var st=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}],ut=/[\\^$.*+?()[\]{}|]/g,ct=RegExp(ut.source);function lt(e,t,n){return e.replace(new RegExp((r=t)&&ct.test(r)?r.replace(ut,"\\$&"):r,"g"),n);var r}function ft(e){var t=e.functionName,n=e.result,r=e.logPvd;if(this.config.useDebugFunction&&n&&n.requestId){var i=JSON.stringify({spaceId:this.config.spaceId,functionName:t,requestId:n.requestId});console.log("[".concat(r,"-request]").concat(i,"[/").concat(r,"-request]"))}}function dt(e){var t=e.callFunction,n=function(n){var r=this,i=n.name;n.data=at.call(e,{data:n.data});var a={aliyun:"aliyun",tencent:"tcb"}[this.config.provider];return t.call(this,n).then((function(e){return ft.call(r,{functionName:i,result:e,logPvd:a}),Promise.resolve(e)}),(function(e){return ft.call(r,{functionName:i,result:e,logPvd:a}),e&&e.message&&(e.message=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.message,n=void 0===t?"":t,r=e.extraInfo,i=void 0===r?{}:r,a=e.formatter,o=void 0===a?[]:a,s=0;s<o.length;s++){var u=o[s],c=u.rule,l=u.content,f=u.mode,d=n.match(c);if(d){for(var h=l,p=1;p<d.length;p++)h=lt(h,"{$".concat(p,"}"),d[p]);for(var g in i)h=lt(h,"{".concat(g,"}"),i[g]);return"replace"===f?h:n+h}}return n}({message:"[".concat(n.name,"]: ").concat(e.message),formatter:st,extraInfo:{functionName:i}})),Promise.reject(e)}))};e.callFunction=function(t){var r;return A&&e.debugInfo&&!e.debugInfo.forceRemote&&C?(e._originCallFunction||(e._originCallFunction=n),r=ot.call(this,t)):r=n.call(this,t),Object.defineProperty(r,"result",{get:function(){return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{}}}),r}}var ht=Symbol("CLIENT_DB_INTERNAL");function pt(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=ht,e.__ob__=void 0,new Proxy(e,{get:function(e,n,r){if("_uniClient"===n)return null;if(n in e||"string"!=typeof n){var i=e[n];return"function"==typeof i?i.bind(e):i}return t.get(e,n,r)}})}function gt(e){return{on:function(t,n){e[t]=e[t]||[],e[t].indexOf(n)>-1||e[t].push(n)},off:function(t,n){e[t]=e[t]||[];var r=e[t].indexOf(n);-1!==r&&e[t].splice(r,1)}}}var vt=["db.Geo","db.command","command.aggregate"];function mt(e,t){return vt.indexOf("".concat(e,".").concat(t))>-1}function yt(e){switch(w(e)){case"array":return e.map((function(e){return yt(e)}));case"object":return e._internalType===ht||Object.keys(e).forEach((function(t){e[t]=yt(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}var wt=function(){function e(t,n,r){(0,l.default)(this,e),this.content=t,this.prevStage=n||null,this.udb=null,this._database=r}return(0,s.default)(e,[{key:"toJSON",value:function(){for(var e=this,t=[e.content];e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((function(e){return{$method:e.$method,$param:yt(e.$param)}}))}}},{key:"getAction",value:function(){var e=this.toJSON().$db.find((function(e){return"action"===e.$method}));return e&&e.$param&&e.$param[0]}},{key:"getCommand",value:function(){return{$db:this.toJSON().$db.filter((function(e){return"action"!==e.$method}))}}},{key:"get",value:function(){return this._send("get",Array.from(arguments))}},{key:"add",value:function(){return this._send("add",Array.from(arguments))}},{key:"remove",value:function(){return this._send("remove",Array.from(arguments))}},{key:"update",value:function(){return this._send("update",Array.from(arguments))}},{key:"end",value:function(){return this._send("end",Array.from(arguments))}},{key:"set",value:function(){throw new Error("clientDB禁止使用set方法")}},{key:"_send",value:function(e,t){var n=this.getAction(),r=this.getCommand();if(r.$db.push({$method:e,$param:yt(t)}),A){var i=r.$db.find((function(e){return"collection"===e.$method})),a=i&&i.$param;a&&1===a.length&&"string"==typeof i.$param[0]&&i.$param[0].indexOf(",")>-1&&console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。")}return this._database._callCloudFunction({action:n,command:r})}},{key:"useAggregate",get:function(){for(var e=this,t=!1;e.prevStage;){e=e.prevStage;var n=e.content.$method;if("aggregate"===n||"pipeline"===n){t=!0;break}}return t}},{key:"count",get:function(){if(!this.useAggregate)return function(){return this._send("count",Array.from(arguments))};var e=this;return function(){return bt({$method:"count",$param:yt(Array.from(arguments))},e,this._database)}}}]),e}();function bt(e,t,n){return pt(new wt(e,t,n),{get:function(e,t){var r="db";return e&&e.content&&(r=e.content.$method),mt(r,t)?bt({$method:t},e,n):function(){return bt({$method:t,$param:yt(Array.from(arguments))},e,n)}}})}function _t(e){var t=e.path,n=e.method;return function(){function e(){(0,l.default)(this,e),this.param=Array.from(arguments)}return(0,s.default)(e,[{key:"toJSON",value:function(){return{$newDb:[].concat((0,a.default)(t.map((function(e){return{$method:e}}))),[{$method:n,$param:this.param}])}}}]),e}()}var kt,At=function(e){(0,f.default)(n,e);var t=(0,d.default)(n);function n(){return(0,l.default)(this,n),t.apply(this,arguments)}return(0,s.default)(n,[{key:"_callCloudFunction",value:function(e){var t=this,n=e.action,r=e.command,i=e.multiCommand,a=e.queryList;function o(e,t){if(i&&a)for(var n=0;n<a.length;n++){var r=a[n];r.udb&&"function"==typeof r.udb.setResult&&(t?r.udb.setResult(t):r.udb.setResult(e.result.dataList[n]))}}var s=M(L("database","invoke")),u=this._uniClient;return s.then((function(){return u.callFunction({name:"DCloud-clientDB",data:{action:n,command:r,multiCommand:i}})})).then((function(e){var n=e.result,r=n.code,i=n.message,a=n.token,s=n.tokenExpired,u=n.systemInfo,c=void 0===u?[]:u;if(c)for(var l=0;l<c.length;l++){var f=c[l],d=f.level,h=f.message,p=f.detail,g=console["app-plus"===x&&"warn"===d?"error":d]||console.log,v="[System Info]"+h;p&&(v="".concat(v,"\n详细信息:").concat(p)),g(v)}if(r){var m=new _(i,r);return t._callback("error",[m]),Promise.reject(m)}a&&s&&(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.token,n=e.tokenExpired;t&&W.setStorageSync("uni_id_token",t),n&&W.setStorageSync("uni_id_token_expired",n)}({token:a,tokenExpired:s}),t._callbackAuth("refreshToken",[{token:a,tokenExpired:s}]),t._callback("refreshToken",[{token:a,tokenExpired:s}]));var y=e.result.affectedDocs;return"number"==typeof y&&Object.defineProperty(e.result,"affectedDocs",{get:function(){return console.warn("affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"),y}}),M(L("database","success"),e).then((function(){return M(L("database","complete"),e)})).then((function(){return o(e,null),Promise.resolve(e)}))}),(function(e){var n=new _(e.message,e.code||"SYSTEM_ERROR");return t._callback("error",[n]),/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),M(L("database","fail"),e).then((function(){return M(L("database","complete"),e)})).then((function(){return o(null,e),Promise.reject(e)}))}))}}]),n}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.uniClient,r=void 0===n?{}:n;(0,l.default)(this,e),this._uniClient=r,this._authCallBacks={},this._dbCallBacks={},r.isDefault&&(this._dbCallBacks=E("_globalUniCloudDatabaseCallback")),this.auth=gt(this._authCallBacks),Object.assign(this,gt(this._dbCallBacks)),this.env=pt({},{get:function(e,t){return{$env:t}}}),this.Geo=pt({},{get:function(e,t){return _t({path:["Geo"],method:t})}}),this.serverDate=_t({path:[],method:"serverDate"}),this.RegExp=_t({path:[],method:"RegExp"})}return(0,s.default)(e,[{key:"getCloudEnv",value:function(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}},{key:"_callback",value:function(e,t){var n=this._dbCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,(0,a.default)(t))}))}},{key:"_callbackAuth",value:function(e,t){var n=this._authCallBacks;n[e]&&n[e].forEach((function(e){e.apply(void 0,(0,a.default)(t))}))}},{key:"multiSend",value:function(){var e=Array.from(arguments),t=e.map((function(e){var t=e.getAction(),n=e.getCommand();if("getTemp"!==n.$db[n.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:n}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}]),e}());function xt(e){e.database=function(t){if(t&&Object.keys(t).length>0)return e.init(t).database();if(this._database)return this._database;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return pt(new e(t),{get:function(e,t){return mt("db",t)?bt({$method:t},null,e):function(){return bt({$method:t,$param:yt(Array.from(arguments))},null,e)}}})}(At,{uniClient:e});return this._database=n,n}}var St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ct=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Tt(){var e,t,n=tt().token||"",r=n.split(".");if(!n||3!==r.length)return{uid:null,role:[],permission:[],tokenExpired:0};try{e=JSON.parse((t=r[1],decodeURIComponent(kt(t).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(n){throw new Error("获取当前用户信息出错,详细错误信息为:"+n.message)}return e.tokenExpired=1e3*e.exp,delete e.exp,delete e.iat,e}kt="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Ct.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",a=0;a<e.length;)t=St.indexOf(e.charAt(a++))<<18|St.indexOf(e.charAt(a++))<<12|(n=St.indexOf(e.charAt(a++)))<<6|(r=St.indexOf(e.charAt(a++))),i+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i}:atob;var Pt=g(v((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="chooseAndUploadFile:ok",r="chooseAndUploadFile:fail";function i(e,t){return e.tempFiles.forEach((function(e,n){e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+n+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((function(e){return e.path}))),e}function a(e,t,r){var i=r.onChooseFile,a=r.onUploadProgress;return t.then((function(e){if(i){var t=i(e);if(void 0!==t)return Promise.resolve(t).then((function(t){return void 0===t?e:t}))}return e})).then((function(t){return!1===t?{errMsg:n,tempFilePaths:[],tempFiles:[]}:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,i=arguments.length>3?arguments[3]:void 0;(t=Object.assign({},t)).errMsg=n;var a=t.tempFiles,o=a.length,s=0;return new Promise((function(n){for(;s<r;)u();function u(){var r=s++;if(r>=o)!a.find((function(e){return!e.url&&!e.errMsg}))&&n(t);else{var c=a[r];e.uploadFile({filePath:c.path,cloudPath:c.cloudPath,fileType:c.fileType,onUploadProgress:function(e){e.index=r,e.tempFile=c,e.tempFilePath=c.path,i&&i(e)}}).then((function(e){c.url=e.fileID,r<o&&u()})).catch((function(e){c.errMsg=e.errMsg||e.message,r<o&&u()}))}}}))}(e,t,5,a)}))}t.initChooseAndUploadFile=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{type:"all"};return"image"===t.type?a(e,function(e){var t=e.count,n=e.sizeType,a=e.sourceType,o=void 0===a?["album","camera"]:a,s=e.extension;return new Promise((function(e,a){uni.chooseImage({count:t,sizeType:n,sourceType:o,extension:s,success:function(t){e(i(t,"image"))},fail:function(e){a({errMsg:e.errMsg.replace("chooseImage:fail",r)})}})}))}(t),t):"video"===t.type?a(e,function(e){var t=e.camera,n=e.compressed,a=e.maxDuration,o=e.sourceType,s=void 0===o?["album","camera"]:o,u=e.extension;return new Promise((function(e,o){uni.chooseVideo({camera:t,compressed:n,maxDuration:a,sourceType:s,extension:u,success:function(t){var n=t.tempFilePath,r=t.duration,a=t.size,o=t.height,s=t.width;e(i({errMsg:"chooseVideo:ok",tempFilePaths:[n],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:n,size:a,type:t.tempFile&&t.tempFile.type||"",width:s,height:o,duration:r,fileType:"video",cloudPath:""}]},"video"))},fail:function(e){o({errMsg:e.errMsg.replace("chooseVideo:fail",r)})}})}))}(t),t):a(e,function(e){var t=e.count,n=e.extension;return new Promise((function(e,a){var o=uni.chooseFile;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(o=wx.chooseMessageFile),"function"!=typeof o)return a({errMsg:r+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});o({type:"all",count:t,extension:n,success:function(t){e(i(t))},fail:function(e){a({errMsg:e.errMsg.replace("chooseFile:fail",r)})}})}))}(t),t)}}}))),It="manual";function Ot(e){return{props:{localdata:{type:Array,default:function(){return[]}},options:{type:[Object,Array],default:function(){return{}}},spaceInfo:{type:Object,default:function(){return{}}},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:function(){return{mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{}}},created:function(){var e=this;this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((function(){var t=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((function(n){t.push(e[n])})),t}),(function(t,n){if(e.loadtime!==It){for(var r=!1,i=[],a=2;a<t.length;a++)t[a]!==n[a]&&(i.push(t[a]),r=!0);t[0]!==n[0]&&(e.mixinDatacomPage.current=e.pageCurrent),e.mixinDatacomPage.size=e.pageSize,e.onMixinDatacomPropsChange(r,i)}}))},methods:{onMixinDatacomPropsChange:function(e,t){},mixinDatacomEasyGet:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getone,r=void 0!==n&&n,i=t.success,a=t.fail;this.mixinDatacomLoading||(this.mixinDatacomLoading=!0,this.mixinDatacomErrorMessage="",this.mixinDatacomGet().then((function(t){e.mixinDatacomLoading=!1;var n=t.result,a=n.data,o=n.count;e.getcount&&(e.mixinDatacomPage.count=o),e.mixinDatacomHasMore=a.length<e.pageSize;var s=r?a.length?a[0]:void 0:a;e.mixinDatacomResData=s,i&&i(s)})).catch((function(t){e.mixinDatacomLoading=!1,e.mixinDatacomErrorMessage=t,a&&a(t)})))},mixinDatacomGet:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.database(this.spaceInfo),i=n.action||this.action;i&&(r=r.action(i));var o=n.collection||this.collection;r=Array.isArray(o)?(t=r).collection.apply(t,(0,a.default)(o)):r.collection(o);var s=n.where||this.where;s&&Object.keys(s).length&&(r=r.where(s));var u=n.field||this.field;u&&(r=r.field(u));var c=n.foreignKey||this.foreignKey;c&&(r=r.foreignKey(c));var l=n.groupby||this.groupby;l&&(r=r.groupBy(l));var f=n.groupField||this.groupField;f&&(r=r.groupField(f)),!0===(void 0!==n.distinct?n.distinct:this.distinct)&&(r=r.distinct());var d=n.orderby||this.orderby;d&&(r=r.orderBy(d));var h=void 0!==n.pageCurrent?n.pageCurrent:this.mixinDatacomPage.current,p=void 0!==n.pageSize?n.pageSize:this.mixinDatacomPage.size,g=void 0!==n.getcount?n.getcount:this.getcount,v=void 0!==n.gettree?n.gettree:this.gettree,m=void 0!==n.gettreepath?n.gettreepath:this.gettreepath,y={getCount:g},w={limitLevel:void 0!==n.limitlevel?n.limitlevel:this.limitlevel,startWith:void 0!==n.startwith?n.startwith:this.startwith};return v&&(y.getTree=w),m&&(y.getTreePath=w),r=r.skip(p*(h-1)).limit(p).get(y),r}}}}function Et(e,t){return Rt.apply(this,arguments)}function Rt(){return Rt=(0,i.default)(regeneratorRuntime.mark((function e(t,n){var r,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r="http://".concat(t,":").concat(n,"/system/ping"),e.prev=1,e.next=4,a={url:r,timeout:500},new Promise((function(e,t){W.request((0,u.default)((0,u.default)({},a),{},{success:function(t){e(t)},fail:function(e){t(e)}}))}));case 4:return i=e.sent,e.abrupt("return",!(!i.data||0!==i.data.code));case 8:return e.prev=8,e.t0=e["catch"](1),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,8]])}))),Rt.apply(this,arguments)}function Dt(e){if(!e.initUniCloudStatus||"rejected"===e.initUniCloudStatus){var t,n=Promise.resolve();t=1,n=new Promise((function(e,n){setTimeout((function(){e()}),t)})),e.isReady=!1,e.isDefault=!1;var r=e.auth();e.initUniCloudStatus="pending",e.initUniCloud=n.then((function(){return r.getLoginState()})).then((function(e){return e?Promise.resolve():r.signInAnonymously()})).then((function(){if(!A)return Promise.resolve();if(A&&e.debugInfo){var t=e.debugInfo,n=t.address,r=t.servePort;return function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(t,n){var r,i,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=0;case 1:if(!(i<t.length)){e.next=11;break}return a=t[i],e.next=5,Et(a,n);case 5:if(!e.sent){e.next=8;break}return r=a,e.abrupt("break",11);case 8:i++,e.next=1;break;case 11:return e.abrupt("return",{address:r,port:n});case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()(n,r)}})).then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.address,r=t.port;if(!A)return Promise.resolve();if(n)e.localAddress=n,e.localPort=r;else if(e.debugInfo){var i=console["app-plus"===x?"error":"warn"],a="";"remote"===e.debugInfo.initialLaunchType?(e.debugInfo.forceRemote=!0,a="当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs"):a="无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs","h5"===x&&(a+="\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"),i(a)}})).then((function(){nt(),e.isReady=!0,e.initUniCloudStatus="fulfilled"})).catch((function(t){console.error(t),e.initUniCloudStatus="rejected"}))}}var Ut=new(function(){function e(){(0,l.default)(this,e)}return(0,s.default)(e,[{key:"init",value:function(e){var t={},n=!1!==e.debugFunction&&A&&("h5"===x&&navigator.userAgent.indexOf("HBuilderX")>0||"app-plus"===x);switch(e.provider){case"tencent":t=et.init(Object.assign(e,{useDebugFunction:n}));break;case"aliyun":t=G.init(Object.assign(e,{useDebugFunction:n}));break;case"private":t=it.init(Object.assign(e,{useDebugFunction:n}));break;default:throw new Error("未提供正确的provider参数")}var r=S;return A&&r&&!r.code&&(t.debugInfo=r),Dt(t),t.reInit=function(){Dt(this)},dt(t),function(e){var t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),xt(t),function(e){e.getCurrentUserInfo=Tt,e.chooseAndUploadFile=Pt.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Ot(e)}})}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((function(e){if(t[e]){var n=t[e];t[e]=function(){return t.reInit(),n.apply(t,Array.from(arguments))},t[e]=q(t[e],e).bind(t)}})),t.init=this.init,t}}]),e}());(function(){var e=C,t={};if(1===e.length)t=e[0],Ut=Ut.init(t),Ut.isDefault=!0;else{var n,r=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo"];n=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":T?"应用未关联服务空间,请在uniCloud目录右键关联服务空间":"uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间",r.forEach((function(e){Ut[e]=function(){return console.error(n),Promise.reject(new j({code:"SYS_ERR",message:n}))}}))}Object.assign(Ut,{get mixinDatacom(){return Ot(Ut)}}),Ut.addInterceptor=U,Ut.removeInterceptor=F,A&&"h5"===x&&(window.uniCloud=Ut)})();var Ft=Ut;t.default=Ft}).call(this,n("c8ba"))},b380:function(e,t,n){"use strict";function r(e,n){return t.default=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,n)}n("131a"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},b44f:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAQCAYAAAAMJL+VAAAAAXNSR0IArs4c6QAAAStJREFUOE+11DlLBEEUBOBvPcFEBM01EARBTRQEMyN/sZGZByiCR6IIIoZqoIGIt7ylW2Znx9lhZTsZuqe76lV1vW4Z8GgNGF+ZIM+/+yTuOl+l4L8kHbWVCUbT33fa6poqyXuL59tQRYIRbGICu7jHEL562JXBp7GBF+zgo0wwjC0sJPADXCUVVWryWnznsY4ZXGAbn2WCmI9hFSup6jMc4rWkJoOPYw1Laf8JjvCWVRctKlYZKqKiSdwkyx5KVmVLZvGEfVymPb9YdTEtAjziOAGElXOp8ilcYw9RQKOYRhH5crMFy2ntOYFEEMLj02RJWFiZurpOLl5i2LCIUBXkdzjHbU0IumL6VxqLRGFPjKg+eqRnrzR9i+piWtsmTQn6fJo6O7lvkLqDPy7tQhFU5CYMAAAAAElFTkSuQmCC"},b85c:function(e,t,n){"use strict";n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var r=i(n("06c5"));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=(0,r.default)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n["return"]||n["return"]()}finally{if(u)throw o}}}}},baa5:function(e,t,n){var r=n("23e7"),i=n("e58c");r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},bd82:function(e,t,n){"use strict";n("a9e3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={props:{show:{type:Boolean,default:uni.$u.props.loadingIcon.show},color:{type:String,default:uni.$u.props.loadingIcon.color},textColor:{type:String,default:uni.$u.props.loadingIcon.textColor},vertical:{type:Boolean,default:uni.$u.props.loadingIcon.vertical},mode:{type:String,default:uni.$u.props.loadingIcon.mode},size:{type:[String,Number],default:uni.$u.props.loadingIcon.size},textSize:{type:[String,Number],default:uni.$u.props.loadingIcon.textSize},text:{type:[String,Number],default:uni.$u.props.loadingIcon.text},timingFunction:{type:String,default:uni.$u.props.loadingIcon.timingFunction},duration:{type:[String,Number],default:uni.$u.props.loadingIcon.duration},inactiveColor:{type:String,default:uni.$u.props.loadingIcon.inactiveColor}}};t.default=r},bf19:function(e,t,n){"use strict";var r=n("23e7");r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},cac3:function(e,t,n){"use strict";n.r(t);var r=n("64e4"),i=n("5604");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("4766");var o,s=n("f0c5"),u=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,"2096554a",null,!1,r["a"],o);t["default"]=u.exports},cf14:function(e,t,n){"use strict";var r=n("4ea4");n("4160"),n("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("96cf");var i=r(n("1da1")),a=n("d089"),o=r(n("cac3")),s={components:{"uni-data-select":o.default},data:function(){return{id:"",String:"",show:!1,value:0,detail:{sort:{name:""}},list1:[],range:[{value:0,text:"篮球"},{value:1,text:"足球"},{value:2,text:"游泳"}]}},onLoad:function(e){this.id=e.id,this.product_detail(),this.report_list()},methods:{open:function(){},close:function(){this.show=!1},change:function(e){console.log("e:",e)},report_list:function(){var e=this;return(0,i.default)(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,a.report_list)();case 3:n=t.sent,console.log("report_list",n),e.range=n.list,e.range.forEach((function(e,t){e.text=e.name})),t.next=13;break;case 9:t.prev=9,t.t0=t["catch"](0),uni.showToast({title:t.t0,icon:"none"}),console.log("report_list",t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))()},product_favorite:function(){var e=this;return(0,i.default)(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,a.product_favorite)(e.id);case 3:n=t.sent,console.log("product_favorite",n),e.product_detail(),t.next=12;break;case 8:t.prev=8,t.t0=t["catch"](0),uni.showToast({title:t.t0,icon:"none"}),console.log("product_favorite",t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))()},product_detail:function(){var e=this;return(0,i.default)(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,a.product_detail)(e.id);case 3:n=t.sent,console.log("product_detail",n),e.detail=n.detail,e.list1=n.detail.images_preview,t.next=13;break;case 9:t.prev=9,t.t0=t["catch"](0),uni.showToast({title:t.t0,icon:"none"}),console.log("product_detail",t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))()},product_buy:function(){var e=this;return(0,i.default)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:uni.navigateTo({url:"/pages/index/buy?id="+e.id});case 1:case"end":return t.stop()}}),t)})))()}}};t.default=s},d642:function(e,t,n){var r=n("24fb");t=r(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */uni-page-body[data-v-2dcc20f1]{background-color:#f0f0f0}.Detail[data-v-2dcc20f1]{padding-bottom:%?160?%}.Detail .topbg .bgimage[data-v-2dcc20f1]{width:%?750?%;height:%?750?%}.Detail .topbg .topmain[data-v-2dcc20f1]{padding:%?32?%;background-color:#fff}.Detail .topbg .topmain .toptitle[data-v-2dcc20f1]{display:flex;align-items:center;justify-content:space-between}.Detail .topbg .topmain .toptitle .money[data-v-2dcc20f1]{font-size:%?52?%;font-weight:500;font-family:PingFang SC;color:#f85317}.Detail .topbg .topmain .toptitle .money uni-text[data-v-2dcc20f1]{color:#f85317;font-size:%?32?%;font-weight:500;font-family:PingFang SC}.Detail .topbg .topmain .toptitle .topgroup[data-v-2dcc20f1]{display:flex;align-items:center}.Detail .topbg .topmain .toptitle .topgroup uni-image[data-v-2dcc20f1]{margin-right:%?32?%;width:%?40?%;height:%?40?%}.Detail .topbg .topmain .topcommit[data-v-2dcc20f1]{margin-top:%?16?%;color:#000;font-size:%?36?%;font-weight:600;font-family:PingFang SC;text-align:left}.Detail .topbg .topmain .toptype[data-v-2dcc20f1]{margin-top:%?24?%;display:flex;align-items:center;color:rgba(0,0,0,.4);font-size:%?26?%;font-weight:400;font-family:PingFang SC;justify-content:space-between}.Detail .mainmiss[data-v-2dcc20f1]{margin-top:%?24?%;background-color:#fff;border-radius:%?24?%;padding:%?32?%;box-sizing:border-box}.Detail .mainmiss .misstop[data-v-2dcc20f1]{display:flex;align-items:center;color:rgba(0,0,0,.9);font-size:%?32?%;font-weight:600;font-family:PingFang SC}.Detail .mainmiss .misstop .tip[data-v-2dcc20f1]{margin-right:%?8?%;width:%?4?%;height:%?24?%;border-radius:%?18?%;opacity:1;background:#fed000}.Detail .mainmiss .showcontant[data-v-2dcc20f1]{margin-top:%?24?%;color:rgba(0,0,0,.4);font-size:%?24?%;font-weight:400;font-family:PingFang SC}.Detail .mainmiss .missbar[data-v-2dcc20f1]{margin-top:%?24?%}.Detail .mainmiss .missbar .name[data-v-2dcc20f1]{color:rgba(0,0,0,.6);font-size:%?28?%;font-weight:400;font-family:PingFang SC;width:%?168?%}.Detail .mainmiss .missbar .namelast[data-v-2dcc20f1]{color:#000;font-size:%?28?%;font-weight:400;font-family:PingFang SC}.Detail .contail[data-v-2dcc20f1]{margin-top:%?24?%;background-color:#fff;border-radius:%?24?%;padding:%?32?%;box-sizing:border-box}.Detail .contail .misstop[data-v-2dcc20f1]{display:flex;align-items:center;color:rgba(0,0,0,.9);font-size:%?32?%;font-weight:600;font-family:PingFang SC}.Detail .contail .misstop .tip[data-v-2dcc20f1]{margin-right:%?8?%;width:%?4?%;height:%?24?%;border-radius:%?18?%;opacity:1;background:#fed000}.Detail .btn[data-v-2dcc20f1]{position:fixed;bottom:0;left:0;width:100%;height:%?128?%;padding:%?16?% %?32?%;box-sizing:border-box;opacity:1;background:#fff}.Detail .btn .paybtn[data-v-2dcc20f1]{width:100%;height:%?96?%;line-height:%?96?%;text-align:center;border-radius:%?28?%;opacity:1;color:rgba(0,0,0,.9);font-size:%?32?%;font-weight:600;font-family:PingFang SC;background:linear-gradient(134.8deg,#ffe864,#ffd800)}.Detail .popshow[data-v-2dcc20f1]{border-radius:%?32?%;width:%?622?%;padding:%?48?%;box-sizing:border-box}.Detail .popshow .title[data-v-2dcc20f1]{color:#000;font-size:%?28?%;font-weight:600;font-family:PingFang SC;text-align:center}.Detail .popshow .showbar[data-v-2dcc20f1]{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;border-bottom:1px solid #f0f0f0}.Detail .popshow .showbar .name[data-v-2dcc20f1]{color:rgba(0,0,0,.9);font-size:%?28?%;font-weight:400;font-family:PingFang SC}.Detail .popshow .showbar .select[data-v-2dcc20f1]{display:flex;align-items:center;width:%?128?%}.Detail .popshow .showbar .select uni-image[data-v-2dcc20f1]{width:%?16?%;height:%?24?%}.Detail .popshow .showarear[data-v-2dcc20f1]{text-align:left}.Detail .popshow .showarear .showtltle[data-v-2dcc20f1]{margin-top:%?32?%;color:#000;font-size:%?28?%;font-weight:400;font-family:PingFang SC}.Detail .popshow .showarear .showcont[data-v-2dcc20f1]{color:rgba(0,0,0,.4);font-size:%?24?%;font-weight:400;font-family:PingFang SC;text-align:left}.Detail .popshow .showarear uni-textarea[data-v-2dcc20f1]{margin-top:%?12?%;box-sizing:border-box;padding:%?24?%;width:%?526?%;height:%?252?%;border:%?2?% solid rgba(1,1,1,.3)}.Detail .popshow .btngroup[data-v-2dcc20f1]{margin-top:%?80?%;display:flex;align-items:center;justify-content:space-between}.Detail .popshow .btngroup .concle[data-v-2dcc20f1]{width:%?240?%;height:%?76?%;border-radius:%?16?%;opacity:1;line-height:%?76?%;color:rgba(0,0,0,.9);font-size:%?28?%;font-weight:500;font-family:PingFang SC;text-align:center;background:#f6f6f6}.Detail .popshow .btngroup .requt[data-v-2dcc20f1]{width:%?240?%;height:%?76?%;color:rgba(0,0,0,.9);font-size:%?28?%;font-weight:500;font-family:PingFang SC;text-align:center;line-height:%?76?%;border-radius:%?16?%;opacity:1;background:#fed000}body.?%PAGE?%[data-v-2dcc20f1]{background-color:#f0f0f0}',""]),e.exports=t},d967:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n("d3b7"),n("4ae1"),n("25f0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=r},dfc8:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var r={uSwiper:n("5f87").default,uPopup:n("410c").default,uniDataSelect:n("cac3").default},i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-uni-view",{staticClass:"Detail"},[r("v-uni-view",{staticClass:"topbg"},[r("v-uni-view",{staticClass:"bgimage"},[r("u-swiper",{attrs:{list:e.list1,height:375},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change.apply(void 0,arguments)},click:function(t){arguments[0]=t=e.$handleEvent(t),e.click.apply(void 0,arguments)}}})],1),r("v-uni-view",{staticClass:"topmain"},[r("v-uni-view",{staticClass:"toptitle"},[r("v-uni-view",{staticClass:"money"},[r("v-uni-text",[e._v("¥")]),e._v(e._s(e.detail.price))],1),r("v-uni-view",{staticClass:"topgroup"},[1==e.detail.is_fav?r("v-uni-image",{attrs:{src:n("66c6"),mode:""},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.product_favorite.apply(void 0,arguments)}}}):r("v-uni-image",{attrs:{src:n("5d29"),mode:""},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.product_favorite.apply(void 0,arguments)}}}),r("v-uni-image",{attrs:{src:n("3039"),mode:""}}),r("v-uni-image",{attrs:{src:n("34c1"),mode:""},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.show=!0}}})],1)],1),r("v-uni-view",{staticClass:"topcommit"},[e._v(e._s(e.detail.name))]),r("v-uni-view",{staticClass:"toptype"},[r("v-uni-view",{staticClass:"type"},[e._v("所属分类:"+e._s(e.detail.sort.name))]),r("v-uni-view",{staticClass:"time"},[e._v("发布于:"+e._s(e.detail.publishtime))])],1)],1)],1),r("v-uni-view",{staticClass:"mainmiss"},[r("v-uni-view",{staticClass:"misstop"},[r("v-uni-view",{staticClass:"tip"}),r("v-uni-text",[e._v("卖家信息")])],1),r("v-uni-view",{staticClass:"missbar flexA"},[r("v-uni-view",{staticClass:"name"},[e._v("姓名")]),r("v-uni-view",{staticClass:"namelast"},[e._v(e._s(e.detail.seller_name))])],1),r("v-uni-view",{staticClass:"missbar flexA"},[r("v-uni-view",{staticClass:"name"},[e._v("联系电话:")]),r("v-uni-view",{staticClass:"namelast"},[e._v(e._s(e.detail.seller_mobile))])],1),r("v-uni-view",{staticClass:"missbar flexA"},[r("v-uni-view",{staticClass:"name"},[e._v("钱包地址:")]),r("v-uni-view",{staticClass:"namelast"},[e._v(e._s(e.detail.package_add))])],1),r("v-uni-view",{staticClass:"missbar flexA"},[r("v-uni-view",{staticClass:"name"},[e._v("微信号:")]),r("v-uni-view",{staticClass:"namelast"},[e._v(e._s(e.detail.wechat_num))])],1)],1),r("v-uni-view",{staticClass:"contail"},[r("v-uni-view",{staticClass:"misstop"},[r("v-uni-view",{staticClass:"tip"}),r("v-uni-text",[e._v("卖家信息")])],1),r("v-uni-view",{staticClass:"showcontant"},[e._v(e._s(e.detail.description))])],1),r("v-uni-view",{staticClass:"btn"},[r("v-uni-view",{staticClass:"paybtn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.product_buy.apply(void 0,arguments)}}},[e._v("立即购买")])],1),r("u-popup",{attrs:{show:e.show,mode:"center",round:12},on:{close:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)},open:function(t){arguments[0]=t=e.$handleEvent(t),e.open.apply(void 0,arguments)}}},[r("v-uni-view",{staticClass:"popshow"},[r("v-uni-view",{staticClass:"title"},[e._v("举报")]),r("v-uni-view",{staticClass:"showbar"},[r("v-uni-view",{staticClass:"name"},[e._v("举报原因")]),r("v-uni-view",{staticClass:"select"},[r("uni-data-select",{attrs:{localdata:e.range},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.change()}},model:{value:e.value,callback:function(t){e.value=t},expression:"value"}}),r("v-uni-image",{attrs:{src:n("b44f"),mode:""}})],1)],1),r("v-uni-view",{staticClass:"showarear"},[r("v-uni-view",{staticClass:"showtltle"},[e._v("详细描述")]),r("v-uni-view",{staticClass:"showcont"},[e._v("description")])],1),r("v-uni-view",{staticClass:"btngroup"},[r("v-uni-view",{staticClass:"concle",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.close.apply(void 0,arguments)}}},[e._v("取消")]),r("v-uni-view",{staticClass:"requt",on:{click:function(t){arguments[0]=t=e.$handleEvent(t)}}},[e._v("提交")])],1)],1)],1)],1)},a=[]},e34f:function(e,t,n){var r=n("24fb");t=r(!1),t.push([e.i,'\n@media screen and (max-width:500px){.hide-on-phone[data-v-2096554a]{display:none}}\n.uni-stat__select[data-v-2096554a]{display:flex;align-items:center;padding:15px;cursor:pointer}.uni-stat__actived[data-v-2096554a]{border:none}.uni-label-text[data-v-2096554a]{font-size:14px;font-weight:700;color:#555;margin:auto 0;margin-right:5px}.uni-select[data-v-2096554a]{font-size:14px;box-sizing:border-box;border-radius:4px;width:%?168?%;position:relative;\ndisplay:flex;-webkit-user-select:none;user-select:none;\nflex-direction:row;align-items:center}.uni-select__label[data-v-2096554a]{font-size:16px;line-height:22px;padding-right:10px;color:#999}.uni-select__input-box[data-v-2096554a]{min-height:36px;position:relative;\ndisplay:flex;\nflex:1;flex-direction:row;align-items:center}.uni-select__input[data-v-2096554a]{flex:1;font-size:14px;height:22px;line-height:22px}.uni-select__input-plac[data-v-2096554a]{font-size:14px;color:#999}.uni-select__selector[data-v-2096554a]{\nbox-sizing:border-box;\nposition:absolute;top:calc(100% + 12px);left:0;width:100%;background-color:#fff;border:1px solid #ebeef5;border-radius:6px;box-shadow:0 2px 12px 0 rgba(0,0,0,.1);z-index:2;padding:4px 0}.uni-select__selector-scroll[data-v-2096554a]{\nmax-height:200px;box-sizing:border-box\n}.uni-select__selector-empty[data-v-2096554a],\n.uni-select__selector-item[data-v-2096554a]{\ndisplay:flex;cursor:pointer;\nline-height:36px;font-size:14px;text-align:center;\n\t/* border-bottom: solid 1px #DDDDDD; */padding:0 10px}.uni-select__selector-item[data-v-2096554a]:hover{background-color:#f9f9f9}.uni-select__selector-empty[data-v-2096554a]:last-child,\n.uni-select__selector-item[data-v-2096554a]:last-child{\nborder-bottom:none\n}\n/* picker 弹出层通用的指示小三角 */.uni-popper__arrow[data-v-2096554a],\n.uni-popper__arrow[data-v-2096554a]::after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:6px}.uni-popper__arrow[data-v-2096554a]{-webkit-filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));top:-6px;left:10%;margin-right:3px;border-top-width:0;border-bottom-color:#ebeef5}.uni-popper__arrow[data-v-2096554a]::after{content:" ";top:1px;margin-left:-6px;border-top-width:0;border-bottom-color:#fff}.uni-select__input-text[data-v-2096554a]{width:280px;color:#333;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden}.uni-select__input-placeholder[data-v-2096554a]{color:#666}.uni-select--mask[data-v-2096554a]{position:fixed;top:0;bottom:0;right:0;left:0}',""]),e.exports=t},f37b:function(e,t,n){"use strict";var r=n("0745"),i=n.n(r);i.a},f4b3:function(e,t,n){"use strict";var r=n("23e7"),i=n("d039"),a=n("7b0b"),o=n("c04e"),s=i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}));r({target:"Date",proto:!0,forced:s},{toJSON:function(e){var t=a(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},f905:function(e,t,n){"use strict";var r=n("4ea4");n("a630"),n("3ca3"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("bd82")),a={name:"u-loading-icon",mixins:[uni.$u.mpMixin,uni.$u.mixin,i.default],data:function(){return{array12:Array.from({length:12}),aniAngel:360,webviewHide:!1,loading:!1}},computed:{otherBorderColor:function(){var e=uni.$u.colorGradient(this.color,"#ffffff",100)[80];return"circle"===this.mode?this.inactiveColor?this.inactiveColor:e:"transparent"}},watch:{show:function(e){}},mounted:function(){this.init()},methods:{init:function(){setTimeout((function(){}),20)},addEventListenerToWebview:function(){var e=this,t=getCurrentPages(),n=t[t.length-1],r=n.$getAppWebview();r.addEventListener("hide",(function(){e.webviewHide=!0})),r.addEventListener("show",(function(){e.webviewHide=!1}))}}};t.default=a},fa95:function(e,t,n){"use strict";function r(e){return-1!==Function.toString.call(e).indexOf("[native code]")}n("c975"),n("d3b7"),n("25f0"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=r}}]);