index.js 14 KB

123456789101112131415
  1. module.exports = (function() {
  2. var __MODS__ = {};
  3. var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };
  4. var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
  5. var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
  6. var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
  7. __DEFINE__(1760234669850, function(require, module, exports) {
  8. Object.defineProperty(exports,"__esModule",{value:!0});var Y=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},x=(e,t,r)=>(Y(e,t,"read from private field"),r?r.call(e):t.get(e)),Ae=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},qe=(e,t,r,o)=>(Y(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r),b;class Z{constructor(t){this.message=t}toString(){return`Cancel${this.message?`: ${this.message}`:""}`}}function I(e){return e instanceof Z}const ee=class{constructor(t){Ae(this,b,void 0);let r;const o=new Promise(n=>{r=u=>{x(this,b)||(qe(this,b,new Z(u)),n(x(this,b)))}});this.onCancel=o.then.bind(o),t(r)}static source(){let t;return{token:new ee(r=>{t=r}),cancel:t}}throwIfRequested(){if(x(this,b))throw x(this,b)}};let _=ee;b=new WeakMap;function te(e){return e instanceof _}let re=class extends Error{constructor(t,r,o,n){super(t),this.config=r,this.request=n,this.response=o}};function Te(e,t,r,o){return new re(e,t,r,o)}function ne(e){return e instanceof re}const oe=["options","trace","connect"],ae=["head","get","delete"],L=["post","put","patch"],xe=new RegExp(`^(${L.join("|")})`,"i"),H=Object.prototype.toString;function ke(e){return e===null}function k(e){return typeof e=="undefined"}function z(e){return typeof e=="string"||H.call(e)==="[object String]"}function m(e){return H.call(e)==="[object Object]"}function se(e){return Array.isArray(e)}function Ce(e){return H.call(e)==="[object Date]"}function d(e){return typeof e=="function"}function w(e,t){e||Re(t)}function Re(e){throw new Error(`[axios-miniprogram]: ${e}`)}function De(e){return m(e)?e:{}}const Se=/\/:([^/]+)/g;function ie(e,t={},r={}){const o=De(r);return e.replace(Se,(n,u)=>{var c;const i=(c=t[u])!=null?c:o[u];return u in t&&delete t[u],`/${i}`})}function A(...e){const t={};for(const r of e.filter(m))for(const[o,n]of Object.entries(r))if(m(n)){const u=t[o];t[o]=m(u)?A(u,n):A(n)}else t[o]=n;return t}var Me=Object.defineProperty,ue=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ce=(e,t,r)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ue=(e,t)=>{for(var r in t||(t={}))Fe.call(t,r)&&ce(e,r,t[r]);if(ue)for(var r of ue(t))We.call(t,r)&&ce(e,r,t[r]);return e};function Ie(e,...t){const r=Ue({},e);return q(r,t),r}function q(e,t){for(const r of t)delete e[r]}const le="common",_e=[le].concat(oe,ae,L);function Le(e){var t;const r=(t=e.headers)!=null?t:{},o=A(r[le],r[e.method],r);return Ie(o,..._e)}function He(e,t,r){return se(r)||(d(r)?r=[r]:r=[]),r.forEach(o=>{e=o(e,t)}),e}function ze(e="",t={},r=Ne){const o=r(t);return o&&(e=`${e}${e.indexOf("?")===-1?"?":"&"}${o}`),e}function Ne(e){const t=[];function r(o,n){t.push(`${fe(o)}=${fe(n)}`)}for(const[o,n]of Object.entries(e))if(!ke(n)&&!k(n)&&n===n)if(m(n))for(const[u,c]of Object.entries(n))r(`${o}[${u}]`,c);else if(se(n)){const u=`${o}[]`;for(const c of n)r(u,c)}else Ce(n)?r(o,n.toISOString()):r(o,n);return t.join("&")}function fe(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}const Be=/^([a-z][\w-.]*:)\/\//i;function Ge(e){return Be.test(e)}function pe(e="",t=""){return t?Ge(t)?t:`${e.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`:e}function de(e){const t=pe(e.baseURL,e.url);return ze(t,e.params,e.paramsSerializer)}function Ke(e){let t="request";return e.download&&/^GET/i.test(e.method)?t="download":e.upload&&/^POST/i.test(e.method)&&(t="upload"),t}var Je=Object.defineProperty,Qe=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,me=(e,t,r)=>t in e?Je(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ze=(e,t)=>{for(var r in t||(t={}))Xe.call(t,r)&&me(e,r,t[r]);if(he)for(var r of he(t))Ye.call(t,r)&&me(e,r,t[r]);return e},et=(e,t)=>Qe(e,Ve(t));function rt(e){return new Promise((t,r)=>{const o=et(Ze({},e),{type:Ke(e),url:de(e),method:e.method.toUpperCase(),success:u,fail:c});let n;try{n=e.adapter(o)}catch(s){c({status:400,statusText:"Bad Adapter"}),console.error(s)}function u(s){var f,v,p;const l=s;l.status=(f=l.status)!=null?f:200,l.statusText=(v=l.statusText)!=null?v:"OK",l.headers=(p=l.headers)!=null?p:{},l.config=e,l.request=n;const{validateStatus:T}=e;!d(T)||T(l.status)?t(l):i("validate status error",l)}function c(s){var f,v,p;const l=s;l.isFail=!0,l.status=(f=l.status)!=null?f:400,l.statusText=(v=l.statusText)!=null?v:"Fail",l.headers=(p=l.headers)!=null?p:{},l.config=e,l.request=n,i("request fail",l)}function i(s,f){r(Te(s,e,f,n))}m(n)&&ve(o,n.onProgressUpdate);const{cancelToken:a}=e;te(a)&&a.onCancel(s=>{m(n)&&(ve(o,n.offProgressUpdate),d(n.abort)&&n.abort()),r(s)})})}function ve(e,t){if(d(t)){const{type:r,onUploadProgress:o,onDownloadProgress:n}=e;switch(r){case"upload":d(o)&&t(o);break;case"download":d(n)&&t(n);break}}}function nt(e){N(e),w(d(e.adapter),"adapter \u4E0D\u662F\u4E00\u4E2A function"),w(z(e.url),"url \u4E0D\u662F\u4E00\u4E2A string"),w(z(e.method),"method \u4E0D\u662F\u4E00\u4E2A string"),e.url=ie(e.url,e.params,e.data),e.headers=Le(e),xe.test(e.method)?o(e,e.transformRequest):delete e.data;function t(n){return N(e),o(n,e.transformResponse),n}function r(n){return I(n)||(N(e),o(n.response,e.transformResponse)),Promise.reject(n)}function o(n,u){n.data=He(n.data,n.headers,u)}return rt(e).then(t,r)}function N(e){const{cancelToken:t}=e;te(t)&&t.throwIfRequested()}var ye=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},$=(e,t,r)=>(ye(e,t,"read from private field"),r?r.call(e):t.get(e)),we=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ot=(e,t,r,o)=>(ye(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r),at=(e,t,r,o)=>({set _(n){ot(e,t,n,r)},get _(){return $(e,t,o)}}),C,g;let be=class{constructor(){we(this,C,0),we(this,g,new Map)}get size(){return $(this,g).size}use(t,r){return $(this,g).set(++at(this,C)._,{resolved:t,rejected:r}),$(this,C)}eject(t){return $(this,g).delete(t)}clear(){$(this,g).clear()}forEach(t){$(this,g).forEach(t)}};C=new WeakMap,g=new WeakMap;var st=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},$e=(e,t,r)=>(st(e,t,"read from private field"),r?r.call(e):t.get(e)),it=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ut=(e,t,r)=>new Promise((o,n)=>{var u=a=>{try{i(r.next(a))}catch(s){n(s)}},c=a=>{try{i(r.throw(a))}catch(s){n(s)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(u,c);i((r=r.apply(e,t)).next())}),R;let ct=class{constructor(){it(this,R,[])}use(t){w(d(t),"middleware \u4E0D\u662F\u4E00\u4E2A function"),$e(this,R).push(t)}createContext(t){return{req:t,res:null}}run(t,r){const o=[...$e(this,R),r];function n(){return ut(this,null,function*(){yield o.shift()(t,n)})}return n()}enhanceRun(t){return(r,o)=>t(r,()=>this.run(r,o))}};R=new WeakMap;const lt={url:!0,data:!0,upload:!0,download:!0},ft={headers:!0,params:!0};function D(e={},t={}){const r={},o=Array.from(new Set([...Object.keys(e),...Object.keys(t)]));for(const n of o){const u=e[n],c=t[n];lt[n]?k(c)||(r[n]=c):ft[n]?m(u)&&m(c)?r[n]=A(u,c):m(c)?r[n]=c:m(u)&&(r[n]=u):k(c)?k(u)||(r[n]=u):r[n]=c}return r}var B=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},h=(e,t,r)=>(B(e,t,"read from private field"),r?r.call(e):t.get(e)),E=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},pt=(e,t,r,o)=>(B(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r),S=(e,t,r)=>(B(e,t,"access private method"),r),ge=(e,t,r)=>new Promise((o,n)=>{var u=a=>{try{i(r.next(a))}catch(s){n(s)}},c=a=>{try{i(r.throw(a))}catch(s){n(s)}},i=a=>a.done?o(a.value):Promise.resolve(a.value).then(u,c);i((r=r.apply(e,t)).next())}),y,j,M,G,F,K,J,Q,W;class O{constructor(t,r){E(this,M),E(this,F),E(this,y,void 0),this.interceptors={request:new be,response:new be},E(this,j,new ct),this.request=(o,n={})=>{var u,c;z(o)?n.url=o:n=o,n=D(this.defaults,n),n.method=(c=(u=n.method)==null?void 0:u.toLowerCase())!=null?c:"get";const i={resolved:h(this,J)},a={rejected:n.errorHandler},s=[];return S(this,M,G).call(this,f=>{s.unshift(f)}),s.push(i),S(this,F,K).call(this,f=>{s.push(f)}),s.push(a),s.reduce((f,{resolved:v,rejected:p})=>f.then(v,p),Promise.resolve(n))},this.use=o=>(h(this,j).use(o),this),E(this,J,o=>ge(this,null,function*(){const n=h(this,j).createContext(o);return yield h(this,W).call(this,n,h(this,Q)),n.res})),E(this,Q,o=>ge(this,null,function*(){o.res=yield nt(o.req)})),E(this,W,(o,n)=>h(this,y)?h(this,j).enhanceRun(h(h(this,y),W))(o,n):h(this,j).run(o,n)),this.defaults=t,pt(this,y,r)}}y=new WeakMap,j=new WeakMap,M=new WeakSet,G=function(e){var t;this.interceptors.request.forEach(e),h(this,y)&&S(t=h(this,y),M,G).call(t,e)},F=new WeakSet,K=function(e){var t;this.interceptors.response.forEach(e),h(this,y)&&S(t=h(this,y),F,K).call(t,e)},J=new WeakMap,Q=new WeakMap,W=new WeakMap;for(const e of oe)O.prototype[e]=function(t,r={}){return r.method=e,this.request(t,r)};for(const e of ae)O.prototype[e]=function(t,r,o={}){return o.method=e,o.params=A(r,o.params),this.request(t,o)};for(const e of L)O.prototype[e]=function(t,r,o={}){return o.method=e,o.data=r,this.request(t,o)};function V(e,t){const r=new O(e,t),o=r.request;return o.getUri=function(n){return n.url=ie(n.url,n.params,n.data),de(D(e,n))},o.create=function(n){return V(D(e,n))},o.extend=function(n){return n.baseURL=pe(e.baseURL,n.baseURL),V(D(e,n),r)},o.fork=o.extend,Object.assign(o,r),Object.setPrototypeOf(o,O.prototype),o}var dt=Object.defineProperty,ht=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Pe=(e,t,r)=>t in e?dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vt=(e,t)=>{for(var r in t||(t={}))Ee.call(t,r)&&Pe(e,r,t[r]);if(U)for(var r of U(t))Oe.call(t,r)&&Pe(e,r,t[r]);return e},yt=(e,t)=>ht(e,mt(t)),wt=(e,t)=>{var r={};for(var o in e)Ee.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&U)for(var o of U(e))t.indexOf(o)<0&&Oe.call(e,o)&&(r[o]=e[o]);return r};function X(e){w(m(e),"platform \u4E0D\u662F\u4E00\u4E2A object"),w(d(e.request),"request \u4E0D\u662F\u4E00\u4E2A function"),w(d(e.upload),"upload \u4E0D\u662F\u4E00\u4E2A function"),w(d(e.download),"download \u4E0D\u662F\u4E00\u4E2A function");function t(i){const a=r(i);switch(i.type){case"request":return n(e.request,a);case"download":return c(e.download,a);case"upload":return u(e.upload,a)}}function r(i){return yt(vt({},i),{header:i.headers,success(a){o(a),i.success(a)},fail(a){a.data={errMsg:a.errMsg,errno:a.errno},o(a),i.fail(a)}})}function o(i){var a,s;i.status=(a=i.status)!=null?a:i.statusCode,i.headers=(s=i.headers)!=null?s:i.header,q(i,["statusCode","errMsg","errno","header"])}function n(i,a){return i(a)}function u(i,a){const s=a,f=s.data,{name:v,filePath:p,fileType:l}=f,T=wt(f,["name","filePath","fileType"]);return s.name=v,s.fileName=v,s.filePath=p,s.fileType=l,s.formData=T,q(s,["params","data"]),i(s)}function c(i,a){const s=a,{params:f,success:v}=s;return s.filePath=f==null?void 0:f.filePath,s.success=p=>{p.data={filePath:p.filePath,tempFilePath:p.tempFilePath||p.apFilePath},q(p,["tempFilePath","apFilePath","filePath"]),v(p)},q(s,["params"]),i(s)}return t}function bt(){const e=r(t());if(!o(e))return;function t(){const n="undefined";if(typeof wx!==n)return wx;if(typeof my!==n)return my;if(typeof swan!==n)return swan;if(typeof tt!==n)return tt;if(typeof qq!==n)return qq;if(typeof qh!==n)return qh;if(typeof ks!==n)return ks;if(typeof dd!==n)return dd;if(typeof jd!==n)return jd}function r(n){var u,c,i;return n&&{request:(u=n.request)!=null?u:n.httpRequest,upload:(c=n.upload)!=null?c:n.uploadFile,download:(i=n.download)!=null?i:n.downloadFile}}function o(n){return m(n)&&d(n.request)&&d(n.upload)&&d(n.download)}return X(e)}const $t={adapter:bt(),headers:{common:{Accept:"application/json, text/plain, */*"},options:{},get:{},head:{},post:{},put:{},patch:{},delete:{},trace:{},connect:{}},validateStatus(e){return e>=200&&e<300},dataType:"json",responseType:"text",timeout:1e4},je="2.5.0",P=V($t);P.version=je,P.Axios=O,P.CancelToken=_,P.createAdapter=X,P.isCancel=I,P.isAxiosError=ne,exports.Axios=O,exports.CancelToken=_,exports.createAdapter=X,exports.default=P,exports.isAxiosError=ne,exports.isCancel=I,exports.version=je;
  9. //# sourceMappingURL=axios-miniprogram.cjs.js.map
  10. }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
  11. return __REQUIRE__(1760234669850);
  12. })()
  13. //miniprogram-npm-outsideDeps=[]
  14. //# sourceMappingURL=index.js.map