2 Star 5 Fork 3

Sweet Little Horse/小程序-canvas

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sdk-v1.1.3.js 66.15 KB
一键复制 编辑 原始数据 按行查看 历史
韩先生 提交于 2018-01-11 23:45 +08:00 . 流星雨小程序
!function e(t,n,r){function o(u,a){if(!n[u]){if(!t[u]){var c="function"==typeof require&&require;if(!a&&c)return c(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return o(n||e)},f,f.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,t,n){"use strict";var r,o=Object.prototype,i=o.hasOwnProperty,u=o.toString;"function"==typeof Symbol&&(r=Symbol.prototype.valueOf);var a=function(e){return e!==e},c={boolean:1,number:1,string:1,undefined:1},s=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/,f=/^[A-Fa-f0-9]+$/,l={};l.a=l.type=function(e,t){return typeof e===t},l.defined=function(e){return void 0!==e},l.empty=function(e){var t,n=u.call(e);if("[object Array]"===n||"[object Arguments]"===n||"[object String]"===n)return 0===e.length;if("[object Object]"===n){for(t in e)if(i.call(e,t))return!1;return!0}return!e},l.equal=function(e,t){if(e===t)return!0;var n,r=u.call(e);if(r!==u.call(t))return!1;if("[object Object]"===r){for(n in e)if(!(l.equal(e[n],t[n])&&n in t))return!1;for(n in t)if(!(l.equal(e[n],t[n])&&n in e))return!1;return!0}if("[object Array]"===r){if((n=e.length)!==t.length)return!1;for(;n--;)if(!l.equal(e[n],t[n]))return!1;return!0}return"[object Function]"===r?e.prototype===t.prototype:"[object Date]"===r&&e.getTime()===t.getTime()},l.hosted=function(e,t){var n=typeof t[e];return"object"===n?!!t[e]:!c[n]},l.instance=l.instanceof=function(e,t){return e instanceof t},l.nil=l.null=function(e){return null===e},l.undef=l.undefined=function(e){return void 0===e},l.args=l.arguments=function(e){var t="[object Arguments]"===u.call(e),n=!l.array(e)&&l.arraylike(e)&&l.object(e)&&l.fn(e.callee);return t||n},l.array=Array.isArray||function(e){return"[object Array]"===u.call(e)},l.args.empty=function(e){return l.args(e)&&0===e.length},l.array.empty=function(e){return l.array(e)&&0===e.length},l.arraylike=function(e){return!!e&&!l.bool(e)&&i.call(e,"length")&&isFinite(e.length)&&l.number(e.length)&&e.length>=0},l.bool=l.boolean=function(e){return"[object Boolean]"===u.call(e)},l.false=function(e){return l.bool(e)&&!1===Boolean(Number(e))},l.true=function(e){return l.bool(e)&&!0===Boolean(Number(e))},l.date=function(e){return"[object Date]"===u.call(e)},l.date.valid=function(e){return l.date(e)&&!isNaN(Number(e))},l.element=function(e){return void 0!==e&&"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&1===e.nodeType},l.error=function(e){return"[object Error]"===u.call(e)},l.fn=l.function=function(e){if("undefined"!=typeof window&&e===window.alert)return!0;var t=u.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t||"[object AsyncFunction]"===t},l.number=function(e){return"[object Number]"===u.call(e)},l.infinite=function(e){return e===1/0||e===-1/0},l.decimal=function(e){return l.number(e)&&!a(e)&&!l.infinite(e)&&e%1!=0},l.divisibleBy=function(e,t){var n=l.infinite(e),r=l.infinite(t),o=l.number(e)&&!a(e)&&l.number(t)&&!a(t)&&0!==t;return n||r||o&&e%t==0},l.integer=l.int=function(e){return l.number(e)&&!a(e)&&e%1==0},l.maximum=function(e,t){if(a(e))throw new TypeError("NaN is not a valid value");if(!l.arraylike(t))throw new TypeError("second argument must be array-like");for(var n=t.length;--n>=0;)if(e<t[n])return!1;return!0},l.minimum=function(e,t){if(a(e))throw new TypeError("NaN is not a valid value");if(!l.arraylike(t))throw new TypeError("second argument must be array-like");for(var n=t.length;--n>=0;)if(e>t[n])return!1;return!0},l.nan=function(e){return!l.number(e)||e!==e},l.even=function(e){return l.infinite(e)||l.number(e)&&e===e&&e%2==0},l.odd=function(e){return l.infinite(e)||l.number(e)&&e===e&&e%2!=0},l.ge=function(e,t){if(a(e)||a(t))throw new TypeError("NaN is not a valid value");return!l.infinite(e)&&!l.infinite(t)&&e>=t},l.gt=function(e,t){if(a(e)||a(t))throw new TypeError("NaN is not a valid value");return!l.infinite(e)&&!l.infinite(t)&&e>t},l.le=function(e,t){if(a(e)||a(t))throw new TypeError("NaN is not a valid value");return!l.infinite(e)&&!l.infinite(t)&&e<=t},l.lt=function(e,t){if(a(e)||a(t))throw new TypeError("NaN is not a valid value");return!l.infinite(e)&&!l.infinite(t)&&e<t},l.within=function(e,t,n){if(a(e)||a(t)||a(n))throw new TypeError("NaN is not a valid value");if(!l.number(e)||!l.number(t)||!l.number(n))throw new TypeError("all arguments must be numbers");return l.infinite(e)||l.infinite(t)||l.infinite(n)||e>=t&&e<=n},l.object=function(e){return"[object Object]"===u.call(e)},l.primitive=function(e){return!e||!("object"==typeof e||l.object(e)||l.fn(e)||l.array(e))},l.hash=function(e){return l.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},l.regexp=function(e){return"[object RegExp]"===u.call(e)},l.string=function(e){return"[object String]"===u.call(e)},l.base64=function(e){return l.string(e)&&(!e.length||s.test(e))},l.hex=function(e){return l.string(e)&&(!e.length||f.test(e))},l.symbol=function(e){return"function"==typeof Symbol&&"[object Symbol]"===u.call(e)&&"symbol"==typeof r.call(e)},t.exports=l},{}],2:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],3:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e}t.exports=r},{}],4:[function(e,t,n){function r(e,t){return null==t?e:o(t,i(t),e)}var o=e("lodash._basecopy"),i=e("lodash.keys");t.exports=r},{"lodash._basecopy":6,"lodash.keys":13}],5:[function(e,t,n){(function(n){function r(e,t,n,i,p,d,v){var _;if(n&&(_=p?n(e,i,p):n(e)),void 0!==_)return _;if(!s(e))return e;var E=y(e);if(E){if(_=u(e),!t)return f(e,_)}else{var w=U.call(e),m=w==g;if(w!=O&&w!=b&&(!m||p))return x[w]?c(e,w,t):p?e:{};if(_=a(m?{}:e),!t)return h(_,e)}d||(d=[]),v||(v=[]);for(var T=d.length;T--;)if(d[T]==e)return v[T];return d.push(e),v.push(_),(E?l:o)(e,function(o,i){_[i]=r(o,t,n,i,e,d,v)}),_}function o(e,t){return p(e,t,d)}function i(e){var t=new F(e.byteLength);return new M(t).set(new M(e)),t}function u(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&L.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function a(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}function c(e,t,n){var r=e.constructor;switch(t){case T:return i(e);case v:case _:return new r(+e);case R:case S:case A:case j:case I:case D:case P:case C:case G:var o=e.buffer;return new r(n?i(o):o,e.byteOffset,e.length);case E:case m:return new r(e);case w:var u=new r(e.source,N.exec(e));u.lastIndex=e.lastIndex}return u}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var f=e("lodash._arraycopy"),l=e("lodash._arrayeach"),h=e("lodash._baseassign"),p=e("lodash._basefor"),y=e("lodash.isarray"),d=e("lodash.keys"),b="[object Arguments]",v="[object Boolean]",_="[object Date]",g="[object Function]",E="[object Number]",O="[object Object]",w="[object RegExp]",m="[object String]",T="[object ArrayBuffer]",R="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",j="[object Int16Array]",I="[object Int32Array]",D="[object Uint8Array]",P="[object Uint8ClampedArray]",C="[object Uint16Array]",G="[object Uint32Array]",N=/\w*$/,x={};x[b]=x["[object Array]"]=x[T]=x[v]=x[_]=x[R]=x[S]=x[A]=x[j]=x[I]=x[E]=x[O]=x[w]=x[m]=x[D]=x[P]=x[C]=x[G]=!0,x["[object Error]"]=x[g]=x["[object Map]"]=x["[object Set]"]=x["[object WeakMap]"]=!1;var k=Object.prototype,L=k.hasOwnProperty,U=k.toString,F=n.ArrayBuffer,M=n.Uint8Array;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"lodash._arraycopy":2,"lodash._arrayeach":3,"lodash._baseassign":4,"lodash._basefor":7,"lodash.isarray":12,"lodash.keys":13}],6:[function(e,t,n){function r(e,t,n){n||(n={});for(var r=-1,o=t.length;++r<o;){var i=t[r];n[i]=e[i]}return n}t.exports=r},{}],7:[function(e,t,n){var r=function(e){return function(t,n,r){for(var o=-1,i=Object(t),u=r(t),a=u.length;a--;){var c=u[e?a:++o];if(!1===n(i[c],c,i))break}return t}}();t.exports=r},{}],8:[function(e,t,n){function r(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)};case 5:return function(n,r,o,i,u){return e.call(t,n,r,o,i,u)}}return function(){return e.apply(t,arguments)}}function o(e){return e}t.exports=r},{}],9:[function(e,t,n){function r(e){return!!e&&"object"==typeof e}function o(e,t){var n=null==e?void 0:e[t];return a(n)?n:void 0}function i(e){return u(e)&&p.call(e)==c}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return null!=e&&(i(e)?y.test(l.call(e)):r(e)&&s.test(e))}var c="[object Function]",s=/^\[object .+?Constructor\]$/,f=Object.prototype,l=Function.prototype.toString,h=f.hasOwnProperty,p=f.toString,y=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=o},{}],10:[function(e,t,n){function r(e,t,n){return"function"==typeof t?o(e,!0,i(t,n,3)):o(e,!0)}var o=e("lodash._baseclone"),i=e("lodash._bindcallback");t.exports=r},{"lodash._baseclone":5,"lodash._bindcallback":8}],11:[function(e,t,n){function r(e){return i(e)&&d.call(e,"callee")&&(!v.call(e,"callee")||b.call(e)==l)}function o(e){return null!=e&&a(e.length)&&!u(e)}function i(e){return s(e)&&o(e)}function u(e){var t=c(e)?b.call(e):"";return t==h||t==p}function a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==typeof e}var f=9007199254740991,l="[object Arguments]",h="[object Function]",p="[object GeneratorFunction]",y=Object.prototype,d=y.hasOwnProperty,b=y.toString,v=y.propertyIsEnumerable;t.exports=r},{}],12:[function(e,t,n){function r(e){return!!e&&"object"==typeof e}function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=b}function i(e){return u(e)&&p.call(e)==c}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return null!=e&&(i(e)?y.test(l.call(e)):r(e)&&s.test(e))}var c="[object Function]",s=/^\[object .+?Constructor\]$/,f=Object.prototype,l=Function.prototype.toString,h=f.hasOwnProperty,p=f.toString,y=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),d=function(e,t){var n=null==e?void 0:e[t];return a(n)?n:void 0}(Array,"isArray"),b=9007199254740991,v=d||function(e){return r(e)&&o(e.length)&&"[object Array]"==p.call(e)};t.exports=v},{}],13:[function(e,t,n){function r(e){return null!=e&&i(v(e))}function o(e,t){return e="number"==typeof e||h.test(e)?+e:-1,t=null==t?b:t,e>-1&&e%1==0&&e<t}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=b}function u(e){for(var t=c(e),n=t.length,r=n&&e.length,u=!!r&&i(r)&&(l(e)||f(e)),a=-1,s=[];++a<n;){var h=t[a];(u&&o(h,r)||y.call(e,h))&&s.push(h)}return s}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function c(e){if(null==e)return[];a(e)||(e=Object(e));var t=e.length;t=t&&i(t)&&(l(e)||f(e))&&t||0;for(var n=e.constructor,r=-1,u="function"==typeof n&&n.prototype===e,c=Array(t),s=t>0;++r<t;)c[r]=r+"";for(var h in e)s&&o(h,t)||"constructor"==h&&(u||!y.call(e,h))||c.push(h);return c}var s=e("lodash._getnative"),f=e("lodash.isarguments"),l=e("lodash.isarray"),h=/^\d+$/,p=Object.prototype,y=p.hasOwnProperty,d=s(Object,"keys"),b=9007199254740991,v=function(e){return function(t){return null==t?void 0:t[e]}}("length"),_=d?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&r(e)?u(e):a(e)?d(e):[]}:u;t.exports=_},{"lodash._getnative":9,"lodash.isarguments":11,"lodash.isarray":12}],14:[function(e,t,n){var r=e("./_root"),o=r.Symbol;t.exports=o},{"./_root":19}],15:[function(e,t,n){function r(e){return null==e?void 0===e?c:a:s&&s in Object(e)?i(e):u(e)}var o=e("./_Symbol"),i=e("./_getRawTag"),u=e("./_objectToString"),a="[object Null]",c="[object Undefined]",s=o?o.toStringTag:void 0;t.exports=r},{"./_Symbol":14,"./_getRawTag":17,"./_objectToString":18}],16:[function(e,t,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],17:[function(e,t,n){function r(e){var t=u.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),o}var o=e("./_Symbol"),i=Object.prototype,u=i.hasOwnProperty,a=i.toString,c=o?o.toStringTag:void 0;t.exports=r},{"./_Symbol":14}],18:[function(e,t,n){function r(e){return i.call(e)}var o=Object.prototype,i=o.toString;t.exports=r},{}],19:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},{"./_freeGlobal":16}],20:[function(e,t,n){var r=Array.isArray;t.exports=r},{}],21:[function(e,t,n){function r(e){return"number"==typeof e&&e==o(e)}var o=e("./toInteger");t.exports=r},{"./toInteger":27}],22:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],23:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],24:[function(e,t,n){function r(e){return"string"==typeof e||!i(e)&&u(e)&&o(e)==a}var o=e("./_baseGetTag"),i=e("./isArray"),u=e("./isObjectLike"),a="[object String]";t.exports=r},{"./_baseGetTag":15,"./isArray":20,"./isObjectLike":23}],25:[function(e,t,n){function r(e){return"symbol"==typeof e||i(e)&&o(e)==u}var o=e("./_baseGetTag"),i=e("./isObjectLike"),u="[object Symbol]";t.exports=r},{"./_baseGetTag":15,"./isObjectLike":23}],26:[function(e,t,n){function r(e){if(!e)return 0===e?e:0;if((e=o(e))===i||e===-i){return(e<0?-1:1)*u}return e===e?e:0}var o=e("./toNumber"),i=1/0,u=1.7976931348623157e308;t.exports=r},{"./toNumber":28}],27:[function(e,t,n){function r(e){var t=o(e),n=t%1;return t===t?n?t-n:t:0}var o=e("./toFinite");t.exports=r},{"./toFinite":26}],28:[function(e,t,n){function r(e){if("number"==typeof e)return e;if(i(e))return u;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||f.test(e)?l(e.slice(2),n?2:8):c.test(e)?u:+e}var o=e("./isObject"),i=e("./isSymbol"),u=NaN,a=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt;t.exports=r},{"./isObject":22,"./isSymbol":25}],29:[function(e,t,n){"use strict";t.exports=e("./lib/extend")},{"./lib/extend":30}],30:[function(e,t,n){"use strict";var r=e("is"),o=function e(){var t,n,o,i,u,a,c=arguments[0]||{},s=1,f=arguments.length,l=!1;for("boolean"==typeof c&&(l=c,c=arguments[1]||{},s=2),"object"==typeof c||r.fn(c)||(c={});s<f;s++)if(null!=(t=arguments[s])){"string"==typeof t&&(t=t.split(""));for(n in t)o=c[n],i=t[n],c!==i&&(l&&i&&(r.hash(i)||(u=r.array(i)))?(u?(u=!1,a=o&&r.array(o)?o:[]):a=o&&r.hash(o)?o:{},c[n]=e(l,a,i)):void 0!==i&&(c[n]=i))}return c};o.version="1.1.3",t.exports=o},{is:1}],31:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function u(e){if(h===clearTimeout)return clearTimeout(e);if((h===o||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(e);try{return h(e)}catch(t){try{return h.call(null,e)}catch(t){return h.call(this,e)}}}function a(){b&&y&&(b=!1,y.length?d=y.concat(d):v=-1,d.length&&c())}function c(){if(!b){var e=i(a);b=!0;for(var t=d.length;t;){for(y=d,d=[];++v<t;)y&&y[v].run();v=-1,t=d.length}y=null,b=!1,u(e)}}function s(e,t){this.fun=e,this.array=t}function f(){}var l,h,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(e){l=r}try{h="function"==typeof clearTimeout?clearTimeout:o}catch(e){h=o}}();var y,d=[],b=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];d.push(new s(e,t)),1!==d.length||b||i(c)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=f,p.addListener=f,p.once=f,p.off=f,p.removeListener=f,p.removeAllListeners=f,p.emit=f,p.prependListener=f,p.prependOnceListener=f,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],32:[function(e,t,n){(function(r,o){!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.RSVP=e.RSVP||{})}(this,function(t){"use strict";function n(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function i(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t}function u(e,t){if(2!==arguments.length)return Oe[e];Oe[e]=t}function a(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function c(e){return"function"==typeof e}function s(e){return null!==e&&"object"==typeof e}function f(e){return null!==e&&"object"==typeof e}function l(){setTimeout(function(){for(var e=0;e<Re.length;e++){var t=Re[e],n=t.payload;n.guid=n.key+n.id,n.childGuid=n.key+n.childId,n.error&&(n.stack=n.error.stack),Oe.trigger(t.name,t.payload)}Re.length=0},50)}function h(e,t,n){1===Re.push({name:e,payload:{key:t._guidKey,id:t._id,eventName:e,detail:t._result,childId:n&&n._id,label:t._label,timeStamp:Te(),error:Oe["instrument-with-stack"]?new Error(t._label):null}})&&l()}function p(e,t){var n=this;if(e&&"object"==typeof e&&e.constructor===n)return e;var r=new n(d,t);return O(r,e),r}function y(){return new TypeError("A promises callback cannot return that same promise.")}function d(){}function b(e){try{return e.then}catch(e){return Ie.error=e,Ie}}function v(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function _(e,t,n){Oe.async(function(e){var r=!1,o=v(n,t,function(n){r||(r=!0,t!==n?O(e,n,void 0):m(e,n))},function(t){r||(r=!0,T(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,T(e,o))},e)}function g(e,t){t._state===Ae?m(e,t._result):t._state===je?(t._onError=null,T(e,t._result)):R(t,void 0,function(n){t!==n?O(e,n,void 0):m(e,n)},function(t){return T(e,t)})}function E(e,t,n){t.constructor===e.constructor&&n===P&&e.constructor.resolve===p?g(e,t):n===Ie?(T(e,Ie.error),Ie.error=null):c(n)?_(e,t,n):m(e,t)}function O(e,t){e===t?m(e,t):a(t)?E(e,t,b(t)):m(e,t)}function w(e){e._onError&&e._onError(e._result),S(e)}function m(e,t){e._state===Se&&(e._result=t,e._state=Ae,0===e._subscribers.length?Oe.instrument&&h("fulfilled",e):Oe.async(S,e))}function T(e,t){e._state===Se&&(e._state=je,e._result=t,Oe.async(w,e))}function R(e,t,n,r){var o=e._subscribers,i=o.length;e._onError=null,o[i]=t,o[i+Ae]=n,o[i+je]=r,0===i&&e._state&&Oe.async(S,e)}function S(e){var t=e._subscribers,n=e._state;if(Oe.instrument&&h(n===Ae?"fulfilled":"rejected",e),0!==t.length){for(var r=void 0,o=void 0,i=e._result,u=0;u<t.length;u+=3)r=t[u],o=t[u+n],r?I(n,r,o,i):o(i);e._subscribers.length=0}}function A(){this.error=null}function j(e,t){try{return e(t)}catch(e){return De.error=e,De}}function I(e,t,n,r){var o=c(n),i=void 0,u=void 0;if(o){if((i=j(n,r))===De)u=i.error,i.error=null;else if(i===t)return void T(t,y())}else i=r;t._state!==Se||(o&&void 0===u?O(t,i):void 0!==u?T(t,u):e===Ae?m(t,i):e===je&&T(t,i))}function D(e,t){var n=!1;try{t(function(t){n||(n=!0,O(e,t))},function(t){n||(n=!0,T(e,t))})}catch(t){T(e,t)}}function P(e,t,n){var r=this,o=r._state;if(o===Ae&&!e||o===je&&!t)return Oe.instrument&&h("chained",r,r),r;r._onError=null;var i=new r.constructor(d,n),u=r._result;if(Oe.instrument&&h("chained",r,i),o===Se)R(r,i,e,t);else{var a=o===Ae?e:t;Oe.async(function(){return I(o,i,a,u)})}return i}function C(e,t,n){return e===Ae?{state:"fulfilled",value:n}:{state:"rejected",reason:n}}function G(e,t){return me(e)?new Pe(this,e,!0,t).promise:this.reject(new TypeError("Promise.all must be called with an array"),t)}function N(e,t){var n=this,r=new n(d,t);if(!me(e))return T(r,new TypeError("Promise.race must be called with an array")),r;for(var o=0;r._state===Se&&o<e.length;o++)R(n.resolve(e[o]),void 0,function(e){return O(r,e)},function(e){return T(r,e)});return r}function x(e,t){var n=this,r=new n(d,t);return T(r,e),r}function k(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function L(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(){this.value=void 0}function F(e){try{return e.then}catch(e){return xe.value=e,xe}}function M(e,t,n){try{e.apply(t,n)}catch(e){return xe.value=e,xe}}function q(e,t){for(var n={},r=e.length,o=new Array(r),i=0;i<r;i++)o[i]=e[i];for(var u=0;u<t.length;u++){n[t[u]]=o[u+1]}return n}function Q(e){for(var t=e.length,n=new Array(t-1),r=1;r<t;r++)n[r-1]=e[r];return n}function B(e,t){return{then:function(n,r){return e.call(t,n,r)}}}function Y(e,t){var n=function(){for(var n=this,r=arguments.length,o=new Array(r+1),i=!1,u=0;u<r;++u){var a=arguments[u];if(!i){if((i=$(a))===ke){var c=new Ne(d);return T(c,ke.value),c}i&&!0!==i&&(a=B(i,a))}o[u]=a}var s=new Ne(d);return o[r]=function(e,n){e?T(s,e):void 0===t?O(s,n):!0===t?O(s,Q(arguments)):me(t)?O(s,q(arguments,t)):O(s,n)},i?K(s,o,e,n):H(s,o,e,n)};return n.__proto__=e,n}function H(e,t,n,r){var o=M(n,r,t);return o===xe&&T(e,o.value),e}function K(e,t,n,r){return Ne.all(t).then(function(t){var o=M(n,r,t);return o===xe&&T(e,o.value),e})}function $(e){return!(!e||"object"!=typeof e)&&(e.constructor===Ne||F(e))}function V(e,t){return Ne.all(e,t)}function J(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function z(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function X(e,t){return me(e)?new Le(Ne,e,t).promise:Ne.reject(new TypeError("Promise.allSettled must be called with an array"),t)}function W(e,t){return Ne.race(e,t)}function Z(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function ee(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function te(e,t){return s(e)?new Fe(Ne,e,t).promise:Ne.reject(new TypeError("Promise.hash must be called with an object"),t)}function ne(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function re(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function oe(e,t){return s(e)?new Me(Ne,e,!1,t).promise:Ne.reject(new TypeError("RSVP.hashSettled must be called with an object"),t)}function ie(e){throw setTimeout(function(){throw e}),e}function ue(e){var t={resolve:void 0,reject:void 0};return t.promise=new Ne(function(e,n){t.resolve=e,t.reject=n},e),t}function ae(e,t,n){return me(e)?c(t)?Ne.all(e,n).then(function(e){for(var r=e.length,o=new Array(r),i=0;i<r;i++)o[i]=t(e[i]);return Ne.all(o,n)}):Ne.reject(new TypeError("RSVP.map expects a function as a second argument"),n):Ne.reject(new TypeError("RSVP.map must be called with an array"),n)}function ce(e,t){return Ne.resolve(e,t)}function se(e,t){return Ne.reject(e,t)}function fe(e,t){return Ne.all(e,t)}function le(e,t){return Ne.resolve(e,t).then(function(e){return fe(e,t)})}function he(e,t,n){return me(e)||s(e)&&void 0!==e.then?c(t)?(me(e)?fe(e,n):le(e,n)).then(function(e){for(var r=e.length,o=new Array(r),i=0;i<r;i++)o[i]=t(e[i]);return fe(o,n).then(function(t){for(var n=new Array(r),o=0,i=0;i<r;i++)t[i]&&(n[o]=e[i],o++);return n.length=o,n})}):Ne.reject(new TypeError("RSVP.filter expects function as a second argument"),n):Ne.reject(new TypeError("RSVP.filter must be called with an array or promise"),n)}function pe(e,t){Ve[qe]=e,Ve[qe+1]=t,2===(qe+=2)&&Je()}function ye(){return void 0!==Qe?function(){Qe(be)}:de()}function de(){return function(){return setTimeout(be,1)}}function be(){for(var e=0;e<qe;e+=2){(0,Ve[e])(Ve[e+1]),Ve[e]=void 0,Ve[e+1]=void 0}qe=0}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(){Oe.on.apply(Oe,arguments)}function ge(){Oe.off.apply(Oe,arguments)}var Ee={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function");var r=i(this),o=void 0;o=r[e],o||(o=r[e]=[]),-1===n(o,t)&&o.push(t)},off:function(e,t){var r=i(this),o=void 0,u=void 0;if(!t)return void(r[e]=[]);o=r[e],-1!==(u=n(o,t))&&o.splice(u,1)},trigger:function(e,t,n){var r=i(this),o=void 0;if(o=r[e])for(var u=0;u<o.length;u++)(0,o[u])(t,n)}},Oe={instrument:!1};Ee.mixin(Oe);var we=void 0;we=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var me=we,Te=Date.now||function(){return(new Date).getTime()},Re=[],Se=void 0,Ae=1,je=2,Ie=new A,De=new A,Pe=function(){function e(e,t,n,r){this._instanceConstructor=e,this.promise=new e(d,r),this._abortOnReject=n,this._init.apply(this,arguments)}return e.prototype._init=function(e,t){var n=t.length||0;this.length=n,this._remaining=n,this._result=new Array(n),this._enumerate(t),0===this._remaining&&m(this.promise,this._result)},e.prototype._enumerate=function(e){for(var t=this.length,n=this.promise,r=0;n._state===Se&&r<t;r++)this._eachEntry(e[r],r)},e.prototype._settleMaybeThenable=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===p){var o=b(e);if(o===P&&e._state!==Se)e._onError=null,this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=this._makeResult(Ae,t,e);else if(n===Ne){var i=new n(d);E(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},e.prototype._eachEntry=function(e,t){f(e)?this._settleMaybeThenable(e,t):(this._remaining--,this._result[t]=this._makeResult(Ae,t,e))},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===Se&&(this._abortOnReject&&e===je?T(r,n):(this._remaining--,this._result[t]=this._makeResult(e,t,n),0===this._remaining&&m(r,this._result)))},e.prototype._makeResult=function(e,t,n){return n},e.prototype._willSettleAt=function(e,t){var n=this;R(e,void 0,function(e){return n._settledAt(Ae,t,e)},function(e){return n._settledAt(je,t,e)})},e}(),Ce="rsvp_"+Te()+"-",Ge=0,Ne=function(){function e(t,n){this._id=Ge++,this._label=n,this._state=void 0,this._result=void 0,this._subscribers=[],Oe.instrument&&h("created",this),d!==t&&("function"!=typeof t&&k(),this instanceof e?D(this,t):L())}return e.prototype._onError=function(e){var t=this;Oe.after(function(){t._onError&&Oe.trigger("error",e,t._label)})},e.prototype.catch=function(e,t){return this.then(void 0,e,t)},e.prototype.finally=function(e,t){var n=this,r=n.constructor;return n.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})},t)},e}();Ne.cast=p,Ne.all=G,Ne.race=N,Ne.resolve=p,Ne.reject=x,Ne.prototype._guidKey=Ce,Ne.prototype.then=P;var xe=new U,ke=new U,Le=function(e){function t(t,n,r){return J(this,e.call(this,t,n,!1,r))}return z(t,e),t}(Pe);Le.prototype._makeResult=C;var Ue=Object.prototype.hasOwnProperty,Fe=function(e){function t(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments[3];return Z(this,e.call(this,t,n,r,o))}return ee(t,e),t.prototype._init=function(e,t){this._result={},this._enumerate(t),0===this._remaining&&m(this.promise,this._result)},t.prototype._enumerate=function(e){var t=this.promise,n=[];for(var r in e)Ue.call(e,r)&&n.push({position:r,entry:e[r]});var o=n.length;this._remaining=o;for(var i=void 0,u=0;t._state===Se&&u<o;u++)i=n[u],this._eachEntry(i.entry,i.position)},t}(Pe),Me=function(e){function t(t,n,r){return ne(this,e.call(this,t,n,!1,r))}return re(t,e),t}(Fe);Me.prototype._makeResult=C;var qe=0,Qe=void 0,Be="undefined"!=typeof window?window:void 0,Ye=Be||{},He=Ye.MutationObserver||Ye.WebKitMutationObserver,Ke="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),$e="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Ve=new Array(1e3),Je=void 0;Je=Ke?function(){var e=r.nextTick,t=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){return e(be)}}():He?function(){var e=0,t=new He(be),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){return n.data=e=++e%2}}():$e?function(){var e=new MessageChannel;return e.port1.onmessage=be,function(){return e.port2.postMessage(0)}}():void 0===Be&&"function"==typeof e?function(){try{var t=e,n=t("vertx");return Qe=n.runOnLoop||n.runOnContext,ye()}catch(e){return de()}}():de();if("object"==typeof self)self;else{if("object"!=typeof o)throw new Error("no global: `self` or `global` found");o}var ze;Oe.async=pe,Oe.after=function(e){return setTimeout(e,0)};var Xe=ce,We=function(e,t){return Oe.async(e,t)};if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var Ze=window.__PROMISE_INSTRUMENTATION__;u("instrument",!0);for(var et in Ze)Ze.hasOwnProperty(et)&&_e(et,Ze[et])}var tt=(ze={asap:pe,cast:Xe,Promise:Ne,EventTarget:Ee,all:V,allSettled:X,race:W,hash:te,hashSettled:oe,rethrow:ie,defer:ue,denodeify:Y,configure:u,on:_e,off:ge,resolve:ce,reject:se,map:ae},ve(ze,"async",We),ve(ze,"filter",he),ze);t.default=tt,t.asap=pe,t.cast=Xe,t.Promise=Ne,t.EventTarget=Ee,t.all=V,t.allSettled=X,t.race=W,t.hash=te,t.hashSettled=oe,t.rethrow=ie,t.defer=ue,t.denodeify=Y,t.configure=u,t.on=_e,t.off=ge,t.resolve=ce,t.reject=se,t.map=ae,t.async=We,t.filter=he,Object.defineProperty(t,"__esModule",{value:!0})})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:31}],33:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=e("./constants"),u=e("./Query"),a=e("lodash.clonedeep"),c=e("lodash/isInteger"),s=function(){function e(){r(this,e),this._queryObject={},this._limit=20,this._offset=0,this._orderBy=null}return o(e,[{key:"setQuery",value:function(e){if(!(e instanceof u))throw new Error(i.MSG.ARGS_ERROR)
;return this._queryObject=a(e.queryObject),this}},{key:"limit",value:function(e){if(!c(e))throw new Error(i.MSG.ARGS_ERROR);return this._limit=e,this}},{key:"offset",value:function(e){if(!c(e))throw new Error(i.MSG.ARGS_ERROR);return this._offset=e,this}},{key:"orderBy",value:function(e){return e instanceof Array?this._orderBy=e.join(","):this._orderBy=e,this}},{key:"_handleAllQueryConditions",value:function(){var e={};return e.limit=this._limit,e.offset=this._offset,this._orderBy&&(e.order_by=this._orderBy),e.where=JSON.stringify(this._queryObject),e}}]),e}();t.exports=s},{"./Query":40,"./constants":50,"lodash.clonedeep":10,"lodash/isInteger":21}],34:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=e("./constants"),a=e("./GeoPoint"),c=e("./GeoPolygon"),s=function(){function e(t){r(this,e),this._recordID=t,this._record={}}return i(e,[{key:"set",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length){if("object"!==o(t[0]))throw new Error(u.MSG.ARGS_ERROR);var r=t[0],i={};Object.keys(t[0]).forEach(function(e){i[e]=r[e]instanceof a||r[e]instanceof c?r[e].toGeoJSON():r[e]}),this._record=i}else{if(2!==t.length)throw new Error(u.MSG.ARGS_ERROR);this._record[t[0]]=t[1]instanceof a||t[1]instanceof c?t[1].toGeoJSON():t[1]}return this}},{key:"incrementBy",value:function(e,t){return this._record[e]={$incr_by:t},this}},{key:"append",value:function(e,t){return t instanceof Array||(t=[t]),this._record[e]={$append:t},this}},{key:"uAppend",value:function(e,t){return t instanceof Array||(t=[t]),this._record[e]={$append_unique:t},this}},{key:"remove",value:function(e,t){return t instanceof Array||(t=[t]),this._record[e]={$remove:t},this}}]),e}();t.exports=s},{"./GeoPoint":38,"./GeoPolygon":39,"./constants":50}],35:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("./baas"),c=e("./BaseQuery"),s=e("./Query"),f=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._contentGroupID=e,n}return i(t,e),u(t,[{key:"getContent",value:function(e){return a.getContent({richTextID:e})}},{key:"find",value:function(){var e=this._handleAllQueryConditions();return e.contentGroupID=this._contentGroupID,a.getContentList2(e)}},{key:"getCategoryList",value:function(){return a.getContentCategoryList({contentGroupID:this._contentGroupID,limit:100})}},{key:"getCategory",value:function(e){var t=new s;return t.compare("group_id","=",this._contentGroupID),a.getContentCategory({categoryID:e,where:JSON.stringify(t.queryObject)})}}]),t}(c);t.exports=f},{"./BaseQuery":33,"./Query":40,"./baas":46}],36:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("./baas"),c=e("./BaseQuery"),s=e("./uploadFile"),f=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return i(t,e),u(t,[{key:"upload",value:function(e,t){return s(e,t,"json")}},{key:"delete",value:function(e){return e instanceof Array?a.deleteFiles({id__in:e}):a.deleteFile({fileID:e})}},{key:"get",value:function(e){return a.getFileDetail({fileID:e})}},{key:"find",value:function(){return a.getFileList(this._handleAllQueryConditions())}}]),t}(c);t.exports=f},{"./BaseQuery":33,"./baas":46,"./uploadFile":58}],37:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("./baas"),c=e("./BaseQuery"),s=e("./Query"),f=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return i(t,e),u(t,[{key:"get",value:function(e){return a.getFileCategoryDetail({categoryID:e})}},{key:"getFileList",value:function(e){var t=new s;return t.in("category_id",[e]),a.getFileList({where:JSON.stringify(t.queryObject)})}},{key:"find",value:function(){return a.getFileCategoryList(this._handleAllQueryConditions())}}]),t}(c);t.exports=f},{"./BaseQuery":33,"./Query":40,"./baas":46}],38:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=e("lodash.clonedeep"),u=function(){function e(t,n){r(this,e),this.attitude=t,this.longitude=n,this.geoJSON={type:"Point",coordinates:[this.attitude,this.longitude]}}return o(e,[{key:"toGeoJSON",value:function(){return i(this.geoJSON)}}]),e}();t.exports=u},{"lodash.clonedeep":10}],39:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=e("./GeoPoint"),u=e("lodash.clonedeep"),a=e("./constants"),c=function(){function e(t){if(r(this,e),!(t&&t instanceof Array))throw new Error(a.MSG.ARGS_ERROR);if(t.length<4)throw new Error(a.MSG.ARGS_ERROR);this.points=t,this.geoJSON={type:"Polygon",coordinates:[]}}return o(e,[{key:"toGeoJSON",value:function(){var e=this.geoJSON.coordinates,t=[];return this.points.forEach(function(e){if(e instanceof i)t.push([e.attitude,e.longitude]);else{if(!(e instanceof Array&&2===e.length))throw new Error(a.MSG.ARGS_ERROR);t.push(e)}}),e.push(t),u(this.geoJSON)}}]),e}();t.exports=c},{"./GeoPoint":38,"./constants":50,"lodash.clonedeep":10}],40:[function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=e("./constants"),a=e("./GeoPoint"),c=e("./GeoPolygon"),s=e("./utils"),f=e("lodash/isString"),l=function(){function e(){o(this,e),this.queryObject={}}return i(e,[{key:"compare",value:function(e,t,n){var o="eq";switch(t){case"=":o="eq";break;case"!=":o="ne";break;case"<":o="lt";break;case"<=":o="lte";break;case">":o="gt";break;case">=":o="gte";break;default:throw new Error(u.MSG.ARGS_ERROR)}return this._addQueryObject(e,r({},o,n)),this}},{key:"contains",value:function(e,t){if(t&&f(t))return this._addQueryObject(e,{contains:t}),this;throw new Error(u.MSG.ARGS_ERROR)}},{key:"matches",value:function(e,t){if(t&&t instanceof RegExp){var n=s.parseRegExp(t);return n.length>1?this._addQueryObject(e,{regex:n[0],options:n[1]}):this._addQueryObject(e,{regex:n[0]}),this}throw new Error(u.MSG.ARGS_ERROR)}},{key:"in",value:function(e,t){if(t&&t instanceof Array)return this._addQueryObject(e,{in:t}),this;throw new Error(u.MSG.ARGS_ERROR)}},{key:"notIn",value:function(e,t){if(t&&t instanceof Array)return this._addQueryObject(e,{nin:t}),this;throw new Error(u.MSG.ARGS_ERROR)}},{key:"arrayContains",value:function(e,t){if(t&&t instanceof Array)return this._addQueryObject(e,{all:t}),this;throw new Error(u.MSG.ARGS_ERROR)}},{key:"isNull",value:function(e){var t=this;return e&&e instanceof Array?e.forEach(function(e){t._addQueryObject(e,{isnull:!0})}):this._addQueryObject(e,{isnull:!0}),this}},{key:"isNotNull",value:function(e){var t=this;return e&&e instanceof Array?e.forEach(function(e){t._addQueryObject(e,{isnull:!1})}):this._addQueryObject(e,{isnull:!1}),this}},{key:"exists",value:function(e){var t=this;return e&&e instanceof Array?e.forEach(function(e){t._addQueryObject(e,{exists:!0})}):this._addQueryObject(e,{exists:!0}),this}},{key:"notExists",value:function(e){var t=this;return e&&e instanceof Array?e.forEach(function(e){t._addQueryObject(e,{exists:!1})}):this._addQueryObject(e,{exists:!1}),this}},{key:"include",value:function(e,t){if(t&&t instanceof a)return this._addQueryObject(e,{intersects:t.toGeoJSON()}),this;throw new Error(u.MSG.ARGS_ERROR)}},{key:"within",value:function(e,t){if(t&&t instanceof c)return this._addQueryObject(e,{within:t.toGeoJSON()}),this;throw new Error(u.MSG.ARGS_ERROR)}},{key:"withinCircle",value:function(e,t,n){if(t&&t instanceof a){var r={radius:n,coordinates:[t.attitude,t.longitude]};return this._addQueryObject(e,{center:r}),this}throw new Error(u.MSG.ARGS_ERROR)}},{key:"withinRegion",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t&&t instanceof a){var o={geometry:t.toGeoJSON(),min_distance:r};return n&&(o.max_distance=n),this._addQueryObject(e,{nearsphere:o}),this}throw new Error(u.MSG.ARGS_ERROR)}},{key:"_setQueryObject",value:function(e){this.queryObject=e}},{key:"_addQueryObject",value:function(e,t){if(t.constructor!==Object)throw new Error(u.MSG.ARGS_ERROR);var n=r({},e,{});Object.keys(t).forEach(function(r){n[e]["$"+r]=t[r]}),this.queryObject.$and||(this.queryObject.$and=[]),this.queryObject.$and.push(n)}}],[{key:"and",value:function(){for(var t=new e,n={$and:[]},r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.forEach(function(e){n.$and.push(e.queryObject)}),t._setQueryObject(n),t}},{key:"or",value:function(){for(var t=new e,n={$or:[]},r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.forEach(function(e){n.$or.push(e.queryObject)}),t._setQueryObject(n),t}}]),e}();t.exports=l},{"./GeoPoint":38,"./GeoPolygon":39,"./constants":50,"./utils":59,"lodash/isString":24}],41:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var u=o.get;if(void 0!==u)return u.call(r)},c=e("./baas"),s=e("./BaseQuery"),f=e("./TableRecord"),l=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n._tableID=e,n}return i(t,e),u(t,[{key:"create",value:function(){return new f(this._tableID)}},{key:"delete",value:function(e){return c.deleteRecord({tableID:this._tableID,recordID:e})}},{key:"getWithoutData",value:function(e){return new f(this._tableID,e)}},{key:"get",value:function(e){return c.getRecord({tableID:this._tableID,recordID:e})}},{key:"_handleAllQueryConditions",value:function(){var e=a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_handleAllQueryConditions",this).call(this);return e.tableID=this._tableID,e}},{key:"find",value:function(){return c.queryRecordList(this._handleAllQueryConditions())}}]),t}(s);t.exports=l},{"./BaseQuery":33,"./TableRecord":42,"./baas":46}],42:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("./baas"),c=e("./BaseRecord"),s=e("lodash.clonedeep"),f=function(e){function t(e,n){r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return i._tableID=e,i}return i(t,e),u(t,[{key:"save",value:function(){var e=s(this._record);return this._record={},a.createRecord({tableID:this._tableID,data:e})}},{key:"update",value:function(){var e=s(this._record);return this._record={},a.updateRecord({tableID:this._tableID,recordID:this._recordID,data:e})}}]),t}(c);t.exports=f},{"./BaseRecord":34,"./baas":46,"lodash.clonedeep":10}],43:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("./baas"),c=e("./BaseQuery"),s=e("./UserRecord"),f=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return i(t,e),u(t,[{key:"get",value:function(e){return a.getUserDetail({userID:e})}},{key:"getCurrentUserWithoutData",value:function(){return new s}},{key:"find",value:function(){return a.getUserList(this._handleAllQueryConditions())}}]),t}(c);t.exports=f},{"./BaseQuery":33,"./UserRecord":44,"./baas":46}],44:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("./baas"),c=e("./BaseRecord"),s=e("lodash.clonedeep"),f=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return i(t,e),u(t,[{key:"update",value:function(){var e=s(this._record);return this._record={},a.updateUser({data:e})}}]),t}(c);t.exports=f},{"./BaseRecord":34,"./baas":46,"lodash.clonedeep":10}],45:[function(e,t,n){"use strict";var r=e("./baas"),o=e("./constants"),i=e("./promise"),u=e("./request"),a=e("./storage"),c=r._config.API,s=!1,f=[],l=[],h=!1,p=[],y=[],d=function(e,t,n){return u({url:c.INIT,method:"POST",data:{code:e}}).then(function(e){e.statusCode==o.STATUS_CODE.CREATED?(a.set(o.STORAGE_KEY.UID,e.data.user_id),a.set(o.STORAGE_KEY.OPENID,e.data.openid||""),a.set(o.STORAGE_KEY.UNIONID,e.data.unionid||""),a.set(o.STORAGE_KEY.AUTH_TOKEN,e.data.token),t(e)):n(o.MSG.CONFIG_ERROR)},function(e){n(e)})},b=function(){return new i(function(e,t){wx.login({success:function(n){return d(n.code,e,t)},fail:function(e){t(e)}})})},v=function(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?_():a.get(o.STORAGE_KEY.USERINFO)?new i(function(e,t){e(g())}):s?new i(function(e,t){f.push(e),l.push(t)}):(s=!0,new i(function(e,t){f.push(e),l.push(t),_().then(function(){return T().then(function(){s=!1,E()},function(e){s=!1,O()}).catch(function(){w()})},function(){throw new Error(o.MSG.CONFIG_ERROR)}).catch(function(e){w(e)})}))},_=function(){return a.get(o.STORAGE_KEY.UID)?new i(function(e,t){e(g(!1))}):h?new i(function(e,t){p.push(e),y.push(t)}):(h=!0,new i(function(e,t){return p.push(e),y.push(t),b().then(function(){h=!1,E(!1)},function(e){h=!1,O(!1)}).catch(function(e){w(!1)})}))},g=function(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?{id:a.get(o.STORAGE_KEY.UID),openid:a.get(o.STORAGE_KEY.OPENID),unionid:a.get(o.STORAGE_KEY.UNIONID)}:a.get(o.STORAGE_KEY.USERINFO)},E=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];setTimeout(function(){if(e)for(;f.length;)f.shift()(g());else for(;p.length;)p.shift()(g(!1))},0)},O=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];setTimeout(function(){if(e)for(;l.length;)l.shift()(g(!1));else for(;y.length;)throw y.shift()(),new Error(o.MSG.CONFIG_ERROR)},0)},w=function(){throw arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?h=!1:s=!1,new Error(o.MSG.CONFIG_ERROR)},m=function(){return r.check(),u({url:c.LOGOUT,method:"POST"}).then(function(e){if(e.statusCode!=o.STATUS_CODE.CREATED)throw new Error(o.MSG.STATUS_CODE_ERROR);r.clearSession()},function(e){throw new Error(e)})},T=function(){if(!r.getAuthToken())throw new Error("未认证客户端");return new i(function(e,t){wx.getUserInfo({success:function(n){var r={rawData:n.rawData,signature:n.signature,encryptedData:n.encryptedData,iv:n.iv},i=n.userInfo;return i.id=a.get(o.STORAGE_KEY.UID),i.openid=a.get(o.STORAGE_KEY.OPENID),i.unionid=a.get(o.STORAGE_KEY.UNIONID),a.set(o.STORAGE_KEY.USERINFO,i),R(r,e,t)},fail:function(e){t("")}})})},R=function(e,t,n){return u({url:c.LOGIN,method:"POST",data:e}).then(function(e){e.statusCode==o.STATUS_CODE.CREATED?(a.set(o.STORAGE_KEY.IS_LOGINED_BAAS,"1"),t(e)):n(o.MSG.STATUS_CODE_ERROR)},function(e){n(e)})};t.exports={auth:b,login:v,logout:m}},{"./baas":46,"./constants":50,"./promise":54,"./request":55,"./storage":56}],46:[function(e,t,n){(function(n){"use strict";var r=(e("node.extend"),e("./utils")),o=e("./constants"),i=e("./storage"),u=n.BaaS||{};u._config=r.getConfig(),u.init=function(e){if("[object String]"!==Object.prototype.toString.apply(e))throw new Error("非法 clientID");u._config.CLIENT_ID=e},u.getAuthToken=function(){return i.get(o.STORAGE_KEY.AUTH_TOKEN)},u.isLogined=function(){return i.get(o.STORAGE_KEY.IS_LOGINED_BAAS)},u.check=function(){if(!u.getAuthToken())throw new Error("未认证客户端");if(!u.isLogined())throw new Error("未登录")},u.clearSession=function(){i.set(o.STORAGE_KEY.AUTH_TOKEN,""),i.set(o.STORAGE_KEY.IS_LOGINED_BAAS,""),i.set(o.STORAGE_KEY.USERINFO,""),i.set(o.STORAGE_KEY.UID,""),i.set(o.STORAGE_KEY.OPENID,""),i.set(o.STORAGE_KEY.OPENID,"")},t.exports=u}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./constants":50,"./storage":56,"./utils":59,"node.extend":29}],47:[function(e,t,n){"use strict";var r=e("./baas"),o=e("./constants"),i=e("node.extend"),u=e("./promise"),a=e("./request"),c=e("./utils"),s=e("./auth"),f=function(e){var t=arguments;e.url,e.method,e.data,e.header,e.dataType;return s.login(!1).then(function(){return a.apply(null,t)},function(e){throw new Error(e)})},l=function(e){var t={GET:o.STATUS_CODE.SUCCESS,POST:o.STATUS_CODE.CREATED,PUT:o.STATUS_CODE.UPDATE,PATCH:o.STATUS_CODE.PATCH,DELETE:o.STATUS_CODE.DELETE};for(var n in e)e.hasOwnProperty(n)&&(r[n]=function(n){var r=e[n];return function(e){var n=i(!0,{},e),a=r.method||"GET";if(r.defaultParams){var s=i({},r.defaultParams);n=i(s,n)}var l=c.format(r.url,n),p=n&&n.data||n;return p=h(r.url,p),p=c.replaceQueryParams(p),new u(function(e,n){return f({url:l,method:a,data:p}).then(function(r){r.statusCode==t[a]?e(r):n(o.MSG.STATUS_CODE_ERROR)},function(e){n(e)})})}}(n))},h=function(e,t){return e.replace(/:(\w*)/g,function(e,n){void 0!==t[n]&&delete t[n]}),t},p=function(){r._config.METHOD_MAP_LIST.map(function(e){l(e)})};t.exports={baasRequest:f,excludeParams:h,createRequestMethod:p,doCreateRequestMethod:l}},{"./auth":45,"./baas":46,"./constants":50,"./promise":54,"./request":55,"./utils":59,"node.extend":29}],48:[function(e,t,n){"use strict";var r=e("node.extend"),o=e("./config"),i={DEBUG:!0};t.exports=r(o,i)},{"./config":49,"node.extend":29}],49:[function(e,t,n){"use strict";var r={INIT:"/hserve/v1/session/init/",LOGIN:"/hserve/v1/session/authenticate/",LOGOUT:"/hserve/v1/session/destroy/",PAY:"/hserve/v1/wechat/pay/order/",ORDER:"/hserve/v1/wechat/pay/order/:transactionID/",UPLOAD:"/hserve/v1/upload/",TEMPLATE_MESSAGE:"/hserve/v1/template-message-ticket/",DECRYPT:"/hserve/v1/wechat/decrypt/",USER_DETAIL:"/hserve/v1.3/user/info/:userID/",USER_LIST:"/hserve/v1.3/user/info/",UPDATE_USER:"/hserve/v1.3/user/info/",TABLE_LIST:"/hserve/v1/table/",TABLE_DETAIL:"/hserve/v1/table/:tableID/",RECORD_LIST:"/hserve/v1.1/table/:tableID/record/",QUERY_RECORD_LIST:"/hserve/v1.2/table/:tableID/record/",RECORD_DETAIL:"/hserve/v1.2/table/:tableID/record/:recordID/",CREATE_RECORD:"/hserve/v1.2/table/:tableID/record/",UPDATE_RECORD:"/hserve/v1.2/table/:tableID/record/:recordID/",DELETE_RECORD:"/hserve/v1.2/table/:tableID/record/:recordID/",LAGECY_CONTENT_LIST:"/hserve/v1/content/detail/",CONTENT_LIST:"/hserve/v1.3/content/detail/",CONTENT_GROUP_LIST:"/hserve/v1/content/group/",CONTENT_DETAIL:"/hserve/v1.3/content/detail/:richTextID/",CONTENT_GROUP_DETAIL:"/hserve/v1/content/category/",CONTENT_CATEGORY_LIST:"/hserve/v1/content/category/",CONTENT_CATEGORY_DETAIL:"/hserve/v1/content/category/:categoryID/",FILE_DETAIL:"/hserve/v1.3/uploaded-file/:fileID/",FILE_LIST:"/hserve/v1.3/uploaded-file/",DELETE_FILE:"/hserve/v1.3/uploaded-file/:fileID/",DELETE_FILES:"/hserve/v1.3/uploaded-file/",FILE_CATEGORY_DETAIL:"/hserve/v1.3/file-category/:categoryID/",FILE_CATEGORY_LIST:"/hserve/v1.3/file-category/"},o=[{getUserInfo:{url:r.USER_DETAIL,defaultParams:{userID:""}},getUserDetail:{url:r.USER_DETAIL},getUserList:{url:r.USER_LIST},updateUser:{url:r.UPDATE_USER,method:"PUT"}},{getTableList:{url:r.TABLE_LIST},getTable:{url:r.TABLE_DETAIL},getRecordList:{url:r.RECORD_LIST},queryRecordList:{url:r.QUERY_RECORD_LIST},getRecord:{url:r.RECORD_DETAIL},createRecord:{url:r.CREATE_RECORD,method:"POST"},updateRecord:{url:r.UPDATE_RECORD,method:"PUT"},deleteRecord:{url:r.DELETE_RECORD,method:"DELETE"}},{getContentList:{url:r.LAGECY_CONTENT_LIST},getContentList2:{url:r.CONTENT_LIST},getContent:{url:r.CONTENT_DETAIL},getContentGroupList:{url:r.CONTENT_GROUP_LIST},getContentGroup:{url:r.CONTENT_GROUP_DETAIL},getContentCategoryList:{url:r.CONTENT_CATEGORY_LIST},getContentCategory:{url:r.CONTENT_CATEGORY_DETAIL}},{getFileDetail:{url:r.FILE_DETAIL},getFileList:{url:r.FILE_LIST},deleteFile:{url:r.DELETE_FILE,method:"DELETE"},deleteFiles:{url:r.DELETE_FILES,method:"DELETE"},getFileCategoryDetail:{url:r.FILE_CATEGORY_DETAIL},getFileCategoryList:{url:r.FILE_CATEGORY_LIST}}],i={max:100},u={contentGroupID:"content_group_id",categoryID:"category_id",recordID:"id",submissionType:"submission_type",submissionValue:"submission_value",categoryName:"category_name"};t.exports={API_HOST:"https://sso.ifanr.com",API:r,AUTH_PREFIX:"Hydrogen-r1",METHOD_MAP_LIST:o,DEBUG:!1,RANDOM_OPTION:i,REQUEST_PARAMS_MAP:u,VERSION:"v1.1.3"}},{}],50:[function(e,t,n){"use strict";t.exports={STORAGE_KEY:{AUTH_TOKEN:"auth_token",USERINFO:"userinfo",UID:"uid",OPENID:"openid",UNIONID:"unionid",IS_LOGINED_BAAS:"is_logined_baas"},MSG:{STATUS_CODE_ERROR:"Unexpected API Status Code",NETWORT_ERROR:"Network Error",ARGS_ERROR:"参数使用错误",CONFIG_ERROR:"认证失败,请检查 AppID、ClientID 配置",LOGIN_ERROR:"登录失败",UNAUTH_ERROR:"请先完成用户授权"},STATUS_CODE:{CREATED:201,SUCCESS:200,UPDATE:200,PATCH:200,DELETE:204,UNAUTHORIZED:401,NOT_FOUND:404,SERVER_ERROR:500},UPLOAD:{UPLOAD_FILE_KEY:"file",HEADER_AUTH:"Authorization",HEADER_CLIENT:"X-Hydrogen-Client-ID",HEADER_AUTH_VALUE:"Hydrogen-r1 ",UA:"Mozilla/5.0 (Linux; U; Android 4.0.3; ko-kr; LG-L160L Build/IML74K) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"}}},{}],51:[function(e,t,n){"use strict";var r=e("./baas");r.auth=e("./baasRequest").auth,r.ContentGroup=e("./ContentGroup"),r.File=e("./File"),r.FileCategory=e("./FileCategory"),r.GeoPoint=e("./GeoPoint"),r.GeoPolygon=e("./GeoPolygon"),r.login=e("./auth").login,r.logout=e("./auth").logout,r.order=e("./order"),r.pay=e("./pay"),r.Promise=e("./promise"),r.Query=e("./Query"),r.request=e("./request"),r.storage=e("./storage"),r.TableObject=e("./TableObject"),r.uploadFile=e("./uploadFile"),r.User=e("./User"),r.wxDecryptData=e("./wxDecryptData"),r.wxReportTicket=e("./templateMessage").wxReportTicket,e("./baasRequest").createRequestMethod(),"undefined"!=typeof wx&&(wx.BaaS=r),t.exports=r},{"./ContentGroup":35,"./File":36,"./FileCategory":37,"./GeoPoint":38,"./GeoPolygon":39,"./Query":40,"./TableObject":41,"./User":43,"./auth":45,"./baas":46,"./baasRequest":47,"./order":52,"./pay":53,"./promise":54,"./request":55,"./storage":56,"./templateMessage":57,"./uploadFile":58,"./wxDecryptData":60}],52:[function(e,t,n){"use strict";var r=e("./baasRequest").baasRequest,o=e("./baas"),i=o._config.API,u=e("./utils"),a=e("./promise"),c=function(e){var t=u.format(i.ORDER,{transactionID:e.transactionID});return r({url:t}).then(function(e){return new a(function(t,n){return t(e)},function(e){return reject(e)})},function(e){throw new Error(e)})};t.exports=c},{"./baas":46,"./baasRequest":47,"./promise":54,"./utils":59}],53:[function(e,t,n){"use strict";var r=e("./baasRequest").baasRequest,o=e("./baas"),i=e("./constants"),u=e("./promise"),a=e("./storage"),c=o._config.API,s={merchandiseSchemaID:"merchandise_schema_id",merchandiseRecordID:"merchandise_record_id",merchandiseSnapshot:"merchandise_snapshot",merchandiseDescription:"merchandise_description",totalCost:"total_cost"},f=function(e){if(!a.get(i.STORAGE_KEY.USERINFO))return new u(function(e,t){t(i.MSG.UNAUTH_ERROR)});var t={};for(var n in e)t[s[n]]=e[n];return r({url:c.PAY,method:"POST",data:t}).then(function(e){var t=e.data||{};return new u(function(e,n){wx.requestPayment({appId:t.appId,timeStamp:t.timeStamp,nonceStr:t.nonceStr,package:t.package,signType:"MD5",paySign:t.paySign,success:function(n){return n.transaction_no=t.transaction_no,e(n)},fail:function(e){return n(e)}})},function(e){throw new Error(e)})},function(e){throw new Error(e)})};t.exports=f},{"./baas":46,"./baasRequest":47,"./constants":50,"./promise":54,"./storage":56}],54:[function(e,t,n){"use strict";var r=e("rsvp").Promise;t.exports=r},{rsvp:32}],55:[function(e,t,n){"use strict";var r=e("./promise"),o=e("node.extend"),i=e("./utils"),u=e("./constants"),a=e("./baas"),c=["X-Hydrogen-Client-ID","X-Hydrogen-Client-Version","X-Hydrogen-Client-Platform","Authorization"],s=function(e){var t={"X-Hydrogen-Client-ID":a._config.CLIENT_ID,"X-Hydrogen-Client-Version":a._config.VERSION,"X-Hydrogen-Client-Platform":i.getSysPlatform()},n=a.getAuthToken();return n&&(t.Authorization=a._config.AUTH_PREFIX+" "+n),e&&c.map(function(t){e.hasOwnProperty(t)&&delete e[t]}),o(t,e||{})},f=function(e){var t=e.url,n=e.method,o=void 0===n?"GET":n,c=e.data,f=void 0===c?{}:c,l=e.header,h=void 0===l?{}:l,p=e.dataType,y=void 0===p?"json":p;return new r(function(e,n){a._config.CLIENT_ID||n("未初始化客户端");var r=s(h);/https:\/\//.test(t)||(t=a._config.API_HOST+t),wx.request({method:o,url:t,data:f,header:r,dataType:y,success:function(t){t.statusCode==u.STATUS_CODE.UNAUTHORIZED&&a.clearSession(),e(t)},fail:function(e){throw new Error(e.errMsg)}}),i.log("Request => "+t)})};t.exports=f},{"./baas":46,"./constants":50,"./promise":54,"./utils":59,"node.extend":29}],56:[function(e,t,n){"use strict";t.exports={set:function(e,t){try{wx.setStorageSync("ifx_baas_"+e,t)}catch(e){throw new Error(e)}},get:function(e){try{return wx.getStorageSync("ifx_baas_"+e)}catch(e){throw new Error(e)}}}},{}],57:[function(e,t,n){"use strict";function r(e){if(!e)throw new Error(i.MSG.ARGS_ERROR);var t={};return t.submission_type="form_id",t.submission_value=e,t}var o=e("./baasRequest").baasRequest,i=e("./constants"),u=e("./baas"),a=e("./promise"),c=u._config.API,s=function(e){var t=r(e);return o({url:c.TEMPLATE_MESSAGE,method:"POST",data:t}).then(function(e){return new a(function(t,n){return t(e)},function(e){return reject(e)})},function(e){throw new Error(e)})};t.exports={makeParams:r,wxReportTicket:s}},{"./baas":46,"./baasRequest":47,"./constants":50,"./promise":54}],58:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e
},o=e("./baas"),i=e("./baasRequest").baasRequest,u=e("./constants"),a=e("./promise"),c=e("./utils"),s=function(e,t){o._config.CLIENT_ID||t("未初始化客户端"),o.getAuthToken()||t("未认证,请先完成用户登录")},f=function(e,t){return t.filename=e,i({url:o._config.API_HOST+o._config.API.UPLOAD,method:"POST",data:t}).then(function(e){return new a(function(t,n){return t(e)},function(e){return reject(e)})},function(e){throw new Error(e)})},l=function(e,t,n,r){return wx.uploadFile({url:e.uploadUrl,filePath:e.filePath,name:u.UPLOAD.UPLOAD_FILE_KEY,formData:{authorization:e.authorization,policy:e.policy},header:{Authorization:u.UPLOAD.HEADER_AUTH_VALUE+o.getAuthToken(),"X-Hydrogen-Client-Version":o._config.VERSION,"X-Hydrogen-Client-Platform":c.getSysPlatform(),"X-Hydrogen-Client-ID":o._config.CLIENT_ID,"User-Agent":u.UPLOAD.UA},success:function(n){var o={},i=JSON.parse(n.data);o.status="ok",o.path=e.destLink,o.file={id:e.id,name:e.fileName,created_at:i.time,mime_type:i.mimetype,cdn_path:i.url,size:i.file_size},delete n.data,n.data=r&&"json"===r?o:JSON.stringify(o),t(n)},fail:function(e){n(e)}})},h=function(e,t,n){if(!e||"object"!==(void 0===e?"undefined":r(e))||!e.filePath)throw new Error(u.MSG.ARGS_ERROR);if(t){if("object"!==(void 0===t?"undefined":r(t)))throw new Error(u.MSG.ARGS_ERROR)}else t={};return new a(function(r,o){s(0,o);var i=c.getFileNameFromPath(e.filePath);return f(i,c.replaceQueryParams(t)).then(function(t){var u={id:t.data.id,fileName:i,policy:t.data.policy,authorization:t.data.authorization,uploadUrl:t.data.upload_url,filePath:e.filePath,destLink:t.data.file_link};return l(u,r,o,n)})},function(e){throw new Error(e)})};t.exports=h},{"./baas":46,"./baasRequest":47,"./constants":50,"./promise":54,"./utils":59}],59:[function(e,t,n){"use strict";var r=e("node.extend"),o=void 0;try{o=e("./config.js")}catch(t){o=e("./config.dev")}var i=function(){return o},u=function(){var e="UNKNOWN";try{e=wx.getSystemInfoSync().platform}catch(e){}return e},a=function(e){"undefined"!=typeof BaaS&&BaaS.test||!i().DEBUG||console.log("BaaS LOG: "+e)},c=function(e,t){t=t||{};for(var n in t){var r=new RegExp(":"+n,"g");e=e.replace(r,t[n])}return e.replace(/([^:])\/\//g,function(e,t){return t+"/"})},s=function(e){var t=e.lastIndexOf("/");return e.slice(t+1)},f=function(e){var t=[],n=e.toString(),r=n.lastIndexOf("/");return t.push(n.substring(1,r)),r!==n.length-1&&t.push(n.substring(r+1)),t},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.REQUEST_PARAMS_MAP,n=r({},e);return Object.keys(e).map(function(r){Object.keys(t).map(function(o){if(r.startsWith(o)){var i=r.replace(o,t[o]);delete n[r],n[i]=e[r]}})}),n};t.exports={log:a,format:c,getConfig:i,getSysPlatform:u,getFileNameFromPath:s,parseRegExp:f,replaceQueryParams:l}},{"./config.dev":48,"./config.js":49,"node.extend":29}],60:[function(e,t,n){"use strict";var r=e("./baas"),o=e("./baasRequest").baasRequest,i=e("./constants"),u=e("./promise"),a=r._config.API,c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!s(t))throw new Error(i.MSG.ARGS_ERROR);var r={encryptedData:t[0],iv:t[1]};return o({url:a.DECRYPT+t[2]+"/",method:"POST",data:r}).then(function(e){var t=e.statusCode;return new u(function(n,r){return 401===t?r(new Error("用户未登录 or session_key 过期")):403===t?r(new Error("微信解密插件未开启")):400===t?r(new Error("提交的解密信息有错")):n(e.data)})})},s=function(e){return e instanceof Array&&!(e.length<3)&&["we-run-data","open-gid","phone-number"].includes(e[2])};t.exports=c},{"./baas":46,"./baasRequest":47,"./constants":50,"./promise":54}]},{},[51]);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/XiaoYang112/XiaoChengXu-canvas.git
git@gitee.com:XiaoYang112/XiaoChengXu-canvas.git
XiaoYang112
XiaoChengXu-canvas
小程序-canvas
master

搜索帮助