@@ -47,5 +47,5 @@ var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t
},{}],"zMBz":[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;vart=o(require("md5")),e=o(require("qs")),r=require("./constants"),n=require("./helper");functiono(t){returnt&&t.__esModule?t:{default:t}}functioni(t){return(i="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft})(t)}functiona(){a=function(){returnt};vart={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeofSymbol?Symbol:{},c=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";functionl(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(T){l=function(t,e,r){returnt[e]=r}}functionf(t,e,r,o){vari=e&&e.prototypeinstanceofy?e:y,a=Object.create(i.prototype),c=newS(o||[]);returnn(a,"_invoke",{value:j(t,r,c)}),a}functionh(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(T){return{type:"throw",arg:T}}}t.wrap=f;varp={};functiony(){}functionv(){}functiond(){}varg={};l(g,c,function(){returnthis});varm=Object.getPrototypeOf,b=m&&m(m(k([])));b&&b!==e&&r.call(b,c)&&(g=b);varw=d.prototype=y.prototype=Object.create(g);functionx(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){returnthis._invoke(e,t)})})}functionO(t,e){varo;n(this,"_invoke",{value:function(n,a){functionc(){returnnewe(function(o,c){!functionn(o,a,c,u){vars=h(t[o],t,a);if("throw"!==s.type){varl=s.arg,f=l.value;returnf&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,c,u)},function(t){n("throw",t,c,u)}):e.resolve(f).then(function(t){l.value=t,c(l)},function(t){returnn("throw",t,c,u)})}u(s.arg)}(n,a,o,c)})}returno=o?o.then(c,c):c()}})}functionj(t,e,r){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;return_()}for(r.method=o,r.arg=i;;){vara=r.delegate;if(a){varc=L(a,r);if(c){if(c===p)continue;returnc}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";varu=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}functionL(t,e){varr=e.method,n=t.iterator[r];if(void0===n)returne.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=newTypeError("The iterator does not provide a '"+r+"' method")),p;varo=h(n,t.iterator,e.arg);if("throw"===o.type)returne.method="throw",e.arg=o.arg,e.delegate=null,p;vari=o.arg;returni?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void0),e.delegate=null,p):i:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,p)}functionP(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionE(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}functionS(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}functionk(t){if(t){vare=t[c];if(e)returne.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){varn=-1,o=functione(){for(;++n<t.length;)if(r.call(t,n))returne.value=t[n],e.done=!1,e;returne.value=void0,e.done=!0,e};returno.next=o}}return{next:_}}function_(){return{value:void0,done:!0}}returnv.prototype=d,n(w,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:v,configurable:!0}),v.displayName=l(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){vare="function"==typeoft&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(O.prototype),l(O.prototype,u,function(){returnthis}),t.AsyncIterator=O,t.async=function(e,r,n,o,i){void0===i&&(i=Promise);vara=newO(f(e,r,n,o),i);returnt.isGeneratorFunction(r)?a:a.next().then(function(t){returnt.done?t.value:a.next()})},x(w),l(w,s,"Generator"),l(w,c,function(){returnthis}),l(w,"toString",function(){return"[object Generator]"}),t.keys=function(t){vare=Object(t),r=[];for(varnine)r.push(n);returnr.reverse(),functiont(){for(;r.length;){varn=r.pop();if(nine)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},t.values=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(E),!t)for(vareinthis)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;vare=this;functionn(r,n){returna.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void0),!!n}for(varo=this.tryEntries.length-1;o>=0;--o){vari=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)returnn("end");if(i.tryLoc<=this.prev){varc=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)returnn(i.catchLoc,!0);if(this.prev<i.finallyLoc)returnn(i.finallyLoc)}elseif(c){if(this.prev<i.catchLoc)returnn(i.catchLoc,!0)}else{if(!u)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returnn(i.finallyLoc)}}}},abrupt:function(t,e){for(varn=this.tryEntries.length-1;n>=0;--n){varo=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){vari=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);vara=i?i.completion:{};returna.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),E(r),p}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){varo=n.arg;E(r)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(t,e,r){returnthis.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void0),p}},t}functionc(t,e){varr=Object.keys(t);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){returnObject.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}returnr}functionu(t){for(vare=1;e<arguments.length;e++){varr=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){s(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}returnt}functions(t,e,r){return(e=x(e))int?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}functionl(t,e,r,n,o,i,a){try{varc=t[i](a),u=c.value}catch(s){returnvoidr(s)}c.done?e(u):Promise.resolve(u).then(n,o)}functionf(t){returnfunction(){vare=this,r=arguments;returnnewPromise(function(n,o){vari=t.apply(e,r);functiona(t){l(i,n,o,a,c,"next",t)}functionc(t){l(i,n,o,a,c,"throw",t)}a(void0)})}}functionh(t,e){returng(t)||d(t,e)||y(t,e)||p()}functionp(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functiony(t,e){if(t){if("string"==typeoft)returnv(t,e);varr=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(t,e):void0}}functionv(t,e){(null==e||e>t.length)&&(e=t.length);for(varr=0,n=newArray(e);r<e;r++)n[r]=t[r];returnn}functiond(t,e){varr=null==t?null:"undefined"!=typeofSymbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){varn,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}elsefor(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(l){s=!0,o=l}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throwo}}returnc}}functiong(t){if(Array.isArray(t))returnt}functionm(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionb(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,x(n.key),n)}}functionw(t,e,r){returne&&b(t.prototype,e),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functionx(t){vare=O(t,"string");return"symbol"===i(e)?e:String(e)}functionO(t,e){if("object"!==i(t)||null===t)returnt;varr=t[Symbol.toPrimitive];if(void0!==r){varn=r.call(t,e||"default");if("object"!==i(n))returnn;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}varj=function(){functiono(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:r.MAP_OPTIONS.KEY,e=arguments.length>1&&void0!==arguments[1]?arguments[1]:r.MAP_OPTIONS.SECRET;m(this,o),this.key=t,this.secret=e}returnw(o,[{key:"setLocaleCompare",value:function(t){returnt.key=this.key,Object.fromEntries(Object.entries(t).sort(function(t,e){varr=h(t,1)[0],n=h(e,1)[0];returnr.localeCompare(n)}))}},{key:"getSign",value:function(r){return(0,t.default)("".concat(decodeURIComponent(e.default.stringify(this.setLocaleCompare(r)))).concat(this.secret))}},{key:"get",value:function(t,e){returnthis.request("GET",t,e)}},{key:"request",value:function(){vart=f(a().mark(functiont(e,o){vari,c,s,l,f,h,p,y,v,d,g=arguments;returna().wrap(function(t){for(;;)switch(t.prev=t.next){case0:if(i=g.length>2&&void0!==g[2]?g[2]:{},c=this.getSign(i,o),s=u(u({},this.setLocaleCompare(i)),{},{sig:c}),!n.isMiniprogram){t.next=31;break}returnwx.showNavigationBarLoading(),t.prev=4,t.next=7,newPromise(function(t,n){wx.request({url:"".concat(r.MAP_OPTIONS.domain).concat(o),data:s,method:e,header:"POST"===e?{"content-type":"application/json"}:{},dataType:"json",responseType:"text",success:t,fail:n})});case7:if(l=t.sent,f=l.statusCode,h=l.data,p=l.errMsg,"200"!=f){t.next=17;break}if("1"!=h.status){t.next=14;break}returnt.abrupt("return",h);case14:wx.showToast({title:h.info,icon:"none"});case15:t.next=18;break;case17:wx.showToast({title:p,icon:"error"});case18:t.next=26;break;case20:throwt.prev=20,t.t0=t.catch(4),wx.hideLoading(),console.error("接口异常:",t.t0),wx.showToast({title:"系统异常",icon:"error"}),t.t0;case26:returnt.prev=26,wx.hideNavigationBarLoading(),t.finish(26);case29:t.next=51;break;case31:returny=[],Object.keys(s).map(function(t){y.push("".concat(t,"=").concat(encodeURIComponent(s[t])))}),t.prev=33,t.next=36,window.fetch("".concat(r.MAP_OPTIONS.domain).concat(o,"?").concat(y.join("&")),{method:e});case36:returnv=t.sent,t.next=39,v.json();case39:if("1"!=(d=t.sent).status){t.next=44;break}returnt.abrupt("return",d);case44:throwd.info;case45:t.next=51;break;case47:throwt.prev=47,t.t1=t.catch(33),console.error("接口异常:",t.t1),t.t1;case51:case"end":returnt.stop()}},t,this,[[4,20,26,29],[33,47]])}));returnfunction(e,r){returnt.apply(this,arguments)}}()}]),o}(),L=j;exports.default=L;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;vart=e(require("./request"));functione(t){returnt&&t.__esModule?t:{default:t}}functionr(t){return(r="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft})(t)}functionn(t,e){varr=Object.keys(t);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){returnObject.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}returnr}functiono(t){for(vare=1;e<arguments.length;e++){varr=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}returnt}functioni(t,e,r){return(e=m(e))int?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}functiona(t,e){returnf(t)||l(t,e)||u(t,e)||c()}functionc(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functionu(t,e){if(t){if("string"==typeoft)returns(t,e);varr=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void0}}functions(t,e){(null==e||e>t.length)&&(e=t.length);for(varr=0,n=newArray(e);r<e;r++)n[r]=t[r];returnn}functionl(t,e){varr=null==t?null:"undefined"!=typeofSymbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){varn,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}elsefor(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(l){s=!0,o=l}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throwo}}returnc}}functionf(t){if(Array.isArray(t))returnt}functionp(){p=function(){returnt};vart={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeofSymbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";functions(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(k){s=function(t,e,r){returnt[e]=r}}functionl(t,e,r,n){vari=e&&e.prototypeinstanceofv?e:v,a=Object.create(i.prototype),c=new_(n||[]);returno(a,"_invoke",{value:x(t,r,c)}),a}functionf(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(k){return{type:"throw",arg:k}}}t.wrap=l;varh={};functionv(){}functiony(){}functiond(){}varg={};s(g,a,function(){returnthis});varm=Object.getPrototypeOf,b=m&&m(m(E([])));b&&b!==e&&n.call(b,a)&&(g=b);varw=d.prototype=v.prototype=Object.create(g);functionO(t){["next","throw","return"].forEach(function(e){s(t,e,function(t){returnthis._invoke(e,t)})})}functionj(t,e){vari;o(this,"_invoke",{value:function(o,a){functionc(){returnnewe(function(i,c){!functiono(i,a,c,u){vars=f(t[i],t,a);if("throw"!==s.type){varl=s.arg,p=l.value;returnp&&"object"==r(p)&&n.call(p,"__await")?e.resolve(p.__await).then(function(t){o("next",t,c,u)},function(t){o("throw",t,c,u)}):e.resolve(p).then(function(t){l.value=t,c(l)},function(t){returno("throw",t,c,u)})}u(s.arg)}(o,a,i,c)})}returni=i?i.then(c,c):c()}})}functionx(t,e,r){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;returnN()}for(r.method=o,r.arg=i;;){vara=r.delegate;if(a){varc=S(a,r);if(c){if(c===h)continue;returnc}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";varu=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}functionS(t,e){varr=e.method,n=t.iterator[r];if(void0===n)returne.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=newTypeError("The iterator does not provide a '"+r+"' method")),h;varo=f(n,t.iterator,e.arg);if("throw"===o.type)returne.method="throw",e.arg=o.arg,e.delegate=null,h;vari=o.arg;returni?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void0),e.delegate=null,h):i:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,h)}functionL(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionP(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}function_(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}functionE(t){if(t){vare=t[a];if(e)returne.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){varr=-1,o=functione(){for(;++r<t.length;)if(n.call(t,r))returne.value=t[r],e.done=!1,e;returne.value=void0,e.done=!0,e};returno.next=o}}return{next:N}}functionN(){return{value:void0,done:!0}}returny.prototype=d,o(w,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:y,configurable:!0}),y.displayName=s(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){vare="function"==typeoft&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(j.prototype),s(j.prototype,c,function(){returnthis}),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void0===i&&(i=Promise);vara=newj(l(e,r,n,o),i);returnt.isGeneratorFunction(r)?a:a.next().then(function(t){returnt.done?t.value:a.next()})},O(w),s(w,u,"Generator"),s(w,a,function(){returnthis}),s(w,"toString",function(){return"[object Generator]"}),t.keys=function(t){vare=Object(t),r=[];for(varnine)r.push(n);returnr.reverse(),functiont(){for(;r.length;){varn=r.pop();if(nine)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},t.values=E,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(P),!t)for(vareinthis)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;vare=this;functionr(r,n){returna.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void0),!!n}for(varo=this.tryEntries.length-1;o>=0;--o){vari=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)returnr("end");if(i.tryLoc<=this.prev){varc=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0);if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}elseif(c){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0)}else{if(!u)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}}}},abrupt:function(t,e){for(varr=this.tryEntries.length-1;r>=0;--r){varo=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){vari=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);vara=i?i.completion:{};returna.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),P(r),h}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){varo=n.arg;P(r)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(t,e,r){returnthis.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void0),h}},t}functionh(t,e,r,n,o,i,a){try{varc=t[i](a),u=c.value}catch(s){returnvoidr(s)}c.done?e(u):Promise.resolve(u).then(n,o)}functionv(t){returnfunction(){vare=this,r=arguments;returnnewPromise(function(n,o){vari=t.apply(e,r);functiona(t){h(i,n,o,a,c,"next",t)}functionc(t){h(i,n,o,a,c,"throw",t)}a(void0)})}}functiony(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiond(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}functiong(t,e,r){returne&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functionm(t){vare=b(t,"string");return"symbol"===r(e)?e:String(e)}functionb(t,e){if("object"!==r(t)||null===t)returnt;varn=t[Symbol.toPrimitive];if(void0!==n){varo=n.call(t,e||"default");if("object"!==r(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}varw=function(){functione(){varr=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};y(this,e);varn=r.key,o=r.secret;this.request=newt.default(n,o)}returng(e,[{key:"calculateDistance",value:function(){vart=v(p().mark(functiont(e,r){varn,o,i,a,c,u,s=arguments;returnp().wrap(function(t){for(;;)switch(t.prev=t.next){case0:returnn=s.length>2&&void0!==s[2]?s[2]:1,t.prev=1,o=JSON.parse(JSON.stringify(e)).reverse().join(","),i=JSON.parse(JSON.stringify(r)).reverse().join(","),t.next=6,this.request.get("/v3/distance",{destination:o,origins:i,type:n});case6:returna=t.sent,c=a.results,u={elements:c},t.abrupt("return",Promise.resolve(u));case12:returnt.prev=12,t.t0=t.catch(1),t.abrupt("return",Promise.reject(t.t0));case15:case"end":returnt.stop()}},t,this,[[1,12]])}));returnfunction(e,r){returnt.apply(this,arguments)}}()},{key:"calculateDistanceMatrix",value:function(){vart=v(p().mark(functiont(e,r){varn,o,i,a,c,u,s=arguments;returnp().wrap(function(t){for(;;)switch(t.prev=t.next){case0:returnn=s.length>2&&void0!==s[2]?s[2]:1,t.prev=1,o=JSON.parse(JSON.stringify(e)).reverse().join(","),i=JSON.parse(JSON.stringify(r)).map(function(t){returnt.reverse()}).join("|"),t.next=6,this.request.get("/v3/distance",{destination:o,origins:i,type:n});case6:returna=t.sent,c=a.results,u={rows:[{elements:c}]},t.abrupt("return",Promise.resolve(u));case12:returnt.prev=12,t.t0=t.catch(1),t.abrupt("return",Promise.reject(t.t0));case15:case"end":returnt.stop()}},t,this,[[1,12]])}));returnfunction(e,r){returnt.apply(this,arguments)}}()},{key:"geocoder",value:function(t){returnthis.request.get("/v3/geocode/geo",{address:t})}},{key:"detailedAdrress",value:function(){vart=v(p().mark(functiont(e){varr,n,i,c,u,s,l,f,h;returnp().wrap(function(t){for(;;)switch(t.prev=t.next){case0:returnt.prev=0,r=a(e,2),n=r[0],i=r[1],t.next=4,this.request.get("/v3/geocode/regeo",{location:JSON.parse(JSON.stringify(e)).reverse().join(",")});case4:returnc=t.sent,u=c.regeocode,s=u.addressComponent,l=u.formatted_address,f="".concat(s.province||"").concat(s.city||"").concat(s.district||"").concat(s.township||""),h=o(o({},u),{},{address:f,formatted_addresses:{recommend:l,rough:l,standard_address:l},address_component:{city:s.city,district:s.district,nation:s.country,province:s.province,street:s.township},ad_info:{adcode:s.adcode,city:s.city,city_code:s.citycode,district:s.district,location:{lat:n,lng:i},name:"".concat(s.country+","||"").concat(s.province+","||"").concat(s.city+","||"").concat(s.district||""),nation:s.country,nation_code:"",phone_area_code:s.citycode,province:s.province},location:{lat:n,lng:i}}),t.abrupt("return",Promise.resolve(h));case13:returnt.prev=13,t.t0=t.catch(0),t.abrupt("return",Promise.reject(t.t0));case16:case"end":returnt.stop()}},t,this,[[0,13]])}));returnfunction(e){returnt.apply(this,arguments)}}()},{key:"getLocationByIp",value:function(){returnthis.request.get("/v3/ip")}},{key:"translate",value:function(t){vare=arguments.length>1&&void0!==arguments[1]?arguments[1]:"autonavi",r=JSON.parse(JSON.stringify(t)).map(function(t){returnt.reverse()}).join("|");returnthis.request.get("/v3/assistant/coordinate/convert",{locations:r,coordsys:e})}}]),e}(),O=w;exports.default=O;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void0;vart=e(require("./request"));functione(t){returnt&&t.__esModule?t:{default:t}}functionr(t){return(r="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft})(t)}functionn(t,e){varr=Object.keys(t);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){returnObject.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}returnr}functiono(t){for(vare=1;e<arguments.length;e++){varr=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}returnt}functioni(t,e,r){return(e=m(e))int?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}functiona(){a=function(){returnt};vart={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeofSymbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";functionl(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(N){l=function(t,e,r){returnt[e]=r}}functionf(t,e,r,n){vari=e&&e.prototypeinstanceofv?e:v,a=Object.create(i.prototype),c=newS(n||[]);returno(a,"_invoke",{value:x(t,r,c)}),a}functionh(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(N){return{type:"throw",arg:N}}}t.wrap=f;varp={};functionv(){}functiony(){}functiond(){}varg={};l(g,c,function(){returnthis});varm=Object.getPrototypeOf,b=m&&m(m(P([])));b&&b!==e&&n.call(b,c)&&(g=b);varw=d.prototype=v.prototype=Object.create(g);functionO(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){returnthis._invoke(e,t)})})}functionj(t,e){vari;o(this,"_invoke",{value:function(o,a){functionc(){returnnewe(function(i,c){!functiono(i,a,c,u){vars=h(t[i],t,a);if("throw"!==s.type){varl=s.arg,f=l.value;returnf&&"object"==r(f)&&n.call(f,"__await")?e.resolve(f.__await).then(function(t){o("next",t,c,u)},function(t){o("throw",t,c,u)}):e.resolve(f).then(function(t){l.value=t,c(l)},function(t){returno("throw",t,c,u)})}u(s.arg)}(o,a,i,c)})}returni=i?i.then(c,c):c()}})}functionx(t,e,r){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;returnk()}for(r.method=o,r.arg=i;;){vara=r.delegate;if(a){varc=L(a,r);if(c){if(c===p)continue;returnc}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";varu=h(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}functionL(t,e){varr=e.method,n=t.iterator[r];if(void0===n)returne.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=newTypeError("The iterator does not provide a '"+r+"' method")),p;varo=h(n,t.iterator,e.arg);if("throw"===o.type)returne.method="throw",e.arg=o.arg,e.delegate=null,p;vari=o.arg;returni?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void0),e.delegate=null,p):i:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,p)}function_(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionE(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}functionS(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}functionP(t){if(t){vare=t[c];if(e)returne.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){varr=-1,o=functione(){for(;++r<t.length;)if(n.call(t,r))returne.value=t[r],e.done=!1,e;returne.value=void0,e.done=!0,e};returno.next=o}}return{next:k}}functionk(){return{value:void0,done:!0}}returny.prototype=d,o(w,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:y,configurable:!0}),y.displayName=l(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){vare="function"==typeoft&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,l(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(j.prototype),l(j.prototype,u,function(){returnthis}),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void0===i&&(i=Promise);vara=newj(f(e,r,n,o),i);returnt.isGeneratorFunction(r)?a:a.next().then(function(t){returnt.done?t.value:a.next()})},O(w),l(w,s,"Generator"),l(w,c,function(){returnthis}),l(w,"toString",function(){return"[object Generator]"}),t.keys=function(t){vare=Object(t),r=[];for(varnine)r.push(n);returnr.reverse(),functiont(){for(;r.length;){varn=r.pop();if(nine)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},t.values=P,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(E),!t)for(vareinthis)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;vare=this;functionr(r,n){returna.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void0),!!n}for(varo=this.tryEntries.length-1;o>=0;--o){vari=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)returnr("end");if(i.tryLoc<=this.prev){varc=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0);if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}elseif(c){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0)}else{if(!u)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}}}},abrupt:function(t,e){for(varr=this.tryEntries.length-1;r>=0;--r){varo=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){vari=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);vara=i?i.completion:{};returna.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),E(r),p}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){varo=n.arg;E(r)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(t,e,r){returnthis.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void0),p}},t}functionc(t,e){returnh(t)||f(t,e)||s(t,e)||u()}functionu(){thrownewTypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}functions(t,e){if(t){if("string"==typeoft)returnl(t,e);varr=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void0}}functionl(t,e){(null==e||e>t.length)&&(e=t.length);for(varr=0,n=newArray(e);r<e;r++)n[r]=t[r];returnn}functionf(t,e){varr=null==t?null:"undefined"!=typeofSymbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){varn,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}elsefor(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(l){s=!0,o=l}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throwo}}returnc}}functionh(t){if(Array.isArray(t))returnt}functionp(t,e,r,n,o,i,a){try{varc=t[i](a),u=c.value}catch(s){returnvoidr(s)}c.done?e(u):Promise.resolve(u).then(n,o)}functionv(t){returnfunction(){vare=this,r=arguments;returnnewPromise(function(n,o){vari=t.apply(e,r);functiona(t){p(i,n,o,a,c,"next",t)}functionc(t){p(i,n,o,a,c,"throw",t)}a(void0)})}}functiony(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiond(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}functiong(t,e,r){returne&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functionm(t){vare=b(t,"string");return"symbol"===r(e)?e:String(e)}functionb(t,e){if("object"!==r(t)||null===t)returnt;varn=t[Symbol.toPrimitive];if(void0!==n){varo=n.call(t,e||"default");if("object"!==r(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}varw=function(){functione(){varr=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};y(this,e);varn=r.key,o=r.secret;this.request=newt.default(n,o)}returng(e,[{key:"calculateDistance",value:function(){vart=v(a().mark(functiont(e,r){varn,o,i,u,s,l,f,h=arguments;returna().wrap(function(t){for(;;)switch(t.prev=t.next){case0:returnn=h.length>2&&void0!==h[2]?h[2]:1,t.prev=1,o=[e,r].map(function(t){returnJSON.stringify(t).reverse().join(",")}),i=c(o,2),u=i[0],s=i[1],t.next=5,this.request.get("/v3/distance",{destination:u,origins:s,type:n});case5:returnl=t.sent,f=l.results,t.abrupt("return",{elements:f});case10:throwt.prev=10,t.t0=t.catch(1),t.t0;case13:case"end":returnt.stop()}},t,this,[[1,10]])}));returnfunction(e,r){returnt.apply(this,arguments)}}()},{key:"calculateDistanceMatrix",value:function(){vart=v(a().mark(functiont(e,r){varn,o,i,u,s,l,f,h=arguments;returna().wrap(function(t){for(;;)switch(t.prev=t.next){case0:returnn=h.length>2&&void0!==h[2]?h[2]:1,t.prev=1,o=[e,r].map(function(t){returnJSON.stringify(t).reverse().join(t===e?",":"|")}),i=c(o,2),u=i[0],s=i[1],t.next=5,this.request.get("/v3/distance",{destination:u,origins:s,type:n});case5:returnl=t.sent,f=l.results,t.abrupt("return",{rows:[{elements:f}]});case10:throwt.prev=10,t.t0=t.catch(1),t.t0;case13:case"end":returnt.stop()}},t,this,[[1,10]])}));returnfunction(e,r){returnt.apply(this,arguments)}}()},{key:"geocoder",value:function(t){returnthis.request.get("/v3/geocode/geo",{address:t})}},{key:"detailedAdrress",value:function(){vart=v(a().mark(functiont(e){varr,n,i,u,s,l,f,h,p;returna().wrap(function(t){for(;;)switch(t.prev=t.next){case0:returnt.prev=0,r=c(e,2),n=r[0],i=r[1],t.next=4,this.request.get("/v3/geocode/regeo",{location:JSON.stringify(e).reverse().join(",")});case4:returnu=t.sent,s=u.regeocode,l=s.addressComponent,f=s.formatted_address,h="".concat(l.province||"").concat(l.city||"").concat(l.district||"").concat(l.township||""),p=o(o({},s),{},{address:h,formatted_addresses:{recommend:f,rough:f,standard_address:f},address_component:{city:l.city,district:l.district,nation:l.country,province:l.province,street:l.township},ad_info:{adcode:l.adcode,city:l.city,city_code:l.citycode,district:l.district,location:{lat:n,lng:i},name:"".concat(l.country+","||"").concat(l.province+","||"").concat(l.city+","||"").concat(l.district||""),nation:l.country,nation_code:"",phone_area_code:l.citycode,province:l.province},location:{lat:n,lng:i}}),t.abrupt("return",p);case13:throwt.prev=13,t.t0=t.catch(0),t.t0;case16:case"end":returnt.stop()}},t,this,[[0,13]])}));returnfunction(e){returnt.apply(this,arguments)}}()},{key:"getLocationByIp",value:function(){returnthis.request.get("/v3/ip")}},{key:"translate",value:function(t){vare=arguments.length>1&&void0!==arguments[1]?arguments[1]:"autonavi",r=c([t].map(function(t){returnJSON.stringify(t).reverse().join("|")}),1)[0];returnthis.request.get("/v3/assistant/coordinate/convert",{locations:r,coordsys:e})}}]),e}(),O=w;exports.default=O;