commit 79c3bbaf666980e8f4ad968f5d13810a29f3932a Author: tianzhendong <1203886034@qq.com> Date: Tue Apr 19 09:23:26 2022 +0800 docisy用的一些插件 diff --git a/202202280805295.png b/202202280805295.png new file mode 100644 index 0000000..c229936 Binary files /dev/null and b/202202280805295.png differ diff --git a/plugin/Valine.min.js b/plugin/Valine.min.js new file mode 100644 index 0000000..a7b3a77 --- /dev/null +++ b/plugin/Valine.min.js @@ -0,0 +1,106 @@ +/*! + * Valine v1.4.4 + * (c) 2017-2020 xCss + * Released under the GPL-2.0 License. + * Last Update: 2020-4-11 23:12:15 + */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Valine=t():e.Valine=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=61)}([function(e,t,n){"use strict";var r=TypeError,o=Object.getOwnPropertyDescriptor;if(o)try{o({},"")}catch(e){o=null}var i,a,s=function(){throw new r},l=o?function(){try{return arguments.callee,s}catch(e){try{return o(arguments,"callee").get}catch(e){return s}}}():s,c=n(45)(),u=Object.getPrototypeOf||function(e){return e.__proto__},d=i?u(i):void 0,p=a?u(a):void 0,f=a?a():void 0,h="undefined"==typeof Uint8Array?void 0:u(Uint8Array),g={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":c?u([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":a?u(f):void 0,"%AsyncGeneratorFunction%":p,"%AsyncGeneratorPrototype%":p?p.prototype:void 0,"%AsyncIteratorPrototype%":f&&c&&Symbol.asyncIterator?f[Symbol.asyncIterator]():void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":i?u(i()):void 0,"%GeneratorFunction%":d,"%GeneratorPrototype%":d?d.prototype:void 0,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?u(u([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?u((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c?u((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":c?u(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":c?Symbol:void 0,"%SymbolPrototype%":c?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":l,"%TypedArray%":h,"%TypedArrayPrototype%":h?h.prototype:void 0,"%TypeError%":r,"%TypeErrorPrototype%":r.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},v=n(3),m=v.call(Function.call,String.prototype.replace),y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,b=/\\(\\)?/g,w=function(e){var t=[];return m(e,y,function(e,n,r,o){t[t.length]=r?m(o,b,"$1"):n||e}),t},x=function(e,t){if(!(e in g))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===g[e]&&!t)throw new r("intrinsic "+e+" exists, but is not available. Please file an issue!");return g[e]};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=w(e),i=x("%"+(n.length>0?n[0]:"")+"%",t),a=1;a=n.length){var s=o(i,n[a]);if(!(t||n[a]in i))throw new r("base intrinsic for "+e+" exists, but the property is not available.");i=s?s.get||s.value:i[n[a]]}else i=i[n[a]];return i}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n(30);var i=n(36),a=r(i),s=n(27),l=r(s),c=n(26),u=r(c),d=n(40),p=r(d),f=n(25),h=r(f),g=document,v=(window,navigator),m=/[&<>"'`\\]/g,y=RegExp(m.source),b=/&(?:amp|lt|gt|quot|#39|#x60|#x5c);/g,w=RegExp(b.source),x={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\\":"\"},k={};for(var _ in x)k[x[_]]=_;Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n,r;if(null==this)throw new TypeError(" this is null or not defined");var o=Object(this),i=o.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(n=t),r=0;r2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=n(43),o=n(42),i=n(44),a=i("String.prototype.replace"),s=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,l=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var e=o(r(this));return a(a(e,s,""),l,"")}},function(e,t,n){"use strict";var r=n(3),o=n(0),i=o("%Function%"),a=i.apply,s=i.call;e.exports=function(){return r.apply(s,arguments)},e.exports.apply=function(){return r.apply(a,arguments)}},function(e,t,n){"use strict";var r=n(10),o="​";e.exports=function(){return String.prototype.trim&&o.trim()===o?String.prototype.trim:r}},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(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}function o(e,t,n){}function i(e,t,n){}function a(e,t,n){}function s(e,t,n){}function l(e){return e.replace(S,"<").replace(O,">")}function c(e,t,n,r){if(n=g(n),"href"===t||"src"===t){if("#"===(n=_.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(C.lastIndex=0,C.test(n))return""}else if("style"===t){if(P.lastIndex=0,P.test(n))return"";if(M.lastIndex=0,M.test(n)&&(C.lastIndex=0,C.test(n)))return"";!1!==r&&(r=r||A,n=r.process(n))}return n=v(n)}function u(e){return e.replace(E,""")}function d(e){return e.replace($,'"')}function p(e){return e.replace(j,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function f(e){return e.replace(T,":").replace(I," ")}function h(e){for(var t="",n=0,r=e.length;n/g,E=/"/g,$=/"/g,j=/&#([a-zA-Z0-9]*);?/gim,T=/:?/gim,I=/&newline;?/gim,C=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,P=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,M=/u\s*r\s*l\s*\(.*/gi,z=//g;t.whiteList=r(),t.getDefaultWhiteList=r,t.onTag=o,t.onIgnoreTag=i,t.onTagAttr=a,t.onIgnoreTagAttr=s,t.safeAttrValue=c,t.escapeHtml=l,t.escapeQuote=u,t.unescapeQuote=d,t.escapeHtmlEntities=p,t.escapeDangerHtml5Entities=f,t.clearNonPrintableCharacter=h,t.friendlyAttrValue=g,t.escapeAttrValue=v,t.onIgnoreTagStripAll=m,t.StripTagBody=y,t.stripCommentTag=b,t.stripBlankChar=w,t.cssFilter=A,t.getDefaultCSSWhiteList=k},function(e,t,n){function r(e){var t=d.spaceIndex(e);if(-1===t)var n=e.slice(1,-1);else var n=e.slice(1,t+1);return n=d.trim(n).toLowerCase(),"/"===n.slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(e){return""===f){i+=n(e.slice(a,s)),p=e.slice(s,c+1),d=r(p),i+=t(s,i.length,d,p,o(p)),a=c+1,s=!1;continue}if(('"'===f||"'"===f)&&"="===e.charAt(c-1)){l=f;continue}}else if(f===l){l=!1;continue}}return a0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function c(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}function u(e){return c(e)?e.substr(1,e.length-2):e}var d=n(4),p=/[^a-zA-Z0-9_:\.\-]/gim;t.parseTag=i,t.parseAttr=a},function(e,t,n){var r,o,i;/*! + autosize 4.0.2 + license: MIT + http://www.jacklmoore.com/autosize +*/ +!function(n,a){o=[e,t],r=a,void 0!==(i="function"==typeof r?r.apply(t,o):r)&&(e.exports=i)}(0,function(e,t){"use strict";function n(e){function t(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function n(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function r(){if(0!==e.scrollHeight){var t=n(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+s+"px",l=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop}),r&&(document.documentElement.scrollTop=r)}}function o(){r();var n=Math.round(parseFloat(e.style.height)),o=window.getComputedStyle(e,null),i="content-box"===o.boxSizing?Math.round(parseFloat(o.height)):e.offsetHeight;if(i-1},get:function(n){return t[e.indexOf(n)]},set:function(n,r){-1===e.indexOf(n)&&(e.push(n),t.push(r))},delete:function(n){var r=e.indexOf(n);r>-1&&(e.splice(r,1),t.splice(r,1))}}}(),a=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){a=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(s=function(e){return e},s.destroy=function(e){return e},s.update=function(e){return e}):(s=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e)}),e},s.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e}),t.default=s,e.exports=t.default})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(35),i=r(o),a=n(53),s=r(a),l=n(54),c=r(l),u=n(51),d=r(u),p=n(52),f=r(p),h={zh:s.default,"zh-cn":s.default,"zh-CN":s.default,"zh-TW":c.default,en:d.default,"en-US":d.default,ja:f.default,"ja-JP":f.default};t.default=function(e,t){return!h[e]&&e&&t&&(h[e]=t),new i.default({phrases:h[e||"zh"],locale:e})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return!!e&&this.init(e),this}function i(e){return new o(e)}var a=n(22),s=r(a),l=n(24),c=r(l),u=n(16),d=r(u),p=n(23),f=r(p),h=n(17),g=r(h),v=n(19),m=r(v),y=n(5),b=n(20),w=r(b),x=n(21),k=r(x),_=n(1),A=r(_),S={comment:"",nick:"Anonymous",mail:"",link:"",ua:A.default.ua,url:""},O="",E={cdn:"https://gravatar.loli.net/avatar/",ds:["mp","identicon","monsterid","wavatar","robohash","retro",""],params:"",hide:!1},$=["nick","mail","link"];o.prototype.init=function(e){var t=this;return e=A.default.extend(y.DEFAULT_CONFIG,e),A.default.sdkLoader("https://cdn.jsdelivr.net/npm/leancloud-storage@3/dist/av-min.js","AV",function(n){if(t.i18n=(0,g.default)(e.lang||A.default.lang,e.langMode),t.config=e,"undefined"==typeof document)throw new Error("Sorry, Valine does not support Server-side rendering.");!!e&&t._init()}),t},o.prototype._init=function(){var e=this;try{var t=e.config,n=t.avatar,r=t.avatarForce,o=t.avatar_cdn,i=t.visitor,a=t.path,s=void 0===a?location.pathname:a,l=t.pageSize,u=t.recordIP;e.config.path=s.replace(/index\.html?$/,"");var d=E.ds,p=r?"&q="+Math.random().toString(32).substring(2):"";E.params="?d="+(d.indexOf(n)>-1?n:"mp")+"&v=1.4.4"+p,E.hide="hide"===n,E.cdn=/^https?\:\/\//.test(o)?o:E.cdn,e.config.pageSize=isNaN(l)?10:l<1?10:l,c.default.setOptions({renderer:new c.default.Renderer,highlight:!1===e.config.highlight?null:f.default,gfm:!0,tables:!0,breaks:!0,pedantic:!1,sanitize:!1,smartLists:!0,smartypants:!0}),u&&(A.default.sdkLoader("//api.ip.sb/jsonip?callback=getIP","getIP"),window.getIP=function(e){S.ip=e.ip});var h=e.config.app_id||e.config.appId,g=e.config.app_key||e.config.appKey;if(!h||!g)return;var v="https://",m="";if(!e.config.serverURLs)switch(h.slice(-9)){case"-9Nh9j0Va":v+="tab.";break;case"-MdYXbMMI":v+="us."}m=e.config.serverURLs||v+"avoscloud.com";try{AV.init({appId:h,appKey:g,serverURLs:m})}catch(e){}var y=(0,A.default)(".valine-comment-count"),b=0;!function t(n){var r=n[b++];if(r){var o=(0,A.default)(r).attr("data-xid");!!o&&e.Q(o).count().then(function(e){r.innerText=e,t(n)}).catch(function(e){r.innerText=0})}}(y),i&&T.add(AV.Object.extend("Counter"),e.config.path);var w=e.config.el||null,x=(0,A.default)(w);if(!(w=w instanceof HTMLElement?w:x[x.length-1]||null))return;e.$el=(0,A.default)(w),e.$el.addClass("v"),E.hide&&e.$el.addClass("hide-avatar"),e.config.meta=(e.config.guest_info||e.config.meta||$).filter(function(e){return $.indexOf(e)>-1});var k=(0==e.config.meta.length?$:e.config.meta).map(function(t){var n="mail"==t?"email":"text";return $.indexOf(t)>-1?'':""}),_='
'+k.join("")+'
Powered By Valine
v1.4.4
';e.$el.html(_),e.$el.find(".cancel-reply").on("click",function(t){e.reset()});var O=e.$el.find(".vempty");e.nodata={show:function(t){return O.html(t||e.i18n.t("sofa")).show(),e},hide:function(){return O.hide(),e}};var j=e.$el.find(".load-bottom"),I=e.$el.find(".load-top");e.loading={show:function(t){return t&&I.show()||j.show(),e.nodata.hide(),e},hide:function(){return I.hide(),j.hide(),0===e.$el.find(".vcard").length&&e.nodata.show(),e}},A.default.TJ("1.4.4"),e.bind()}catch(t){e.ErrorHandler(t,"init")}};var j=function(e,t){var n=new e,r=new AV.ACL;r.setPublicReadAccess(!0),r.setPublicWriteAccess(!0),n.setACL(r),n.set("url",t.url),n.set("xid",t.xid),n.set("title",t.title),n.set("time",1),n.save().then(function(e){(0,A.default)(t.el).find(".leancloud-visitors-count").text(1)}).catch(function(e){})},T={add:function(e,t){var n=this,r=(0,A.default)(".leancloud_visitors,.leancloud-visitors");if(1===r.length){var o=r[0],i=decodeURI((0,A.default)(o).attr("id")),a=(0,A.default)(o).attr("data-flag-title"),s=encodeURI(i),l={el:o,url:i,xid:s,title:a};if(decodeURI(i)===decodeURI(t)){var c=new AV.Query(e);c.equalTo("url",i),c.find().then(function(t){if(t.length>0){var n=t[0];n.increment("time"),n.save().then(function(e){(0,A.default)(o).find(".leancloud-visitors-count").text(e.get("time"))}).catch(function(e){})}else j(e,l)}).catch(function(t){101==t.code?j(e,l):n.ErrorHandler(t)})}else T.show(e,r)}else T.show(e,r)},show:function(e,t){var n=[];if(t.forEach(function(e){var t=(0,A.default)(e).find(".leancloud-visitors-count");t&&t.text(0),n.push(decodeURI((0,A.default)(e).attr("id")))}),n.length){var r=new AV.Query(e);r.containedIn("url",n),r.find().then(function(e){e.length>0&&e.forEach(function(e){var t=e.get("url"),n=e.get("time");(0,A.default)('.leancloud_visitors[id="'+t+'"],.leancloud_visitors[data-xid="'+t+'"],.leancloud-visitors[id="'+t+'"],.leancloud-visitors[data-xid="'+t+'"]').forEach(function(e){var t=(0,A.default)(e).find(".leancloud-visitors-count");t&&t.text(n)})})}).catch(function(e){})}}};o.prototype.Q=function(e){var t=this,n=arguments.length,r=t.config.clazzName;if(1==n){var o=new AV.Query(r);o.doesNotExist("rid");var i=new AV.Query(r);i.equalTo("rid","");var a=AV.Query.or(o,i);return"*"===e?a.exists("url"):a.equalTo("url",decodeURI(e)),a.addDescending("createdAt"),a.addDescending("insertedAt"),a}var s=JSON.stringify(arguments[1]).replace(/(\[|\])/g,""),l="select * from "+r+" where rid in ("+s+") order by -createdAt,-createdAt";return AV.Query.doCloudQuery(l)},o.prototype.ErrorHandler=function(e,t){var n=this;if(n.$el&&n.loading.hide().nodata.hide(),"[object Error]"==={}.toString.call(e)){var r=e.code||"";if(r){var o=n.i18n.t("code-"+r),i=(o=="code-"+r?void 0:o)||e.message||e.error||"";101==r?n.nodata.show():n.$el&&n.nodata.show('
Code '+r+": "+i+"
")}else n.$el&&n.nodata.show('
 '+msg+"
")}else n.$el&&n.nodata.show('
'+JSON.stringify(e)+"
")},o.prototype.installLocale=function(e,t){var n=this;return n.i18n(e,t),n},o.prototype.setPath=function(e){return this.config.path=e,this},o.prototype.bind=function(){var e=this,t=e.$el.find(".vemojis"),n=e.$el.find(".vpreview"),r=e.$el.find(".vemoji-btn"),o=e.$el.find(".vpreview-btn"),i=e.$el.find(".veditor"),a=m.default.data,l=!1,u=function(e){var n=[];for(var r in a)if(a.hasOwnProperty(r)){var o=a[r]; +//自定义表情 +var my_emoji = y.DEFAULT_EMOJI_CDN+o; +if (o.indexOf("https://") >= 0){ + my_emoji = o; +} + +n.push('\""+r+'"')}t.html(n.join("")),l=!0,t.find("i").on("click",function(e){e.preventDefault(),b(i[0]," :"+(0,A.default)(this).attr("title")+":")})}; + +e.$emoji={show:function(){return!l&&u(),e.$preview.hide(),t.show(),r.addClass("actived"),e.$emoji},hide:function(){return r.removeClass("actived"),t.hide(),e.$emoji}},e.$preview={show:function(){return O?(e.$emoji.hide(),o.addClass("actived"),n.html(O).show(),C()):e.$preview.hide(),e.$preview},hide:function(){return o.removeClass("actived"),n.hide().html(""),e.$preview}};var p=function(e){O=(0,k.default)((0,c.default)(m.default.parse(e.val()||""))),o.hasClass("actived")>-1&&O!=n.html()&&n.html(O),(0,d.default)(e[0]),C()};r.on("click",function(t){r.hasClass("actived")?e.$emoji.hide():e.$emoji.show()}),o.on("click",function(t){o.hasClass("actived")?e.$preview.hide():e.$preview.show()});var f=e.config.meta,h={},g={veditor:"comment"};f.forEach(function(e){g["v"+e]=e});for(var v in g)g.hasOwnProperty(v)&&function(){var t=g[v],n=e.$el.find("."+v);h[t]=n,n.on("input change blur ",function(e){"comment"===t?p(n):S[t]=A.default.escape(n.val().replace(/(^\s*)|(\s*$)/g,"")).substring(0,40)})}();var b=function(e,t){if(document.selection){e.focus();document.selection.createRange().text=t,e.focus()}else if(e.selectionStart||"0"==e.selectionStart){var n=e.selectionStart,r=e.selectionEnd,o=e.scrollTop;e.value=e.value.substring(0,n)+t+e.value.substring(r,e.value.length),e.focus(),e.selectionStart=n+t.length,e.selectionEnd=n+t.length,e.scrollTop=o}else e.focus(),e.value+=t;(0,d.default)(e)},x={no:1,size:e.config.pageSize,skip:e.config.pageSize},_=e.$el.find(".vpage");_.on("click",function(e){_.hide(),x.no++,$()});var $=function(){var t=x.size,n=x.no,r=Number(e.$el.find(".vnum").text());e.loading.show();var o=e.Q(e.config.path);o.limit(t),o.skip((n-1)*t),o.find().then(function(o){if(x.skip=x.size,o&&o.length){var i=[];o.forEach(function(t){i.push(t.id),j(t,e.$el.find(".vcards"),!0)}),e.Q(e.config.path,i).then(function(e){(e&&e.results||[]).forEach(function(e){j(e,(0,A.default)('.vquote[data-self-id="'+e.get("rid")+'"]'))}).catch(function(e){})}),t*n0?(e.$el.find(".vcount").show().find(".vnum").text(t),$()):e.loading.hide()}).catch(function(t){e.ErrorHandler(t,"count")});var j=function(t,n,r){var o=(0,A.default)('
'),i=t.get("ua"),a="";//获得UI标识 i + +// var remote_ip_info = t.get("http://pv.sohu.com/cityjson?ie=utf-8");//搜狐 +// getScript(a, function() { +// $("#depcity").val(getCity(remote_ip_info.city)); + +// }); +// var u_address='unkown'; +// $.get('http://pv.sohu.com/cityjson?ie=utf-8', function() { +// u_address = returnCitySN.cname; +// }); + +i&&!/ja/.test(e.config.lang)&&(i=A.default.detect(i), +a=''+i.browser+" "+i.version+' '+i.os+" "+i.osVersion+""),"*"===e.config.path&&(a=''+t.get("url")+""); + +//qq 头像接口 +//var qq_img = m.cdn + a(e.get("mail")) + m.params;//v1.3.10 +var qq_img = E.cdn+(0,s.default)(t.get("mail"))+E.params; +if (t.get("mail").indexOf("@qq.com") >= 0) { + var prefix = t.get("mail").replace(/@.*/, "");//前缀 + var pattern = /^\d+$/g; //正则表达式 + var result = prefix.match(pattern);//match 是匹配的意思 + if (result !== null) { + qq_img = "//q1.qlogo.cn/g?b=qq&nk=" + prefix + "&s=100"; + } +} + +var l=t.get("link")?/^https?\:\/\//.test(t.get("link"))?t.get("link"):"http://"+t.get("link"):"",c=l?''+t.get("nick")+"":''+t.get("nick")+"",u=E.hide?"":'',d=u+'
'+c+" "+a+'
'+(0,w.default)(t.get("insertedAt"),e.i18n)+''+e.i18n.t("reply")+'
'+(0,k.default)(t.get("comment"))+'
'; +o.html(d);var p=o.find(".vat");o.find("a").forEach(function(e){e&&!(0,A.default)(e).hasClass("at")&&(0,A.default)(e).attr({target:"_blank",rel:"nofollow"})}),r?n.append(o):n.prepend(o);var f=o.find(".vcontent");f&&P(f),p&&I(p,t),C()},T={},I=function(t,n){t.on("click",function(r){var o=t.attr("data-root-id"),i=t.attr("data-self-id"),a=e.$el.find(".vwrap"),s="@"+A.default.escape(n.get("nick"));(0,A.default)('.vreply-wrapper[data-self-id="'+i+'"]').append(a).find(".cancel-reply").show(),T={at:A.default.escape(s)+" ",rid:o,pid:i,rmail:n.get("mail")},h.comment.attr({placeholder:s})[0].focus()})},C=function(){setTimeout(function(){try{"MathJax"in window&&"version"in window.MathJax&&(/^3.*/.test(window.MathJax.version)&&MathJax.typeset()||MathJax.Hub.Queue(["Typeset",MathJax.Hub,document.querySelector(".v")])),"renderMathInElement"in window&&renderMathInElement((0,A.default)(".v")[0],{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1}]}),"hljs"in window&&(0,A.default)("pre code,code.hljs").forEach(function(e){hljs.highlightBlock(e)})}catch(e){}},200)},P=function(e){setTimeout(function(){e[0].offsetHeight>180&&(e.addClass("expand"),e.on("click",function(t){e.removeClass("expand")}))})};!function(t){var n=A.default.store.get("ValineCache");if(n)for(var r in f){var o=f[r];e.$el.find(".v"+o).val(A.default.unescape(n[o])),S[o]=n[o]}}(),e.reset=function(){S.comment="",h.comment.val(""),p(h.comment),h.comment.attr("placeholder",e.config.placeholder),T={},e.$preview.hide(),e.$el.find(".vpanel").append(e.$el.find(".vwrap")),e.$el.find(".cancel-reply").hide(),O=""};var M=e.$el.find(".vsubmit"),z=function(t){if(""==O)return void h.comment[0].focus();S.comment=O,S.nick=S.nick||"Anonymous";var n=A.default.store.get("vlx");if(n){if(Date.now()/1e3-n/1e3<20)return void e.$el.find(".status-bar").text(e.i18n.t("busy")).empty(3e3)}R()},L=function(){var e=new AV.ACL;return e.setPublicReadAccess(!0),e.setPublicWriteAccess(!1),e},R=function(){A.default.store.set("vlx",Date.now()),M.attr({disabled:!0}),e.loading.show(!0);var t=AV.Object.extend(e.config.clazzName||"Comment"),n=new t;if(S.url=decodeURI(e.config.path),S.insertedAt=new Date,T.rid){var r=T.pid||T.rid;n.set("rid",T.rid),n.set("pid",r),S.comment=O.replace("

",'

'+T.at+" , ")}for(var o in S)if(S.hasOwnProperty(o)){var i=S[o];n.set(o,i)}n.setACL(L()),n.save().then(function(t){"Anonymous"!=S.nick&&A.default.store.set("ValineCache",{nick:S.nick,link:S.link,mail:S.mail});var n=e.$el.find(".vnum");try{T.rid?j(t,(0,A.default)('.vquote[data-self-id="'+T.rid+'"]'),!0):(Number(n.text())?n.text(Number(n.text())+1):e.$el.find(".vcount").show().find(".vnum").text(Number(n.text())+1),j(t,e.$el.find(".vcards")),x.skip++),M.removeAttr("disabled"),e.loading.hide(),e.reset()}catch(t){e.ErrorHandler(t,"save")}}).catch(function(t){e.ErrorHandler(t,"commitEvt")})};M.on("click",z),(0,A.default)(document).on("keydown",function(e){e=event||e;var t=e.keyCode||e.which||e.charCode;((e.ctrlKey||e.metaKey)&&13===t&&z(),9===t)&&("veditor"==(document.activeElement.id||"")&&(e.preventDefault(),b(i[0]," ")))}).on("paste",function(e){var t="clipboardData"in e?e.clipboardData:e.originalEvent&&e.originalEvent.clipboardData||window.clipboardData;t&&F(t.items,!0)}),i.on("dragenter dragleave dragover drop",function(e){e.stopPropagation(),e.preventDefault(),"drop"===e.type&&F(e.dataTransfer.items)});var F=function(e,t){for(var n=[],r=0,o=e.length;r]+>/g,""))});else if(-1!==a.type.indexOf("image")){n.push(a.getAsFile());continue}}U(n)},U=function t(n,r){r=r||0;var o=n.length;if(o>0){var a=n[r];M.attr({disabled:!0});var s="![Uploading "+a.name+"...]()";b(i[0],s),B(a,function(l,c){!l&&c?(i.val(i.val().replace(s,"!["+a.name+"]("+c.data.url+")\r\n")),(0,d.default)(i[0]),++r= 0){ + my_emoji_show = (o.data[t]||e); + } + return' '+t+' " + //} + // else{ + // return ':'+t+':' + // } + }) + } + }; +t.default=o},function(e,t,n){"use strict";var r=function(e,t){if(!e)return"";try{var n=i(e).getTime(),r=(new Date).getTime(),a=r-n,s=Math.floor(a/864e5);if(0===s){var l=a%864e5,c=Math.floor(l/36e5);if(0===c){var u=l%36e5,d=Math.floor(u/6e4);if(0===d){var p=u%6e4;return Math.round(p/1e3)+" "+t.t("seconds")}return d+" "+t.t("minutes")}return c+" "+t.t("hours")}return s<0?t.t("now"):s<8?s+" "+t.t("days"):o(e)}catch(e){}},o=function(e){var t=a(e.getDate(),2),n=a(e.getMonth()+1,2);return a(e.getFullYear(),2)+"-"+n+"-"+t},i=function e(t){return t instanceof Date?t:!isNaN(t)||/^\d+$/.test(t)?new Date(parseInt(t)):/GMT/.test(t||"")?e(new Date(t).getTime()):(t=(t||"").replace(/(^\s*)|(\s*$)/g,"").replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(t))},a=function(e,t){for(var n=e.toString();n.length>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t){return e<>>32-t}function s(e,t,n,r,o,s){return i(a(i(i(t,e),i(r,s)),o),n)}function l(e,t,n,r,o,i,a){return s(t&n|~t&r,e,t,o,i,a)}function c(e,t,n,r,o,i,a){return s(t&r|n&~r,e,t,o,i,a)}function u(e,t,n,r,o,i,a){return s(t^n^r,e,t,o,i,a)}function d(e,t,n,r,o,i,a){return s(n^(t|~r),e,t,o,i,a)}function p(e,t){e[t>>5]|=128<>>9<<4)]=t;var n,r,o,a,s,p=1732584193,f=-271733879,h=-1732584194,g=271733878;for(n=0;n>5]>>>t%32&255);return n}function h(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<16&&(o=p(o,8*e.length)),n=0;n<16;n+=1)i[n]=909522486^o[n],a[n]=1549556828^o[n];return r=p(i.concat(h(t)),512+8*t.length),f(p(a.concat(r),640))}function m(e){var t,n,r="0123456789abcdef",o="";for(n=0;n>>4&15)+r.charAt(15&t);return o}function y(e){return unescape(encodeURIComponent(e))}function b(e){return g(y(e))}function w(e){return m(b(e))}function x(e,t){return v(y(e),y(t))}function k(e,t){return m(x(e,t))}function _(e,t,n){return t?n?x(t,e):k(t,e):n?b(e):w(e)}void 0!==(r=function(){return _}.call(t,n,t,e))&&(e.exports=r)}()},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return''+e+""}var t=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e){var t=e.exports=function(){return new RegExp("(?:"+t.line().source+")|(?:"+t.block().source+")","gm")};t.line=function(){return/(?:^|\s)\/\/(.+?)$/gm},t.block=function(){return/\/\*([\S\s]*?)\*\//gm}}),n=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"];return function(r,o){void 0===o&&(o={});var i=o.colors;void 0===i&&(i=n);var a=0,s={},l=/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/,c=/'+n+"";return a=++a%i.length,l})}})},function(e,t,n){(function(t){!function(t){"use strict";function n(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=g.normal,this.options.pedantic?this.rules=g.pedantic:this.options.gfm&&(this.options.tables?this.rules=g.tables:this.rules=g.gfm)}function r(e,t){if(this.options=t||h.defaults,this.links=e,this.rules=v.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=v.pedantic:this.options.gfm&&(this.options.breaks?this.rules=v.breaks:this.rules=v.gfm)}function o(e){this.options=e||h.defaults}function i(){}function a(e){this.tokens=[],this.token=null,this.options=e||h.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function l(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 c(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 u(e,t){return m[" "+e]||(/^[^:]+:\/*[^\/]*$/.test(e)?m[" "+e]=e+"/":m[" "+e]=e.replace(/[^\/]*$/,"")),e=m[" "+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;rt)n.splice(t);else for(;n.lengthAn error occurred:

"+s(e.message+"",!0)+"
";throw e}}var g={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:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\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]+/};g._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,g._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,g.def=c(g.def).replace("label",g._label).replace("title",g._title).getRegex(),g.bullet=/(?:[*+-]|\d+\.)/,g.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,g.item=c(g.item,"gm").replace(/bull/g,g.bullet).getRegex(),g.list=c(g.list).replace(/bull/g,g.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+g.def.source+")").getRegex(),g._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",g._comment=//,g.html=c(g.html,"i").replace("comment",g._comment).replace("tag",g._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),g.paragraph=c(g.paragraph).replace("hr",g.hr).replace("heading",g.heading).replace("lheading",g.lheading).replace("tag",g._tag).getRegex(),g.blockquote=c(g.blockquote).replace("paragraph",g.paragraph).getRegex(),g.normal=p({},g),g.gfm=p({},g.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),g.gfm.paragraph=c(g.paragraph).replace("(?!","(?!"+g.gfm.fences.source.replace("\\1","\\2")+"|"+g.list.source.replace("\\1","\\3")+"|").getRegex(),g.tables=p({},g.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),g.pedantic=p({},g.normal,{html:c("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",g._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),n.rules=g,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,o,i,a,s,l,c,u,d,p,h,v;e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))&&(s={type:"table",header:f(o[1].replace(/^ *| *\| *$/g,"")),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3]?o[3].replace(/\n$/,"").split("\n"):[]},s.header.length===s.align.length)){for(e=e.substring(o[0].length),c=0;c ?/gm,""),this.token(o,t),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),i=o[2],p=i.length>1,this.tokens.push({type:"list_start",ordered:p,start:p?+i:""}),o=o[0].match(this.rules.item),n=!1,d=o.length,c=0;c1&&a.length>1||(e=o.slice(c+1).join("\n")+e,c=d-1)),r=n||/\n\n(?!\s*$)/.test(s),c!==d-1&&(n="\n"===s.charAt(s.length-1),r||(r=n)),h=/^\[[ xX]\] /.test(s),v=void 0,h&&(v=" "!==s[1],s=s.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:r?"loose_item_start":"list_item_start",task:h,checked:v}),this.token(s,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),o[3]&&(o[3]=o[3].substring(1,o[3].length-1)),u=o[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[u]||(this.tokens.links[u]={href:o[2],title:o[3]});else if(t&&(o=this.rules.table.exec(e))&&(s={type:"table",header:f(o[1].replace(/^ *| *\| *$/g,"")),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3]?o[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]},s.header.length===s.align.length)){for(e=e.substring(o[0].length),c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:d,text:/^[\s\S]+?(?=[\\?@\[\]\\^_`{|}~])/g,v._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,v._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])?)+(?![-_])/,v.autolink=c(v.autolink).replace("scheme",v._scheme).replace("email",v._email).getRegex(),v._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,v.tag=c(v.tag).replace("comment",g._comment).replace("attribute",v._attribute).getRegex(),v._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,v._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,v._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,v.link=c(v.link).replace("label",v._label).replace("href",v._href).replace("title",v._title).getRegex(),v.reflink=c(v.reflink).replace("label",v._label).getRegex(),v.normal=p({},v),v.pedantic=p({},v.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:c(/^!?\[(label)\]\((.*?)\)/).replace("label",v._label).getRegex(),reflink:c(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",v._label).getRegex()}),v.gfm=p({},v.normal,{escape:c(v.escape).replace("])","~|])").getRegex(),url:c(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",v._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(v.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),v.breaks=p({},v.gfm,{br:c(v.br).replace("{2,}","*").getRegex(),text:c(v.gfm.text).replace("{2,}","*").getRegex()}),r.rules=v,r.output=function(e,t,n){return new r(t,n).output(e)},r.prototype.output=function(e){for(var t,n,o,i,a,l="";e;)if(a=this.rules.escape.exec(e))e=e.substring(a[0].length),l+=a[1];else if(a=this.rules.autolink.exec(e))e=e.substring(a[0].length),"@"===a[2]?(n=s(this.mangle(a[1])),o="mailto:"+n):(n=s(a[1]),o=n),l+=this.renderer.link(o,null,n);else if(this.inLink||!(a=this.rules.url.exec(e))){if(a=this.rules.tag.exec(e))!this.inLink&&/^/i.test(a[0])&&(this.inLink=!1),e=e.substring(a[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):s(a[0]):a[0];else if(a=this.rules.link.exec(e))e=e.substring(a[0].length),this.inLink=!0,o=a[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o),t?(o=t[1],i=t[3]):i=""):i=a[3]?a[3].slice(1,-1):"",o=o.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(a,{href:r.escapes(o),title:r.escapes(i)}),this.inLink=!1;else if((a=this.rules.reflink.exec(e))||(a=this.rules.nolink.exec(e))){if(e=e.substring(a[0].length),t=(a[2]||a[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=a[0].charAt(0),e=a[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(a,t),this.inLink=!1}else if(a=this.rules.strong.exec(e))e=e.substring(a[0].length),l+=this.renderer.strong(this.output(a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.em.exec(e))e=e.substring(a[0].length),l+=this.renderer.em(this.output(a[6]||a[5]||a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.code.exec(e))e=e.substring(a[0].length),l+=this.renderer.codespan(s(a[2].trim(),!0));else if(a=this.rules.br.exec(e))e=e.substring(a[0].length),l+=this.renderer.br();else if(a=this.rules.del.exec(e))e=e.substring(a[0].length),l+=this.renderer.del(this.output(a[1]));else if(a=this.rules.text.exec(e))e=e.substring(a[0].length),l+=this.renderer.text(s(this.smartypants(a[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else a[0]=this.rules._backpedal.exec(a[0])[0],e=e.substring(a[0].length),"@"===a[2]?(n=s(a[0]),o="mailto:"+n):(n=s(a[0]),o="www."===a[1]?"http://"+n:n),l+=this.renderer.link(o,null,n);return l},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?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(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,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},o.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:s(e,!0))+"
\n":"
"+(n?e:s(e,!0))+"
"},o.prototype.blockquote=function(e){return"
\n"+e+"
\n"},o.prototype.html=function(e){return e},o.prototype.heading=function(e,t,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},o.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},o.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},o.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},o.prototype.checkbox=function(e){return" "},o.prototype.paragraph=function(e){return"

    "+e+"

    \n"},o.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},o.prototype.tablerow=function(e){return"\n"+e+"\n"},o.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},o.prototype.strong=function(e){return""+e+""},o.prototype.em=function(e){return""+e+""},o.prototype.codespan=function(e){return""+e+""},o.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},o.prototype.del=function(e){return""+e+""},o.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(l(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return n}this.options.baseUrl&&!y.test(e)&&(e=u(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var o='
    "},o.prototype.image=function(e,t,n){this.options.baseUrl&&!y.test(e)&&(e=u(this.options.baseUrl,e));var r=''+n+'":">"},o.prototype.text=function(e){return e},i.prototype.strong=i.prototype.em=i.prototype.codespan=i.prototype.del=i.prototype.text=function(e){return e},i.prototype.link=i.prototype.image=function(e,t,n){return""+n},i.prototype.br=function(){return""},a.parse=function(e,t){return new a(t).parse(e)},a.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,p({},this.options,{renderer:new i})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},a.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,l(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,o="",i="";for(n="",e=0;e-1||e.indexOf("NET CLR")>-1,Presto:e.indexOf("Presto")>-1,WebKit:e.indexOf("AppleWebKit")>-1,Gecko:e.indexOf("Gecko/")>-1,Safari:e.indexOf("Safari")>-1,Edge:e.indexOf("Edge")>-1||e.indexOf("Edg")>-1,Chrome:e.indexOf("Chrome")>-1||e.indexOf("CriOS")>-1,IE:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1,Firefox:e.indexOf("Firefox")>-1||e.indexOf("FxiOS")>-1,"Firefox Focus":e.indexOf("Focus")>-1,Chromium:e.indexOf("Chromium")>-1,Opera:e.indexOf("Opera")>-1||e.indexOf("OPR")>-1,Vivaldi:e.indexOf("Vivaldi")>-1,Yandex:e.indexOf("YaBrowser")>-1,Kindle:e.indexOf("Kindle")>-1||e.indexOf("Silk/")>-1,360:e.indexOf("360EE")>-1||e.indexOf("360SE")>-1,UC:e.indexOf("UC")>-1||e.indexOf(" UBrowser")>-1,QQBrowser:e.indexOf("QQBrowser")>-1,QQ:e.indexOf("QQ/")>-1,Baidu:e.indexOf("Baidu")>-1||e.indexOf("BIDUBrowser")>-1,Maxthon:e.indexOf("Maxthon")>-1,Sogou:e.indexOf("MetaSr")>-1||e.indexOf("Sogou")>-1,LBBROWSER:e.indexOf("LBBROWSER")>-1,"2345Explorer":e.indexOf("2345Explorer")>-1,TheWorld:e.indexOf("TheWorld")>-1,XiaoMi:e.indexOf("MiuiBrowser")>-1,Quark:e.indexOf("Quark")>-1,Qiyu:e.indexOf("Qiyu")>-1,Wechat:e.indexOf("MicroMessenger")>-1,Taobao:e.indexOf("AliApp(TB")>-1,Alipay:e.indexOf("AliApp(AP")>-1,Weibo:e.indexOf("Weibo")>-1,Douban:e.indexOf("com.douban.frodo")>-1,Suning:e.indexOf("SNEBUY-APP")>-1,iQiYi:e.indexOf("IqiyiApp")>-1,Windows:e.indexOf("Windows")>-1,Linux:e.indexOf("Linux")>-1||e.indexOf("X11")>-1,macOS:e.indexOf("Macintosh")>-1,Android:e.indexOf("Android")>-1||e.indexOf("Adr")>-1,Ubuntu:e.indexOf("Ubuntu")>-1,FreeBSD:e.indexOf("FreeBSD")>-1,Debian:e.indexOf("Debian")>-1,"Windows Phone":e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,BlackBerry:e.indexOf("BlackBerry")>-1||e.indexOf("RIM")>-1||e.indexOf("BB10")>-1,MeeGo:e.indexOf("MeeGo")>-1,Symbian:e.indexOf("Symbian")>-1,iOS:e.indexOf("like Mac OS X")>-1,"Chrome OS":e.indexOf("CrOS")>-1,WebOS:e.indexOf("hpwOS")>-1,Mobile:e.indexOf("Mobi")>-1||e.indexOf("iPh")>-1||e.indexOf("480")>-1,Tablet:e.indexOf("Tablet")>-1||e.indexOf("Pad")>-1||e.indexOf("Nexus 7")>-1};n.Mobile&&(n.Mobile=!(e.indexOf("iPad")>-1));var r={browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Kindle","360","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","macOS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"]};for(var o in r)if(r.hasOwnProperty(o))for(var i=0,a=r[o].length;i=3&&(i=n),"[object Array]"===o.call(e)?a(e,t,i):"string"==typeof e?s(e,t,i):l(e,t,i)};e.exports=c},function(e,t,n){"use strict";var r=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==o.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,i=r.call(arguments,1),a=function(){if(this instanceof n){var o=t.apply(this,i.concat(r.call(arguments)));return Object(o)===o?o:this}return t.apply(e,i.concat(r.call(arguments)))},s=Math.max(0,t.length-i.length),l=[],c=0;c=12&&t<=14)?1:2},b={pluralTypes:{arabic:function(e){if(e<3)return e;var t=e%100;return t>=3&&t<=10?3:t>=11?4:5},bosnian_serbian:y,chinese:function(){return 0},croatian:y,french:function(e){return e>1?1:0},german:function(e){return 1!==e?1:0},russian:y,lithuanian:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?1:2},czech:function(e){return 1===e?0:e>=2&&e<=4?1:2},polish:function(e){if(1===e)return 0;var t=e%10;return 2<=t&&t<=4&&(e%100<10||e%100>=20)?1:2},icelandic:function(e){return e%10!=1||e%100==11?1:0},slovenian:function(e){var t=e%100;return 1===t?0:2===t?1:3===t||4===t?2:3}},pluralTypeToLanguages:{arabic:["ar"],bosnian_serbian:["bs-Latn-BA","bs-Cyrl-BA","srl-RS","sr-RS"],chinese:["id","id-ID","ja","ko","ko-KR","lo","ms","th","th-TH","zh"],croatian:["hr","hr-HR"],german:["fa","da","de","en","es","fi","el","he","hi-IN","hu","hu-HU","it","nl","no","pt","sv","tr"],french:["fr","tl","pt-br"],russian:["ru","ru-RU"],lithuanian:["lt"],czech:["cs","cs-CZ","sk"],polish:["pl"],icelandic:["is"],slovenian:["sl-SL"]}},w=/%\{(.*?)\}/g;c.prototype.locale=function(e){return e&&(this.currentLocale=e),this.currentLocale},c.prototype.extend=function(e,t){u(e,function(e,n){var r=t?t+"."+n:n;"object"==typeof e?this.extend(e,r):this.phrases[r]=e},this)},c.prototype.unset=function(e,t){"string"==typeof e?delete this.phrases[e]:u(e,function(e,n){var r=t?t+"."+n:n;"object"==typeof e?this.unset(e,r):delete this.phrases[r]},this)},c.prototype.clear=function(){this.phrases={}},c.prototype.replace=function(e){this.clear(),this.extend(e)},c.prototype.t=function(e,t){var n,r,o=null==t?{}:t;if("string"==typeof this.phrases[e])n=this.phrases[e];else if("string"==typeof o._)n=o._;else if(this.onMissingKey){var i=this.onMissingKey;r=i(e,o,this.currentLocale,this.tokenRegex,this.pluralRules)}else this.warn('Missing translation for key: "'+e+'"'),r=e;return"string"==typeof n&&(r=l(n,o,this.currentLocale,this.tokenRegex,this.pluralRules)),r},c.prototype.has=function(e){return p(this.phrases,e)},c.transformPhrase=function(e,t,n){return l(e,t,n)},e.exports=c},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ +var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=r(e),c=1;c0&&!o.call(e,0))for(var f=0;f0)for(var g=0;g1)for(var n=1;n + * https://github.com/jaywcjlove/store.js + * + * Licensed under the MIT license. + */ +var u=window.localStorage;u=function(e){var t="_Is_Incognit";try{e.setItem(t,"yes")}catch(t){if("QuotaExceededError"===t.name){var n=function(){};e.__proto__={setItem:n,getItem:n,removeItem:n,clear:n}}}finally{"yes"===e.getItem(t)&&e.removeItem(t)}return e}(u),l.prototype={set:function(e,t){if(e&&!r(e))u.setItem(e,o(t));else if(r(e))for(var n in e)this.set(n,e[n]);return this},get:function(e){if(!e){var t={};return this.forEach(function(e,n){return t[e]=n}),t}if("?"===e.charAt(0))return this.has(e.substr(1));var n=arguments;if(n.length>1){for(var r={},o=0,a=n.length;o-1&&(n[t[r]]=this.get(t[r]));return n}};var d=null;for(var p in l.prototype)c[p]=l.prototype[p];t.default=c},function(e,t,n){"use strict";var r=n(11),o=n(8),i=n(10),a=n(12),s=n(47),l=r(a());o(l,{getPolyfill:a,implementation:i,shim:s}),e.exports=l},function(e,t,n){"use strict";var r=n(0),o=r("%String%"),i=r("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new i("Cannot convert a Symbol value to a string");return o(e)}},function(e,t,n){"use strict";var r=n(0),o=r("%TypeError%");e.exports=function(e,t){if(null==e)throw new o(t||"Cannot call method on "+e);return e}},function(e,t,n){"use strict";var r=n(0),o=n(11),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")?o(n):n}},function(e,t,n){"use strict";(function(t){var r=t.Symbol,o=n(46);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}}).call(t,n(13))},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;e[t]=42;for(t in e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r=n(8),o=n(12);e.exports=function(){var e=o();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},function(e,t,n){"use strict";(function(t){var n="production"!==t.env.NODE_ENV,r=function(){};if(n){var o=function(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r2?r-2:0);for(var i=2;i";var b=o(l),w=i[n],x=d(b.html,function(e,t){var o=-1!==p.indexOf(w,e),i=c(n,e,t,o);if(!r(i))return i;if(o)return t=h(n,e,t,v),t?e+'="'+t+'"':e;var i=f(n,e,t,o);return r(i)?void 0:i}),l="<"+n;return x&&(l+=" "+x),b.closing&&(l+=" /"),l+=">"}var y=s(n,l,m);return r(y)?g(l):y},g);return m&&(y=m.remove(y)),y},e.exports=a},function(e,t){e.exports={nick:"NickName",mail:"E-Mail",link:"Website(http://)",sofa:"No comment yet.",submit:"Submit",reply:"Reply",cancelReply:"Cancel reply",comments:"Comments",cancel:"Cancel",confirm:"Confirm",continue:"Continue",more:"Load More...",preview:"Preview",emoji:"Emoji",expand:"See more....",seconds:"seconds ago",minutes:"minutes ago",hours:"hours ago",days:"days ago",now:"just now",uploading:"Uploading ...",uploadDone:"Upload completed!",busy:"Submit is busy, please wait...","code-99":"Initialization failed, Please check the `el` element in the init method.","code-100":"Initialization failed, Please check your appId and appKey.","code-140":"The total number of API calls today has exceeded the development version limit.","code-401":"Unauthorized operation, Please check your appId and appKey.","code-403":"Access denied by API domain white list, Please check your security domain."}},function(e,t){e.exports={nick:"ニックネーム",mail:"メールアドレス",link:"サイト(http://)",sofa:"コメントしましょう~",submit:"提出する",reply:"返信する",cancelReply:"キャンセル",comments:"コメント",cancel:"キャンセル",confirm:"確認する",continue:"继续",more:"さらに読み込む...",preview:"プレビュー",emoji:"絵文字",expand:"もっと見る",seconds:"秒前",minutes:"分前",hours:"時間前",days:"日前",now:"たっだ今",uploading:"アップロード中...",uploadDone:"アップロードが完了しました!",busy:"20 秒間隔で提出してください ...","code-99":"ロードエラーです。initにある`el`エレメントを確認ください.","code-100":"ロードエラーです。AppIdとAppKeyを確認ください.","code-140":"今日のAPIコールの総数が開発バージョンの上限を超えた.","code-401":"権限が制限されています。AppIdとAppKeyを確認ください.","code-403":"アクセスがAPIなどに制限されました、ドメイン名のセキュリティ設定を確認ください"}},function(e,t){e.exports={nick:"昵称",mail:"邮箱 (方便及时回复)",link:"网址(http://)",sofa:"来发评论吧~",submit:"提交",reply:"回复",cancelReply:"取消回复",comments:"评论",cancel:"取消",confirm:"确认",continue:"继续",more:"加载更多...",preview:"预览",emoji:"表情",expand:"查看更多...",seconds:"秒前",minutes:"分钟前",hours:"小时前",days:"天前",now:"刚刚",uploading:"正在传输...",uploadDone:"传输完成!",busy:"操作频繁,请稍候再试...","code-99":"初始化失败,请检查init中的`el`元素.","code-100":"初始化失败,请检查你的AppId和AppKey.","code-140":"今日 API 调用总次数已超过开发版限制.","code-401":"未经授权的操作,请检查你的AppId和AppKey.","code-403":"访问被API域名白名单拒绝,请检查你的安全域名设置."}},function(e,t){e.exports={nick:"暱稱",mail:"郵箱",link:"網址(http://)",sofa:"來發評論吧~",submit:"提交",reply:"回覆",cancelReply:"取消回覆",comments:"評論",cancel:"取消",confirm:"確認",continue:"繼續",more:"加載更多...",preview:"預覽",emoji:"表情",expand:"查看更多...",seconds:"秒前",minutes:"分鐘前",hours:"小時前",days:"天前",now:"剛剛",uploading:"正在上傳...",uploadDone:"上傳完成!",busy:"操作頻繁,請稍候再試...","code-99":"初始化失敗,請檢查init中的`el`元素.","code-100":"初始化失敗,請檢查你的AppId和AppKey.","code-140":"今日 API 調用總次數已超過開發版限制.","code-401":"未經授權的操作,請檢查你的AppId和AppKey.","code-403":"訪問被API域名白名單拒絕,請檢查你的安全域名設置."}},function(e,t){e.exports={傲娇:"https://cdn.jsdelivr.net/gh/drew233/cdn/20200409103906.webp",开心:"https://cdn.jsdelivr.net/gh/drew233/cdn/20200409104757.webp",扣手手:"https://cdn.jsdelivr.net/gh/drew233/cdn/20200409130304.webp",仙女下凡:"https://cdn.jsdelivr.net/gh/drew233/cdn/20200409130301.webp",得瑟:"https://cdn.jsdelivr.net/gh/drew233/cdn/20200409130258.webp",揉左脸:"https://cdn.jsdelivr.net/gh/drew233/cdn/20200409130254.webp",揉右脸:"https://cdn.jsdelivr.net/gh/drew233/cdn/20200409130249.webp",滑稽:"https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/smilies/icon_huaji.gif", + +/*smile:"e3/2018new_weixioa02_org.png",lovely:"09/2018new_keai_org.png",happy:"1e/2018new_taikaixin_org.png",clap:"6e/2018new_guzhang_thumb.png",whee:"33/2018new_xixi_thumb.png",haha:"8f/2018new_haha_thumb.png","laugh and cry":"4a/2018new_xiaoku_thumb.png",wink:"43/2018new_jiyan_org.png",greddy:"fa/2018new_chanzui_org.png",awkward:"a3/2018new_heixian_thumb.png",sweat:"28/2018new_han_org.png","pick nose":"9a/2018new_wabi_thumb.png",hum:"7c/2018new_heng_thumb.png",angry:"f6/2018new_nu_thumb.png",grievance:"a5/2018new_weiqu_thumb.png",poor:"96/2018new_kelian_org.png",disappoint:"aa/2018new_shiwang_thumb.png",sad:"ee/2018new_beishang_org.png",tear:"6e/2018new_leimu_org.png","no way":"83/2018new_kuxiao_org.png",shy:"c1/2018new_haixiu_org.png",dirt:"10/2018new_wu_thumb.png","love you":"f6/2018new_aini_org.png",kiss:"2c/2018new_qinqin_thumb.png",amorousness:"9d/2018new_huaxin_org.png",longing:"c9/2018new_chongjing_org.png",desire:"3e/2018new_tianping_thumb.png","bad laugh":"4d/2018new_huaixiao_org.png",blackness:"9e/2018new_yinxian_org.png","laugh without word":"2d/2018new_xiaoerbuyu_org.png",titter:"71/2018new_touxiao_org.png",cool:"c4/2018new_ku_org.png","not easy":"aa/2018new_bingbujiandan_thumb.png",think:"30/2018new_sikao_org.png",question:"b8/2018new_ningwen_org.png","no idea":"2a/2018new_wenhao_thumb.png",dizzy:"07/2018new_yun_thumb.png",bomb:"a2/2018new_shuai_thumb.png",bone:"a1/2018new_kulou_thumb.png","be quiet":"b0/2018new_xu_org.png","shut up":"62/2018new_bizui_org.png",stupid:"dd/2018new_shayan_org.png","surprise ":"49/2018new_chijing_org.png",vomit:"08/2018new_tu_org.png",cold:"40/2018new_kouzhao_thumb.png",sick:"3b/2018new_shengbing_thumb.png",bye:"fd/2018new_baibai_thumb.png","look down on":"da/2018new_bishi_org.png","white eye":"ef/2018new_landelini_org.png","left hum":"43/2018new_zuohengheng_thumb.png","right hum":"c1/2018new_youhengheng_thumb.png",crazy:"17/2018new_zhuakuang_org.png","scold ":"87/2018new_zhouma_thumb.png","hit on face":"cb/2018new_dalian_org.png",wow:"ae/2018new_ding_org.png",fan:"86/2018new_hufen02_org.png",money:"a2/2018new_qian_thumb.png",yawn:"55/2018new_dahaqian_org.png",sleepy:"3c/2018new_kun_thumb.png",sleep:"e2/2018new_shuijiao_thumb.png","watermelon ":"01/2018new_chigua_thumb.png",doge:"a1/2018new_doge02_org.png",dog:"22/2018new_erha_org.png",cat:"7b/2018new_miaomiao_thumb.png",thumb:"e6/2018new_zan_org.png",good:"8a/2018new_good_org.png",ok:"45/2018new_ok_org.png",yeah:"29/2018new_ye_thumb.png","shack hand":"e9/2018new_woshou_thumb.png",bow:"e7/2018new_zuoyi_org.png",come:"42/2018new_guolai_thumb.png",punch:"86/2018new_quantou_thumb.png"*/}; +function aru(str){ + return "aru/aru-" + str + ".gif"; + } + function tieba(str){ + return "tieba/tieba-" + str + ".png"; + } + function qq(str) { + return "qq/qq-" + str + ".gif"; + } + //e.exports = {}; + for (var i = 1; i < 54; i++) { + e.exports['tieba-' + i] = tieba(i); + } + for (var i = 1; i < 101; i++) { + e.exports['qq-' + i] = qq(i); + } + for (var i = 1; i < 116; i++) { + e.exports['aru-' + i] = aru(i); + }},function(e,t,n){var r=n(57);"string"==typeof r&&(r=[[e.i,r,""]]);var o={};o.transform=void 0;n(59)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(58)(!1),t.push([e.i,'.MathJax,.MathJax_Display,mjx-container{overflow-y:auto;outline:none}.v{font-size:16px;text-align:left}.v *{-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1.75;color:#555}.v .text-right{text-align:right}.v .text-center{text-align:center}.v hr{margin:.825em 0;border-color:#f6f6f6;border-style:dashed}.v.hide-avatar .vimg{display:none}.v a{position:relative;cursor:pointer;color:#1abc9c;display:inline-block}.v a:hover{color:#d7191a}.v code,.v pre{background-color:#f8f8f8;color:#555;padding:.2em .4em;border-radius:3px;font-size:85%;margin:0;font-family:Source Code Pro,courier new,Input Mono,PT Mono,SFMono-Regular,Consolas,Monaco,Menlo,PingFang SC,Liberation Mono,Microsoft YaHei,Courier,monospace}.v pre{padding:10px;overflow:auto;line-height:1.45}.v pre code{padding:0;background:transparent;white-space:pre-wrap;word-break:keep-all}.v blockquote{color:#666;margin:.5em 0;padding:0 0 0 1em;border-left:8px solid hsla(0,0%,93%,.5)}.v .vinput{border:none;resize:none;outline:none;padding:10px 5px;max-width:100%;font-size:.775em}.v input[type=checkbox],.v input[type=radio]{display:inline-block;vertical-align:middle;margin-top:-2px}.v .vicon{cursor:pointer;display:inline-block;overflow:hidden;fill:#666;vertical-align:middle}.v .vicon+.vicon{margin-left:10px}.v .vicon.actived{fill:#66b1ff}.v .vrow{font-size:0;padding:10px 0}.v .vrow .vcol{display:inline-block;vertical-align:middle;font-size:14px}.v .vrow .vcol.vcol-20{width:20%}.v .vrow .vcol.vcol-30{width:30%}.v .vrow .vcol.vcol-40{width:40%}.v .vrow .vcol.vcol-50{width:50%}.v .vrow .vcol.vcol-60{width:60%}.v .vrow .vcol.vcol-70{width:70%}.v .vrow .vcol.vcol-80{width:80%}.v .vrow .vcol.vctrl{font-size:12px}.v .emoji,.v .vemoji{max-height:22px;vertical-align:middle;margin:0 1px;display:inline-block}.v .vwrap{border:1px solid #f0f0f0;border-radius:4px;margin-bottom:10px;overflow:hidden;position:relative;padding:10px}.v .vwrap input{background:transparent}.v .vwrap .vedit{position:relative;padding-top:10px}.v .vwrap .cancel-reply-btn{position:absolute;right:5px;top:5px;cursor:pointer}.v .vwrap .vemojis{display:none;font-size:18px;text-align:justify;max-height:145px;overflow:auto;padding-bottom:10px;-webkit-box-shadow:0 0 1px #f0f0f0;box-shadow:0 0 1px #f0f0f0}.v .vwrap .vemojis i{font-style:normal;padding-top:7px;width:36px;cursor:pointer;text-align:center;display:inline-block;vertical-align:middle}.v .vwrap .vpreview{padding:7px;-webkit-box-shadow:0 0 1px #f0f0f0;box-shadow:0 0 1px #f0f0f0}.v .vwrap .vpreview frame,.v .vwrap .vpreview iframe,.v .vwrap .vpreview img{max-width:100%;border:none}.v .vwrap .vheader .vinput{width:33.33%;border-bottom:1px dashed #dedede}.v .vwrap .vheader.item2 .vinput{width:50%}.v .vwrap .vheader.item1 .vinput{width:100%}.v .vwrap .vheader .vinput:focus{border-bottom-color:#eb5055}@media screen and (max-width:520px){.v .vwrap .vheader.item2 .vinput,.v .vwrap .vheader .vinput{width:100%}}.v .vcopy{color:#999;padding:.5em 0}.v .vcopy,.v .vcopy a{font-size:.75em}.v .vcount{padding:5px;font-weight:600;font-size:1.25em}.v a{text-decoration:none;color:#555}.v a:hover{color:#222}.v ol,.v ul{padding:0;margin-left:1.25em}.v .txt-center{text-align:center}.v .txt-right{text-align:right}.v .pd5{padding:5px}.v .pd10{padding:10px}.v .veditor{width:100%;min-height:8.75em;font-size:.875em;background:transparent;resize:vertical;-webkit-transition:all .25s ease;transition:all .25s ease}.v .vbtn{-webkit-transition-duration:.4s;transition-duration:.4s;text-align:center;color:#313131;border:1px solid #ededed;border-radius:.3em;display:inline-block;background:#ededed;margin-bottom:0;font-weight:400;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;white-space:nowrap;padding:.5em 1.25em;font-size:.875em;line-height:1.42857143;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none}.v .vbtn+.vbtn{margin-left:1.25em}.v .vbtn:active,.v .vbtn:hover{color:#3090e4;border-color:#3090e4;background-color:#fff}.v .vbtn:disabled{border-color:#e1e1e1;color:#e1e1e1;background-color:#fdfafa;cursor:not-allowed}.v .vempty{padding:1.25em;text-align:center;color:#999}.v .vsys{display:inline-block;padding:.2em .5em;background:#ededed;color:#b3b1b1;font-size:.75em;border-radius:.2em;margin-right:.3em}@media screen and (max-width:520px){.v .vsys{display:none}}.v .vcards{width:100%}.v .vcards .vcard{padding-top:1.25em;position:relative;display:block}.v .vcards .vcard:after{content:"";clear:both;display:block}.v .vcards .vcard .vimg{width:3.125em;height:3.125em;float:left;border-radius:50%;margin-right:.7525em;border:1px solid #f5f5f5;padding:.125em}@media screen and (max-width:720px){.v .vcards .vcard .vimg{width:2.5em;height:2.5em}}.v .vcards .vcard .vhead{line-height:1.5;margin-top:0}.v .vcards .vcard .vhead .vnick{position:relative;font-size:.875em;font-weight:500;margin-right:.875em;cursor:pointer;color:#1abc9c;text-decoration:none;display:inline-block}.v .vcards .vcard .vhead .vnick:hover{color:#d7191a}.v .vcards .vcard .vh{overflow:hidden;padding-bottom:.5em;border-bottom:1px dashed #f5f5f5}.v .vcards .vcard .vh .vtime{color:#b3b3b3;font-size:.75em;margin-right:.875em}.v .vcards .vcard .vh .vmeta{line-height:1;position:relative}.v .vcards .vcard .vh .vmeta .vat{font-size:.8125em;color:#ef2f11;cursor:pointer;float:right}.v .vcards .vcard:last-child .vh{border-bottom:none}.v .vcards .vcard .vcontent{word-wrap:break-word;word-break:break-all;text-align:justify;font-size:.875em;line-height:2;position:relative;margin-bottom:.75em;padding-top:.625em}.v .vcards .vcard .vcontent a:hover{color:#ef2f11}.v .vcards .vcard .vcontent frame,.v .vcards .vcard .vcontent iframe,.v .vcards .vcard .vcontent img{max-width:100%;border:none}.v .vcards .vcard .vcontent.expand{cursor:pointer;max-height:8em;overflow:hidden}.v .vcards .vcard .vcontent.expand:before{display:block;content:"";position:absolute;width:100%;left:0;top:0;bottom:3.15em;background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,0)),to(hsla(0,0%,100%,.9)));background:linear-gradient(180deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.9));z-index:999}.v .vcards .vcard .vcontent.expand:after{display:block;content:attr(data-expand);text-align:center;color:#828586;position:absolute;width:100%;height:3.15em;line-height:3.15em;left:0;bottom:0;z-index:999;background:hsla(0,0%,100%,.9)}.v .vcards .vcard .vquote{color:#666;padding-left:1em;border-left:1px dashed hsla(0,0%,93%,.5)}.v .vcards .vcard .vquote .vimg{width:2.225em;height:2.225em}.v .vpage .vmore{margin:1em 0}.v .clear{content:"";display:block;clear:both}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes pulse{50%{background:#dcdcdc}}@keyframes pulse{50%{background:#dcdcdc}}.v .vspinner{width:22px;height:22px;display:inline-block;border:6px double #a0a0a0;border-top-color:transparent;border-bottom-color:transparent;border-radius:50%;-webkit-animation:spin 1s infinite linear;animation:spin 1s infinite linear;position:relative;vertical-align:middle;margin:0 5px}.night .v *,.theme__dark .v *,[data-theme=dark] .v *{color:#929298}.night .v .vsys,.night .v code,.night .v pre,.theme__dark .v .vsys,.theme__dark .v code,.theme__dark .v pre,[data-theme=dark] .v .vsys,[data-theme=dark] .v code,[data-theme=dark] .v pre{background-color:transparent;color:#929298}.night .v .vicon,.theme__dark .v .vicon,[data-theme=dark] .v .vicon{fill:#929298}.night .v .vicon.actived,.theme__dark .v .vicon.actived,[data-theme=dark] .v .vicon.actived{fill:#66b1ff}.night .v .vbtn,.theme__dark .v .vbtn,[data-theme=dark] .v .vbtn{background-color:transparent;color:#929298}.night .v .vbtn:hover,.theme__dark .v .vbtn:hover,[data-theme=dark] .v .vbtn:hover{color:#66b1ff}.night .v a:hover,.theme__dark .v a:hover,[data-theme=dark] .v a:hover{color:#d7191a}.night .v .vlist .vcard .vcontent.expand:before,.theme__dark .v .vlist .vcard .vcontent.expand:before,[data-theme=dark] .v .vlist .vcard .vcontent.expand:before{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.3)),to(rgba(0,0,0,.7)));background:linear-gradient(180deg,rgba(0,0,0,.3),rgba(0,0,0,.7))}.night .v .vlist .vcard .vcontent.expand:after,.theme__dark .v .vlist .vcard .vcontent.expand:after,[data-theme=dark] .v .vlist .vcard .vcontent.expand:after{background:rgba(0,0,0,.7)}@media (prefers-color-scheme:dark){.v *{color:#929298}.v .vsys,.v code,.v pre{background-color:transparent;color:#929298}.v .vicon{fill:#929298}.v .vicon.actived{fill:#66b1ff}.v .vbtn{background-color:transparent;color:#929298}.v .vbtn:hover{color:#66b1ff}.v a:hover{color:#d7191a}.v .vlist .vcard .vcontent.expand:before{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.3)),to(rgba(0,0,0,.7)));background:linear-gradient(180deg,rgba(0,0,0,.3),rgba(0,0,0,.7))}.v .vlist .vcard .vcontent.expand:after{background:rgba(0,0,0,.7)}}',""])},function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([i]).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={},o=0;o=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),i(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),i(e,t),t}function c(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function u(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var c=y++;n=m||(m=s(t)),r=d.bind(null,n,c,!1),o=d.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=l(t),r=f.bind(null,n,t),o=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),o=function(){a(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 o()}}function d(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(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 f(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=w(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var h={},g=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),v=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,y=0,b=[],w=n(60);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=g()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=o(e,t);return r(n,t),function(e){for(var i=[],a=0;a=0&&s0?0:a-1;return arguments.length<3&&(i=n[o?o[u]:u],u+=t),e(n,r,i,o,u,a)}}function s(t){return function(e,n,r){n=A(n,r);for(var i=j(e),s=t>0?0:i-1;s>=0&&s0?o=s>=0?s:Math.max(s+a,o):a=s>=0?Math.min(s+1,a):s+a+1;else if(n&&s&&a)return s=n(r,i),r[s]===i?s:-1;if(i!==i)return s=e(p.call(r,o,a),O.isNaN),s>=0?s+o:-1;for(s=t>0?o:a-1;s>=0&&s=0&&e<=C};O.each=O.forEach=function(t,e,n){e=S(e,n);var r,i;if(x(t))for(r=0,i=t.length;r=0},O.invoke=function(t,e){var n=p.call(arguments,2),r=O.isFunction(e);return O.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},O.pluck=function(t,e){return O.map(t,O.property(e))},O.where=function(t,e){return O.filter(t,O.matcher(e))},O.findWhere=function(t,e){return O.find(t,O.matcher(e))},O.max=function(t,e,n){var r,i,s=-1/0,o=-1/0;if(null==e&&null!=t){t=x(t)?t:O.values(t);for(var a=0,u=t.length;as&&(s=r)}else e=A(e,n),O.each(t,function(t,n,r){((i=e(t,n,r))>o||i===-1/0&&s===-1/0)&&(s=t,o=i)});return s},O.min=function(t,e,n){var r,i,s=1/0,o=1/0;if(null==e&&null!=t){t=x(t)?t:O.values(t);for(var a=0,u=t.length;ar||void 0===n)return 1;if(ne?(o&&(clearTimeout(o),o=null),a=c,s=t.apply(r,i),o||(r=i=null)):o||!1===n.trailing||(o=setTimeout(u,l)),s}},O.debounce=function(t,e,n){var r,i,s,o,a,u=function(){var c=O.now()-o;c=0?r=setTimeout(u,e-c):(r=null,n||(a=t.apply(s,i),r||(s=i=null)))};return function(){s=this,i=arguments,o=O.now();var c=n&&!r;return r||(r=setTimeout(u,e)),c&&(a=t.apply(s,i),s=i=null),a}},O.wrap=function(t,e){return O.partial(e,t)},O.negate=function(t){return function(){return!t.apply(this,arguments)}},O.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},O.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},O.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},O.once=O.partial(O.before,2);var R=!{toString:null}.propertyIsEnumerable("toString"),P=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];O.keys=function(t){if(!O.isObject(t))return[];if(y)return y(t);var e=[];for(var n in t)O.has(t,n)&&e.push(n);return R&&a(t,e),e},O.allKeys=function(t){if(!O.isObject(t))return[];var e=[];for(var n in t)e.push(n);return R&&a(t,e),e},O.values=function(t){for(var e=O.keys(t),n=e.length,r=Array(n),i=0;i":">",'"':""","'":"'","`":"`"},q=O.invert(L),M=function(t){var e=function(e){return t[e]},n="(?:"+O.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};O.escape=M(L),O.unescape=M(q),O.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),O.isFunction(r)?r.call(t):r};var F=0;O.uniqueId=function(t){var e=++F+"";return t?t+e:e},O.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Q=/\\|'|\r|\n|\u2028|\u2029/g,V=function(t){return"\\"+B[t]};O.template=function(t,e,n){!e&&n&&(e=n),e=O.defaults({},e,O.templateSettings);var r=RegExp([(e.escape||J).source,(e.interpolate||J).source,(e.evaluate||J).source].join("|")+"|$","g"),i=0,s="__p+='";t.replace(r,function(e,n,r,o,a){return s+=t.slice(i,a).replace(Q,V),i=a+e.length,n?s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?s+="'+\n((__t=("+r+"))==null?'':__t)+\n'":o&&(s+="';\n"+o+"\n__p+='"),e}),s+="';\n",e.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(e.variable||"obj","_",s)}catch(t){throw t.source=s,t}var a=function(t){return o.call(this,t,O)};return a.source="function("+(e.variable||"obj")+"){\n"+s+"}",a},O.chain=function(t){var e=O(t);return e._chain=!0,e};var W=function(t,e){return t._chain?O(e).chain():e};O.mixin=function(t){O.each(O.functions(t),function(e){var n=O[e]=t[e];O.prototype[e]=function(){var t=[this._wrapped];return d.apply(t,arguments),W(this,n.apply(O,t))}})},O.mixin(O),O.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];O.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],W(this,n)}}),O.each(["concat","join","slice"],function(t){var e=l[t];O.prototype[t]=function(){return W(this,e.apply(this._wrapped,arguments))}}),O.prototype.value=function(){return this._wrapped},O.prototype.valueOf=O.prototype.toJSON=O.prototype.value,O.prototype.toString=function(){return""+this._wrapped},r=[],void 0!==(i=function(){return O}.apply(e,r))&&(t.exports=i)}).call(this)},function(t,e,n){"use strict";var r=(n(0),n(46).Promise);r._continueWhile=function(t,e){return t()?e().then(function(){return r._continueWhile(t,e)}):r.resolve()},t.exports=r},function(t,e,n){"use strict";var r=n(50),i=n(0),s=i.extend,o=n(1),a=n(4),u=n(5),c=n(3),l=c.getSessionToken,h=c.ajax,f=function(t,e){var n=(new Date).getTime(),i=r(n+t);return e?i+","+n+",master":i+","+n},d=function(t,e){e?t["X-LC-Sign"]=f(u.applicationKey):t["X-LC-Key"]=u.applicationKey},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1],n={"X-LC-Id":u.applicationId,"Content-Type":"application/json;charset=UTF-8"},r=!1;return"boolean"==typeof t.useMasterKey?r=t.useMasterKey:"boolean"==typeof u._config.useMasterKey&&(r=u._config.useMasterKey),r?u.masterKey?e?n["X-LC-Sign"]=f(u.masterKey,!0):n["X-LC-Key"]=u.masterKey+",master":(console.warn("masterKey is not set, fall back to use appKey"),d(n,e)):d(n,e),u.hookKey&&(n["X-LC-Hook-Key"]=u.hookKey),null!==u._config.production&&(n["X-LC-Prod"]=String(u._config.production)),n["X-LC-UA"]=u._sharedConfig.userAgent,o.resolve().then(function(){var e=l(t);if(e)n["X-LC-Session"]=e;else if(!u._config.disableCurrentUser)return u.User.currentAsync().then(function(t){return t&&t._sessionToken&&(n["X-LC-Session"]=t._sessionToken),n});return n})},_=function(t){var e=t.service,n=void 0===e?"api":e,r=t.version,i=void 0===r?"1.1":r,s=t.path,o=u._config.serverURLs[n];if(!o)throw new Error("undefined server URL for "+n);return"/"!==o.charAt(o.length-1)&&(o+="/"),o+=i,s&&(o+=s),o},v=function(t){return new o(function(e,n){var r={code:t.code||-1,error:t.message||t.responseText};if(t.response&&t.response.code)r=t.response;else if(t.responseText)try{r=JSON.parse(t.responseText)}catch(t){}n(new a(r.code,r.error))})},m=function(t){var e=t.service,n=t.version,r=t.method,i=t.path,s=t.query,o=t.data,a=void 0===o?{}:o,c=t.authOptions,l=t.signKey,f=void 0===l||l;if(!u.applicationId||!u.applicationKey&&!u.masterKey)throw new Error("Not initialized");u._appRouter.refresh();var d=_({service:e,path:i,version:n});return p(c,f).then(function(t){return h({method:r,url:d,query:s,data:a,headers:t}).catch(v)})},y=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments[5],a=arguments[6],u="";if(t&&(u+="/"+t),e&&(u+="/"+e),n&&(u+="/"+n),i&&i._fetchWhenSave)throw new Error("_fetchWhenSave should be in the query");if(i&&i._where)throw new Error("_where should be in the query");return r&&"get"===r.toLowerCase()&&(a=s({},a,i),i=null),m({method:r,path:u,query:a,data:i,authOptions:o})};u.request=m,t.exports={_request:y,request:m}},function(t,e,n){"use strict";function r(t){var e=new RegExp("^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2})T([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})(.([0-9]+))?Z$"),n=e.exec(t);if(!n)return null;var r=n[1]||0,i=(n[2]||1)-1,s=n[3]||0,o=n[4]||0,a=n[5]||0,u=n[6]||0,c=n[8]||0;return new Date(Date.UTC(r,i,s,o,a,u,c))}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=n(0),o=n(7),a=n(6)("leancloud:request"),u=n(1),c=0,l=function(t){var e=t.method,n=t.url,r=t.query,s=t.data,l=t.headers,h=void 0===l?{}:l,f=t.onprogress,d=c++;a("request("+d+")",e,n,r,s,h);var p={};if(r)for(var _ in r)"object"===i(r[_])?p[_]=JSON.stringify(r[_]):p[_]=r[_];return new u(function(t,r){var i=o(e,n).set(h).query(p).send(s);f&&i.on("progress",f),i.end(function(e,n){return n&&a("response("+d+")",n.status,n.body||n.text,n.header),e?(n&&(e.statusCode=n.status,e.responseText=n.text,e.response=n.body),r(e)):t(n.body)})})},h=function(t){return s.isNull(t)||s.isUndefined(t)},f=function(t){return s.isArray(t)?t:void 0===t||null===t?[]:[t]},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.keys,n=t.include,r=t.includeACL,i={};return e&&(i.keys=f(e).join(",")),n&&(i.include=f(n).join(",")),r&&(i.returnACL=r),i},p=function(t){return t.sessionToken?t.sessionToken:t.user&&"function"==typeof t.user.getSessionToken?t.user.getSessionToken():void 0},_=function(t){return function(e){return t(e),e}},v=function(){},m=function(t,e,n){var r;return r=e&&e.hasOwnProperty("constructor")?e.constructor:function(){t.apply(this,arguments)},s.extend(r,t),v.prototype=t.prototype,r.prototype=new v,e&&s.extend(r.prototype,e),n&&s.extend(r,n),r.prototype.constructor=r,r.__super__=t.prototype,r};t.exports={ajax:l,isNullOrUndefined:h,ensureArray:f,transformFetchOptions:d,getSessionToken:p,tap:_,inherits:m,parseDate:r}},function(t,e,n){"use strict";function r(t,e){var n=new Error(e);return n.code=t,n}n(0).extend(r,{OTHER_CAUSE:-1,INTERNAL_SERVER_ERROR:1,CONNECTION_FAILED:100,OBJECT_NOT_FOUND:101,INVALID_QUERY:102,INVALID_CLASS_NAME:103,MISSING_OBJECT_ID:104,INVALID_KEY_NAME:105,INVALID_POINTER:106,INVALID_JSON:107,COMMAND_UNAVAILABLE:108,NOT_INITIALIZED:109,INCORRECT_TYPE:111,INVALID_CHANNEL_NAME:112,PUSH_MISCONFIGURED:115,OBJECT_TOO_LARGE:116,OPERATION_FORBIDDEN:119,CACHE_MISS:120,INVALID_NESTED_KEY:121,INVALID_FILE_NAME:122,INVALID_ACL:123,TIMEOUT:124,INVALID_EMAIL_ADDRESS:125,MISSING_CONTENT_TYPE:126,MISSING_CONTENT_LENGTH:127,INVALID_CONTENT_LENGTH:128,FILE_TOO_LARGE:129,FILE_SAVE_ERROR:130,FILE_DELETE_ERROR:153,DUPLICATE_VALUE:137,INVALID_ROLE_NAME:139,EXCEEDED_QUOTA:140,SCRIPT_FAILED:141,VALIDATION_ERROR:142,INVALID_IMAGE_DATA:150,UNSAVED_FILE_ERROR:151,INVALID_PUSH_TIME_ERROR:152,USERNAME_MISSING:200,PASSWORD_MISSING:201,USERNAME_TAKEN:202,EMAIL_TAKEN:203,EMAIL_MISSING:204,EMAIL_NOT_FOUND:205,SESSION_MISSING:206,MUST_CREATE_USER_THROUGH_SIGNUP:207,ACCOUNT_ALREADY_LINKED:208,LINKED_ID_MISSING:250,INVALID_LINKED_SESSION:251,UNSUPPORTED_SERVICE:252,X_DOMAIN_REQUEST:602}),t.exports=r},function(t,e,n){"use strict";(function(e){var r=n(0),i=n(37),s=n(3),o=s.inherits,a=s.parseDate,u=e.AV||{};u._config={serverURLs:{},useMasterKey:!1,production:null,realtime:null},u._sharedConfig={userAgent:i,liveQueryRealtime:null},u._getAVPath=function(t){if(!u.applicationId)throw new Error("You need to call AV.initialize before using AV.");if(t||(t=""),!r.isString(t))throw new Error("Tried to get a localStorage path that wasn't a String.");return"/"===t[0]&&(t=t.substring(1)),"AV/"+u.applicationId+"/"+t};var c=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},l=function(){return""+c()+c()+"-"+c()+"-"+c()+"-"+c()+"-"+c()+c()+c()};u._installationId=null,u._getInstallationId=function(){if(u._installationId)return u.Promise.resolve(u._installationId);var t=u._getAVPath("installationId");return u.localStorage.getItemAsync(t).then(function(e){return u._installationId=e,u._installationId?e:(u._installationId=e=l(),u.localStorage.setItemAsync(t,e).then(function(){return e}))})},u._subscriptionId=null,u._refreshSubscriptionId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u._getAVPath("subscriptionId"),e=u._subscriptionId=l();return u.localStorage.setItemAsync(t,e).then(function(){return e})},u._getSubscriptionId=function(){if(u._subscriptionId)return u.Promise.resolve(u._subscriptionId);var t=u._getAVPath("subscriptionId");return u.localStorage.getItemAsync(t).then(function(e){return u._subscriptionId=e,u._subscriptionId||(e=u._refreshSubscriptionId(t)),e})},u._parseDate=a,u._extend=function(t,e){var n=o(this,t,e);return n.extend=this.extend,n},u._encode=function(t,e,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t instanceof u.Object){if(n)throw new Error("AV.Objects not allowed here");return e&&!r.include(e,t)&&t._hasData?t._toFullJSON(e.concat(t),i):t._toPointer()}if(t instanceof u.ACL)return t.toJSON();if(r.isDate(t))return i?{__type:"Date",iso:t.toJSON()}:t.toJSON();if(t instanceof u.GeoPoint)return t.toJSON();if(r.isArray(t))return r.map(t,function(t){return u._encode(t,e,n,i)});if(r.isRegExp(t))return t.source;if(t instanceof u.Relation)return t.toJSON();if(t instanceof u.Op)return t.toJSON();if(t instanceof u.File){if(!t.url()&&!t.id)throw new Error("Tried to save an object containing an unsaved file.");return t._toFullJSON(e,i)}return r.isObject(t)?r.mapObject(t,function(t,r){return u._encode(t,e,n,i)}):t},u._decode=function(t,e){if(!r.isObject(t)||r.isDate(t))return t;if(r.isArray(t))return r.map(t,function(t){return u._decode(t)});if(t instanceof u.Object)return t;if(t instanceof u.File)return t;if(t instanceof u.Op)return t;if(t instanceof u.GeoPoint)return t;if(t instanceof u.ACL)return t;if("ACL"===e)return new u.ACL(t);if(t.__op)return u.Op._decode(t);var n;if("Pointer"===t.__type){n=t.className;var i=u.Object._create(n);if(Object.keys(t).length>3){var s=r.clone(t);delete s.__type,delete s.className,i._finishFetch(s,!0)}else i._finishFetch({objectId:t.objectId},!1);return i}if("Object"===t.__type){n=t.className;var o=r.clone(t);delete o.__type,delete o.className;var a=u.Object._create(n);return a._finishFetch(o,!0),a}if("Date"===t.__type)return u._parseDate(t.iso);if("GeoPoint"===t.__type)return new u.GeoPoint({latitude:t.latitude,longitude:t.longitude});if("Relation"===t.__type){if(!e)throw new Error("key missing decoding a Relation");var c=new u.Relation(null,e);return c.targetClassName=t.className,c}if("File"===t.__type){var l=new u.File(t.name),h=r.clone(t);return delete h.__type,l._finishFetch(h),l}return r.mapObject(t,u._decode)},u.parseJSON=u._decode,u._encodeObjectOrArray=function(t){var e=function(t){return t&&t._toFullJSON&&(t=t._toFullJSON([])),r.mapObject(t,function(t){return u._encode(t,[])})};return r.isArray(t)?t.map(function(t){return e(t)}):e(t)},u._arrayEach=r.each,u._traverse=function(t,e,n){if(t instanceof u.Object){if(n=n||[],r.indexOf(n,t)>=0)return;return n.push(t),u._traverse(t.attributes,e,n),e(t)}return t instanceof u.Relation||t instanceof u.File?e(t):r.isArray(t)?(r.each(t,function(r,i){var s=u._traverse(r,e,n);s&&(t[i]=s)}),e(t)):r.isObject(t)?(u._each(t,function(r,i){var s=u._traverse(r,e,n);s&&(t[i]=s)}),e(t)):e(t)},u._objectEach=u._each=function(t,e){r.isObject(t)?r.each(r.keys(t),function(n){e(t[n],n)}):r.each(t,e)},t.exports=u}).call(e,n(9))},function(t,e,n){function r(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function i(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,s=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(s=i))}),t.splice(s,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function a(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t}e=t.exports=n(45),e.log=s,e.formatArgs=i,e.save=o,e.load=a,e.useColors=r,e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(a())},function(t,e,n){function r(){}function i(t){if(!_(t))return t;var e=[];for(var n in t)s(e,n,t[n]);return e.join("&")}function s(t,e,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){s(t,e,n)});else if(_(n))for(var r in n)s(t,e+"["+r+"]",n[r]);else t.push(encodeURIComponent(e)+"="+encodeURIComponent(n));else null===n&&t.push(encodeURIComponent(e))}function o(t){for(var e,n,r={},i=t.split("&"),s=0,o=i.length;s=0?"&":"?")+t),this._sort){var e=this.url.indexOf("?");if(e>=0){var n=this.url.substring(e+1).split("&");v(this._sort)?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,e)+"?"+n.join("&")}}},l.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},l.prototype.end=function(t){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||r,this._appendQueryString(),this._end()},l.prototype._end=function(){var t=this,e=this.xhr=g.getXHR(),n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4==n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.onprogress=r.bind(null,"download"),e.upload&&(e.upload.onprogress=r.bind(null,"upload"))}catch(t){}try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],s=this._serializer||g.serialize[i?i.split(";")[0]:""];!s&&u(i)&&(s=g.serialize["application/json"]),s&&(n=s(n))}for(var o in this.header)null!=this.header[o]&&this.header.hasOwnProperty(o)&&e.setRequestHeader(o,this.header[o]);return this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0!==n?n:null),this},g.get=function(t,e,n){var r=g("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},g.head=function(t,e,n){var r=g("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},g.options=function(t,e,n){var r=g("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},g.del=h,g.delete=h,g.patch=function(t,e,n){var r=g("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},g.post=function(t,e,n){var r=g("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},g.put=function(t,e,n){var r=g("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},function(t,e){function n(t){return null!==t&&"object"==typeof t}t.exports=n},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(11),i=n(5),s=e.removeAsync=r.removeItemAsync.bind(r),o=function(t,e){try{t=JSON.parse(t)}catch(t){return null}if(t){return t.expiredAt&&t.expiredAt1&&void 0!==arguments[1]?arguments[1]:{};if(r.isString(t)&&(t={mobilePhoneNumber:t}),!t.mobilePhoneNumber)throw new Error("Missing mobilePhoneNumber.");return e.validateToken&&(t=r.extend({},t,{validate_token:e.validateToken})),s("requestSmsCode",null,null,"POST",t,e)},verifySmsCode:function(t,e){if(!t)throw new Error("Missing sms code.");var n={};return r.isString(e)&&(n.mobilePhoneNumber=e),s("verifySmsCode",t,null,"POST",n)},_requestCaptcha:function(t,e){return s("requestCaptcha",null,null,"GET",t,e).then(function(t){var e=t.captcha_url;return{captchaToken:t.captcha_token,url:e}})},requestCaptcha:t.Captcha.request,verifyCaptcha:function(t,e){return s("verifyCaptcha",null,null,"POST",{captcha_code:t,captcha_token:e}).then(function(t){return t.validate_token})}})}},function(t,e,n){"use strict";var r=n(0),i=n(2),s=i._request,o=n(5);t.exports=o.Object.extend("_Conversation",{constructor:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o.Object.prototype.constructor.call(this,null,null),this.set("name",t),void 0!==e.isSystem&&this.set("sys",!!e.isSystem),void 0!==e.isTransient&&this.set("tr",!!e.isTransient)},getCreator:function(){return this.get("c")},getLastMessageAt:function(){return this.get("lm")},getMembers:function(){return this.get("m")},addMember:function(t){return this.add("m",t)},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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"function"==typeof e.toJSON&&(e=e.toJSON()),"string"!=typeof e&&(e=JSON.stringify(e));var i={from_peer:t,conv_id:this.id,transient:!1,message:e};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),s("rtm","messages",null,"POST",i,r)},broadcast:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"function"==typeof e.toJSON&&(e=e.toJSON()),"string"!=typeof e&&(e=JSON.stringify(e));var o={from_peer:t,conv_id:this.id,message:e};if(void 0!==n.pushData&&(o.push=n.pushData),void 0!==n.validTill){var a=n.validTill;r.isDate(a)&&(a=a.getTime()),n.valid_till=a}return s("rtm","broadcast",null,"POST",o,i)}})},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){var e=/\s+/,n=Array.prototype.slice;t.Events={on:function(t,n,r){var i,s,o,a,u;if(!n)return this;for(t=t.split(e),i=this._callbacks||(this._callbacks={}),s=t.shift();s;)u=i[s],o=u?u.tail:{},o.next=a={},o.context=r,o.callback=n,i[s]={tail:a,next:u?u.next:o},s=t.shift();return this},off:function(t,n,i){var s,o,a,u,c,l;if(o=this._callbacks){if(!(t||n||i))return delete this._callbacks,this;for(t=t?t.split(e):r.keys(o),s=t.shift();s;)if(a=o[s],delete o[s],a&&(n||i)){for(u=a.tail,a=a.next;a!==u;)c=a.callback,l=a.context,(n&&c!==n||i&&l!==i)&&this.on(s,c,l),a=a.next;s=t.shift()}return this}},trigger:function(t){var r,i,s,o,a,u,c;if(!(s=this._callbacks))return this;for(u=s.all,t=t.split(e),c=n.call(arguments,1),r=t.shift();r;){if(i=s[r])for(o=i.tail;(i=i.next)!==o;)i.callback.apply(i.context||this,c);if(i=u)for(o=i.tail,a=[r].concat(c);(i=i.next)!==o;)i.callback.apply(i.context||this,a);r=t.shift()}return this}},t.Events.bind=t.Events.on,t.Events.unbind=t.Events.off}},function(t,e,n){"use strict";var r=n(0),i=n(38),s=n(39),o=n(40),a=n(4),u=n(2)._request,c=n(1),l=n(3),h=l.tap,f=l.transformFetchOptions,d=n(6)("leancloud:file"),p=n(42);t.exports=function(t){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},n=function(t){return t.match(/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/)[4]},l=function(t){if(t<26)return String.fromCharCode(65+t);if(t<52)return String.fromCharCode(t-26+97);if(t<62)return String.fromCharCode(t-52+48);if(62===t)return"+";if(63===t)return"/";throw new Error("Tried to encode large digit "+t+" in base64.")},_=function(t){var e=[];return e.length=Math.ceil(t.length/3),r.times(e.length,function(n){var r=t[3*n],i=t[3*n+1]||0,s=t[3*n+2]||0,o=3*n+1>2&63),l(r<<4&48|i>>4&15),o?l(i<<2&60|s>>6&3):"=",a?l(63&s):"="].join("")}),e.join("")};t.File=function(e,i,s){if(this.attributes={name:e,url:"",metaData:{},base64:""},r.isString(i))throw new TypeError("Creating an AV.File from a String is not yet supported.");r.isArray(i)&&(this.attributes.metaData.size=i.length,i={base64:_(i)}),this._extName="",this._data=i,"undefined"!=typeof Blob&&i instanceof Blob&&(i.size&&(this.attributes.metaData.size=i.size),i.name&&(this._extName=n(i.name)));var o=void 0;if(i&&i.owner)o=i.owner;else if(!t._config.disableCurrentUser)try{o=t.User.current()}catch(t){if("SYNC_API_NOT_AVAILABLE"!==t.code)throw t;console.warn("Get current user failed. It seems this runtime use an async storage system, please create AV.File in the callback of AV.User.currentAsync().")}this.attributes.metaData.owner=o?o.id:"unknown",this.set("mime_type",s)},t.File.withURL=function(e,n,r,i){if(!e||!n)throw new Error("Please provide file name and url");var s=new t.File(e,null,i);if(r)for(var o in r)s.attributes.metaData[o]||(s.attributes.metaData[o]=r[o]);return s.attributes.url=n,s.attributes.metaData.__source="external",s},t.File.createWithoutData=function(e){var n=new t.File;return n.id=e,n},r.extend(t.File.prototype,{className:"_File",_toFullJSON:function(e){var n=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=r.clone(this.attributes);return t._objectEach(s,function(n,r){s[r]=t._encode(n,e,void 0,i)}),t._objectEach(this._operations,function(t,e){s[e]=t}),r.has(this,"id")&&(s.objectId=this.id),r(["createdAt","updatedAt"]).each(function(t){if(r.has(n,t)){var e=n[t];s[t]=r.isDate(e)?e.toJSON():e}}),i&&(s.__type="File"),s},toFullJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this._toFullJSON(t)},toJSON:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[this];return this._toFullJSON(n,!1)},getACL:function(){return this._acl},setACL:function(e){if(!(e instanceof t.ACL))return new a(a.OTHER_CAUSE,"ACL must be a AV.ACL.");this._acl=e},name:function(){return this.get("name")},url:function(){return this.get("url")},get:function(t){switch(t){case"objectId":return this.id;case"url":case"name":case"mime_type":case"metaData":case"createdAt":case"updatedAt":return this.attributes[t];default:return this.attributes.metaData[t]}},set:function(){for(var t=this,e=function(e,n){switch(e){case"name":case"url":case"mime_type":case"base64":case"metaData":t.attributes[e]=n;break;default:t.attributes.metaData[e]=n}},n=arguments.length,r=Array(n),i=0;i100)throw new Error("Invalid quality value.");return i=i||"png",s+"?imageView/"+(r?2:1)+"/w/"+t+"/h/"+e+"/q/"+n+"/format/"+i},size:function(){return this.metaData().size},ownerId:function(){return this.metaData().owner},destroy:function(t){return this.id?u("files",null,this.id,"DELETE",null,t):c.reject(new Error("The file id is not eixsts."))},_fileToken:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fileTokens",i=this.attributes.name,s=n(i);!s&&this._extName&&(i+=this._extName,s=this._extName);var o=e()+e()+e()+e()+e()+s,a={key:o,name:i,ACL:this._acl,mime_type:t,metaData:this.attributes.metaData};return this._qiniu_key=o,u(r,null,null,"POST",a)},save:function(t){var e=this;if(this.id)throw new Error("File already saved. If you want to manipulate a file, use AV.Query to get it.");if(!this._previousSave)if(this._data){var n=this.get("mime_type");this._previousSave=this._fileToken(n).then(function(r){return r.mime_type&&(n=r.mime_type,e.set("mime_type",n)),e._token=r.token,c.resolve().then(function(){var t=e._data;if(t&&t.base64)return p(t.base64,n);if(t&&t.blob)return!t.blob.type&&n&&(t.blob.type=n),t.blob.name||(t.blob.name=e.get("name")),t.blob;if("undefined"!=typeof Blob&&t instanceof Blob)return t;throw new TypeError("malformed file data")}).then(function(n){switch(r.provider){case"s3":return o(r,n,e,t);case"qcloud":return i(r,n,e,t);case"qiniu":default:return s(r,n,e,t)}}).then(h(function(){return e._callback(!0)}),function(t){throw e._callback(!1),t})})}else if(this.attributes.url&&"external"===this.attributes.metaData.__source){var r={name:this.attributes.name,ACL:this._acl,metaData:this.attributes.metaData,mime_type:this.mimeType,url:this.attributes.url};this._previousSave=u("files",this.attributes.name,null,"post",r).then(function(t){return e.attributes.name=t.name,e.attributes.url=t.url,e.id=t.objectId,t.size&&(e.attributes.metaData.size=t.size),e})}return this._previousSave},_callback:function(t){u("fileCallback",null,null,"post",{token:this._token,result:t}).catch(d),delete this._token,delete this._data},fetch:function(t,e){return u("files",null,this.id,"GET",f(t),e).then(this._finishFetch.bind(this))},_finishFetch:function(e){var n=t.Object.prototype.parse(e);return n.attributes={name:n.name,url:n.url,mime_type:n.mime_type,bucket:n.bucket},n.attributes.metaData=n.metaData||{},n.id=n.objectId,delete n.objectId,delete n.metaData,delete n.url,delete n.name,delete n.mime_type,delete n.bucket,r.extend(this,n),this}})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){t.GeoPoint=function(e,n){r.isArray(e)?(t.GeoPoint._validate(e[0],e[1]),this.latitude=e[0],this.longitude=e[1]):r.isObject(e)?(t.GeoPoint._validate(e.latitude,e.longitude),this.latitude=e.latitude,this.longitude=e.longitude):r.isNumber(e)&&r.isNumber(n)?(t.GeoPoint._validate(e,n),this.latitude=e,this.longitude=n):(this.latitude=0,this.longitude=0);var i=this;this.__defineGetter__&&this.__defineSetter__&&(this._latitude=this.latitude,this._longitude=this.longitude,this.__defineGetter__("latitude",function(){return i._latitude}),this.__defineGetter__("longitude",function(){return i._longitude}),this.__defineSetter__("latitude",function(e){t.GeoPoint._validate(e,i.longitude),i._latitude=e}),this.__defineSetter__("longitude",function(e){t.GeoPoint._validate(i.latitude,e),i._longitude=e}))},t.GeoPoint._validate=function(t,e){if(t<-90)throw new Error("AV.GeoPoint latitude "+t+" < -90.0.");if(t>90)throw new Error("AV.GeoPoint latitude "+t+" > 90.0.");if(e<-180)throw new Error("AV.GeoPoint longitude "+e+" < -180.0.");if(e>180)throw new Error("AV.GeoPoint longitude "+e+" > 180.0.")},t.GeoPoint.current=function(){return new t.Promise(function(e,n){navigator.geolocation.getCurrentPosition(function(n){e(new t.GeoPoint({latitude:n.coords.latitude,longitude:n.coords.longitude}))},n)})},r.extend(t.GeoPoint.prototype,{toJSON:function(){return t.GeoPoint._validate(this.latitude,this.longitude),{__type:"GeoPoint",latitude:this.latitude,longitude:this.longitude}},radiansTo:function(t){var e=Math.PI/180,n=this.latitude*e,r=this.longitude*e,i=t.latitude*e,s=t.longitude*e,o=n-i,a=r-s,u=Math.sin(o/2),c=Math.sin(a/2),l=u*u+Math.cos(n)*Math.cos(i)*c*c;return l=Math.min(1,l),2*Math.asin(Math.sqrt(l))},kilometersTo:function(t){return 6371*this.radiansTo(t)},milesTo:function(t){return 3958.8*this.radiansTo(t)}})}},function(t,e,n){"use strict";function r(t,e){if("us"===e)return h("https://us-api.leancloud.cn");var n=void 0;switch(t.slice(-9)){case"-9Nh9j0Va":return h("https://e1-api.leancloud.cn");case"-MdYXbMMI":return h("https://us-api.leancloud.cn");default:return n=t.slice(0,8).toLowerCase(),{push:"https://"+n+".push.lncld.net",stats:"https://"+n+".stats.lncld.net",engine:"https://"+n+".engine.lncld.net",api:"https://"+n+".api.lncld.net"}}}var i=n(5),s=n(34),o=n(3),a=o.isNullOrUndefined,u=n(0),c=u.extend,l=u.isObject,h=function(t){return{push:t,stats:t,engine:t,api:t}},f=!1;i.init=function(t){if(!l(t))return i.init({appId:t,appKey:arguments.length<=1?void 0:arguments[1],masterKey:arguments.length<=2?void 0:arguments[2],region:arguments.length<=3?void 0:arguments[3]});var e=t.appId,n=t.appKey,o=t.masterKey,a=(t.hookKey,t.region),u=void 0===a?"cn":a,h=t.serverURLs,d=t.disableCurrentUser,p=t.production,_=t.realtime;if(i.applicationId)throw new Error("SDK is already initialized.");o&&console.warn("MasterKey is not supposed to be used in browser."),i._config.applicationId=e,i._config.applicationKey=n,i._config.masterKey=o,void 0!==p&&(i._config.production=p),void 0!==d&&(i._config.disableCurrentUser=d),i._appRouter=new s(i);var v=f||void 0!==h||"cn"!==u;i._setServerURLs(c({},r(e,u),i._config.serverURLs,h),v),_?i._config.realtime=_:i._sharedConfig.liveQueryRealtime&&(i._config.realtime=new i._sharedConfig.liveQueryRealtime({appId:e,region:u}))},i.setProduction=function(t){a(t)?i._config.production=null:i._config.production=t?1:0},i._setServerURLs=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"string"!=typeof t?c(i._config.serverURLs,t):i._config.serverURLs=h(t),e&&(i._appRouter?i._appRouter.disable():f=!0)},i.setServerURLs=function(t){return i._setServerURLs(t)},i.initialize=i.init,["applicationId","applicationKey","masterKey","hookKey"].forEach(function(t){return Object.defineProperty(i,t,{get:function(){return i._config[t]},set:function(e){i._config[t]=e}})})},function(t,e,n){"use strict";var r=n(0),i=n(4),s=n(2),o=s.request;t.exports=function(t){t.Insight=t.Insight||{},r.extend(t.Insight,{startJob:function(e,n){if(!e||!e.sql)throw new Error("Please provide the sql to run the job.");var r={jobConfig:e,appId:t.applicationId};return o({path:"/bigquery/jobs",method:"POST",data:t._encode(r,null,!0),authOptions:n,signKey:!1}).then(function(e){return t._decode(e).id})},on:function(t,e){}}),t.Insight.JobQuery=function(t,e){if(!t)throw new Error("Please provide the job id.");this.id=t,this.className=e,this._skip=0,this._limit=100},r.extend(t.Insight.JobQuery.prototype,{skip:function(t){return this._skip=t,this},limit:function(t){return this._limit=t,this},find:function(e){var n={skip:this._skip,limit:this._limit};return o({path:"/bigquery/jobs/"+this.id,method:"GET",query:n,authOptions:e,signKey:!1}).then(function(e){return e.error?t.Promise.reject(new i(e.code,e.error)):t.Promise.resolve(e)})}})}},function(t,e,n){"use strict";var r=n(47),i=n(1),s=n(3),o=s.inherits,a=n(2),u=a.request;t.exports=function(t){t.LiveQuery=o(r,{constructor:function(t,e){r.apply(this),this.id=t,this._client=e,this._client.register(this),e.on("message",this._dispatch.bind(this))},_dispatch:function(e){var n=this;e.forEach(function(e){var r=e.op,i=e.object,s=e.query_id,o=e.updatedKeys;if(s===n.id){var a=t.parseJSON(Object.assign({__type:"_File"===i.className?"File":"Object"},i));o?n.emit(r,a,o):n.emit(r,a)}})},unsubscribe:function(){return this._client.deregister(this),u({method:"POST",path:"/LiveQuery/unsubscribe",data:{id:this._client.id,query_id:this.id}})}},{init:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.subscriptionId,s=void 0===r?t._getSubscriptionId():r;if(!t._config.realtime)throw new Error("LiveQuery not supported. Please use the LiveQuery bundle. https://url.leanapp.cn/enable-live-query");if(!(e instanceof t.Query))throw new TypeError("LiveQuery must be inited with a Query");var o=e.toJSON(),a=o.where,c=o.keys,l=o.returnACL;return i.resolve(s).then(function(n){return u({method:"POST",path:"/LiveQuery/subscribe",data:{query:{where:a,keys:c,returnACL:l,className:e.className},id:n}}).then(function(e){var r=e.query_id;return t._config.realtime.createLiveQueryClient(n).then(function(e){return new t.LiveQuery(r,e)})})})}})}},function(t,e,n){"use strict";function r(t,e){return t&&t[e]?i.isFunction(t[e])?t[e]():t[e]:null}var i=n(0),s=n(4),o=n(2),a=o._request,u=n(3),c=u.isNullOrUndefined,l=u.ensureArray,h=u.transformFetchOptions,f=["objectId","createdAt","updatedAt"],d=function(t){if(-1!==f.indexOf(t))throw new Error("key["+t+"] is reserved")};t.exports=function(t){t.Object=function(e,n){if(i.isString(e))return t.Object._create.apply(this,arguments);e=e||{},n&&n.parse&&(e=this.parse(e),e=this._mergeMagicFields(e));var s=r(this,"defaults");s&&(e=i.extend({},s,e)),n&&n.collection&&(this.collection=n.collection),this._serverData={},this._opSetQueue=[{}],this._flags={},this.attributes={},this._hashedJSON={},this._escapedAttributes={},this.cid=i.uniqueId("c"),this.changed={},this._silent={},this._pending={},this.set(e,{silent:!0}),this.changed={},this._silent={},this._pending={},this._hasData=!0,this._previousAttributes=i.clone(this.attributes),this.initialize.apply(this,arguments)},t.Object.saveAll=function(e,n){return t.Object._deepSaveAsync(e,null,n)},t.Object.fetchAll=function(e,n){return t.Promise.resolve().then(function(){return a("batch",null,null,"POST",{requests:i.map(e,function(t){if(!t.className)throw new Error("object must have className to fetch");if(!t.id)throw new Error("object must have id to fetch");if(t.dirty())throw new Error("object is modified but not saved");return{method:"GET",path:"/1.1/classes/"+t.className+"/"+t.id}})},n)}).then(function(t){return i.forEach(e,function(e,n){if(!t[n].success){var r=new Error(t[n].error.error);throw r.code=t[n].error.code,r}e._finishFetch(e.parse(t[n].success))}),e})},i.extend(t.Object.prototype,t.Events,{_fetchWhenSave:!1,initialize:function(){},fetchWhenSave:function(t){if(console.warn("AV.Object#fetchWhenSave is deprecated, use AV.Object#save with options.fetchWhenSave instead."),!i.isBoolean(t))throw new Error("Expect boolean value for fetchWhenSave");this._fetchWhenSave=t},getObjectId:function(){return this.id},getCreatedAt:function(){return this.createdAt||this.get("createdAt")},getUpdatedAt:function(){return this.updatedAt||this.get("updatedAt")},toJSON:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return this._toFullJSON(n,!1)},toFullJSON:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this._toFullJSON(t)},_toFullJSON:function(e){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=i.clone(this.attributes);if(i.isArray(e))var o=e.concat(this);return t._objectEach(s,function(e,n){s[n]=t._encode(e,o,void 0,r)}),t._objectEach(this._operations,function(t,e){s[e]=t}),i.has(this,"id")&&(s.objectId=this.id),i(["createdAt","updatedAt"]).each(function(t){if(i.has(n,t)){var e=n[t];s[t]=i.isDate(e)?e.toJSON():e}}),r&&(s.__type="Object",i.isArray(e)&&e.length&&(s.__type="Pointer"),s.className=this.className),s},_refreshCache:function(){var e=this;e._refreshingCache||(e._refreshingCache=!0,t._objectEach(this.attributes,function(n,r){n instanceof t.Object?n._refreshCache():i.isObject(n)&&e._resetCacheForKey(r)&&e.set(r,new t.Op.Set(n),{silent:!0})}),delete e._refreshingCache)},dirty:function(t){this._refreshCache();var e=i.last(this._opSetQueue);return t?!!e[t]:!this.id||i.keys(e).length>0},_toPointer:function(){return{__type:"Pointer",className:this.className,objectId:this.id}},get:function(t){switch(t){case"objectId":return this.id;case"createdAt":case"updatedAt":return this[t];default:return this.attributes[t]}},relation:function(e){var n=this.get(e);if(n){if(!(n instanceof t.Relation))throw new Error("Called relation() on non-relation field "+e);return n._ensureParentAndKey(this,e),n}return new t.Relation(this,e)},escape:function(t){var e=this._escapedAttributes[t];if(e)return e;var n,r=this.attributes[t];return n=c(r)?"":i.escape(r.toString()),this._escapedAttributes[t]=n,n},has:function(t){return!c(this.attributes[t])},_mergeMagicFields:function(e){var n=this,r=["objectId","createdAt","updatedAt"];return t._arrayEach(r,function(r){e[r]&&("objectId"===r?n.id=e[r]:"createdAt"!==r&&"updatedAt"!==r||i.isDate(e[r])?n[r]=e[r]:n[r]=t._parseDate(e[r]),delete e[r])}),e},_startSave:function(){this._opSetQueue.push({})},_cancelSave:function(){var e=i.first(this._opSetQueue);this._opSetQueue=i.rest(this._opSetQueue);var n=i.first(this._opSetQueue);t._objectEach(e,function(t,r){var i=e[r],s=n[r];i&&s?n[r]=s._mergeWithPrevious(i):i&&(n[r]=i)}),this._saving=this._saving-1},_finishSave:function(e){var n={};t._traverse(this.attributes,function(e){e instanceof t.Object&&e.id&&e._hasData&&(n[e.id]=e)});var r=i.first(this._opSetQueue);this._opSetQueue=i.rest(this._opSetQueue),this._applyOpSet(r,this._serverData),this._mergeMagicFields(e);var s=this;t._objectEach(e,function(e,r){s._serverData[r]=t._decode(e,r);var i=t._traverse(s._serverData[r],function(e){if(e instanceof t.Object&&n[e.id])return n[e.id]});i&&(s._serverData[r]=i)}),this._rebuildAllEstimatedData(),this._saving=this._saving-1},_finishFetch:function(e,n){this._opSetQueue=[{}],this._mergeMagicFields(e);var r=this;t._objectEach(e,function(e,n){r._serverData[n]=t._decode(e,n)}),this._rebuildAllEstimatedData(),this._refreshCache(),this._opSetQueue=[{}],this._hasData=n},_applyOpSet:function(e,n){var r=this;t._objectEach(e,function(e,i){n[i]=e._estimate(n[i],r,i),n[i]===t.Op._UNSET&&delete n[i]})},_resetCacheForKey:function(e){var n=this.attributes[e];if(i.isObject(n)&&!(n instanceof t.Object)&&!(n instanceof t.File)){n=n.toJSON?n.toJSON():n;var r=JSON.stringify(n);if(this._hashedJSON[e]!==r){var s=!!this._hashedJSON[e];return this._hashedJSON[e]=r,s}}return!1},_rebuildEstimatedDataForKey:function(e){var n=this;delete this.attributes[e],this._serverData[e]&&(this.attributes[e]=this._serverData[e]),t._arrayEach(this._opSetQueue,function(r){var i=r[e];i&&(n.attributes[e]=i._estimate(n.attributes[e],n,e),n.attributes[e]===t.Op._UNSET?delete n.attributes[e]:n._resetCacheForKey(e))})},_rebuildAllEstimatedData:function(){var e=this,n=i.clone(this.attributes);this.attributes=i.clone(this._serverData),t._arrayEach(this._opSetQueue,function(n){e._applyOpSet(n,e.attributes),t._objectEach(n,function(t,n){e._resetCacheForKey(n)})}),t._objectEach(n,function(t,n){e.attributes[n]!==t&&e.trigger("change:"+n,e,e.attributes[n],{})}),t._objectEach(this.attributes,function(t,r){i.has(n,r)||e.trigger("change:"+r,e,t,{})})},set:function(e,n,r){var s;if(i.isObject(e)||c(e)?(s=i.mapObject(e,function(e,n){return d(n),t._decode(e,n)}),r=n):(s={},d(e),s[e]=t._decode(n,e)),r=r||{},!s)return this;s instanceof t.Object&&(s=s.attributes),r.unset&&t._objectEach(s,function(e,n){s[n]=new t.Op.Unset});var o=i.clone(s),a=this;t._objectEach(o,function(e,n){e instanceof t.Op&&(o[n]=e._estimate(a.attributes[n],a,n),o[n]===t.Op._UNSET&&delete o[n])}),this._validate(s,r),r.changes={};var u=this._escapedAttributes;this._previousAttributes;return t._arrayEach(i.keys(s),function(e){var n=s[e];n instanceof t.Relation&&(n.parent=a),n instanceof t.Op||(n=new t.Op.Set(n));var o=!0;n instanceof t.Op.Set&&i.isEqual(a.attributes[e],n.value)&&(o=!1),o&&(delete u[e],r.silent?a._silent[e]=!0:r.changes[e]=!0);var c=i.last(a._opSetQueue);c[e]=n._mergeWithPrevious(c[e]),a._rebuildEstimatedDataForKey(e),o?(a.changed[e]=a.attributes[e],r.silent||(a._pending[e]=!0)):(delete a.changed[e],delete a._pending[e])}),r.silent||this.change(r),this},unset:function(t,e){return e=e||{},e.unset=!0,this.set(t,null,e)},increment:function(e,n){return(i.isUndefined(n)||i.isNull(n))&&(n=1),this.set(e,new t.Op.Increment(n))},add:function(e,n){return this.set(e,new t.Op.Add(l(n)))},addUnique:function(e,n){return this.set(e,new t.Op.AddUnique(l(n)))},remove:function(e,n){return this.set(e,new t.Op.Remove(l(n)))},op:function(t){return i.last(this._opSetQueue)[t]},clear:function(t){t=t||{},t.unset=!0;var e=i.extend(this.attributes,this._operations);return this.set(e,t)},_getSaveJSON:function(){var e=i.clone(i.first(this._opSetQueue));return t._objectEach(e,function(t,n){e[n]=t.toJSON()}),e},_canBeSerialized:function(){return t.Object._canBeSerializedAsValue(this.attributes)},fetch:function(t,e){var n=this;return a("classes",this.className,this.id,"GET",h(t),e).then(function(t){return n._finishFetch(n.parse(t),!0),n})},save:function(e,n,r){var s,o,u;i.isObject(e)||c(e)?(s=e,u=n):(s={},s[e]=n,u=r),u=i.clone(u)||{},u.wait&&(o=i.clone(this.attributes));var l=i.clone(u)||{};l.wait&&(l.silent=!0),s&&this.set(s,l);var h=this;h._refreshCache();var f=[],d=[];return t.Object._findUnsavedChildren(h.attributes,f,d),f.length+d.length>0?t.Object._deepSaveAsync(this.attributes,h,u).then(function(){return h.save(null,u)}):(this._startSave(),this._saving=(this._saving||0)+1,this._allPreviousSaves=this._allPreviousSaves||t.Promise.resolve(),this._allPreviousSaves=this._allPreviousSaves.catch(function(t){}).then(function(){var t=h.id?"PUT":"POST",e=h._getSaveJSON(),n={};if((h._fetchWhenSave||u.fetchWhenSave)&&(n.new="true"),u.query){var r;if("function"==typeof u.query.toJSON&&(r=u.query.toJSON())&&(n.where=r.where),!n.where){throw new Error("options.query is not an AV.Query")}}i.extend(e,h._flags);var c="classes",f=h.className;"_User"!==h.className||h.id||(c="users",f=null);var d=u._makeRequest||a,p=d(c,f,h.id,t,e,u,n);return p=p.then(function(t){var e=h.parse(t);return u.wait&&(e=i.extend(s||{},e)),h._finishSave(e),u.wait&&h.set(o,l),h},function(t){throw h._cancelSave(),t})}),this._allPreviousSaves)},destroy:function(t){t=t||{};var e=this,n=function(){e.trigger("destroy",e,e.collection,t)};return this.id?(t.wait||n(),a("classes",this.className,this.id,"DELETE",this._flags,t).then(function(){return t.wait&&n(),e})):n()},parse:function(e){var n=i.clone(e);return i(["createdAt","updatedAt"]).each(function(e){n[e]&&(n[e]=t._parseDate(n[e]))}),n.updatedAt||(n.updatedAt=n.createdAt),n},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.id},change:function(e){e=e||{};var n=this._changing;this._changing=!0;var r=this;t._objectEach(this._silent,function(t){r._pending[t]=!0});var s=i.extend({},e.changes,this._silent);if(this._silent={},t._objectEach(s,function(t,n){r.trigger("change:"+n,r,r.get(n),e)}),n)return this;for(var o=function(t,e){r._pending[e]||r._silent[e]||delete r.changed[e]};!i.isEmpty(this._pending);)this._pending={},this.trigger("change",this,e),t._objectEach(this.changed,o),r._previousAttributes=i.clone(this.attributes);return this._changing=!1,this},hasChanged:function(t){return arguments.length?this.changed&&i.has(this.changed,t):!i.isEmpty(this.changed)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&i.clone(this.changed);var n={},r=this._previousAttributes;return t._objectEach(e,function(t,e){i.isEqual(r[e],t)||(n[e]=t)}),n},previous:function(t){return arguments.length&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},isValid:function(){try{this.validate(this.attributes)}catch(t){return!1}return!0},validate:function(e){if(i.has(e,"ACL")&&!(e.ACL instanceof t.ACL))throw new s(s.OTHER_CAUSE,"ACL must be a AV.ACL.")},_validate:function(t,e){!e.silent&&this.validate&&(t=i.extend({},this.attributes,t),this.validate(t))},getACL:function(){return this.get("ACL")},setACL:function(t,e){return this.set("ACL",t,e)},disableBeforeHook:function(){this.ignoreHook("beforeSave"),this.ignoreHook("beforeUpdate"),this.ignoreHook("beforeDelete")},disableAfterHook:function(){this.ignoreHook("afterSave"),this.ignoreHook("afterUpdate"),this.ignoreHook("afterDelete")},ignoreHook:function(e){i.contains(["beforeSave","afterSave","beforeUpdate","afterUpdate","beforeDelete","afterDelete"],e)||console.trace("Unsupported hookName: "+e),t.hookKey||console.trace("ignoreHook required hookKey"),this._flags.__ignore_hooks||(this._flags.__ignore_hooks=[]),this._flags.__ignore_hooks.push(e)}}),t.Object.createWithoutData=function(e,n,r){var i=new t.Object(e);return i.id=n,i._hasData=r,i},t.Object.destroyAll=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||0===e.length)return t.Promise.resolve();var r=i.groupBy(e,function(t){return JSON.stringify({className:t.className,flags:t._flags})}),s={requests:i.map(r,function(t){var e=i.map(t,"id").join(",");return{method:"DELETE",path:"/1.1/classes/"+t[0].className+"/"+e,body:t[0]._flags}})};return a("batch",null,null,"POST",s,n)},t.Object._getSubclass=function(e){if(!i.isString(e))throw new Error("AV.Object._getSubclass requires a string argument.");var n=t.Object._classMap[e];return n||(n=t.Object.extend(e),t.Object._classMap[e]=n),n},t.Object._create=function(e,n,r){return new(t.Object._getSubclass(e))(n,r)},t.Object._classMap={},t.Object._extend=t._extend,t.Object.new=function(e,n){return new t.Object(e,n)},t.Object.extend=function(e,n,r){if(!i.isString(e)){if(e&&i.has(e,"className"))return t.Object.extend(e.className,e,n);throw new Error("AV.Object.extend's first argument should be the className.")}"User"===e&&(e="_User");var s=null;if(i.has(t.Object._classMap,e)){var o=t.Object._classMap[e];if(!n&&!r)return o;s=o._extend(n,r)}else n=n||{},n._className=e,s=this._extend(n,r);return s.extend=function(n){if(i.isString(n)||n&&i.has(n,"className"))return t.Object.extend.apply(s,arguments);var r=[e].concat(i.toArray(arguments));return t.Object.extend.apply(s,r)},s.new=function(t,e){return new s(t,e)},t.Object._classMap[e]=s,s},Object.defineProperty(t.Object.prototype,"className",{get:function(){var t=this._className||this.constructor._LCClassName||this.constructor.name;return"User"===t?"_User":t}}),t.Object.register=function(e,n){if(!(e.prototype instanceof t.Object))throw new Error("registered class is not a subclass of AV.Object");var r=n||e.name;if(!r.length)throw new Error("registered class must be named");n&&(e._LCClassName=n),t.Object._classMap[r]=e},t.Object._findUnsavedChildren=function(e,n,r){t._traverse(e,function(e){return e instanceof t.Object?(e._refreshCache(),void(e.dirty()&&n.push(e))):e instanceof t.File?void(e.url()||e.id||r.push(e)):void 0})},t.Object._canBeSerializedAsValue=function(e){var n=!0;return e instanceof t.Object||e instanceof t.File?n=!!e.id:i.isArray(e)?t._arrayEach(e,function(e){t.Object._canBeSerializedAsValue(e)||(n=!1)}):i.isObject(e)&&t._objectEach(e,function(e){t.Object._canBeSerializedAsValue(e)||(n=!1)}),n},t.Object._deepSaveAsync=function(e,n,r){var o=[],u=[];t.Object._findUnsavedChildren(e,o,u),n&&(o=i.filter(o,function(t){return t!=n}));var c=t.Promise.resolve();i.each(u,function(t){c=c.then(function(){return t.save()})});var l=i.uniq(o),h=i.uniq(l);return c.then(function(){return t.Promise._continueWhile(function(){return h.length>0},function(){var e=[],n=[];if(t._arrayEach(h,function(t){if(e.length>20)return void n.push(t);t._canBeSerialized()?e.push(t):n.push(t)}),h=n,0===e.length)return t.Promise.reject(new s(s.OTHER_CAUSE,"Tried to save a batch with a cycle."));var o=t.Promise.resolve(i.map(e,function(e){return e._allPreviousSaves||t.Promise.resolve()})),u=o.then(function(){return a("batch",null,null,"POST",{requests:i.map(e,function(t){var e=t._getSaveJSON();i.extend(e,t._flags);var n="POST",r="/1.1/classes/"+t.className;return t.id&&(r=r+"/"+t.id,n="PUT"),t._startSave(),{method:n,path:r,body:e}})},r).then(function(n){var r;if(t._arrayEach(e,function(t,e){n[e].success?t._finishSave(t.parse(n[e].success)):(r=r||n[e].error,t._cancelSave())}),r)return t.Promise.reject(new s(r.code,r.error))})});return t._arrayEach(e,function(t){t._allPreviousSaves=u}),u})}).then(function(){return e})}}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){t.Op=function(){this._initialize.apply(this,arguments)},r.extend(t.Op.prototype,{_initialize:function(){}}),r.extend(t.Op,{_extend:t._extend,_opDecoderMap:{},_registerDecoder:function(e,n){t.Op._opDecoderMap[e]=n},_decode:function(e){var n=t.Op._opDecoderMap[e.__op];return n?n(e):void 0}}),t.Op._registerDecoder("Batch",function(e){var n=null;return t._arrayEach(e.ops,function(e){e=t.Op._decode(e),n=e._mergeWithPrevious(n)}),n}),t.Op.Set=t.Op._extend({_initialize:function(t){this._value=t},value:function(){return this._value},toJSON:function(){return t._encode(this.value())},_mergeWithPrevious:function(t){return this},_estimate:function(t){return this.value()}}),t.Op._UNSET={},t.Op.Unset=t.Op._extend({toJSON:function(){return{__op:"Delete"}},_mergeWithPrevious:function(t){return this},_estimate:function(e){return t.Op._UNSET}}),t.Op._registerDecoder("Delete",function(e){return new t.Op.Unset}),t.Op.Increment=t.Op._extend({_initialize:function(t){this._amount=t},amount:function(){return this._amount},toJSON:function(){return{__op:"Increment",amount:this._amount}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.amount());if(e instanceof t.Op.Set)return new t.Op.Set(e.value()+this.amount());if(e instanceof t.Op.Increment)return new t.Op.Increment(this.amount()+e.amount());throw new Error("Op is invalid after previous op.")}return this},_estimate:function(t){return t?t+this.amount():this.amount()}}),t.Op._registerDecoder("Increment",function(e){return new t.Op.Increment(e.amount)}),t.Op.Add=t.Op._extend({_initialize:function(t){this._objects=t},objects:function(){return this._objects},toJSON:function(){return{__op:"Add",objects:t._encode(this.objects())}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.objects());if(e instanceof t.Op.Set)return new t.Op.Set(this._estimate(e.value()));if(e instanceof t.Op.Add)return new t.Op.Add(e.objects().concat(this.objects()));throw new Error("Op is invalid after previous op.")}return this},_estimate:function(t){return t?t.concat(this.objects()):r.clone(this.objects())}}),t.Op._registerDecoder("Add",function(e){return new t.Op.Add(t._decode(e.objects))}),t.Op.AddUnique=t.Op._extend({_initialize:function(t){this._objects=r.uniq(t)},objects:function(){return this._objects},toJSON:function(){return{__op:"AddUnique",objects:t._encode(this.objects())}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return new t.Op.Set(this.objects());if(e instanceof t.Op.Set)return new t.Op.Set(this._estimate(e.value()));if(e instanceof t.Op.AddUnique)return new t.Op.AddUnique(this._estimate(e.objects()));throw new Error("Op is invalid after previous op.")}return this},_estimate:function(e){if(e){var n=r.clone(e);return t._arrayEach(this.objects(),function(e){if(e instanceof t.Object&&e.id){var i=r.find(n,function(n){return n instanceof t.Object&&n.id===e.id});if(i){var s=r.indexOf(n,i);n[s]=e}else n.push(e)}else r.contains(n,e)||n.push(e)}),n}return r.clone(this.objects())}}),t.Op._registerDecoder("AddUnique",function(e){return new t.Op.AddUnique(t._decode(e.objects))}),t.Op.Remove=t.Op._extend({_initialize:function(t){this._objects=r.uniq(t)},objects:function(){return this._objects},toJSON:function(){return{__op:"Remove",objects:t._encode(this.objects())}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)return e;if(e instanceof t.Op.Set)return new t.Op.Set(this._estimate(e.value()));if(e instanceof t.Op.Remove)return new t.Op.Remove(r.union(e.objects(),this.objects()));throw new Error("Op is invalid after previous op.")}return this},_estimate:function(e){if(e){var n=r.difference(e,this.objects());return t._arrayEach(this.objects(),function(e){e instanceof t.Object&&e.id&&(n=r.reject(n,function(n){return n instanceof t.Object&&n.id===e.id}))}),n}return[]}}),t.Op._registerDecoder("Remove",function(e){return new t.Op.Remove(t._decode(e.objects))}),t.Op.Relation=t.Op._extend({_initialize:function(e,n){this._targetClassName=null;var i=this,s=function(e){if(e instanceof t.Object){if(!e.id)throw new Error("You can't add an unsaved AV.Object to a relation.");if(i._targetClassName||(i._targetClassName=e.className),i._targetClassName!==e.className)throw new Error("Tried to create a AV.Relation with 2 different types: "+i._targetClassName+" and "+e.className+".");return e.id}return e};this.relationsToAdd=r.uniq(r.map(e,s)),this.relationsToRemove=r.uniq(r.map(n,s))},added:function(){var e=this;return r.map(this.relationsToAdd,function(n){var r=t.Object._create(e._targetClassName);return r.id=n,r})},removed:function(){var e=this;return r.map(this.relationsToRemove,function(n){var r=t.Object._create(e._targetClassName);return r.id=n,r})},toJSON:function(){var t=null,e=null,n=this,i=function(t){return{__type:"Pointer",className:n._targetClassName,objectId:t}},s=null;return this.relationsToAdd.length>0&&(s=r.map(this.relationsToAdd,i),t={__op:"AddRelation",objects:s}),this.relationsToRemove.length>0&&(s=r.map(this.relationsToRemove,i),e={__op:"RemoveRelation",objects:s}),t&&e?{__op:"Batch",ops:[t,e]}:t||e||{}},_mergeWithPrevious:function(e){if(e){if(e instanceof t.Op.Unset)throw new Error("You can't modify a relation after deleting it.");if(e instanceof t.Op.Relation){if(e._targetClassName&&e._targetClassName!==this._targetClassName)throw new Error("Related object must be of class "+e._targetClassName+", but "+this._targetClassName+" was passed in.");var n=r.union(r.difference(e.relationsToAdd,this.relationsToRemove),this.relationsToAdd),i=r.union(r.difference(e.relationsToRemove,this.relationsToAdd),this.relationsToRemove),s=new t.Op.Relation(n,i);return s._targetClassName=this._targetClassName,s}throw new Error("Op is invalid after previous op.")}return this},_estimate:function(e,n,r){if(e){if(e instanceof t.Relation){if(this._targetClassName)if(e.targetClassName){if(e.targetClassName!==this._targetClassName)throw new Error("Related object must be a "+e.targetClassName+", but a "+this._targetClassName+" was passed in.")}else e.targetClassName=this._targetClassName;return e}throw new Error("Op is invalid after previous op.")}new t.Relation(n,r).targetClassName=this._targetClassName}}),t.Op._registerDecoder("AddRelation",function(e){return new t.Op.Relation(t._decode(e.objects),[])}),t.Op._registerDecoder("RemoveRelation",function(e){return new t.Op.Relation([],t._decode(e.objects))})}},function(t,e,n){"use strict"},function(t,e,n){"use strict";var r=n(2).request;t.exports=function(t){t.Installation=t.Object.extend("_Installation"),t.Push=t.Push||{},t.Push.send=function(t,e){if(t.where&&(t.where=t.where.toJSON().where),t.where&&t.cql)throw new Error("Both where and cql can't be set");if(t.push_time&&(t.push_time=t.push_time.toJSON()),t.expiration_time&&(t.expiration_time=t.expiration_time.toJSON()),t.expiration_time&&t.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:t,authOptions:e})}}},function(t,e,n){"use strict";var r=n(0),i=n(6)("leancloud:query"),s=n(1),o=n(4),a=n(2),u=a._request,c=n(3),l=c.ensureArray,h=c.transformFetchOptions,f=function(t,e){if(void 0===t)throw new Error(e)};t.exports=function(t){t.Query=function(e){r.isString(e)&&(e=t.Object._getSubclass(e)),this.objectClass=e,this.className=e.prototype.className,this._where={},this._include=[],this._select=[],this._limit=-1,this._skip=0,this._extraOptions={}},t.Query.or=function(){var e=r.toArray(arguments),n=null;t._arrayEach(e,function(t){if(r.isNull(n)&&(n=t.className),n!==t.className)throw new Error("All queries must be for the same class")});var i=new t.Query(n);return i._orQuery(e),i},t.Query.and=function(){var e=r.toArray(arguments),n=null;t._arrayEach(e,function(t){if(r.isNull(n)&&(n=t.className),n!==t.className)throw new Error("All queries must be for the same class")});var i=new t.Query(n);return i._andQuery(e),i},t.Query.doCloudQuery=function(e,n,i){var s={cql:e};return r.isArray(n)?s.pvalues=n:i=n,u("cloudQuery",null,null,"GET",s,i).then(function(e){var n=new t.Query(e.className);return{results:r.map(e.results,function(t){var r=n._newObject(e);return r._finishFetch&&r._finishFetch(n._processResult(t),!0),r}),count:e.count,className:e.className}})},t.Query._extend=t._extend,r.extend(t.Query.prototype,{_processResult:function(t){return t},get:function(t,e){if(!t){throw new o(o.OBJECT_NOT_FOUND,"Object not found.")}var n=this._newObject();n.id=t;var i=this.toJSON(),s={};return i.keys&&(s.keys=i.keys),i.include&&(s.include=i.include),i.includeACL&&(s.includeACL=i.includeACL),u("classes",this.className,t,"GET",h(s),e).then(function(t){if(r.isEmpty(t))throw new o(o.OBJECT_NOT_FOUND,"Object not found.");return n._finishFetch(n.parse(t),!0),n})},toJSON:function(){var e={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),t._objectEach(this._extraOptions,function(t,n){e[n]=t}),e},_newObject:function(e){return e&&e.className?new t.Object(e.className):new this.objectClass},_createRequest:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.toJSON(),e=arguments[1];if(JSON.stringify(t).length>2e3){var n={requests:[{method:"GET",path:"/1.1/classes/"+this.className,params:t}]};return u("batch",null,null,"POST",n,e).then(function(t){var e=t[0];if(e.success)return e.success;var n=new Error(e.error.error||"Unknown batch error");throw n.code=e.error.code,n})}return u("classes",this.className,null,"GET",t,e)},_parseResponse:function(t){var e=this;return r.map(t.results,function(n){var r=e._newObject(t);return r._finishFetch&&r._finishFetch(e._processResult(n),!0),r})},find:function(t){return this._createRequest(void 0,t).then(this._parseResponse.bind(this))},scan:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.orderedBy,o=e.batchSize,a=arguments[1],c=this.toJSON();i("scan %O",c),c.order&&(console.warn("The order of the query is ignored for Query#scan. Checkout the orderedBy option of Query#scan."),delete c.order),c.skip&&(console.warn("The skip option of the query is ignored for Query#scan."),delete c.skip),c.limit&&(console.warn("The limit option of the query is ignored for Query#scan."),delete c.limit),n&&(c.scan_key=n),o&&(c.limit=o);var l=s.resolve([]),h=void 0,f=!1;return{next:function(){return l=l.then(function(e){return f?[]:e.length>1?e:h||0===e.length?u("scan/classes",t.className,null,"GET",h?r.extend({},c,{cursor:h}):c,a).then(function(e){return h=e.cursor,t._parseResponse(e)}).then(function(t){return t.length||(f=!0),e.concat(t)}):(f=!0,e)}),l.then(function(t){return t.shift()}).then(function(t){return{value:t,done:f}})}}},destroyAll:function(e){return this.find(e).then(function(n){return t.Object.destroyAll(n,e)})},count:function(t){var e=this.toJSON();return e.limit=0,e.count=1,this._createRequest(e,t).then(function(t){return t.count})},first:function(t){var e=this,n=this.toJSON();return n.limit=1,this._createRequest(n,t).then(function(t){return r.map(t.results,function(t){var n=e._newObject();return n._finishFetch&&n._finishFetch(e._processResult(t),!0),n})[0]})},skip:function(t){return f(t,"undefined is not a valid skip value"),this._skip=t,this},limit:function(t){return f(t,"undefined is not a valid limit value"),this._limit=t,this},equalTo:function(e,n){return f(e,"undefined is not a valid key"),f(n,"undefined is not a valid value"),this._where[e]=t._encode(n),this},_addCondition:function(e,n,r){return f(e,"undefined is not a valid condition key"),f(n,"undefined is not a valid condition"),f(r,"undefined is not a valid condition value"),this._where[e]||(this._where[e]={}),this._where[e][n]=t._encode(r),this},sizeEqualTo:function(t,e){this._addCondition(t,"$size",e)},notEqualTo:function(t,e){return this._addCondition(t,"$ne",e),this},lessThan:function(t,e){return this._addCondition(t,"$lt",e),this},greaterThan:function(t,e){return this._addCondition(t,"$gt",e),this},lessThanOrEqualTo:function(t,e){return this._addCondition(t,"$lte",e),this},greaterThanOrEqualTo:function(t,e){return this._addCondition(t,"$gte",e),this},containedIn:function(t,e){return this._addCondition(t,"$in",e),this},notContainedIn:function(t,e){return this._addCondition(t,"$nin",e),this},containsAll:function(t,e){return this._addCondition(t,"$all",e),this},exists:function(t){return this._addCondition(t,"$exists",!0),this},doesNotExist:function(t){return this._addCondition(t,"$exists",!1),this},matches:function(t,e,n){return this._addCondition(t,"$regex",e),n||(n=""),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),n&&n.length&&this._addCondition(t,"$options",n),this},matchesQuery:function(t,e){var n=e.toJSON();return n.className=e.className,this._addCondition(t,"$inQuery",n),this},doesNotMatchQuery:function(t,e){var n=e.toJSON();return n.className=e.className,this._addCondition(t,"$notInQuery",n),this},matchesKeyInQuery:function(t,e,n){var r=n.toJSON();return r.className=n.className,this._addCondition(t,"$select",{key:e,query:r}),this},doesNotMatchKeyInQuery:function(t,e,n){var r=n.toJSON();return r.className=n.className,this._addCondition(t,"$dontSelect",{key:e,query:r}),this},_orQuery:function(t){var e=r.map(t,function(t){return t.toJSON().where});return this._where.$or=e,this},_andQuery:function(t){var e=r.map(t,function(t){return t.toJSON().where});return this._where.$and=e,this},_quote:function(t){return"\\Q"+t.replace("\\E","\\E\\\\E\\Q")+"\\E"},contains:function(t,e){return this._addCondition(t,"$regex",this._quote(e)),this},startsWith:function(t,e){return this._addCondition(t,"$regex","^"+this._quote(e)),this},endsWith:function(t,e){return this._addCondition(t,"$regex",this._quote(e)+"$"),this},ascending:function(t){return f(t,"undefined is not a valid key"),this._order=t,this},addAscending:function(t){return f(t,"undefined is not a valid key"),this._order?this._order+=","+t:this._order=t,this},descending:function(t){return f(t,"undefined is not a valid key"),this._order="-"+t,this},addDescending:function(t){return f(t,"undefined is not a valid key"),this._order?this._order+=",-"+t:this._order="-"+t,this},near:function(e,n){return n instanceof t.GeoPoint||(n=new t.GeoPoint(n)),this._addCondition(e,"$nearSphere",n),this},withinRadians:function(t,e,n){return this.near(t,e),this._addCondition(t,"$maxDistance",n),this},withinMiles:function(t,e,n){return this.withinRadians(t,e,n/3958.8)},withinKilometers:function(t,e,n){return this.withinRadians(t,e,n/6371)},withinGeoBox:function(e,n,r){return n instanceof t.GeoPoint||(n=new t.GeoPoint(n)),r instanceof t.GeoPoint||(r=new t.GeoPoint(r)),this._addCondition(e,"$within",{$box:[n,r]}),this},include:function(t){var e=this;return f(t,"undefined is not a valid key"),r(arguments).forEach(function(t){e._include=e._include.concat(l(t))}),this},includeACL:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._includeACL=t,this},select:function(t){var e=this;return f(t,"undefined is not a valid key"),r(arguments).forEach(function(t){e._select=e._select.concat(l(t))}),this},each:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._order||this._skip||this._limit>=0){var i=new Error("Cannot iterate on a query with sort, skip, or limit.");return t.Promise.reject(i)}var s=new t.Query(this.objectClass);s._limit=n.batchSize||100,s._where=r.clone(this._where),s._include=r.clone(this._include),s.ascending("objectId");var o=!1;return t.Promise._continueWhile(function(){return!o},function(){return s.find(n).then(function(n){var i=t.Promise.resolve();return r.each(n,function(t){i=i.then(function(){return e(t)})}),i.then(function(){n.length>=s._limit?s.greaterThan("objectId",n[n.length-1].id):o=!0})})})},subscribe:function(e){return t.LiveQuery.init(this,e)}}),t.FriendShipQuery=t.Query._extend({_objectClass:t.User,_newObject:function(){return new t.User},_processResult:function(t){if(t&&t[this._friendshipTag]){var e=t[this._friendshipTag];return"Pointer"===e.__type&&"_User"===e.className&&(delete e.__type,delete e.className),e}return null}})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){t.Relation=function(t,e){if(!r.isString(e))throw new TypeError("key must be a string");this.parent=t,this.key=e,this.targetClassName=null},t.Relation.reverseQuery=function(e,n,r){var i=new t.Query(e);return i.equalTo(n,r._toPointer()),i},r.extend(t.Relation.prototype,{_ensureParentAndKey:function(t,e){if(this.parent=this.parent||t,this.key=this.key||e,this.parent!==t)throw new Error("Internal Error. Relation retrieved from two different Objects.");if(this.key!==e)throw new Error("Internal Error. Relation retrieved from two different keys.")},add:function(e){r.isArray(e)||(e=[e]);var n=new t.Op.Relation(e,[]);this.parent.set(this.key,n),this.targetClassName=n._targetClassName},remove:function(e){r.isArray(e)||(e=[e]);var n=new t.Op.Relation([],e);this.parent.set(this.key,n),this.targetClassName=n._targetClassName},toJSON:function(){return{__type:"Relation",className:this.targetClassName}},query:function(){var e,n;return this.targetClassName?(e=t.Object._getSubclass(this.targetClassName),n=new t.Query(e)):(e=t.Object._getSubclass(this.parent.className),n=new t.Query(e),n._extraOptions.redirectClassNameForKey=this.key),n._addCondition("$relatedTo","object",this.parent._toPointer()),n._addCondition("$relatedTo","key",this.key),n}})}},function(t,e,n){"use strict";var r=n(0),i=n(4);t.exports=function(t){t.Role=t.Object.extend("_Role",{constructor:function(e,n){if(r.isString(e)?(t.Object.prototype.constructor.call(this,null,null),this.setName(e)):t.Object.prototype.constructor.call(this,e,n),n){if(!(n instanceof t.ACL))throw new TypeError("acl must be an instance of AV.ACL");this.setACL(n)}},getName:function(){return this.get("name")},setName:function(t,e){return this.set("name",t,e)},getUsers:function(){return this.relation("users")},getRoles:function(){return this.relation("roles")},validate:function(e,n){if("name"in e&&e.name!==this.getName()){var s=e.name;if(this.id&&this.id!==e.objectId)return new i(i.OTHER_CAUSE,"A role's name can only be set before it has been saved.");if(!r.isString(s))return new i(i.OTHER_CAUSE,"A role's name must be a String.");if(!/^[0-9a-zA-Z\-_ ]+$/.test(s))return new i(i.OTHER_CAUSE,"A role's name can only contain alphanumeric characters, _, -, and spaces.")}return!!t.Object.prototype.validate&&t.Object.prototype.validate.call(this,e,n)}})}},function(t,e,n){"use strict";var r=n(0),i=n(2)._request;t.exports=function(t){t.SearchSortBuilder=function(){this._sortFields=[]},r.extend(t.SearchSortBuilder.prototype,{_addField:function(t,e,n,r){var i={};return i[t]={order:e||"asc",mode:n||"avg",missing:"_"+(r||"last")},this._sortFields.push(i),this},ascending:function(t,e,n){return this._addField(t,"asc",e,n)},descending:function(t,e,n){return this._addField(t,"desc",e,n)},whereNear:function(t,e,n){n=n||{};var r={},i={lat:e.latitude,lon:e.longitude},s={order:n.order||"asc",mode:n.mode||"avg",unit:n.unit||"km"};return s[t]=i,r._geo_distance=s,this._sortFields.push(r),this},build:function(){return JSON.stringify(t._encode(this._sortFields))}}),t.SearchQuery=t.Query._extend({_sid:null,_hits:0,_queryString:null,_highlights:null,_sortBuilder:null,_createRequest:function(t,e){return i("search/select",null,null,"GET",t||this.toJSON(),e)},sid:function(t){return this._sid=t,this},queryString:function(t){return this._queryString=t,this},highlights:function(t){var e;return e=t&&r.isString(t)?arguments:t,this._highlights=e,this},sortBy:function(t){return this._sortBuilder=t,this},hits:function(){return this._hits||(this._hits=0),this._hits},_processResult:function(t){return delete t.className,delete t._app_url,delete t._deeplink,t},hasMore:function(){return!this._hitEnd},reset:function(){this._hitEnd=!1,this._sid=null,this._hits=0},find:function(){var t=this;return this._createRequest().then(function(e){return e.sid?(t._oldSid=t._sid,t._sid=e.sid):(t._sid=null,t._hitEnd=!0),t._hits=e.hits||0,r.map(e.results,function(n){n.className&&(e.className=n.className);var r=t._newObject(e);return r.appURL=n._app_url,r._finishFetch(t._processResult(n),!0),r})})},toJSON:function(){var e=t.SearchQuery.__super__.toJSON.call(this);if(delete e.where,this.className&&(e.clazz=this.className),this._sid&&(e.sid=this._sid),!this._queryString)throw new Error("Please set query string.");if(e.q=this._queryString,this._highlights&&(e.highlights=this._highlights.join(",")),this._sortBuilder&&e.order)throw new Error("sort and order can not be set at same time.");return this._sortBuilder&&(e.sort=this._sortBuilder.build()),e}})}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(0),s=n(2)._request,o=n(3),a=o.getSessionToken;t.exports=function(t){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a(e)?t.User._fetchUserBySessionToken(a(e)):t.User.currentAsync()},n=function(n){return e(n).then(function(e){return t.Object.createWithoutData("_User",e.id)._toPointer()})};t.Status=function(t,e){return this.data={},this.inboxType="default",this.query=null,t&&"object"===(void 0===t?"undefined":r(t))?this.data=t:(t&&(this.data.image=t),e&&(this.data.message=e)),this},i.extend(t.Status.prototype,{get:function(t){return this.data[t]},set:function(t,e){return this.data[t]=e,this},destroy:function(e){return this.id?s("statuses",null,this.id,"DELETE",e):t.Promise.reject(new Error("The status id is not exists."))},toObject:function(){return this.id?t.Object.createWithoutData("_Status",this.id):null},_getDataJSON:function(){var e=i.clone(this.data);return t._encode(e)},send:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a(r)&&!t.User.current())throw new Error("Please signin an user.");return this.query?n(r).then(function(t){var n=e.query.toJSON();n.className=e.query.className;var i={};return i.query=n,e.data=e.data||{},e.data.source=e.data.source||t,i.data=e._getDataJSON(),i.inboxType=e.inboxType||"default",s("statuses",null,null,"POST",i,r)}).then(function(n){return e.id=n.objectId,e.createdAt=t._parseDate(n.createdAt),e}):t.Status.sendStatusToFollowers(this,r)},_finishFetch:function(e){this.id=e.objectId,this.createdAt=t._parseDate(e.createdAt),this.updatedAt=t._parseDate(e.updatedAt),this.messageId=e.messageId,delete e.messageId,delete e.objectId,delete e.createdAt,delete e.updatedAt,this.data=t._decode(e)}}),t.Status.sendStatusToFollowers=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a(r)&&!t.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,e.data=e.data||{},e.data.source=e.data.source||n,o.data=e._getDataJSON(),o.inboxType=e.inboxType||"default",s("statuses",null,null,"POST",o,r).then(function(n){return e.id=n.objectId,e.createdAt=t._parseDate(n.createdAt),e})})},t.Status.sendPrivateStatus=function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!a(o)&&!t.User.current())throw new Error("Please signin an user.");if(!r)throw new Error("Invalid target user.");var u=i.isString(r)?r:r.id;if(!u)throw new Error("Invalid target user.");return n(o).then(function(n){var r={};r.className="_User",r.where={objectId:u};var i={};return i.query=r,e.data=e.data||{},e.data.source=e.data.source||n,i.data=e._getDataJSON(),i.inboxType="private",e.inboxType="private",s("statuses",null,null,"POST",i,o).then(function(n){return e.id=n.objectId,e.createdAt=t._parseDate(n.createdAt),e})})},t.Status.countUnreadStatuses=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(i.isString(r)||(o=r),!a(o)&&null==n&&!t.User.current())throw new Error("Please signin an user or pass the owner objectId.");return e(o).then(function(e){var n={};return n.inboxType=t._encode(r),n.owner=t._encode(e),s("subscribe/statuses/count",null,null,"GET",n,o)})},t.Status.resetUnreadCount=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(i.isString(r)||(o=r),!a(o)&&null==n&&!t.User.current())throw new Error("Please signin an user or pass the owner objectId.");return e(o).then(function(e){var n={};return n.inboxType=t._encode(r),n.owner=t._encode(e),s("subscribe/statuses/resetUnreadCount",null,null,"POST",n,o)})},t.Status.statusQuery=function(e){var n=new t.Query("_Status");return e&&n.equalTo("source",e),n},t.InboxQuery=t.Query._extend({_objectClass:t.Status,_sinceId:0,_maxId:0,_inboxType:"default",_owner:null,_newObject:function(){return new t.Status},_createRequest:function(t,e){return s("subscribe/statuses",null,null,"GET",t||this.toJSON(),e)},sinceId:function(t){return this._sinceId=t,this},maxId:function(t){return this._maxId=t,this},owner:function(t){return this._owner=t,this},inboxType:function(t){return this._inboxType=t,this},toJSON:function(){var e=t.InboxQuery.__super__.toJSON.call(this);return e.owner=t._encode(this._owner),e.inboxType=t._encode(this._inboxType),e.sinceId=t._encode(this._sinceId),e.maxId=t._encode(this._maxId),e}}),t.Status.inboxQuery=function(e,n){var r=new t.InboxQuery(t.Status);return e&&(r._owner=e),n&&(r._inboxType=n),r}}},function(t,e,n){"use strict";var r=n(0),i=n(4),s=n(2)._request,o=n(1),a=function(){if("undefined"==typeof wx||"function"!=typeof wx.login)throw new Error("Weapp Login is only available in Weapp");return new o(function(t,e){wx.login({success:function(n){var r=n.code,i=n.errMsg;r?t(r):e(new Error(i))},fail:function(){return e(new Error("wx.login 失败"))}})})};t.exports=function(t){t.User=t.Object.extend("_User",{_isCurrentUser:!1,_mergeMagicFields:function(e){e.sessionToken&&(this._sessionToken=e.sessionToken,delete e.sessionToken),t.User.__super__._mergeMagicFields.call(this,e)},_cleanupAuthData:function(){if(this.isCurrent()){var e=this.get("authData");e&&t._objectEach(this.get("authData"),function(t,n){e[n]||delete e[n]})}},_synchronizeAllAuthData:function(){if(this.get("authData")){var e=this;t._objectEach(this.get("authData"),function(t,n){e._synchronizeAuthData(n)})}},_synchronizeAuthData:function(e){if(this.isCurrent()){var n;r.isString(e)?(n=e,e=t.User._authProviders[n]):n=e.getAuthType();var i=this.get("authData");if(i&&e){e.restoreAuthentication(i[n])||this._unlinkFrom(e)}}},_handleSaveResult:function(e){return e&&!t._config.disableCurrentUser&&(this._isCurrentUser=!0),this._cleanupAuthData(),this._synchronizeAllAuthData(),delete this._serverData.password,this._rebuildEstimatedDataForKey("password"),this._refreshCache(),!e&&!this.isCurrent()||t._config.disableCurrentUser?o.resolve():o.resolve(t.User._saveCurrentUser(this))},_linkWith:function(e,n){var i,s=this;if(r.isString(e)?(i=e,e=t.User._authProviders[e]):i=e.getAuthType(),n){var o=this.get("authData")||{};return o[i]=n,this.save({authData:o}).then(function(t){return t._handleSaveResult(!0).then(function(){return t})})}return e.authenticate().then(function(t){return s._linkWith(e,t)})},linkWithWeapp:function(){var t=this;return a().then(function(e){return t._linkWith("lc_weapp",{code:e})})},_unlinkFrom:function(e){var n=this;return r.isString(e)&&(e=t.User._authProviders[e]),this._linkWith(e,null).then(function(t){return n._synchronizeAuthData(e),t})},_isLinked:function(t){var e;return e=r.isString(t)?t:t.getAuthType(),!!(this.get("authData")||{})[e]},logOut:function(){this._logOutWithAll(),this._isCurrentUser=!1},_logOutWithAll:function(){if(this.get("authData")){var e=this;t._objectEach(this.get("authData"),function(t,n){e._logOutWith(n)})}},_logOutWith:function(e){this.isCurrent()&&(r.isString(e)&&(e=t.User._authProviders[e]),e&&e.deauthenticate&&e.deauthenticate())},signUp:function(t,e){var n=t&&t.username||this.get("username");if(!n||""===n)throw new i(i.OTHER_CAUSE,"Cannot sign up user with an empty name.");var r=t&&t.password||this.get("password");if(!r||""===r)throw new i(i.OTHER_CAUSE,"Cannot sign up user with an empty password.");return this.save(t,e).then(function(t){return t._handleSaveResult(!0).then(function(){return t})})},signUpOrlogInWithMobilePhone:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t&&t.mobilePhoneNumber||this.get("mobilePhoneNumber");if(!n||""===n)throw new i(i.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty mobilePhoneNumber.");var r=t&&t.smsCode||this.get("smsCode");if(!r||""===r)throw new i(i.OTHER_CAUSE,"Cannot sign up or login user by mobilePhoneNumber with an empty smsCode.");return e._makeRequest=function(t,e,n,r,i){return s("usersByMobilePhone",null,null,"POST",i)},this.save(t,e).then(function(t){return delete t.attributes.smsCode,delete t._serverData.smsCode,t._handleSaveResult(!0).then(function(){return t})})},logIn:function(){var t=this;return s("login",null,null,"POST",this.toJSON()).then(function(e){var n=t.parse(e);return t._finishFetch(n),t._handleSaveResult(!0).then(function(){return n.smsCode||delete t.attributes.smsCode,t})})},save:function(e,n,i){var s,o;return r.isObject(e)||r.isNull(e)||r.isUndefined(e)?(s=e,o=n):(s={},s[e]=n,o=i),o=o||{},t.Object.prototype.save.call(this,s,o).then(function(t){return t._handleSaveResult(!1).then(function(){return t})})},follow:function(e,n){if(!this.id)throw new Error("Please signin.");var i=void 0,o=void 0;e.user?(i=e.user,o=e.attributes):i=e;var a=r.isString(i)?i:i.id;if(!a)throw new Error("Invalid target user.");var u="users/"+this.id+"/friendship/"+a;return s(u,null,null,"POST",t._encode(o),n)},unfollow:function(t,e){if(!this.id)throw new Error("Please signin.");var n=void 0;n=t.user?t.user:t;var i=r.isString(n)?n:n.id;if(!i)throw new Error("Invalid target user.");var o="users/"+this.id+"/friendship/"+i;return s(o,null,null,"DELETE",null,e)},followerQuery:function(){return t.User.followerQuery(this.id)},followeeQuery:function(){return t.User.followeeQuery(this.id)},fetch:function(e,n){return t.Object.prototype.fetch.call(this,e,n).then(function(t){return t._handleSaveResult(!1).then(function(){return t})})},updatePassword:function(t,e,n){var r="users/"+this.id+"/updatePassword";return s(r,null,null,"PUT",{old_password:t,new_password:e},n)},isCurrent:function(){return this._isCurrentUser},getUsername:function(){return this.get("username")},getMobilePhoneNumber:function(){return this.get("mobilePhoneNumber")},setMobilePhoneNumber:function(t,e){return this.set("mobilePhoneNumber",t,e)},setUsername:function(t,e){return this.set("username",t,e)},setPassword:function(t,e){return this.set("password",t,e)},getEmail:function(){return this.get("email")},setEmail:function(t,e){return this.set("email",t,e)},authenticated:function(){return console.warn("DEPRECATED: 如果要判断当前用户的登录状态是否有效,请使用 currentUser.isAuthenticated().then(),如果要判断该用户是否是当前登录用户,请使用 user.id === currentUser.id。"),!!this._sessionToken&&!t._config.disableCurrentUser&&t.User.current()&&t.User.current().id===this.id},isAuthenticated:function(){var e=this;return o.resolve().then(function(){return!!e._sessionToken&&t.User._fetchUserBySessionToken(e._sessionToken).then(function(){return!0},function(t){if(211===t.code)return!1;throw t})})},getSessionToken:function(){return this._sessionToken},refreshSessionToken:function(t){var e=this;return s("users/"+this.id+"/refreshSessionToken",null,null,"PUT",null,t).then(function(t){return e._finishFetch(t),e._handleSaveResult(!0).then(function(){return e})})},getRoles:function(e){return t.Relation.reverseQuery("_Role","users",this).find(e)}},{_currentUser:null,_currentUserMatchesDisk:!1,_CURRENT_USER_KEY:"currentUser",_authProviders:{},signUp:function(e,n,r,i){return r=r||{},r.username=e,r.password=n,t.Object._create("_User").signUp(r,i)},logIn:function(e,n,r){var i=t.Object._create("_User");return i._finishFetch({username:e,password:n}),i.logIn(r)},become:function(t){return this._fetchUserBySessionToken(t).then(function(t){return t._handleSaveResult(!0).then(function(){return t})})},_fetchUserBySessionToken:function(e){var n=t.Object._create("_User");return s("users","me",null,"GET",{session_token:e}).then(function(t){var e=n.parse(t);return n._finishFetch(e),n})},logInWithMobilePhoneSmsCode:function(e,n,r){var i=t.Object._create("_User");return i._finishFetch({mobilePhoneNumber:e,smsCode:n}),i.logIn(r)},signUpOrlogInWithMobilePhone:function(e,n,r,i){return r=r||{},r.mobilePhoneNumber=e,r.smsCode=n,t.Object._create("_User").signUpOrlogInWithMobilePhone(r,i)},logInWithMobilePhone:function(e,n,r){var i=t.Object._create("_User");return i._finishFetch({mobilePhoneNumber:e,password:n}),i.logIn(r)},signUpOrlogInWithAuthData:function(e,n){return t.User._logInWith(n,e)},loginWithWeapp:function(){var t=this;return a().then(function(e){return t.signUpOrlogInWithAuthData({code:e},"lc_weapp")})},associateWithAuthData:function(t,e,n){return t._linkWith(e,n)},logOut:function(){return t._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"),o.resolve(null)):(null!==t.User._currentUser&&(t.User._currentUser._logOutWithAll(),t.User._currentUser._isCurrentUser=!1),t.User._currentUserMatchesDisk=!0,t.User._currentUser=null,t.localStorage.removeItemAsync(t._getAVPath(t.User._CURRENT_USER_KEY)).then(function(){return t._refreshSubscriptionId()}))},followerQuery:function(e){if(!e||!r.isString(e))throw new Error("Invalid user object id.");var n=new t.FriendShipQuery("_Follower");return n._friendshipTag="follower",n.equalTo("user",t.Object.createWithoutData("_User",e)),n},followeeQuery:function(e){if(!e||!r.isString(e))throw new Error("Invalid user object id.");var n=new t.FriendShipQuery("_Followee");return n._friendshipTag="followee",n.equalTo("user",t.Object.createWithoutData("_User",e)),n},requestPasswordReset:function(t){return s("requestPasswordReset",null,null,"POST",{email:t})},requestEmailVerify:function(t){return s("requestEmailVerify",null,null,"POST",{email:t})},requestMobilePhoneVerify:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:t};return e.validateToken&&(n.validate_token=e.validateToken),s("requestMobilePhoneVerify",null,null,"POST",n,e)},requestPasswordResetBySmsCode:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:t};return e.validateToken&&(n.validate_token=e.validateToken),s("requestPasswordResetBySmsCode",null,null,"POST",n,e)},resetPasswordBySmsCode:function(t,e){return s("resetPasswordBySmsCode",null,t,"PUT",{password:e})},verifyMobilePhone:function(t){return s("verifyMobilePhone",null,t,"POST",null)},requestLoginSmsCode:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={mobilePhoneNumber:t};return e.validateToken&&(n.validate_token=e.validateToken),s("requestLoginSmsCode",null,null,"POST",n,e)},currentAsync:function(){return t._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"),o.resolve(null)):t.User._currentUser?o.resolve(t.User._currentUser):t.User._currentUserMatchesDisk?o.resolve(t.User._currentUser):t.localStorage.getItemAsync(t._getAVPath(t.User._CURRENT_USER_KEY)).then(function(e){if(!e)return null;t.User._currentUserMatchesDisk=!0,t.User._currentUser=t.Object._create("_User"),t.User._currentUser._isCurrentUser=!0;var n=JSON.parse(e);return t.User._currentUser.id=n._id,delete n._id,t.User._currentUser._sessionToken=n._sessionToken,delete n._sessionToken,t.User._currentUser._finishFetch(n),t.User._currentUser._synchronizeAllAuthData(),t.User._currentUser._refreshCache(),t.User._currentUser._opSetQueue=[{}],t.User._currentUser})},current:function(){if(t._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(t.User._currentUser)return t.User._currentUser;if(t.User._currentUserMatchesDisk)return t.User._currentUser;t.User._currentUserMatchesDisk=!0;var e=t.localStorage.getItem(t._getAVPath(t.User._CURRENT_USER_KEY));if(!e)return null;t.User._currentUser=t.Object._create("_User"),t.User._currentUser._isCurrentUser=!0;var n=JSON.parse(e);return t.User._currentUser.id=n._id,delete n._id,t.User._currentUser._sessionToken=n._sessionToken,delete n._sessionToken,t.User._currentUser._finishFetch(n),t.User._currentUser._synchronizeAllAuthData(),t.User._currentUser._refreshCache(),t.User._currentUser._opSetQueue=[{}],t.User._currentUser},_saveCurrentUser:function(e){var n;return n=t.User._currentUser!==e?t.User.logOut():o.resolve(),n.then(function(){e._isCurrentUser=!0,t.User._currentUser=e;var n=e.toJSON();return n._id=e.id,n._sessionToken=e._sessionToken,t.localStorage.setItemAsync(t._getAVPath(t.User._CURRENT_USER_KEY),JSON.stringify(n)).then(function(){return t.User._currentUserMatchesDisk=!0,t._refreshSubscriptionId()})})},_registerAuthenticationProvider:function(e){t.User._authProviders[e.getAuthType()]=e,!t._config.disableCurrentUser&&t.User.current()&&t.User.current()._synchronizeAuthData(e.getAuthType())},_logInWith:function(e,n){return t.Object._create("_User")._linkWith(e,n)}})}},function(t,e,n){"use strict";function r(t){var e=this;this.AV=t,this.lockedUntil=0,o.getAsync("serverURLs").then(function(t){if(!t)return e.lock(0);var n=t.serverURLs,r=t.lockedUntil;e.AV._setServerURLs(n,!1),e.lockedUntil=r}).catch(function(){return e.lock(0)})}var i=n(3),s=i.ajax,o=n(10);r.prototype.disable=function(){this.disabled=!0},r.prototype.lock=function(t){this.lockedUntil=Date.now()+t},r.prototype.refresh=function(){var t=this;if(!(this.disabled||Date.now()3&&void 0!==arguments[3]?arguments[3]:{};n.attributes.url=t.url,n._bucket=t.bucket,n.id=t.objectId;var a=t.upload_url+"?sign="+encodeURIComponent(t.token);return new s(function(t,s){var u=r("POST",a).field("fileContent",e).field("op","upload");o.onprogress&&u.on("progress",o.onprogress),u.end(function(e,r){if(r&&i(r.status,r.body,r.text),e)return r&&(e.statusCode=r.status,e.responseText=r.text,e.response=r.body),s(e);t(n)})})}},function(t,e,n){"use strict";var r=n(7),i=n(1),s=n(6)("qiniu");t.exports=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n.attributes.url=t.url,n._bucket=t.bucket,n.id=t.objectId;var a=t.token;return new i(function(t,i){var u=r("POST","https://up.qbox.me").field("file",e).field("name",n.attributes.name).field("key",n._qiniu_key).field("token",a);o.onprogress&&u.on("progress",o.onprogress),u.end(function(e,r){if(r&&s(r.status,r.body,r.text),e)return r&&(e.statusCode=r.status,e.responseText=r.text,e.response=r.body),i(e);t(n)})})}},function(t,e,n){"use strict";var r=n(7),i=n(1),s=function(t,e){return e&&(t.statusCode=e.status,t.responseText=e.text,t.response=e.body),t};t.exports=function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.attributes.url=t.url,n._bucket=t.bucket,n.id=t.objectId,new i(function(i,a){var u=r("PUT",t.upload_url).set("Content-Type",n.get("mime_type"));o.onprogress&&u.on("progress",o.onprogress),u.on("response",function(t){if(t.ok)return i(n);a(s(t.error,t))}),u.on("error",function(t,e){return a(s(t,e))}),u.send(e).end()})}},function(t,e,n){"use strict";(function(e){var r=n(0),i=(n(1),{}),s=["getItem","setItem","removeItem","clear"],o=e.localStorage;try{var a="__storejs__";if(o.setItem(a,a),o.getItem(a)!=a)throw new Error;o.removeItem(a)}catch(t){o=n(49)}r(s).each(function(t){i[t]=function(){return o[t].apply(o,arguments)}}),i.async=!1,t.exports=i}).call(e,n(9))},function(t,e,n){"use strict";var r=function(t,e){var n;t.indexOf("base64")<0?n=atob(t):t.split(",")[0].indexOf("base64")>=0?(e=e||t.split(",")[0].split(":")[1].split(";")[0],n=atob(t.split(",")[1])):n=unescape(t.split(",")[1]);for(var r=new Uint8Array(n.length),i=0;i>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n>>6*(3-s)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}};t.exports=n}()},function(t,e,n){function r(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}function i(t){function n(){if(n.enabled){var t=n,r=+new Date,i=r-(c||r);t.diff=i,t.prev=c,t.curr=r,c=r;for(var s=new Array(arguments.length),o=0;o + * @license MIT + */ +t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},function(t,e,n){!function(e){var n={},r={};n.length=0,n.getItem=function(t){return r[t]||null},n.setItem=function(t,e){void 0===e?n.removeItem(t):(r.hasOwnProperty(t)||n.length++,r[t]=""+e)},n.removeItem=function(t){r.hasOwnProperty(t)&&(delete r[t],n.length--)},n.key=function(t){return Object.keys(r)[t]||null},n.clear=function(){r={},n.length=0},t.exports=n}()},function(t,e,n){!function(){var e=n(44),r=n(13).utf8,i=n(48),s=n(13).bin,o=function(t,n){t.constructor==String?t=n&&"binary"===n.encoding?s.stringToBytes(t):r.stringToBytes(t):i(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var a=e.bytesToWords(t),u=8*t.length,c=1732584193,l=-271733879,h=-1732584194,f=271733878,d=0;d>>24)|4278255360&(a[d]<<24|a[d]>>>8);a[u>>>5]|=128<>>9<<4)]=u;for(var p=o._ff,_=o._gg,v=o._hh,m=o._ii,d=0;d>>0,l=l+g>>>0,h=h+b>>>0,f=f+w>>>0}return e.endian([c,l,h,f])};o._ff=function(t,e,n,r,i,s,o){var a=t+(e&n|~e&r)+(i>>>0)+o;return(a<>>32-s)+e},o._gg=function(t,e,n,r,i,s,o){var a=t+(e&r|n&~r)+(i>>>0)+o;return(a<>>32-s)+e},o._hh=function(t,e,n,r,i,s,o){var a=t+(e^n^r)+(i>>>0)+o;return(a<>>32-s)+e},o._ii=function(t,e,n,r,i,s,o){var a=t+(n^(e|~r))+(i>>>0)+o;return(a<>>32-s)+e},o._blocksize=16,o._digestsize=16,t.exports=function(t,n){if(void 0===t||null===t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(o(t,n));return n&&n.asBytes?r:n&&n.asString?s.bytesToString(r):e.bytesToHex(r)}}()},function(t,e){function n(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){return t>=c?Math.round(t/c)+"d":t>=u?Math.round(t/u)+"h":t>=a?Math.round(t/a)+"m":t>=o?Math.round(t/o)+"s":t+"ms"}function i(t){return s(t,c,"day")||s(t,u,"hour")||s(t,a,"minute")||s(t,o,"second")||t+" ms"}function s(t,e,n){if(!(t0)return n(t);if("number"===s&&!1===isNaN(t))return e.long?i(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(t){return"[object Function]"===(i(t)?Object.prototype.toString.call(t):"")}var i=n(8);t.exports=r},function(t,e,n){function r(t){if(t)return i(t)}function i(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}var s=n(8);t.exports=r,r.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},r.prototype.parse=function(t){return this._parser=t,this},r.prototype.responseType=function(t){return this._responseType=t,this},r.prototype.serialize=function(t){return this._serializer=t,this},r.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var e in t)switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",e)}return this},r.prototype.retry=function(t){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(t,e){if(!this._fullfilledPromise){var n=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 Promise(function(t,e){n.end(function(n,r){n?e(n):t(r)})})}return this._fullfilledPromise.then(t,e)},r.prototype.catch=function(t){return this.then(void 0,t)},r.prototype.use=function(t){return t(this),this},r.prototype.ok=function(t){if("function"!=typeof t)throw Error("Callback required");return this._okCallback=t,this},r.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},r.prototype.get=function(t){return this._header[t.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(t,e){if(s(t)){for(var n in t)this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},r.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},r.prototype.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),s(t)){for(var n in t)this.field(n,t[n]);return this}if(Array.isArray(e)){for(var r in e)this.field(t,e[r]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=""+e),this._getFormData().append(t,e),this},r.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)},r.prototype.withCredentials=function(t){return void 0==t&&(t=!0),this._withCredentials=t,this},r.prototype.redirects=function(t){return this._maxRedirects=t,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(t){var e=s(t),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(e&&s(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},r.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error(t+e+"ms exceeded");r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(t,e,n){function r(t){if(t)return i(t)}function i(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}var s=n(56);t.exports=r,r.prototype.get=function(t){return this.header[t.toLowerCase()]},r.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=s.type(e);var n=s.params(e);for(var r in n)this[r]=n[r];this.links={};try{t.link&&(this.links=s.parseLinks(t.link))}catch(t){}},r.prototype._setStatusProperties=function(t){var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.redirect=3==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.forbidden=403==t,this.notFound=404==t}},function(t,e){var n=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];t.exports=function(t,e){return!!(t&&t.code&&~n.indexOf(t.code))||(!!(e&&e.status&&e.status>=500)||(!!(t&&"timeout"in t&&"ECONNABORTED"==t.code)||!!(t&&"crossDomain"in t)))}},function(t,e){e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce(function(t,e){var n=e.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(t[r]=i),t},{})},e.parseLinks=function(t){return t.split(/ *, */).reduce(function(t,e){var n=e.split(/ *; */),r=n[0].slice(1,-1);return t[n[1].split(/ *= */)[1].slice(1,-1)]=r,t},{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&delete t.cookie,t}},function(t,e){}])}); +//# sourceMappingURL=av-min.js.map \ No newline at end of file diff --git a/plugin/click_heart.js b/plugin/click_heart.js new file mode 100644 index 0000000..e38e169 --- /dev/null +++ b/plugin/click_heart.js @@ -0,0 +1 @@ +!function(e,t,a){function r(e){var a=t.createElement("div");a.className="heart",n.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}),t.body.appendChild(a)}var n=[];e.requestAnimationFrame=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},function(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),function(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),r(e)}}(),function e(){for(var a=0;a nav { + display: none; +} +div#app { + font-size: 30px; + font-weight: lighter; + margin: 40vh auto; + text-align: center; +} +div#app:empty::before { + content: 'Loading...'; +} +.emoji { + height: 1.2rem; + vertical-align: middle; +} +.progress { + background-color: var(--theme-color, #42b983); + height: 2px; + left: 0px; + position: fixed; + right: 0px; + top: 0px; + transition: width 0.2s, opacity 0.4s; + width: 0%; + z-index: 999999; +} +.search a:hover { + color: var(--theme-color, #42b983); +} +.search .search-keyword { + color: var(--theme-color, #42b983); + font-style: normal; + font-weight: bold; +} +html, +body { + height: 100%; +} +body { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + color: #34495e; + font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 15px; + letter-spacing: 0; + margin: 0; + overflow-x: hidden; +} +img { + max-width: 100%; +} +a[disabled] { + cursor: not-allowed; + opacity: 0.6; +} +kbd { + border: solid 1px #ccc; + border-radius: 3px; + display: inline-block; + font-size: 12px !important; + line-height: 12px; + margin-bottom: 3px; + padding: 3px 5px; + vertical-align: middle; +} +li input[type='checkbox'] { + margin: 0 0.2em 0.25em 0; + vertical-align: middle; +} +.app-nav { + margin: 25px 60px 0 0; + position: absolute; + right: 0; + text-align: right; + z-index: 10; +/* navbar dropdown */ +} +.app-nav.no-badge { + margin-right: 25px; +} +.app-nav p { + margin: 0; +} +.app-nav > a { + margin: 0 1rem; + padding: 5px 0; +} +.app-nav ul, +.app-nav li { + display: inline-block; + list-style: none; + margin: 0; +} +.app-nav a { + color: inherit; + font-size: 16px; + text-decoration: none; + transition: color 0.3s; +} +.app-nav a:hover { + color: var(--theme-color, #42b983); +} +.app-nav a.active { + border-bottom: 2px solid var(--theme-color, #42b983); + color: var(--theme-color, #42b983); +} +.app-nav li { + display: inline-block; + margin: 0 1rem; + padding: 5px 0; + position: relative; + cursor: pointer; +} +.app-nav li ul { + background-color: #fff; + border: 1px solid #ddd; + border-bottom-color: #ccc; + border-radius: 4px; + box-sizing: border-box; + display: none; + max-height: calc(100vh - 61px); + overflow-y: auto; + padding: 10px 0; + position: absolute; + right: -15px; + text-align: left; + top: 100%; + white-space: nowrap; +} +.app-nav li ul li { + display: block; + font-size: 14px; + line-height: 1rem; + margin: 0; + margin: 8px 14px; + white-space: nowrap; +} +.app-nav li ul a { + display: block; + font-size: inherit; + margin: 0; + padding: 0; +} +.app-nav li ul a.active { + border-bottom: 0; +} +.app-nav li:hover ul { + display: block; +} +.github-corner { + border-bottom: 0; + position: fixed; + right: 0; + text-decoration: none; + top: 0; + z-index: 1; +} +.github-corner:hover .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; +} +.github-corner svg { + color: #fff; + fill: var(--theme-color, #42b983); + height: 80px; + width: 80px; +} +main { + display: block; + position: relative; + width: 100vw; + height: 100%; + z-index: 0; +} +main.hidden { + display: none; +} +.anchor { + display: inline-block; + text-decoration: none; + transition: all 0.3s; +} +.anchor span { + color: #34495e; +} +.anchor:hover { + text-decoration: underline; +} +.sidebar { + border-right: 1px solid rgba(0,0,0,0.07); + overflow-y: auto; + padding: 40px 0 0; + position: absolute; + top: 0; + bottom: 0; + left: 0; + transition: transform 250ms ease-out; + width: 300px; + z-index: 20; +} +.sidebar > h1 { + margin: 0 auto 1rem; + font-size: 1.5rem; + font-weight: 300; + text-align: center; +} +.sidebar > h1 a { + color: inherit; + text-decoration: none; +} +.sidebar > h1 .app-nav { + display: block; + position: static; +} +.sidebar .sidebar-nav { + line-height: 2em; + padding-bottom: 40px; +} +.sidebar li.collapse .app-sub-sidebar { + display: none; +} +.sidebar ul { + margin: 0 0 0 15px; + padding: 0; +} +.sidebar li > p { + font-weight: 700; + margin: 0; +} +.sidebar ul, +.sidebar ul li { + list-style: none; +} +.sidebar ul li a { + border-bottom: none; + display: block; +} +.sidebar ul li ul { + padding-left: 20px; +} +.sidebar::-webkit-scrollbar { + width: 4px; +} +.sidebar::-webkit-scrollbar-thumb { + background: transparent; + border-radius: 4px; +} +.sidebar:hover::-webkit-scrollbar-thumb { + background: rgba(136,136,136,0.4); +} +.sidebar:hover::-webkit-scrollbar-track { + background: rgba(136,136,136,0.1); +} +.sidebar-toggle { + background-color: transparent; + background-color: rgba(255,255,255,0.8); + border: 0; + outline: none; + padding: 10px; + position: absolute; + bottom: 0; + left: 0; + text-align: center; + transition: opacity 0.3s; + width: 284px; + z-index: 30; + cursor: pointer; +} +.sidebar-toggle:hover .sidebar-toggle-button { + opacity: 0.4; +} +.sidebar-toggle span { + background-color: var(--theme-color, #42b983); + display: block; + margin-bottom: 4px; + width: 16px; + height: 2px; +} +body.sticky .sidebar, +body.sticky .sidebar-toggle { + position: fixed; +} +.content { + padding-top: 60px; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 300px; + transition: left 250ms ease; +} +.markdown-section { + margin: 0 auto; + max-width: 80%; + padding: 30px 15px 40px 15px; + position: relative; +} +.markdown-section > * { + box-sizing: border-box; + font-size: inherit; +} +.markdown-section > :first-child { + margin-top: 0 !important; +} +.markdown-section hr { + border: none; + border-bottom: 1px solid #eee; + margin: 2em 0; +} +.markdown-section iframe { + border: 1px solid #eee; +/* fix horizontal overflow on iOS Safari */ + width: 1px; + min-width: 100%; +} +.markdown-section table { + border-collapse: collapse; + border-spacing: 0; + display: block; + margin-bottom: 1rem; + overflow: auto; + width: 100%; +} +.markdown-section th { + border: 1px solid #ddd; + font-weight: bold; + padding: 6px 13px; +} +.markdown-section td { + border: 1px solid #ddd; + padding: 6px 13px; +} +.markdown-section tr { + border-top: 1px solid #ccc; +} +.markdown-section tr:nth-child(2n) { + background-color: #f8f8f8; +} +.markdown-section p.tip { + background-color: #f8f8f8; + border-bottom-right-radius: 2px; + border-left: 4px solid #f66; + border-top-right-radius: 2px; + margin: 2em 0; + padding: 12px 24px 12px 30px; + position: relative; +} +.markdown-section p.tip:before { + background-color: #f66; + border-radius: 100%; + color: #fff; + content: '!'; + font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; + font-size: 14px; + font-weight: bold; + left: -12px; + line-height: 20px; + position: absolute; + height: 20px; + width: 20px; + text-align: center; + top: 14px; +} +.markdown-section p.tip code { + background-color: #efefef; +} +.markdown-section p.tip em { + color: #34495e; +} +.markdown-section p.warn { + background: rgba(66,185,131,0.1); + border-radius: 2px; + padding: 1rem; +} +.markdown-section ul.task-list > li { + list-style-type: none; +} +body.close .sidebar { + transform: translateX(-300px); +} +body.close .sidebar-toggle { + width: auto; +} +body.close .content { + left: 0; +} +@media print { + .github-corner, + .sidebar-toggle, + .sidebar, + .app-nav { + display: none; + } +} +@media screen and (max-width: 768px) { + .github-corner, + .sidebar-toggle, + .sidebar { + position: fixed; + } + .app-nav { + margin-top: 16px; + } + .app-nav li ul { + top: 30px; + } + main { + height: auto; + overflow-x: hidden; + } + .sidebar { + left: -300px; + transition: transform 250ms ease-out; + } + .content { + left: 0; + max-width: 100vw; + position: static; + padding-top: 20px; + transition: transform 250ms ease; + } + .app-nav, + .github-corner { + transition: transform 250ms ease-out; + } + .sidebar-toggle { + background-color: transparent; + width: auto; + padding: 30px 30px 10px 10px; + } + body.close .sidebar { + transform: translateX(300px); + } + body.close .sidebar-toggle { + background-color: rgba(255,255,255,0.8); + transition: 1s background-color; + width: 284px; + padding: 10px; + } + body.close .content { + transform: translateX(300px); + } + body.close .app-nav, + body.close .github-corner { + display: none; + } + .github-corner:hover .octo-arm { + -webkit-animation: none; + animation: none; + } + .github-corner .octo-arm { + -webkit-animation: octocat-wave 560ms ease-in-out; + animation: octocat-wave 560ms ease-in-out; + } +} +@-webkit-keyframes octocat-wave { + 0%, 100% { + transform: rotate(0); + } + 20%, 60% { + transform: rotate(-25deg); + } + 40%, 80% { + transform: rotate(10deg); + } +} +@keyframes octocat-wave { + 0%, 100% { + transform: rotate(0); + } + 20%, 60% { + transform: rotate(-25deg); + } + 40%, 80% { + transform: rotate(10deg); + } +} +section.cover { + align-items: center; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + height: 100vh; + width: 100vw; + display: none; +} +section.cover.show { + display: flex; +} +section.cover.has-mask .mask { + background-color: #fff; + opacity: 0.8; + position: absolute; + top: 0; + height: 100%; + width: 100%; +} +section.cover .cover-main { + flex: 1; + margin: -20px 16px 0; + text-align: center; +} +section.cover a { + color: inherit; + text-decoration: none; +} +section.cover a:hover { + text-decoration: none; +} +section.cover p { + line-height: 1.5rem; + margin: 1em 0; +} +section.cover h1 { + color: inherit; + font-size: 2.5rem; + font-weight: 300; + margin: 0.625rem 0 2.5rem; + position: relative; + text-align: center; +} +section.cover h1 a { + display: block; +} +section.cover h1 small { + bottom: -0.4375rem; + font-size: 1rem; + position: absolute; +} +section.cover blockquote { + font-size: 1.5rem; + text-align: center; +} +section.cover ul { + line-height: 1.8; + list-style-type: none; + margin: 1em auto; + max-width: 500px; + padding: 0; +} +section.cover .cover-main > p:last-child a { + border-color: var(--theme-color, #42b983); + border-radius: 2rem; + border-style: solid; + border-width: 1px; + box-sizing: border-box; + color: var(--theme-color, #42b983); + display: inline-block; + font-size: 1.05rem; + letter-spacing: 0.1rem; + margin: 0.5rem 1rem; + padding: 0.75em 2rem; + text-decoration: none; + transition: all 0.15s ease; +} +section.cover .cover-main > p:last-child a:last-child { + background-color: var(--theme-color, #42b983); + color: #fff; +} +section.cover .cover-main > p:last-child a:last-child:hover { + color: inherit; + opacity: 0.8; +} +section.cover .cover-main > p:last-child a:hover { + color: inherit; +} +section.cover blockquote > p > a { + border-bottom: 2px solid var(--theme-color, #42b983); + transition: color 0.3s; +} +section.cover blockquote > p > a:hover { + color: var(--theme-color, #42b983); +} +body { + background-color: #fff; +} +/* sidebar */ +.sidebar { + background-color: #fff; + color: #364149; +} +.sidebar li { + margin: 6px 0 6px 0; +} +.sidebar ul li a { + color: #505d6b; + font-size: 14px; + font-weight: normal; + overflow: hidden; + text-decoration: none; + text-overflow: ellipsis; + white-space: nowrap; +} +.sidebar ul li a:hover { + text-decoration: underline; +} +.sidebar ul li ul { + padding: 0; +} +.sidebar ul li.active > a { + border-right: 2px solid; + color: var(--theme-color, #42b983); + font-weight: 600; +} +.app-sub-sidebar li::before { + content: '-'; + padding-right: 4px; + float: left; +} +/* markdown content found on pages */ +.markdown-section h1, +.markdown-section h2, +.markdown-section h3, +.markdown-section h4, +.markdown-section strong { + color: #2c3e50; + font-weight: 600; +} +.markdown-section a { + color: var(--theme-color, #42b983); + font-weight: 600; +} +.markdown-section h1 { + font-size: 2rem; + margin: 0 0 1rem; +} +.markdown-section h2 { + font-size: 1.75rem; + margin: 45px 0 0.8rem; +} +.markdown-section h3 { + font-size: 1.5rem; + margin: 40px 0 0.6rem; +} +.markdown-section h4 { + font-size: 1.25rem; +} +.markdown-section h5 { + font-size: 1rem; +} +.markdown-section h6 { + color: #777; + font-size: 1rem; +} +.markdown-section figure, +.markdown-section p { + margin: 1.2em 0; +} +.markdown-section p, +.markdown-section ul, +.markdown-section ol { + line-height: 1.6rem; + word-spacing: 0.05rem; +} +.markdown-section ul, +.markdown-section ol { + padding-left: 1.5rem; +} +.markdown-section blockquote { + border-left: 4px solid var(--theme-color, #42b983); + color: #858585; + margin: 2em 0; + padding-left: 20px; +} +.markdown-section blockquote p { + font-weight: 600; + margin-left: 0; +} +.markdown-section iframe { + margin: 1em 0; +} +.markdown-section em { + color: #7f8c8d; +} +.markdown-section code { + background-color: #f8f8f8; + border-radius: 2px; + color: #e96900; + font-family: 'Roboto Mono', Monaco, courier, monospace; + font-size: 0.8rem; + margin: 0 2px; + padding: 3px 5px; + white-space: pre-wrap; +} +.markdown-section pre { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + background-color: #f8f8f8; + font-family: 'Roboto Mono', Monaco, courier, monospace; + line-height: 1.5rem; + margin: 1.2em 0; + overflow: auto; + padding: 0 1.4rem; + position: relative; + word-wrap: normal; +} +/* code highlight */ +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #8e908c; +} +.token.namespace { + opacity: 0.7; +} +.token.boolean, +.token.number { + color: #c76b29; +} +.token.punctuation { + color: #525252; +} +.token.property { + color: #c08b30; +} +.token.tag { + color: #2973b7; +} +.token.string { + color: var(--theme-color, #42b983); +} +.token.selector { + color: #6679cc; +} +.token.attr-name { + color: #2973b7; +} +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #22a2c9; +} +.token.attr-value, +.token.control, +.token.directive, +.token.unit { + color: var(--theme-color, #42b983); +} +.token.keyword, +.token.function { + color: #e96900; +} +.token.statement, +.token.regex, +.token.atrule { + color: #22a2c9; +} +.token.placeholder, +.token.variable { + color: #3d8fd1; +} +.token.deleted { + text-decoration: line-through; +} +.token.inserted { + border-bottom: 1px dotted #202746; + text-decoration: none; +} +.token.italic { + font-style: italic; +} +.token.important, +.token.bold { + font-weight: bold; +} +.token.important { + color: #c94922; +} +.token.entity { + cursor: help; +} +.markdown-section pre > code { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + background-color: #f8f8f8; + border-radius: 2px; + color: #525252; + display: block; + font-family: 'Roboto Mono', Monaco, courier, monospace; + font-size: 0.8rem; + line-height: inherit; + margin: 0 2px; + max-width: inherit; + overflow: inherit; + padding: 2.2em 5px; + white-space: inherit; +} +.markdown-section code::after, +.markdown-section code::before { + letter-spacing: 0.05rem; +} +code .token { + -moz-osx-font-smoothing: initial; + -webkit-font-smoothing: initial; + min-height: 1.5rem; + position: relative; + left: auto; +} +pre::after { + color: #ccc; + content: attr(data-lang); + font-size: 0.6rem; + font-weight: 600; + height: 15px; + line-height: 15px; + padding: 5px 10px 0; + position: absolute; + right: 0; + text-align: right; + top: 0; +} diff --git a/plugin/custom.css b/plugin/custom.css new file mode 100644 index 0000000..9e9bce0 --- /dev/null +++ b/plugin/custom.css @@ -0,0 +1,15 @@ +section.cover.has-mask .mask { + background-image: linear-gradient(hsla(0, 0%, 100%, 0.25),hsla(0, 0%, 100%, 0.75)); + background-color: transparent; + opacity: 1; +} + +section.cover h1 .anchor span{ + font-family: 'Lobster', cursive; + color: var(--theme-color); +} + +section.cover .cover-main>p:last-child a .iconfont { + font-size: 1em; +} + diff --git a/plugin/disqus.min.js b/plugin/disqus.min.js new file mode 100644 index 0000000..d28857f --- /dev/null +++ b/plugin/disqus.min.js @@ -0,0 +1 @@ +!function(){var i=location.href.replace("/-/","/#/");i!==location.href&&(location.href=i),$docsify.plugins=[].concat(function(i,o){var n=Docsify.dom,e=o.config.disqus;if(!e)throw Error("$docsify.disqus is required");i.init(function(i){var t=n.create("script");t.async=!0,t.src="https://"+e+".disqus.com/embed.js",t.setAttribute("data-timestamp",Number(new Date)),n.appendTo(n.body,t)}),i.mounted(function(i){var t=n.create("div");t.id="disqus_thread";var e=n.getNode("#main");t.style="width: "+e.clientWidth+"px; margin: 0 auto 20px;",n.appendTo(n.find(".content"),t),window.disqus_config=function(){this.page.url=location.origin+"/-"+o.route.path,this.page.identifier=o.route.path,this.page.title=document.title}}),i.doneEach(function(i){void 0!==window.DISQUS&&window.DISQUS.reset({reload:!0,config:function(){this.page.url=location.origin+"/-"+o.route.path,this.page.identifier=o.route.path,this.page.title=document.title}})})},$docsify.plugins)}(); diff --git a/plugin/docsify-copy-code.min.js b/plugin/docsify-copy-code.min.js new file mode 100644 index 0000000..bd0e2a1 --- /dev/null +++ b/plugin/docsify-copy-code.min.js @@ -0,0 +1,9 @@ +/*! + * docsify-copy-code + * v2.1.0 + * https://github.com/jperasmus/docsify-copy-code + * (c) 2017-2019 JP Erasmus + * MIT license + */ +!function(){"use strict";function r(o){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:0;right:0;overflow:visible;padding:.65em .8em;border:0;border-radius:.3em;outline:0;font-size:1em;background:grey;background:var(--theme-color,grey);color:#fff;opacity:0}.docsify-copy-code-button span{border-radius:3px;background:inherit;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;left:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error,.docsify-copy-code-button.success .success{opacity:1;-webkit-transform:translate(-115%,-50%);transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,s){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"复制请点击",errorText:"Error",successText:"复制成功"};s.config.copyCode&&Object.keys(c).forEach(function(t){var n=s.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===r(n)&&Object.keys(n).some(function(o){var e=-1',''.concat(c.buttonText,""),''.concat(c.errorText,""),''.concat(c.successText,""),""].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1e3))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1e3)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}(); +//# sourceMappingURL=docsify-copy-code.min.js.map \ No newline at end of file diff --git a/plugin/docsify-footer-enh.min.js b/plugin/docsify-footer-enh.min.js new file mode 100644 index 0000000..58497a1 --- /dev/null +++ b/plugin/docsify-footer-enh.min.js @@ -0,0 +1 @@ +!function(o){var e={};function t(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return o[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=o,t.c=e,t.d=function(o,e,n){t.o(o,e)||Object.defineProperty(o,e,{enumerable:!0,get:n})},t.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,e){if(1&e&&(o=t(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var r in o)t.d(n,r,function(e){return o[e]}.bind(null,r));return n},t.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(e,"a",e),e},t.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},t.p="",t(t.s=0)}([function(o,e,t){"use strict";t.r(e),window.$docsify=window.$docsify||{},window.$docsify.plugins=(window.$docsify.plugins||[]).concat((function(o,e){e.config.footer;let t=e.config.footer&&e.config.footer.copy?e.config.footer.copy:"© 2019.",n=e.config.footer&&e.config.footer.auth?e.config.footer.auth:'Published with docsify.',r=e.config.footer&&e.config.footer.style?`style="${e.config.footer.style}"`:"",f=e.config.footer&&e.config.footer.class?`class="${e.config.footer.class}"`:"";var i=`${e.config.footer&&e.config.footer.pre?`${e.config.footer.pre}`:""}
    ${t} ${n}
    `;o.afterEach((function(o){return o+i}))}))}]); \ No newline at end of file diff --git a/plugin/docsify-katex.js b/plugin/docsify-katex.js new file mode 100644 index 0000000..a9bb7a6 --- /dev/null +++ b/plugin/docsify-katex.js @@ -0,0 +1 @@ +!function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){var n;"undefined"!=typeof self&&self,n=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){},function(t,e,r){"use strict";r.r(e);r(0);var n=function(){function t(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}return t.range=function(e,r){return r?e&&e.loc&&r.loc&&e.loc.lexer===r.loc.lexer?new t(e.loc.lexer,e.loc.start,r.loc.end):null:e&&e.loc},t}(),a=function(){function t(t,e){this.text=void 0,this.loc=void 0,this.text=t,this.loc=e}return t.prototype.range=function(e,r){return new t(r,n.range(this,e))},t}(),i=function t(e,r){this.position=void 0;var n,a="KaTeX parse error: "+e,i=r&&r.loc;if(i&&i.start<=i.end){var o=i.lexer.input;n=i.start;var s=i.end;n===o.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var h=o.slice(n,s).replace(/[^]/g,"$&̲");a+=(n>15?"…"+o.slice(n-15,n):o.slice(0,n))+h+(s+15":">","<":"<",'"':""","'":"'"},l=/[&><"']/g;var m=function t(e){return"ordgroup"===e.type?1===e.body.length?t(e.body[0]):e:"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},c={contains:function(t,e){return-1!==t.indexOf(e)},deflt:function(t,e){return void 0===t?e:t},escape:function(t){return String(t).replace(l,function(t){return h[t]})},hyphenate:function(t){return t.replace(s,"-$1").toLowerCase()},getBaseElem:m,isCharacterBox:function(t){var e=m(t);return"mathord"===e.type||"textord"===e.type||"atom"===e.type}},u=function(){function t(t){this.displayMode=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.allowedProtocols=void 0,t=t||{},this.displayMode=c.deflt(t.displayMode,!1),this.leqno=c.deflt(t.leqno,!1),this.fleqn=c.deflt(t.fleqn,!1),this.throwOnError=c.deflt(t.throwOnError,!0),this.errorColor=c.deflt(t.errorColor,"#cc0000"),this.macros=t.macros||{},this.colorIsTextColor=c.deflt(t.colorIsTextColor,!1),this.strict=c.deflt(t.strict,"warn"),this.maxSize=Math.max(0,c.deflt(t.maxSize,1/0)),this.maxExpand=Math.max(0,c.deflt(t.maxExpand,1e3)),this.allowedProtocols=c.deflt(t.allowedProtocols,["http","https","mailto","_relative"])}var e=t.prototype;return e.reportNonstrict=function(t,e,r){var n=this.strict;if("function"==typeof n&&(n=n(t,e,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new o("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]")}},e.useStrictBehavior=function(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch(t){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),!1)))},t}(),d=function(){function t(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}var e=t.prototype;return e.sup=function(){return p[f[this.id]]},e.sub=function(){return p[g[this.id]]},e.fracNum=function(){return p[x[this.id]]},e.fracDen=function(){return p[v[this.id]]},e.cramp=function(){return p[y[this.id]]},e.text=function(){return p[b[this.id]]},e.isTight=function(){return this.size>=2},t}(),p=[new d(0,0,!1),new d(1,0,!0),new d(2,1,!1),new d(3,1,!0),new d(4,2,!1),new d(5,2,!0),new d(6,3,!1),new d(7,3,!0)],f=[4,5,4,5,6,7,6,7],g=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],y=[1,1,3,3,5,5,7,7],b=[0,1,2,3,2,3,2,3],w={DISPLAY:p[0],TEXT:p[2],SCRIPT:p[4],SCRIPTSCRIPT:p[6]},k=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var S=[];function M(t){for(var e=0;e=S[e]&&t<=S[e+1])return!0;return!1}k.forEach(function(t){return t.blocks.forEach(function(t){return S.push.apply(S,t)})});var z={path:{sqrtMain:"M95,702c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,\n-10,-9.5,-14c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54c44.2,-33.3,65.8,\n-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10s173,378,173,378c0.7,0,\n35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429c69,-144,104.5,-217.7,106.5,\n-221c5.3,-9.3,12,-14,20,-14H400000v40H845.2724s-225.272,467,-225.272,467\ns-235,486,-235,486c-2.7,4.7,-9,7,-19,7c-6,0,-10,-1,-12,-3s-194,-422,-194,-422\ns-65,47,-65,47z M834 80H400000v40H845z",sqrtSize1:"M263,681c0.7,0,18,39.7,52,119c34,79.3,68.167,\n158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120c340,-704.7,510.7,-1060.3,512,-1067\nc4.7,-7.3,11,-11,19,-11H40000v40H1012.3s-271.3,567,-271.3,567c-38.7,80.7,-84,\n175,-136,283c-52,108,-89.167,185.3,-111.5,232c-22.3,46.7,-33.8,70.3,-34.5,71\nc-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1s-109,-253,-109,-253c-72.7,-168,-109.3,\n-252,-110,-252c-10.7,8,-22,16.7,-34,26c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26\ns76,-59,76,-59s76,-60,76,-60z M1001 80H40000v40H1012z",sqrtSize2:"M1001,80H400000v40H1013.1s-83.4,268,-264.1,840c-180.7,\n572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,\n-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744c-10,12,-21,25,-33,39s-32,39,-32,39\nc-6,-5.3,-15,-14,-27,-26s25,-30,25,-30c26.7,-32.7,52,-63,76,-91s52,-60,52,-60\ns208,722,208,722c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,\n-658.5c53.7,-170.3,84.5,-266.8,92.5,-289.5c4,-6.7,10,-10,18,-10z\nM1001 80H400000v40H1013z",sqrtSize3:"M424,2478c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,\n-342,-109.8,-513.3,-110.5,-514c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,\n25c-5.7,9.3,-9.8,16,-12.5,20s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,\n-13s76,-122,76,-122s77,-121,77,-121s209,968,209,968c0,-2,84.7,-361.7,254,-1079\nc169.3,-717.3,254.7,-1077.7,256,-1081c4,-6.7,10,-10,18,-10H400000v40H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M1001 80H400000v40H1014z",sqrtSize4:"M473,2793c339.3,-1799.3,509.3,-2700,510,-2702\nc3.3,-7.3,9.3,-11,18,-11H400000v40H1017.7s-90.5,478,-276.2,1466c-185.7,988,\n-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,\n-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200c0,-1.3,-5.3,8.7,-16,30c-10.7,\n21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26s76,-153,76,-153s77,-151,\n77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,606z\nM1001 80H400000v40H1017z",doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"}},T=function(){function t(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var e=t.prototype;return e.hasClass=function(t){return c.contains(this.classes,t)},e.toNode=function(){for(var t=document.createDocumentFragment(),e=0;e"},q=function(){function t(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,B.call(this,t,r,n),this.children=e||[]}var e=t.prototype;return e.setAttribute=function(t,e){this.attributes[t]=e},e.hasClass=function(t){return c.contains(this.classes,t)},e.toNode=function(){return C.call(this,"span")},e.toMarkup=function(){return N.call(this,"span")},t}(),O=function(){function t(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,B.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}var e=t.prototype;return e.setAttribute=function(t,e){this.attributes[t]=e},e.hasClass=function(t){return c.contains(this.classes,t)},e.toNode=function(){return C.call(this,"a")},e.toMarkup=function(){return N.call(this,"a")},t}(),E={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},I=function(){function t(t,e,r,n,a,i,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=e||0,this.depth=r||0,this.italic=n||0,this.skew=a||0,this.width=i||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var h=function(t){for(var e=0;e=a[0]&&t<=a[1])return r.name}return null}(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=E[this.text])}var e=t.prototype;return e.hasClass=function(t){return c.contains(this.classes,t)},e.toNode=function(){var t=document.createTextNode(this.text),e=null;for(var r in this.italic>0&&((e=document.createElement("span")).style.marginRight=this.italic+"em"),this.classes.length>0&&((e=e||document.createElement("span")).className=A(this.classes)),this.style)this.style.hasOwnProperty(r)&&((e=e||document.createElement("span")).style[r]=this.style[r]);return e?(e.appendChild(t),e):t},e.toMarkup=function(){var t=!1,e="0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=c.hyphenate(n)+":"+this.style[n]+";");r&&(t=!0,e+=' style="'+c.escape(r)+'"');var a=c.escape(this.text);return t?(e+=">",e+=a,e+=""):a},t}(),R=function(){function t(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}var e=t.prototype;return e.toNode=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r":""},t}(),P=function(){function t(t){this.attributes=void 0,this.attributes=t||{}}var e=t.prototype;return e.toNode=function(){var t=document.createElementNS("http://www.w3.org/2000/svg","line");for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t},e.toMarkup=function(){var t="",">"),$("math",W,Q,":",":"),$("math",W,Q,"≈","\\approx",!0),$("math",W,Q,"≅","\\cong",!0),$("math",W,Q,"≥","\\ge"),$("math",W,Q,"≥","\\geq",!0),$("math",W,Q,"←","\\gets"),$("math",W,Q,">","\\gt"),$("math",W,Q,"∈","\\in",!0),$("math",W,Q,"","\\@not"),$("math",W,Q,"⊂","\\subset",!0),$("math",W,Q,"⊃","\\supset",!0),$("math",W,Q,"⊆","\\subseteq",!0),$("math",W,Q,"⊇","\\supseteq",!0),$("math",j,Q,"⊈","\\nsubseteq",!0),$("math",j,Q,"⊉","\\nsupseteq",!0),$("math",W,Q,"⊨","\\models"),$("math",W,Q,"←","\\leftarrow",!0),$("math",W,Q,"≤","\\le"),$("math",W,Q,"≤","\\leq",!0),$("math",W,Q,"<","\\lt"),$("math",W,Q,"→","\\rightarrow",!0),$("math",W,Q,"→","\\to"),$("math",j,Q,"≱","\\ngeq",!0),$("math",j,Q,"≰","\\nleq",!0),$("math",W,tt," ","\\ "),$("math",W,tt," ","~"),$("math",W,tt," ","\\space"),$("math",W,tt," ","\\nobreakspace"),$("text",W,tt," ","\\ "),$("text",W,tt," ","~"),$("text",W,tt," ","\\space"),$("text",W,tt," ","\\nobreakspace"),$("math",W,tt,null,"\\nobreak"),$("math",W,tt,null,"\\allowbreak"),$("math",W,"punct",",",","),$("math",W,"punct",";",";"),$("math",j,Z,"⊼","\\barwedge",!0),$("math",j,Z,"⊻","\\veebar",!0),$("math",W,Z,"⊙","\\odot",!0),$("math",W,Z,"⊕","\\oplus",!0),$("math",W,Z,"⊗","\\otimes",!0),$("math",W,"textord","∂","\\partial",!0),$("math",W,Z,"⊘","\\oslash",!0),$("math",j,Z,"⊚","\\circledcirc",!0),$("math",j,Z,"⊡","\\boxdot",!0),$("math",W,Z,"△","\\bigtriangleup"),$("math",W,Z,"▽","\\bigtriangledown"),$("math",W,Z,"†","\\dagger"),$("math",W,Z,"⋄","\\diamond"),$("math",W,Z,"⋆","\\star"),$("math",W,Z,"◃","\\triangleleft"),$("math",W,Z,"▹","\\triangleright"),$("math",W,"open","{","\\{"),$("text",W,"textord","{","\\{"),$("text",W,"textord","{","\\textbraceleft"),$("math",W,"close","}","\\}"),$("text",W,"textord","}","\\}"),$("text",W,"textord","}","\\textbraceright"),$("math",W,"open","{","\\lbrace"),$("math",W,"close","}","\\rbrace"),$("math",W,"open","[","\\lbrack"),$("text",W,"textord","[","\\lbrack"),$("math",W,"close","]","\\rbrack"),$("text",W,"textord","]","\\rbrack"),$("math",W,"open","(","\\lparen"),$("math",W,"close",")","\\rparen"),$("text",W,"textord","<","\\textless"),$("text",W,"textord",">","\\textgreater"),$("math",W,"open","⌊","\\lfloor",!0),$("math",W,"close","⌋","\\rfloor",!0),$("math",W,"open","⌈","\\lceil",!0),$("math",W,"close","⌉","\\rceil",!0),$("math",W,"textord","\\","\\backslash"),$("math",W,"textord","∣","|"),$("math",W,"textord","∣","\\vert"),$("text",W,"textord","|","\\textbar"),$("math",W,"textord","∥","\\|"),$("math",W,"textord","∥","\\Vert"),$("text",W,"textord","∥","\\textbardbl"),$("text",W,"textord","~","\\textasciitilde"),$("text",W,"textord","\\","\\textbackslash"),$("text",W,"textord","^","\\textasciicircum"),$("math",W,Q,"↑","\\uparrow",!0),$("math",W,Q,"⇑","\\Uparrow",!0),$("math",W,Q,"↓","\\downarrow",!0),$("math",W,Q,"⇓","\\Downarrow",!0),$("math",W,Q,"↕","\\updownarrow",!0),$("math",W,Q,"⇕","\\Updownarrow",!0),$("math",W,J,"∐","\\coprod"),$("math",W,J,"⋁","\\bigvee"),$("math",W,J,"⋀","\\bigwedge"),$("math",W,J,"⨄","\\biguplus"),$("math",W,J,"⋂","\\bigcap"),$("math",W,J,"⋃","\\bigcup"),$("math",W,J,"∫","\\int"),$("math",W,J,"∫","\\intop"),$("math",W,J,"∬","\\iint"),$("math",W,J,"∭","\\iiint"),$("math",W,J,"∏","\\prod"),$("math",W,J,"∑","\\sum"),$("math",W,J,"⨂","\\bigotimes"),$("math",W,J,"⨁","\\bigoplus"),$("math",W,J,"⨀","\\bigodot"),$("math",W,J,"∮","\\oint"),$("math",W,J,"∯","\\oiint"),$("math",W,J,"∰","\\oiiint"),$("math",W,J,"⨆","\\bigsqcup"),$("math",W,J,"∫","\\smallint"),$("text",W,"inner","…","\\textellipsis"),$("math",W,"inner","…","\\mathellipsis"),$("text",W,"inner","…","\\ldots",!0),$("math",W,"inner","…","\\ldots",!0),$("math",W,"inner","⋯","\\@cdots",!0),$("math",W,"inner","⋱","\\ddots",!0),$("math",W,"textord","⋮","\\varvdots"),$("math",W,"accent-token","ˊ","\\acute"),$("math",W,"accent-token","ˋ","\\grave"),$("math",W,"accent-token","¨","\\ddot"),$("math",W,"accent-token","~","\\tilde"),$("math",W,"accent-token","ˉ","\\bar"),$("math",W,"accent-token","˘","\\breve"),$("math",W,"accent-token","ˇ","\\check"),$("math",W,"accent-token","^","\\hat"),$("math",W,"accent-token","⃗","\\vec"),$("math",W,"accent-token","˙","\\dot"),$("math",W,"accent-token","˚","\\mathring"),$("math",W,K,"ı","\\imath",!0),$("math",W,K,"ȷ","\\jmath",!0),$("text",W,"textord","ı","\\i",!0),$("text",W,"textord","ȷ","\\j",!0),$("text",W,"textord","ß","\\ss",!0),$("text",W,"textord","æ","\\ae",!0),$("text",W,"textord","æ","\\ae",!0),$("text",W,"textord","œ","\\oe",!0),$("text",W,"textord","ø","\\o",!0),$("text",W,"textord","Æ","\\AE",!0),$("text",W,"textord","Œ","\\OE",!0),$("text",W,"textord","Ø","\\O",!0),$("text",W,"accent-token","ˊ","\\'"),$("text",W,"accent-token","ˋ","\\`"),$("text",W,"accent-token","ˆ","\\^"),$("text",W,"accent-token","˜","\\~"),$("text",W,"accent-token","ˉ","\\="),$("text",W,"accent-token","˘","\\u"),$("text",W,"accent-token","˙","\\."),$("text",W,"accent-token","˚","\\r"),$("text",W,"accent-token","ˇ","\\v"),$("text",W,"accent-token","¨",'\\"'),$("text",W,"accent-token","˝","\\H"),$("text",W,"accent-token","◯","\\textcircled");var et={"--":!0,"---":!0,"``":!0,"''":!0};$("text",W,"textord","–","--"),$("text",W,"textord","–","\\textendash"),$("text",W,"textord","—","---"),$("text",W,"textord","—","\\textemdash"),$("text",W,"textord","‘","`"),$("text",W,"textord","‘","\\textquoteleft"),$("text",W,"textord","’","'"),$("text",W,"textord","’","\\textquoteright"),$("text",W,"textord","“","``"),$("text",W,"textord","“","\\textquotedblleft"),$("text",W,"textord","”","''"),$("text",W,"textord","”","\\textquotedblright"),$("math",W,"textord","°","\\degree",!0),$("text",W,"textord","°","\\degree"),$("text",W,"textord","°","\\textdegree",!0),$("math",W,K,"£","\\pounds"),$("math",W,K,"£","\\mathsterling",!0),$("text",W,K,"£","\\pounds"),$("text",W,K,"£","\\textsterling",!0),$("math",j,"textord","✠","\\maltese"),$("text",j,"textord","✠","\\maltese"),$("text",W,tt," ","\\ "),$("text",W,tt," "," "),$("text",W,tt," ","~");for(var rt=0;rt<'0123456789/@."'.length;rt++){var nt='0123456789/@."'.charAt(rt);$("math",W,"textord",nt,nt)}for(var at=0;at<'0123456789!@*()-=+[]<>|";:?/.,'.length;at++){var it='0123456789!@*()-=+[]<>|";:?/.,'.charAt(at);$("text",W,"textord",it,it)}for(var ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",st=0;st=5?0:t>=3?1:2]){var r=U[e]={cssEmPerMu:H.quad[e]/18};for(var n in H)H.hasOwnProperty(n)&&(r[n]=H[n][e])}return U[e]}(this.size)),this._fontMetrics},e.getColor=function(){return this.phantom?"transparent":null!=this.color&&t.colorMap.hasOwnProperty(this.color)?t.colorMap[this.color]:this.color},t}();wt.BASESIZE=6,wt.colorMap={"katex-blue":"#6495ed","katex-orange":"#ffa500","katex-pink":"#ff00af","katex-red":"#df0030","katex-green":"#28ae7b","katex-gray":"gray","katex-purple":"#9d38bd","katex-blueA":"#ccfaff","katex-blueB":"#80f6ff","katex-blueC":"#63d9ea","katex-blueD":"#11accd","katex-blueE":"#0c7f99","katex-tealA":"#94fff5","katex-tealB":"#26edd5","katex-tealC":"#01d1c1","katex-tealD":"#01a995","katex-tealE":"#208170","katex-greenA":"#b6ffb0","katex-greenB":"#8af281","katex-greenC":"#74cf70","katex-greenD":"#1fab54","katex-greenE":"#0d923f","katex-goldA":"#ffd0a9","katex-goldB":"#ffbb71","katex-goldC":"#ff9c39","katex-goldD":"#e07d10","katex-goldE":"#a75a05","katex-redA":"#fca9a9","katex-redB":"#ff8482","katex-redC":"#f9685d","katex-redD":"#e84d39","katex-redE":"#bc2612","katex-maroonA":"#ffbde0","katex-maroonB":"#ff92c6","katex-maroonC":"#ed5fa6","katex-maroonD":"#ca337c","katex-maroonE":"#9e034e","katex-purpleA":"#ddd7ff","katex-purpleB":"#c6b9fc","katex-purpleC":"#aa87ff","katex-purpleD":"#7854ab","katex-purpleE":"#543b78","katex-mintA":"#f5f9e8","katex-mintB":"#edf2df","katex-mintC":"#e0e5cc","katex-grayA":"#f6f7f7","katex-grayB":"#f0f1f2","katex-grayC":"#e3e5e6","katex-grayD":"#d6d8da","katex-grayE":"#babec2","katex-grayF":"#888d93","katex-grayG":"#626569","katex-grayH":"#3b3e40","katex-grayI":"#21242c","katex-kaBlue":"#314453","katex-kaGreen":"#71B307"};var kt=wt,St={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Mt={ex:!0,em:!0,mu:!0},zt=function(t,e){var r;if(t.unit in St)r=St[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n;if(n=e.style.isTight()?e.havingStyle(e.style.text()):e,"ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new o("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},Tt=["\\imath","ı","\\jmath","ȷ","\\pounds","\\mathsterling","\\textsterling","£"],At=function(t,e,r){return Y[r][t]&&Y[r][t].replace&&(t=Y[r][t].replace),{value:t,metrics:V(t,e,r)}},Bt=function(t,e,r,n,a){var i,o=At(t,e,r),s=o.metrics;if(t=o.value,s){var h=s.italic;("text"===r||n&&"mathit"===n.font)&&(h=0),i=new I(t,s.height,s.depth,h,s.skew,s.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"'"),i=new I(t,0,0,0,0,0,a);if(n){i.maxFontSize=n.sizeMultiplier,n.style.isTight()&&i.classes.push("mtight");var l=n.getColor();l&&(i.style.color=l)}return i},Ct=function(t,e){if(A(t.classes)!==A(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;for(var r in t.style)if(t.style.hasOwnProperty(r)&&t.style[r]!==e.style[r])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;return!0},Nt=function(t){for(var e=0,r=0,n=0,a=0;ae&&(e=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>n&&(n=i.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=n},qt=function(t,e,r,n){var a=new q(t,e,r,n);return Nt(a),a},Ot=function(t,e,r,n){return new q(t,e,r,n)},Et=function(t){var e=new T(t);return Nt(e),e},It=function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},Rt={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Lt={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Pt={fontMap:Rt,makeSymbol:Bt,mathsym:function(t,e,r,n){return void 0===n&&(n=[]),r&&r.font&&"boldsymbol"===r.font&&At(t,"Main-Bold",e).metrics?Bt(t,"Main-Bold",e,r,n.concat(["mathbf"])):"\\"===t||"main"===Y[e][t].font?Bt(t,"Main-Regular",e,r,n):Bt(t,"AMS-Regular",e,r,n.concat(["amsrm"]))},makeSpan:qt,makeSvgSpan:Ot,makeLineSpan:function(t,e,r){var n=qt([t],[],e);return n.height=r||e.fontMetrics().defaultRuleThickness,n.style.borderBottomWidth=n.height+"em",n.maxFontSize=1,n},makeAnchor:function(t,e,r,n){var a=new O(t,e,r,n);return Nt(a),a},makeFragment:Et,wrapFragment:function(t,e){return t instanceof T?qt([],[t],e):t},makeVList:function(t,e){for(var r=function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,a=n,i=1;i0&&(i.push(me(o,e)),o=[]),i.push(a[s]));o.length>0&&i.push(me(o,e)),r&&((n=me(ae(r,e,!0))).classes=["tag"],i.push(n));var l=Qt(["katex-html"],i);if(l.setAttribute("aria-hidden","true"),n){var m=n.children[0];m.style.height=l.height+l.depth+"em",m.style.verticalAlign=-l.depth+"em"}return l}function ue(t){return new T(t)}var de=function(){function t(t,e){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=t,this.attributes={},this.children=e||[]}var e=t.prototype;return e.setAttribute=function(t,e){this.attributes[t]=e},e.getAttribute=function(t){return this.attributes[t]},e.toNode=function(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r"},e.toText=function(){return this.children.map(function(t){return t.toText()}).join("")},t}(),pe=function(){function t(t){this.text=void 0,this.text=t}var e=t.prototype;return e.toNode=function(){return document.createTextNode(this.text)},e.toMarkup=function(){return c.escape(this.toText())},e.toText=function(){return this.text},t}(),fe={MathNode:de,TextNode:pe,SpaceNode:function(){function t(t){this.width=void 0,this.character=void 0,this.width=t,this.character=t>=.05555&&t<=.05556?" ":t>=.1666&&t<=.1667?" ":t>=.2222&&t<=.2223?" ":t>=.2777&&t<=.2778?"  ":t>=-.05556&&t<=-.05555?" ⁣":t>=-.1667&&t<=-.1666?" ⁣":t>=-.2223&&t<=-.2222?" ⁣":t>=-.2778&&t<=-.2777?" ⁣":null}var e=t.prototype;return e.toNode=function(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",this.width+"em"),t},e.toMarkup=function(){return this.character?""+this.character+"":''},e.toText=function(){return this.character?this.character:" "},t}(),newDocumentFragment:ue},ge=function(t,e,r){return!Y[e][t]||!Y[e][t].replace||55349===t.charCodeAt(0)||et.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.substr(4,2)||r.font&&"tt"===r.font.substr(4,2))||(t=Y[e][t].replace),new fe.TextNode(t)},xe=function(t){return 1===t.length?t[0]:new fe.MathNode("mrow",t)},ve=function(t,e){if("texttt"===e.fontFamily)return"monospace";if("textsf"===e.fontFamily)return"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===e.fontShape&&"textbf"===e.fontWeight)return"bold-italic";if("textit"===e.fontShape)return"italic";if("textbf"===e.fontWeight)return"bold";var r=e.font;if(!r||"mathnormal"===r)return null;var n=t.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"bold-italic";var a=t.text;return c.contains(["\\imath","\\jmath"],a)?null:(Y[n][a]&&Y[n][a].replace&&(a=Y[n][a].replace),V(a,Pt.fontMap[r].fontName,n)?Pt.fontMap[r].variant:null)},ye=function(t,e){for(var r,n=[],a=0;a5)"widehat"===n||"widecheck"===n?(a=420,r=2364,o=.42,i=n+"4"):(a=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][h],a=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=n+h):(r=[0,600,1033,2339,2340][h],a=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var l=new L(i),m=new R([l],{width:"100%",height:o+"em",viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:Pt.makeSvgSpan([],[m],e),minWidth:0,height:o}}var u,d,p=[],f=Te[n],g=f[0],x=f[1],v=f[2],y=v/1e3,b=g.length;if(1===b)u=["hide-tail"],d=[f[3]];else if(2===b)u=["halfarrow-left","halfarrow-right"],d=["xMinYMin","xMaxYMin"];else{if(3!==b)throw new Error("Correct katexImagesData or update code here to support\n "+b+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w0&&(n.style.minWidth=a+"em"),n},qe=function(t,e){var r,n,a,i=Ht(t,"supsub");i?(r=(n=Dt(i.base,"accent")).base,i.base=r,a=function(t){if(t instanceof q)return t;throw new Error("Expected span but got "+String(t)+".")}(le(i,e)),i.base=n):r=(n=Dt(t,"accent")).base;var o=le(r,e.havingCrampedStyle()),s=0;if(n.isShifty&&c.isCharacterBox(r)){var h=c.getBaseElem(r);s=function(t){if(t instanceof I)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}(le(h,e.havingCrampedStyle())).skew}var l,m=Math.min(o.height,e.fontMetrics().xHeight);if(n.isStretchy)l=Ne(n,e),l=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+2*s+"em)",marginLeft:2*s+"em"}:void 0}]},e);else{var u,d;"\\vec"===n.label?(u=Pt.staticSvg("vec",e),d=Pt.svgData.vec[1]):((u=Pt.makeSymbol(n.label,"Main-Regular",n.mode,e)).italic=0,d=u.width),l=Pt.makeSpan(["accent-body"],[u]);var p="\\textcircled"===n.label;p&&(l.classes.push("accent-full"),m=o.height);var f=s;p||(f-=d/2),l.style.left=f+"em","\\textcircled"===n.label&&(l.style.top=".2em"),l=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-m},{type:"elem",elem:l}]},e)}var g=Pt.makeSpan(["mord","accent"],[l],e);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},Oe=function(t,e){var r=t.isStretchy?Ce(t.label):new fe.MathNode("mo",[ge(t.label,t.mode)]),n=new fe.MathNode("mover",[we(t.base,e),r]);return n.setAttribute("accent","true"),n},Ee=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(t){return"\\"+t}).join("|"));Zt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(t,e){var r=e[0],n=!Ee.test(t.funcName),a=!n||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:qe,mathmlBuilder:Oe}),Zt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(t,e){var r=e[0];return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:qe,mathmlBuilder:Oe}),Zt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(t,e){var r=t.parser,n=t.funcName,a=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:function(t,e){var r=le(t.base,e),n=Ne(t,e),a="\\utilde"===t.label?.12:0,i=Pt.makeVList({positionType:"bottom",positionData:n.height+a,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},e);return Pt.makeSpan(["mord","accentunder"],[i],e)},mathmlBuilder:function(t,e){var r=Ce(t.label),n=new fe.MathNode("munder",[we(t.base,e),r]);return n.setAttribute("accentunder","true"),n}}),Zt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(t,e,r){var n=t.parser,a=t.funcName;return{type:"xArrow",mode:n.mode,label:a,body:e[0],below:r[0]}},htmlBuilder:function(t,e){var r,n=e.style,a=e.havingStyle(n.sup()),i=Pt.wrapFragment(le(t.body,a,e),e);i.classes.push("x-arrow-pad"),t.below&&(a=e.havingStyle(n.sub()),(r=Pt.wrapFragment(le(t.below,a,e),e)).classes.push("x-arrow-pad"));var o,s=Ne(t,e),h=-e.fontMetrics().axisHeight+.5*s.height,l=-e.fontMetrics().axisHeight-.5*s.height-.111;if((i.depth>.25||"\\xleftequilibrium"===t.label)&&(l-=i.depth),r){var m=-e.fontMetrics().axisHeight+r.height+.5*s.height+.111;o=Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:l},{type:"elem",elem:s,shift:h},{type:"elem",elem:r,shift:m}]},e)}else o=Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:l},{type:"elem",elem:s,shift:h}]},e);return o.children[0].children[0].children[1].classes.push("svg-align"),Pt.makeSpan(["mrel","x-arrow"],[o],e)},mathmlBuilder:function(t,e){var r,n,a=Ce(t.label);if(t.body){var i=we(t.body,e);t.below?(n=we(t.below,e),r=new fe.MathNode("munderover",[a,n,i])):r=new fe.MathNode("mover",[a,i])}else t.below?(n=we(t.below,e),r=new fe.MathNode("munder",[a,n])):r=new fe.MathNode("mover",[a]);return r}}),Zt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(t,e){for(var r=t.parser,n=Dt(e[0],"ordgroup").body,a="",i=0;i","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ye=[0,1.2,1.8,2.4,3],$e=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],We=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"stack"}],je=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ze=function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},Ke=function(t,e,r,n){for(var a=Math.min(2,3-n.style.size);ae)return r[a]}return r[r.length-1]},Je=function(t,e,r,n,a,i){var o;"<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),o=c.contains(Xe,t)?$e:c.contains(Ge,t)?je:We;var s=Ke(t,e,o,n);return"small"===s.type?function(t,e,r,n,a,i){var o=Pt.makeSymbol(t,"Main-Regular",a,n),s=Pe(o,e,n,i);return r&&De(s,n,e),s}(t,s.style,r,n,a,i):"large"===s.type?He(t,s.size,r,n,a,i):Ve(t,e,r,n,a,i)},Qe=function(t,e){var r,n,a=e.havingBaseSizing(),i=Ke("\\surd",t*a.sizeMultiplier,je,a),o=a.sizeMultiplier,s=0,h=0,l=0;return"small"===i.type?(t<1?o=1:t<1.4&&(o=.7),h=1/o,(r=Ue("sqrtMain",s=1.08/o,l=1080,e)).style.minWidth="0.853em",n=.833/o):"large"===i.type?(l=1080*Ye[i.size],h=Ye[i.size]/o,s=(Ye[i.size]+.08)/o,(r=Ue("sqrtSize"+i.size,s,l,e)).style.minWidth="1.02em",n=1/o):(s=t+.08,h=t,l=Math.floor(1e3*t)+80,(r=Ue("sqrtTall",s,l,e)).style.minWidth="0.742em",n=1.056),r.height=h,r.style.height=s+"em",{span:r,advanceWidth:n,ruleWidth:e.fontMetrics().sqrtRuleThickness*o}},tr=function(t,e,r,n,a){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),c.contains(Ge,t)||c.contains(Xe,t))return He(t,e,!1,r,n,a);if(c.contains(_e,t))return Ve(t,Ye[e],!1,r,n,a);throw new o("Illegal delimiter: '"+t+"'")},er=Je,rr=function(t,e,r,n,a,i){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,s=5/n.fontMetrics().ptPerEm,h=Math.max(e-o,r+o),l=Math.max(h/500*901,2*h-s);return Je(t,l,!0,n,a,i)},nr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},ar=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function ir(t,e){var r=Vt(t);if(r&&c.contains(ar,r.text))return r;throw new o("Invalid delimiter: '"+(r?r.text:JSON.stringify(t))+"' after '"+e.funcName+"'",t)}function or(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Zt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(t,e){var r=ir(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:nr[t.funcName].size,mclass:nr[t.funcName].mclass,delim:r.text}},htmlBuilder:function(t,e){return"."===t.delim?Pt.makeSpan([t.mclass]):tr(t.delim,t.size,e,t.mode,[t.mclass])},mathmlBuilder:function(t){var e=[];"."!==t.delim&&e.push(ge(t.delim,t.mode));var r=new fe.MathNode("mo",e);return"mopen"===t.mclass||"mclose"===t.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r}}),Zt({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(t,e){return{type:"leftright-right",mode:t.parser.mode,delim:ir(e[0],t).text}}}),Zt({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(t,e){var r=ir(e[0],t),n=t.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=Dt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim}},htmlBuilder:function(t,e){or(t);for(var r,n,a=ae(t.body,e,!0,["mopen","mclose"]),i=0,o=0,s=!1,h=0;h0&&(v+=.25),l.push({pos:v,isDashed:t[e]})}for(y(i[0]),r=0;r0&&(k<(T+=x)&&(k=T),T=0),t.addJot&&(k+=p),S.height=w,S.depth=k,v+=w,S.pos=v,v+=k+T,h[r]=S,y(i[r+1])}var A,B,C=v/2+e.fontMetrics().axisHeight,N=t.cols||[],q=[];for(n=0,B=0;n=s)){var L=void 0;(n>0||t.hskipBeforeAndAfter)&&0!==(L=c.deflt(O.pregap,u))&&((A=Pt.makeSpan(["arraycolsep"],[])).style.width=L+"em",q.push(A));var P=[];for(r=0;r0){for(var V=Pt.makeLineSpan("hline",e,.05),U=Pt.makeLineSpan("hdashline",e,.05),G=[{type:"elem",elem:h,shift:0}];l.length>0;){var _=l.pop(),X=_.pos-C;_.isDashed?G.push({type:"elem",elem:U,shift:X}):G.push({type:"elem",elem:V,shift:X})}h=Pt.makeVList({positionType:"individualShift",children:G},e)}return Pt.makeSpan(["mord"],[h],e)},fr=function(t,e){return new fe.MathNode("mtable",t.body.map(function(t){return new fe.MathNode("mtr",t.map(function(t){return new fe.MathNode("mtd",[we(t,e)])}))}))},gr=function(t,e){var r,n=[],a=ur(t.parser,{cols:n,addJot:!0},"display"),i=0,s={type:"ordgroup",mode:t.mode,body:[]},h=Ht(e[0],"ordgroup");if(h){for(var l="",m=0;m0&&c&&(p=1),n[u]={type:"align",align:d,pregap:p,postgap:0}}return a};mr({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(t,e){var r={cols:(Vt(e[0])?[e[0]]:Dt(e[0],"ordgroup").body).map(function(t){var e=function(t){var e=Vt(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}(t).text;if(-1!=="lcr".indexOf(e))return{type:"align",align:e};if("|"===e)return{type:"separator",separator:"|"};if(":"===e)return{type:"separator",separator:":"};throw new o("Unknown column alignment: "+e,t)}),hskipBeforeAndAfter:!0};return ur(t.parser,r,dr(t.envName))},htmlBuilder:pr,mathmlBuilder:fr}),mr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName],r=ur(t.parser,{hskipBeforeAndAfter:!1},dr(t.envName));return e?{type:"leftright",mode:t.mode,body:[r],left:e[0],right:e[1]}:r},htmlBuilder:pr,mathmlBuilder:fr}),mr({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(t){var e=ur(t.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},dr(t.envName));return{type:"leftright",mode:t.mode,body:[e],left:"\\{",right:"."}},htmlBuilder:pr,mathmlBuilder:fr}),mr({type:"array",names:["aligned"],props:{numArgs:0},handler:gr,htmlBuilder:pr,mathmlBuilder:fr}),mr({type:"array",names:["gathered"],props:{numArgs:0},handler:function(t){return ur(t.parser,{cols:[{type:"align",align:"c"}],addJot:!0},"display")},htmlBuilder:pr,mathmlBuilder:fr}),mr({type:"array",names:["alignedat"],props:{numArgs:1},handler:gr,htmlBuilder:pr,mathmlBuilder:fr}),Zt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(t,e){throw new o(t.funcName+" valid only within array environment")}});var xr=lr;Zt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(t,e){var r=t.parser,n=t.funcName,a=e[0];if("ordgroup"!==a.type)throw new o("Invalid environment name",a);for(var i="",s=0;s0?3*c:7*c,p=e.fontMetrics().denom1):(m>0?(u=e.fontMetrics().num2,d=c):(u=e.fontMetrics().num3,d=3*c),p=e.fontMetrics().denom2),l){var b=e.fontMetrics().axisHeight;u-o.depth-(b+.5*m)0&&(e="."===(e=t)?null:e),e};Zt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(t,e){var r=t.parser,n=e[4],a=e[5],i=Ht(e[0],"atom");i&&(i=Ft(e[0],"open"));var o=i?Br(i.text):null,s=Ht(e[1],"atom");s&&(s=Ft(e[1],"close"));var h,l=s?Br(s.text):null,m=Dt(e[2],"size"),c=null;h=!!m.isBlank||(c=m.value).number>0;var u="auto",d=Ht(e[3],"ordgroup");if(d){if(d.body.length>0){var p=Dt(d.body[0],"textord");u=Ar[Number(p.text)]}}else d=Dt(e[3],"textord"),u=Ar[Number(d.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:h,barSize:c,leftDelim:o,rightDelim:l,size:u}},htmlBuilder:zr,mathmlBuilder:Tr}),Zt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(t,e){var r=t.parser,n=(t.funcName,t.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Dt(e[0],"size").value,token:n}}}),Zt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(t,e){var r=t.parser,n=(t.funcName,e[0]),a=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t}(Dt(e[1],"infix").size),i=e[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:zr,mathmlBuilder:Tr});var Cr=function(t,e){var r,n,a=e.style,i=Ht(t,"supsub");i?(r=i.sup?le(i.sup,e.havingStyle(a.sup()),e):le(i.sub,e.havingStyle(a.sub()),e),n=Dt(i.base,"horizBrace")):n=Dt(t,"horizBrace");var o,s=le(n.base,e.havingBaseStyle(w.DISPLAY)),h=Ne(n,e);if(n.isOver?(o=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:h}]},e)).children[0].children[0].children[1].classes.push("svg-align"):(o=Pt.makeVList({positionType:"bottom",positionData:s.depth+.1+h.height,children:[{type:"elem",elem:h},{type:"kern",size:.1},{type:"elem",elem:s}]},e)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Pt.makeSpan(["mord",n.isOver?"mover":"munder"],[o],e);o=n.isOver?Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},e):Pt.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return Pt.makeSpan(["mord",n.isOver?"mover":"munder"],[o],e)};Zt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(t,e){var r=t.parser,n=t.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:Cr,mathmlBuilder:function(t,e){var r=Ce(t.label);return new fe.MathNode(t.isOver?"mover":"munder",[we(t.base,e),r])}}),Zt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(t,e){var r=t.parser,n=e[1],a=Dt(e[0],"url").url;return{type:"href",mode:r.mode,href:a,body:Jt(n)}},htmlBuilder:function(t,e){var r=ae(t.body,e,!1);return Pt.makeAnchor(t.href,[],r,e)},mathmlBuilder:function(t,e){var r=be(t.body,e);return r instanceof de||(r=new de("mrow",[r])),r.setAttribute("href",t.href),r}}),Zt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(t,e){for(var r=t.parser,n=Dt(e[0],"url").url,a=[],i=0;i0){var d=s.italic,p=Pt.staticSvg(u+"Size"+(l?"2":"1"),e);s=Pt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:p,shift:l?.08:0}]},e),a.name="\\"+u,s.classes.unshift("mop"),s.italic=d}}else if(a.body){var f=ae(a.body,e,!0);1===f.length&&f[0]instanceof I?(s=f[0]).classes[0]="mop":s=Pt.makeSpan(["mop"],Pt.tryCombineChars(f),e)}else{for(var g=[],x=1;x0){for(var r=t.body.map(function(t){var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),n=ae(r,e.withFont("mathrm"),!0),a=0;ar.height+r.depth+i&&(i=(i+c-r.height-r.depth)/2);var u=h.height-r.height-i-l;r.style.paddingLeft=m+"em";var d=Pt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:h},{type:"kern",size:l}]},e);if(t.index){var p=e.havingStyle(w.SCRIPTSCRIPT),f=le(t.index,p,e),g=.6*(d.height-d.depth),x=Pt.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},e),v=Pt.makeSpan(["root"],[x]);return Pt.makeSpan(["mord","sqrt"],[v,d],e)}return Pt.makeSpan(["mord","sqrt"],[d],e)},mathmlBuilder:function(t,e){var r=t.body,n=t.index;return n?new fe.MathNode("mroot",[we(r,e),we(n,e)]):new fe.MathNode("msqrt",[we(r,e)])}});var Dr={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT};Zt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(t,e){var r=t.breakOnTokenText,n=t.funcName,a=t.parser,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder:function(t,e){var r=Dr[t.style],n=e.havingStyle(r).withFont("");return Rr(t.body,n,e)},mathmlBuilder:function(t,e){var r={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT}[t.style],n=e.havingStyle(r),a=ye(t.body,n),i=new fe.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});Kt({type:"supsub",htmlBuilder:function(t,e){var r=function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===w.DISPLAY.size||r.alwaysHandleSupSub)?qr:null:"accent"===r.type?c.isCharacterBox(r.base)?qe:null:"horizBrace"===r.type&&!t.sub===r.isOver?Cr:null:null}(t,e);if(r)return r(t,e);var n,a,i,o=t.base,s=t.sup,h=t.sub,l=le(o,e),m=e.fontMetrics(),u=0,d=0,p=o&&c.isCharacterBox(o);if(s){var f=e.havingStyle(e.style.sup());n=le(s,f,e),p||(u=l.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(h){var g=e.havingStyle(e.style.sub());a=le(h,g,e),p||(d=l.depth+g.fontMetrics().subDrop*g.sizeMultiplier/e.sizeMultiplier)}i=e.style===w.DISPLAY?m.sup1:e.style.cramped?m.sup3:m.sup2;var x,v=e.sizeMultiplier,y=.5/m.ptPerEm/v+"em",b=null;if(a){var k=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name);(l instanceof I||k)&&(b=-l.italic+"em")}if(n&&a){u=Math.max(u,i,n.depth+.25*m.xHeight),d=Math.max(d,m.sub2);var S=4*m.defaultRuleThickness;if(u-n.depth-(a.height-d)0&&(u+=M,d-=M)}var z=[{type:"elem",elem:a,shift:d,marginRight:y,marginLeft:b},{type:"elem",elem:n,shift:-u,marginRight:y}];x=Pt.makeVList({positionType:"individualShift",children:z},e)}else if(a){d=Math.max(d,m.sub1,a.height-.8*m.xHeight);var T=[{type:"elem",elem:a,marginLeft:b,marginRight:y}];x=Pt.makeVList({positionType:"shift",positionData:d,children:T},e)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*m.xHeight),x=Pt.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},e)}var A=se(l,"right")||"mord";return Pt.makeSpan([A],[l,Pt.makeSpan(["msupsub"],[x])],e)},mathmlBuilder:function(t,e){var r,n=!1,a=Ht(t.base,"horizBrace");a&&!!t.sup===a.isOver&&(n=!0,r=a.isOver);var i,o=[we(t.base,e)];if(t.sub&&o.push(we(t.sub,e)),t.sup&&o.push(we(t.sup,e)),n)i=r?"mover":"munder";else if(t.sub)if(t.sup){var s=t.base;i=s&&"op"===s.type&&s.limits&&e.style===w.DISPLAY?"munderover":"msubsup"}else{var h=t.base;i=h&&"op"===h.type&&h.limits&&e.style===w.DISPLAY?"munder":"msub"}else{var l=t.base;i=l&&"op"===l.type&&l.limits&&e.style===w.DISPLAY?"mover":"msup"}return new fe.MathNode(i,o)}}),Kt({type:"atom",htmlBuilder:function(t,e){return Pt.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder:function(t,e){var r=new fe.MathNode("mo",[ge(t.text,t.mode)]);if("bin"===t.family){var n=ve(t,e);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===t.family&&r.setAttribute("separator","true");return r}});var Hr={mi:"italic",mn:"normal",mtext:"normal"};Kt({type:"mathord",htmlBuilder:function(t,e){return Pt.makeOrd(t,e,"mathord")},mathmlBuilder:function(t,e){var r=new fe.MathNode("mi",[ge(t.text,t.mode,e)]),n=ve(t,e)||"italic";return n!==Hr[r.type]&&r.setAttribute("mathvariant",n),r}}),Kt({type:"textord",htmlBuilder:function(t,e){return Pt.makeOrd(t,e,"textord")},mathmlBuilder:function(t,e){var r,n=ge(t.text,t.mode,e),a=ve(t,e)||"normal";return r="text"===t.mode?new fe.MathNode("mtext",[n]):/[0-9]/.test(t.text)?new fe.MathNode("mn",[n]):"\\prime"===t.text?new fe.MathNode("mo",[n]):new fe.MathNode("mi",[n]),a!==Hr[r.type]&&r.setAttribute("mathvariant",a),r}});var Fr={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Vr={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Kt({type:"spacing",htmlBuilder:function(t,e){if(Vr.hasOwnProperty(t.text)){var r=Vr[t.text].className||"";if("text"===t.mode){var n=Pt.makeOrd(t,e,"textord");return n.classes.push(r),n}return Pt.makeSpan(["mspace",r],[Pt.mathsym(t.text,t.mode,e)],e)}if(Fr.hasOwnProperty(t.text))return Pt.makeSpan(["mspace",Fr[t.text]],[],e);throw new o('Unknown type of space "'+t.text+'"')},mathmlBuilder:function(t,e){if(!Vr.hasOwnProperty(t.text)){if(Fr.hasOwnProperty(t.text))return new fe.MathNode("mspace");throw new o('Unknown type of space "'+t.text+'"')}return new fe.MathNode("mtext",[new fe.TextNode(" ")])}}),Kt({type:"tag",mathmlBuilder:function(t,e){var r=new fe.MathNode("mtable",[new fe.MathNode("mlabeledtr",[new fe.MathNode("mtd",[be(t.tag,e)]),new fe.MathNode("mtd",[be(t.body,e)])])]);return r.setAttribute("side","right"),r}});var Ur={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Gr={"\\textbf":"textbf"},_r={"\\textit":"textit"},Xr=function(t,e){var r=t.font;return r?Ur[r]?e.withTextFontFamily(Ur[r]):Gr[r]?e.withTextFontWeight(Gr[r]):e.withTextFontShape(_r[r]):e};Zt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textit"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0,consumeMode:"text"},handler:function(t,e){var r=t.parser,n=t.funcName,a=e[0];return{type:"text",mode:r.mode,body:Jt(a),font:n}},htmlBuilder:function(t,e){var r=Xr(t,e),n=ae(t.body,r,!0);return Pt.makeSpan(["mord","text"],Pt.tryCombineChars(n),r)},mathmlBuilder:function(t,e){var r=Xr(t,e);return be(t.body,r)}}),Zt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(t,e){return{type:"underline",mode:t.parser.mode,body:e[0]}},htmlBuilder:function(t,e){var r=le(t.body,e),n=Pt.makeLineSpan("underline-line",e),a=Pt.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:n.height},{type:"elem",elem:n},{type:"kern",size:3*n.height},{type:"elem",elem:r}]},e);return Pt.makeSpan(["mord","underline"],[a],e)},mathmlBuilder:function(t,e){var r=new fe.MathNode("mo",[new fe.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new fe.MathNode("munder",[we(t.body,e),r]);return n.setAttribute("accentunder","true"),n}}),Zt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(t,e,r){throw new o("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(t,e){for(var r=Yr(t),n=[],a=e.havingStyle(e.style.text()),i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=e)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}this.current[t]=e},t}(),Qr={},tn=Qr;function en(t,e){Qr[t]=e}en("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),en("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),en("\\@ifnextchar",function(t){var e=t.consumeArgs(3),r=t.future();return 1===e[0].length&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),en("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),en("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var rn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};en("\\char",function(t){var e,r=t.popToken(),n="";if("'"===r.text)e=8,r=t.popToken();else if('"'===r.text)e=16,r=t.popToken();else if("`"===r.text)if("\\"===(r=t.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new o("\\char` missing argument");n=r.text.charCodeAt(0)}else e=10;if(e){if(null==(n=rn[r.text])||n>=e)throw new o("Invalid base-"+e+" digit "+r.text);for(var a;null!=(a=rn[t.future().text])&&a":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};en("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in on?e=on[r]:"\\not"===r.substr(0,4)?e="\\dotsb":r in Y.math&&c.contains(["bin","rel"],Y.math[r].group)&&(e="\\dotsb"),e});var sn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};en("\\dotso",function(t){return t.future().text in sn?"\\ldots\\,":"\\ldots"}),en("\\dotsc",function(t){var e=t.future().text;return e in sn&&","!==e?"\\ldots\\,":"\\ldots"}),en("\\cdots",function(t){return t.future().text in sn?"\\@cdots\\,":"\\@cdots"}),en("\\dotsb","\\cdots"),en("\\dotsm","\\cdots"),en("\\dotsi","\\!\\cdots"),en("\\dotsx","\\ldots\\,"),en("\\DOTSI","\\relax"),en("\\DOTSB","\\relax"),en("\\DOTSX","\\relax"),en("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),en("\\,","\\tmspace+{3mu}{.1667em}"),en("\\thinspace","\\,"),en("\\>","\\mskip{4mu}"),en("\\:","\\tmspace+{4mu}{.2222em}"),en("\\medspace","\\:"),en("\\;","\\tmspace+{5mu}{.2777em}"),en("\\thickspace","\\;"),en("\\!","\\tmspace-{3mu}{.1667em}"),en("\\negthinspace","\\!"),en("\\negmedspace","\\tmspace-{4mu}{.2222em}"),en("\\negthickspace","\\tmspace-{5mu}{.277em}"),en("\\enspace","\\kern.5em "),en("\\enskip","\\hskip.5em\\relax"),en("\\quad","\\hskip1em\\relax"),en("\\qquad","\\hskip2em\\relax"),en("\\tag","\\@ifstar\\tag@literal\\tag@paren"),en("\\tag@paren","\\tag@literal{({#1})}"),en("\\tag@literal",function(t){if(t.macros.get("\\df@tag"))throw new o("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),en("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),en("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),en("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),en("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),en("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\mathrlap{\\mkern0.4mu\\raisebox{0.4mu}{$#1$}}{\\mkern0.8mu#1}}}{\\mathbf{#1}}"),en("\\\\","\\newline"),en("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var hn=D["Main-Regular"]["T".charCodeAt(0)][1]-.7*D["Main-Regular"]["A".charCodeAt(0)][1]+"em";en("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+hn+"}{\\scriptsize A}\\kern-.15em\\TeX}{LaTeX}}"),en("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+hn+"}{\\scriptsize A}\\kern-.15em\\TeX}{KaTeX}}"),en("\\hspace","\\@ifstar\\@hspacer\\@hspace"),en("\\@hspace","\\hskip #1\\relax"),en("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),en("\\ordinarycolon",":"),en("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),en("\\dblcolon","\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}"),en("\\coloneqq","\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}"),en("\\Coloneqq","\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}"),en("\\coloneq","\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}"),en("\\Coloneq","\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}"),en("\\eqqcolon","\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),en("\\Eqqcolon","\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}"),en("\\eqcolon","\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),en("\\Eqcolon","\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}"),en("\\colonapprox","\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}"),en("\\Colonapprox","\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}"),en("\\colonsim","\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}"),en("\\Colonsim","\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}"),en("≔","\\coloneqq"),en("≕","\\eqqcolon"),en("⩴","\\Coloneqq"),en("\\ratio","\\vcentcolon"),en("\\coloncolon","\\dblcolon"),en("\\colonequals","\\coloneqq"),en("\\coloncolonequals","\\Coloneqq"),en("\\equalscolon","\\eqqcolon"),en("\\equalscoloncolon","\\Eqqcolon"),en("\\colonminus","\\coloneq"),en("\\coloncolonminus","\\Coloneq"),en("\\minuscolon","\\eqcolon"),en("\\minuscoloncolon","\\Eqcolon"),en("\\coloncolonapprox","\\Colonapprox"),en("\\coloncolonsim","\\Colonsim"),en("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),en("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),en("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),en("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),en("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),en("\\limsup","\\DOTSB\\mathop{\\operatorname{lim\\,sup}}\\limits"),en("\\liminf","\\DOTSB\\mathop{\\operatorname{lim\\,inf}}\\limits"),en("⟦","\\mathopen{[\\mkern-3.2mu[}"),en("⟧","\\mathclose{]\\mkern-3.2mu]}"),en("\\darr","\\downarrow"),en("\\dArr","\\Downarrow"),en("\\Darr","\\Downarrow"),en("\\lang","\\langle"),en("\\rang","\\rangle"),en("\\uarr","\\uparrow"),en("\\uArr","\\Uparrow"),en("\\Uarr","\\Uparrow"),en("\\N","\\mathbb{N}"),en("\\R","\\mathbb{R}"),en("\\Z","\\mathbb{Z}"),en("\\alef","\\aleph"),en("\\alefsym","\\aleph"),en("\\Alpha","\\mathrm{A}"),en("\\Beta","\\mathrm{B}"),en("\\bull","\\bullet"),en("\\Chi","\\mathrm{X}"),en("\\clubs","\\clubsuit"),en("\\cnums","\\mathbb{C}"),en("\\Complex","\\mathbb{C}"),en("\\Dagger","\\ddagger"),en("\\diamonds","\\diamondsuit"),en("\\empty","\\emptyset"),en("\\Epsilon","\\mathrm{E}"),en("\\Eta","\\mathrm{H}"),en("\\exist","\\exists"),en("\\harr","\\leftrightarrow"),en("\\hArr","\\Leftrightarrow"),en("\\Harr","\\Leftrightarrow"),en("\\hearts","\\heartsuit"),en("\\image","\\Im"),en("\\infin","\\infty"),en("\\Iota","\\mathrm{I}"),en("\\isin","\\in"),en("\\Kappa","\\mathrm{K}"),en("\\larr","\\leftarrow"),en("\\lArr","\\Leftarrow"),en("\\Larr","\\Leftarrow"),en("\\lrarr","\\leftrightarrow"),en("\\lrArr","\\Leftrightarrow"),en("\\Lrarr","\\Leftrightarrow"),en("\\Mu","\\mathrm{M}"),en("\\natnums","\\mathbb{N}"),en("\\Nu","\\mathrm{N}"),en("\\Omicron","\\mathrm{O}"),en("\\plusmn","\\pm"),en("\\rarr","\\rightarrow"),en("\\rArr","\\Rightarrow"),en("\\Rarr","\\Rightarrow"),en("\\real","\\Re"),en("\\reals","\\mathbb{R}"),en("\\Reals","\\mathbb{R}"),en("\\Rho","\\mathrm{R}"),en("\\sdot","\\cdot"),en("\\sect","\\S"),en("\\spades","\\spadesuit"),en("\\sub","\\subset"),en("\\sube","\\subseteq"),en("\\supe","\\supseteq"),en("\\Tau","\\mathrm{T}"),en("\\thetasym","\\vartheta"),en("\\weierp","\\wp"),en("\\Zeta","\\mathrm{Z}"),en("\\argmin","\\DOTSB\\mathop{\\operatorname{arg\\,min}}\\limits"),en("\\argmax","\\DOTSB\\mathop{\\operatorname{arg\\,max}}\\limits");var ln={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},mn=function(){function t(t,e,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new Jr(tn,e.macros),this.mode=r,this.stack=[]}var e=t.prototype;return e.feed=function(t){this.lexer=new Kr(t,this.settings)},e.switchMode=function(t){this.mode=t},e.beginGroup=function(){this.macros.beginGroup()},e.endGroup=function(){this.macros.endGroup()},e.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},e.popToken=function(){return this.future(),this.stack.pop()},e.pushToken=function(t){this.stack.push(t)},e.pushTokens=function(t){var e;(e=this.stack).push.apply(e,t)},e.consumeSpaces=function(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}},e.consumeArgs=function(t){for(var e=[],r=0;rthis.settings.maxExpand)throw new o("Too many expansions: infinite loop or need to increase maxExpand setting");var n=r.tokens;if(r.numArgs)for(var a=this.consumeArgs(r.numArgs),i=(n=n.slice()).length-1;i>=0;--i){var s=n[i];if("#"===s.text){if(0===i)throw new o("Incomplete placeholder at end of macro body",s);if("#"===(s=n[--i]).text)n.splice(i+1,1);else{if(!/^[1-9]$/.test(s.text))throw new o("Not a valid argument number",s);var h;(h=n).splice.apply(h,[i,2].concat(a[+s.text-1]))}}}return this.pushTokens(n),n},e.expandAfterFuture=function(){return this.expandOnce(),this.future()},e.expandNextToken=function(){for(;;){var t=this.expandOnce();if(t instanceof a){if("\\relax"!==t.text)return this.stack.pop();this.stack.pop()}}throw new Error},e.expandMacro=function(t){if(this.macros.get(t)){var e=[],r=this.stack.length;for(this.pushToken(new a(t));this.stack.length>r;){this.expandOnce()instanceof a&&e.push(this.stack.pop())}return e}},e.expandMacroAsText=function(t){var e=this.expandMacro(t);return e?e.map(function(t){return t.text}).join(""):e},e._getExpansion=function(t){var e=this.macros.get(t);if(null==e)return e;var r="function"==typeof e?e(this):e;if("string"==typeof r){var n=0;if(-1!==r.indexOf("#"))for(var a=r.replace(/##/g,"");-1!==a.indexOf("#"+(n+1));)++n;for(var i=new Kr(r,this.settings),o=[],s=i.lex();"EOF"!==s.text;)o.push(s),s=i.lex();return o.reverse(),{tokens:o,numArgs:n}}return r},e.isDefined=function(t){return this.macros.has(t)||$r.hasOwnProperty(t)||Y.math.hasOwnProperty(t)||Y.text.hasOwnProperty(t)||ln.hasOwnProperty(t)},t}(),cn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"}},un={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","č":"č","ĉ":"ĉ","ċ":"ċ","ď":"ď","ḋ":"ḋ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ĺ":"ĺ","ľ":"ľ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ď":"Ď","Ḋ":"Ḋ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ĺ":"Ĺ","Ľ":"Ľ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ť":"Ť","Ṫ":"Ṫ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},dn=function(){function t(t,e){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new mn(t,e,this.mode),this.settings=e,this.leftrightDepth=0}var e=t.prototype;return e.expect=function(t,e){if(void 0===e&&(e=!0),this.nextToken.text!==t)throw new o("Expected '"+t+"', got '"+this.nextToken.text+"'",this.nextToken);e&&this.consume()},e.consume=function(){this.nextToken=this.gullet.expandNextToken()},e.switchMode=function(t){this.mode=t,this.gullet.switchMode(t)},e.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor"),this.consume();var t=this.parseExpression(!1);return this.expect("EOF",!1),this.gullet.endGroup(),t},e.parseExpression=function(e,r){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.nextToken;if(-1!==t.endOfExpression.indexOf(a.text))break;if(r&&a.text===r)break;if(e&&$r[a.text]&&$r[a.text].infix)break;var i=this.parseAtom(r);if(!i)break;n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},e.handleInfixNodes=function(t){for(var e,r=-1,n=0;n0&&!l&&this.consumeSpaces(),0!==s||l||"math"!==this.mode||this.consumeSpaces();var m=this.nextToken,c=this.parseGroupOfType("argument to '"+t+"'",h,l,n);if(!c){if(l){i.push(null);continue}throw new o("Expected group after '"+t+"'",m)}(l?i:a).push(c)}return{args:a,optArgs:i}},e.parseGroupOfType=function(t,e,r,n){switch(e){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseGroup(t,r,n,void 0,e);case"raw":if(r&&"{"===this.nextToken.text)return null;var a=this.parseStringGroup("raw",r,!0);if(a)return{type:"raw",mode:"text",string:a.text};throw new o("Expected raw group",this.nextToken);case"original":case null:case void 0:return this.parseGroup(t,r,n);default:throw new o("Unknown group type as "+t,this.nextToken)}},e.consumeSpaces=function(){for(;" "===this.nextToken.text;)this.consume()},e.parseStringGroup=function(t,e,r){var n=e?"[":"{",a=e?"]":"}",i=this.nextToken;if(i.text!==n){if(e)return null;if(r&&"EOF"!==i.text&&/[^{}[\]]/.test(i.text))return this.gullet.lexer.setCatcode("%",14),this.consume(),i}var s=this.mode;this.mode="text",this.expect(n);for(var h="",l=this.nextToken,m=0,c=l;r&&m>0||this.nextToken.text!==a;){switch(this.nextToken.text){case"EOF":throw new o("Unexpected end of input in "+t,l.range(c,h));case n:m++;break;case a:m--}h+=(c=this.nextToken).text,this.consume()}return this.mode=s,this.gullet.lexer.setCatcode("%",14),this.expect(a),l.range(c,h)},e.parseRegexGroup=function(t,e){var r=this.mode;this.mode="text";for(var n=this.nextToken,a=n,i="";"EOF"!==this.nextToken.text&&t.test(i+this.nextToken.text);)i+=(a=this.nextToken).text,this.consume();if(""===i)throw new o("Invalid "+e+": '"+n.text+"'",n);return this.mode=r,n.range(a,i)},e.parseColorGroup=function(t){var e=this.parseStringGroup("color",t);if(!e)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!r)throw new o("Invalid color: '"+e.text+"'",e);var n=r[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}},e.parseSizeGroup=function(t){var e,r=!1;if(!(e=t||"{"===this.nextToken.text?this.parseStringGroup("size",t):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;t||0!==e.text.length||(e.text="0pt",r=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e.text);if(!n)throw new o("Invalid size: '"+e.text+"'",e);var a,i={number:+(n[1]+n[2]),unit:n[3]};if("string"!=typeof(a=i)&&(a=a.unit),!(a in St||a in Mt||"ex"===a))throw new o("Invalid unit: '"+i.unit+"'",e);return{type:"size",mode:this.mode,value:i,isBlank:r}},e.parseUrlGroup=function(t){var e=this.parseStringGroup("url",t,!0);if(!e)return null;var r=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),n=/^\s*([^\\\/#]*?)(?::|�*58|�*3a)/i.exec(r);n=null!=n?n[1]:"_relative";var a=this.settings.allowedProtocols;if(!c.contains(a,"*")&&!c.contains(a,n))throw new o("Forbidden protocol '"+n+"'",e);return{type:"url",mode:this.mode,url:r}},e.parseGroup=function(e,r,a,i,s){var h,l,m=this.mode,c=this.nextToken,u=c.text;if(s&&this.switchMode(s),r?"["===u:"{"===u||"\\begingroup"===u){h=t.endOfGroup[u],this.gullet.beginGroup(),this.consume();var d=this.parseExpression(!1,h),p=this.nextToken;this.gullet.endGroup(),l={type:"ordgroup",mode:this.mode,loc:n.range(c,p),body:d,semisimple:"\\begingroup"===u||void 0}}else if(r)l=null;else if(null==(l=this.parseFunction(i,e,a)||this.parseSymbol())&&"\\"===u[0]&&!ln.hasOwnProperty(u)){if(this.settings.throwOnError)throw new o("Undefined control sequence: "+u,c);l=this.handleUnsupportedCmd()}return s&&this.switchMode(m),h&&this.expect(h),l},e.formLigatures=function(t){for(var e=t.length-1,r=0;r=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var h,l=Y[this.mode][e].group,m=n.range(t);if(G.hasOwnProperty(l)){var c=l;h={type:"atom",mode:this.mode,family:c,loc:m,text:e}}else h={type:l,mode:this.mode,loc:m,text:e};i=h}else{if(!(e.charCodeAt(0)>=128))return null;this.settings.strict&&(M(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),i={type:"textord",mode:this.mode,loc:n.range(t),text:e}}if(this.consume(),s)for(var u=0;u/g,b="\x3c!-- begin-block-katex",w="end-block-katex--\x3e",k=//g;!function(){$docsify.plugins=[].concat(function(t){t.beforeEach(t=>{let e=t.replace(/(.*)<\/code>/g,function(t,e){return`${e.replace(/`/g,l)}`}).replace(/\$`\$/g,c).replace(/\\`\{/g,d).replace(/\\\$/g,s).replace(/`[^`]*`/g,function(t){return t.replace(/\$/g,f)}).replace(m,"`");return e=(e=e.replace(u,"$ `$").replace(p,"\\`{")).replace(/(\$\$)([\s\S]*?)(\$\$)/g,function(t,e,r){return b+r+w}).replace(/(\$)([\s\S]*?)(\$)/g,function(t,e,r){return x+r.replace(h,"\\$")+v}).replace(h,"\\$")}),t.afterEach(function(t,e){let r=t.replace(y,function(t,e){return a.a.renderToString(e,i)});e((r=r.replace(k,function(t,e){return a.a.renderToString(e,o)})).replace(g,"$"))})},$docsify.plugins)}()}]); \ No newline at end of file diff --git a/plugin/docsify-pagination.min.js b/plugin/docsify-pagination.min.js new file mode 100644 index 0000000..fd31e17 --- /dev/null +++ b/plugin/docsify-pagination.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e():"function"==typeof define&&define.amd?define(e):e()}(0,function(){"use strict";var t,p=(function(t,e){function n(t,e){return e.querySelector(t)}(e=t.exports=function(t,e){return n(t,e=e||document)}).all=function(t,e){return(e=e||document).querySelectorAll(t)},e.engine=function(t){if(!t.one)throw new Error(".one callback required");if(!t.all)throw new Error(".all callback required");return n=t.one,e.all=t.all,e}}(t={exports:{}},t.exports),t.exports);p.all,p.engine;try{var a=p}catch(t){a=p}var e=Element.prototype,r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector,u=function(t,e){if(!t||1!==t.nodeType)return!1;if(r)return r.call(t,e);for(var n=a.all(e,t.parentNode),i=0;i*{line-height:1;vertical-align:middle}.pagination-item-label svg{height:.8em;width:auto;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px}.pagination-item--next{margin-left:auto;text-align:right}.pagination-item--next svg{margin-left:.5em}.pagination-item--previous svg{margin-right:.5em}.pagination-item-title{font-size:1.6em}.pagination-item-subtitle{text-transform:uppercase;opacity:.3}");var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},l=function(){function i(t,e){for(var n=0;n ul > li"),p("p",e)),this.hyperlink=m(t))}return l(n,[{key:"toJSON",value:function(){if(this.hyperlink)return{name:this.hyperlink.innerText,href:this.hyperlink.getAttribute("href"),chapterName:this.chapter&&this.chapter.innerText||""}}}]),n}();var x={container:function(){return'
    '},inner:function(t,e){return[t.prev&&'\n \n ",t.next&&'\n \n "].filter(Boolean).join("")}};window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(t,e){var n=c({},s(e.config),e.config.pagination||{});function i(){var t=p("."+h);t&&(t.innerHTML=x.inner(function(t,e){var n=e.crossChapter,i=e.routerMode;try{var a=i===d.HISTORY?t.route.path:"#"+t.route.path,r=g(p.all(".sidebar li a")).filter(function(t){return!u(t,".section-link")}),o=r.find(v(a)),l=g((f(o,"ul")||{}).children).filter(function(t){return"LI"===t.tagName.toUpperCase()}),c=n?r.findIndex(v(a)):l.findIndex(function(t){var e=m(t);return e&&v(a,e)}),s=n?r:l;return{prev:new y(s[c-1]).toJSON(),next:new y(s[c+1]).toJSON()}}catch(t){return{}}}(e,n),n))}t.afterEach(function(t){return t+x.container()}),t.doneEach(function(){return i()})}].concat(window.$docsify.plugins||[])}); \ No newline at end of file diff --git a/plugin/docsify-pdf-embed.js b/plugin/docsify-pdf-embed.js new file mode 100644 index 0000000..dd206a6 --- /dev/null +++ b/plugin/docsify-pdf-embed.js @@ -0,0 +1,132 @@ +const DEBUG = 0; +const PDF_VIEWER_WIDTH = '100%'; +const PDF_VIEWER_HEIGHT = '50rem'; +const PDF_MARGIN_TOP = '2rem'; +const PDF_MARGIN_BOTTOM = '5rem'; + +! function() { + var verbose_log = function(log){ + if (DEBUG) { + console.log(log); + } + } + + var mobile_check = function() { + var check = false; + (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera); + return check; + }; + + var url_check = function(url_str) { + var expression = /^(http|https):\/\/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi; + return url_str.match(expression); + } + + var build_absolute_path = function(path_str) { + return window.location.protocol + "//" + window.location.hostname + "/" + path_str; + } + + var renderer_func = function(code, lang, base=null) { + var pdf_renderer = function(code, lang, verify) { + function unique_id_generator(){ + function rand_gen(){ + return Math.floor((Math.random()+1) * 65536).toString(16).substring(1); + } + return rand_gen() + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + rand_gen() + rand_gen(); + } + if(lang && !lang.localeCompare('pdf', 'en', {sensitivity: 'base'})){ + if(verify){ + return true; + }else{ + var divId = "markdown_code_pdf_container_" + unique_id_generator().toString(); + var container_list = new Array(); + if(localStorage.getItem('pdf_container_list')){ + container_list = JSON.parse(localStorage.getItem('pdf_container_list')); + } + container_list.push({"pdf_location": code, "div_id": divId}); + localStorage.setItem('pdf_container_list', JSON.stringify(container_list)); + return ( + '
    ' + + ' Link to ' + code + + '
    ' + ); + } + } + return false; + } + if(pdf_renderer(code, lang, true)){ + return pdf_renderer(code, lang, false); + } + /* SECTION START: Put other custom code rendering functions here + i.e. If the language of the code block is LaTex, + put the code below to replace original code block with the text: + 'Using LaTex is much better than handwriting!' inside a div container. + + if (lang == "latex") { + return ('
    Using LaTex is much better than handwriting!
    '); + } + + SECTION END */ + return (base ? base : this.origin.code.apply(this, arguments)); + } + + var pdf_renderer = {code: renderer_func}; + var doc_md = window.$docsify.markdown = (window.$docsify.markdown || {}); + var doc_md_rend = doc_md.renderer = (window.$docsify.markdown.renderer || {}); + doc_md_rend.code = (doc_md_rend.code ? doc_md_rend.code : renderer_func); + + var mobile_view = mobile_check(); + + // Allowing Docsify to execute the script to embed PDF + window.$docsify.executeScript = true; + + // Linking Docsify to the PDF plugin + window.$docsify.plugins = [ + function(hook, vm) { + hook.init(function() { + verbose_log('PDF Code Block Loader Plugin Initialized'); + verbose_log('This is a '.concat(mobile_view ? 'Mobile' : 'Non-mobile').concat(' Viewer.')); + }); + hook.afterEach(function(html, next) { + verbose_log('PDF Code Block Loader Plugin After Hook Initialized'); + container_list = JSON.parse(localStorage.getItem('pdf_container_list')); + verbose_log(container_list); + if(container_list){ + // Handling mobile pdf rendering + if(mobile_view){ + html += '