14947 lines
2.1 MiB
Plaintext
14947 lines
2.1 MiB
Plaintext
window.EmberENV={FEATURES:{},EXTEND_PROTOTYPES:{Date:!1}}
|
||
var runningTests=!1,loader,define,requireModule,require,requirejs
|
||
function createDeprecatedModule(e){define(e,["exports","ember-resolver/resolver","ember"],function(t,r,n){n.default.deprecate("Usage of `"+e+"` module is deprecated, please update to `ember-resolver`.",!1,{id:"ember-resolver.legacy-shims",until:"3.0.0"}),t.default=r.default})}(function(e){"use strict"
|
||
function t(){var e=Object.create(null)
|
||
return e.__=void 0,delete e.__,e}var r={loader:loader,define:define,requireModule:requireModule,require:require,requirejs:requirejs}
|
||
requirejs=require=requireModule=function(e){for(var t=[],r=c(e,"(require)",t),n=t.length-1;n>=0;n--)t[n].exports()
|
||
return r.module.exports},loader={noConflict:function(t){var n,i
|
||
for(n in t)t.hasOwnProperty(n)&&r.hasOwnProperty(n)&&(i=t[n],e[i]=e[n],e[n]=r[n])},makeDefaultExport:!0}
|
||
var n=t(),i=(t(),0)
|
||
var o=["require","exports","module"]
|
||
function a(e,t,r,n){this.uuid=i++,this.id=e,this.deps=!t.length&&r.length?o:t,this.module={exports:{}},this.callback=r,this.hasExportsAsDep=!1,this.isAlias=n,this.reified=new Array(t.length),this.state="new"}function s(){}function u(e){this.id=e}function c(e,t,r){for(var i=n[e]||n[e+"/index"];i&&i.isAlias;)i=n[i.id]
|
||
return i||function(e,t){throw new Error("Could not find module `"+e+"` imported from `"+t+"`")}(e,t),r&&"pending"!==i.state&&"finalized"!==i.state&&(i.findDeps(r),r.push(i)),i}function l(e,t){if("."!==e.charAt(0))return e
|
||
for(var r=e.split("/"),n=t.split("/").slice(0,-1),i=0,o=r.length;i<o;i++){var a=r[i]
|
||
if(".."===a){if(0===n.length)throw new Error("Cannot access parent module of root")
|
||
n.pop()}else{if("."===a)continue
|
||
n.push(a)}}return n.join("/")}function f(e){return!(!n[e]&&!n[e+"/index"])}a.prototype.makeDefaultExport=function(){var e=this.module.exports
|
||
null===e||"object"!=typeof e&&"function"!=typeof e||void 0!==e.default||!Object.isExtensible(e)||(e.default=e)},a.prototype.exports=function(){if("finalized"===this.state||"reifying"===this.state)return this.module.exports
|
||
loader.wrapModules&&(this.callback=loader.wrapModules(this.id,this.callback)),this.reify()
|
||
var e=this.callback.apply(this,this.reified)
|
||
return this.reified.length=0,this.state="finalized",this.hasExportsAsDep&&void 0===e||(this.module.exports=e),loader.makeDefaultExport&&this.makeDefaultExport(),this.module.exports},a.prototype.unsee=function(){this.state="new",this.module={exports:{}}},a.prototype.reify=function(){if("reified"!==this.state){this.state="reifying"
|
||
try{this.reified=this._reify(),this.state="reified"}finally{"reifying"===this.state&&(this.state="errored")}}},a.prototype._reify=function(){for(var e=this.reified.slice(),t=0;t<e.length;t++){var r=e[t]
|
||
e[t]=r.exports?r.exports:r.module.exports()}return e},a.prototype.findDeps=function(e){if("new"===this.state){this.state="pending"
|
||
for(var t=this.deps,r=0;r<t.length;r++){var n=t[r],i=this.reified[r]={exports:void 0,module:void 0}
|
||
"exports"===n?(this.hasExportsAsDep=!0,i.exports=this.module.exports):"require"===n?i.exports=this.makeRequire():"module"===n?i.exports=this.module:i.module=c(l(n,this.id),this.id,e)}}},a.prototype.makeRequire=function(){var e=this.id,t=function(t){return require(l(t,e))}
|
||
return t.default=t,t.moduleId=e,t.has=function(t){return f(l(t,e))},t},(define=function(e,t,r){var i=n[e]
|
||
i&&"new"!==i.state||(arguments.length<2&&function(e){throw new Error("an unsupported module was defined, expected `define(id, deps, module)` instead got: `"+e+"` arguments to define`")}(arguments.length),Array.isArray(t)||(r=t,t=[]),n[e]=r instanceof u?new a(r.id,t,r,!0):new a(e,t,r,!1))}).exports=function(e,t){var r=n[e]
|
||
if(!r||"new"===r.state)return(r=new a(e,[],s,null)).module.exports=t,r.state="finalized",n[e]=r,r},define.alias=function(e,t){return 2===arguments.length?define(t,new u(e)):new u(e)},requirejs.entries=requirejs._eak_seen=n,requirejs.has=f,requirejs.unsee=function(e){c(e,"(unsee)",!1).unsee()},requirejs.clear=function(){requirejs.entries=requirejs._eak_seen=n=t(),t()},define("foo",function(){}),define("foo/bar",[],function(){}),define("foo/asdf",["module","exports","require"],function(e,t,r){r.has("foo/bar")&&r("foo/bar")}),define("foo/baz",[],define.alias("foo")),define("foo/quz",define.alias("foo")),define.alias("foo","foo/qux"),define("foo/bar",["foo","./quz","./baz","./asdf","./bar","../foo"],function(){}),define("foo/main",["foo/bar"],function(){}),define.exports("foo/exports",{}),require("foo/exports"),require("foo/main"),require.unsee("foo/bar"),requirejs.clear(),"object"==typeof exports&&"object"==typeof module&&module.exports&&(module.exports={require:require,define:define})})(this),function(e){"use strict"
|
||
var t,r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag",a="object"==typeof module,s=e.regeneratorRuntime
|
||
if(s)a&&(module.exports=s)
|
||
else{(s=e.regeneratorRuntime=a?module.exports:{}).wrap=p
|
||
var u="suspendedStart",c="suspendedYield",l="executing",f="completed",h={},d=b.prototype=y.prototype
|
||
g.prototype=d.constructor=b,b.constructor=g,b[o]=g.displayName="GeneratorFunction",s.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor
|
||
return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(d),e},s.awrap=function(e){return new _(e)},v(w.prototype),s.async=function(e,t,r,n){var i=new w(p(e,t,r,n))
|
||
return s.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},v(d),d[i]=function(){return this},d[o]="Generator",d.toString=function(){return"[object Generator]"},s.keys=function(e){var t=[]
|
||
for(var r in e)t.push(r)
|
||
return t.reverse(),function r(){for(;t.length;){var n=t.pop()
|
||
if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},s.values=x,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0
|
||
var e=this.tryEntries[0].completion
|
||
if("throw"===e.type)throw e.arg
|
||
return this.rval},dispatchException:function(e){if(this.done)throw e
|
||
var t=this
|
||
function n(r,n){return a.type="throw",a.arg=e,t.next=r,!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion
|
||
if("root"===o.tryLoc)return n("end")
|
||
if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc")
|
||
if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)
|
||
if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally")
|
||
if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n]
|
||
if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i
|
||
break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null)
|
||
var a=o?o.completion:{}
|
||
return a.type=e,a.arg=t,o?this.next=o.finallyLoc:this.complete(a),h},complete:function(e,t){if("throw"===e.type)throw e.arg
|
||
"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t]
|
||
if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t]
|
||
if(r.tryLoc===e){var n=r.completion
|
||
if("throw"===n.type){var i=n.arg
|
||
E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},h}}}function p(e,r,n,i){var o=r&&r.prototype instanceof y?r:y,a=Object.create(o.prototype),s=new k(i||[])
|
||
return a._invoke=function(e,r,n){var i=u
|
||
return function(o,a){if(i===l)throw new Error("Generator is already running")
|
||
if(i===f){if("throw"===o)throw a
|
||
return C()}for(;;){var s=n.delegate
|
||
if(s){if("return"===o||"throw"===o&&s.iterator[o]===t){n.delegate=null
|
||
var d=s.iterator.return
|
||
if(d){var p=m(d,s.iterator,a)
|
||
if("throw"===p.type){o="throw",a=p.arg
|
||
continue}}if("return"===o)continue}var p=m(s.iterator[o],s.iterator,a)
|
||
if("throw"===p.type){n.delegate=null,o="throw",a=p.arg
|
||
continue}o="next",a=t
|
||
var y=p.arg
|
||
if(!y.done)return i=c,y
|
||
n[s.resultName]=y.value,n.next=s.nextLoc,n.delegate=null}if("next"===o)n.sent=n._sent=a
|
||
else if("throw"===o){if(i===u)throw i=f,a
|
||
n.dispatchException(a)&&(o="next",a=t)}else"return"===o&&n.abrupt("return",a)
|
||
i=l
|
||
var p=m(e,r,n)
|
||
if("normal"===p.type){i=n.done?f:c
|
||
var y={value:p.arg,done:n.done}
|
||
if(p.arg!==h)return y
|
||
n.delegate&&"next"===o&&(a=t)}else"throw"===p.type&&(i=f,o="throw",a=p.arg)}}}(e,n,s),a}function m(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function y(){}function g(){}function b(){}function v(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function _(e){this.arg=e}function w(e){function t(r,n,i,o){var a=m(e[r],e,n)
|
||
if("throw"!==a.type){var s=a.arg,u=s.value
|
||
return u instanceof _?Promise.resolve(u.arg).then(function(e){t("next",e,i,o)},function(e){t("throw",e,i,o)}):Promise.resolve(u).then(function(e){s.value=e,i(s)},o)}o(a.arg)}var r
|
||
"object"==typeof process&&process.domain&&(t=process.domain.bind(t)),this._invoke=function(e,n){function i(){return new Promise(function(r,i){t(e,n,r,i)})}return r=r?r.then(i,i):i()}}function S(e){var t={tryLoc:e[0]}
|
||
1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{}
|
||
t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function x(e){if(e){var n=e[i]
|
||
if(n)return n.call(e)
|
||
if("function"==typeof e.next)return e
|
||
if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n
|
||
return n.value=t,n.done=!0,n}
|
||
return a.next=a}}return{next:C}}function C(){return{value:t,done:!0}}}("object"==typeof global?global:"object"==typeof window?window:"object"==typeof self?self:this),function(e,t){"use strict"
|
||
"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document")
|
||
return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict"
|
||
var r=[],n=e.document,i=Object.getPrototypeOf,o=r.slice,a=r.concat,s=r.push,u=r.indexOf,c={},l=c.toString,f=c.hasOwnProperty,h=f.toString,d=h.call(Object),p={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},y=function(e){return null!=e&&e===e.window},g={type:!0,src:!0,noModule:!0}
|
||
function b(e,t,r){var i,o=(t=t||n).createElement("script")
|
||
if(o.text=e,r)for(i in g)r[i]&&(o[i]=r[i])
|
||
t.head.appendChild(o).parentNode.removeChild(o)}function v(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[l.call(e)]||"object":typeof e}var _=function(e,t){return new _.fn.init(e,t)},w=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
|
||
function S(e){var t=!!e&&"length"in e&&e.length,r=v(e)
|
||
return!m(e)&&!y(e)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e)}_.fn=_.prototype={jquery:"3.3.1",constructor:_,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e)
|
||
return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,function(t,r){return e.call(t,r,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,r=+e+(e<0?t:0)
|
||
return this.pushStack(r>=0&&r<t?[this[r]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:r.sort,splice:r.splice},_.extend=_.fn.extend=function(){var e,t,r,n,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1
|
||
for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=a[t],a!==(n=e[t])&&(c&&n&&(_.isPlainObject(n)||(i=Array.isArray(n)))?(i?(i=!1,o=r&&Array.isArray(r)?r:[]):o=r&&_.isPlainObject(r)?r:{},a[t]=_.extend(c,o,n)):void 0!==n&&(a[t]=n))
|
||
return a},_.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,r
|
||
return!(!e||"[object Object]"!==l.call(e))&&(!(t=i(e))||"function"==typeof(r=f.call(t,"constructor")&&t.constructor)&&h.call(r)===d)},isEmptyObject:function(e){var t
|
||
for(t in e)return!1
|
||
return!0},globalEval:function(e){b(e)},each:function(e,t){var r,n=0
|
||
if(S(e))for(r=e.length;n<r&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break
|
||
return e},trim:function(e){return null==e?"":(e+"").replace(w,"")},makeArray:function(e,t){var r=t||[]
|
||
return null!=e&&(S(Object(e))?_.merge(r,"string"==typeof e?[e]:e):s.call(r,e)),r},inArray:function(e,t,r){return null==t?-1:u.call(t,e,r)},merge:function(e,t){for(var r=+t.length,n=0,i=e.length;n<r;n++)e[i++]=t[n]
|
||
return e.length=i,e},grep:function(e,t,r){for(var n=[],i=0,o=e.length,a=!r;i<o;i++)!t(e[i],i)!==a&&n.push(e[i])
|
||
return n},map:function(e,t,r){var n,i,o=0,s=[]
|
||
if(S(e))for(n=e.length;o<n;o++)null!=(i=t(e[o],o,r))&&s.push(i)
|
||
else for(o in e)null!=(i=t(e[o],o,r))&&s.push(i)
|
||
return a.apply([],s)},guid:1,support:p}),"function"==typeof Symbol&&(_.fn[Symbol.iterator]=r[Symbol.iterator]),_.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()})
|
||
var E=function(e){var t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_="sizzle"+1*new Date,w=e.document,S=0,E=0,k=ae(),x=ae(),C=ae(),A=function(e,t){return e===t&&(f=!0),0},T={}.hasOwnProperty,I=[],P=I.pop,M=I.push,R=I.push,O=I.slice,B=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r
|
||
return-1},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",j="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",D="\\["+j+"*("+L+")(?:"+j+"*([*^$|!~]?=)"+j+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+j+"*\\]",U=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+D+")*)|.*)\\)|)",F=new RegExp(j+"+","g"),z=new RegExp("^"+j+"+|((?:^|[^\\\\])(?:\\\\.)*)"+j+"+$","g"),q=new RegExp("^"+j+"*,"+j+"*"),V=new RegExp("^"+j+"*([>+~]|"+j+")"+j+"*"),H=new RegExp("="+j+"*([^\\]'\"]*?)"+j+"*\\]","g"),K=new RegExp(U),W=new RegExp("^"+L+"$"),G={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+D),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),ee=function(e,t,r){var n="0x"+t-65536
|
||
return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ne=function(){h()},ie=be(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"})
|
||
try{R.apply(I=O.call(w.childNodes),w.childNodes),I[w.childNodes.length].nodeType}catch(e){R={apply:I.length?function(e,t){M.apply(e,O.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}function oe(e,t,n,i){var o,s,c,l,f,p,g,b=t&&t.ownerDocument,S=t?t.nodeType:9
|
||
if(n=n||[],"string"!=typeof e||!e||1!==S&&9!==S&&11!==S)return n
|
||
if(!i&&((t?t.ownerDocument||t:w)!==d&&h(t),t=t||d,m)){if(11!==S&&(f=$.exec(e)))if(o=f[1]){if(9===S){if(!(c=t.getElementById(o)))return n
|
||
if(c.id===o)return n.push(c),n}else if(b&&(c=b.getElementById(o))&&v(t,c)&&c.id===o)return n.push(c),n}else{if(f[2])return R.apply(n,t.getElementsByTagName(e)),n
|
||
if((o=f[3])&&r.getElementsByClassName&&t.getElementsByClassName)return R.apply(n,t.getElementsByClassName(o)),n}if(r.qsa&&!C[e+" "]&&(!y||!y.test(e))){if(1!==S)b=t,g=e
|
||
else if("object"!==t.nodeName.toLowerCase()){for((l=t.getAttribute("id"))?l=l.replace(te,re):t.setAttribute("id",l=_),s=(p=a(e)).length;s--;)p[s]="#"+l+" "+ge(p[s])
|
||
g=p.join(","),b=J.test(e)&&me(t.parentNode)||t}if(g)try{return R.apply(n,b.querySelectorAll(g)),n}catch(e){}finally{l===_&&t.removeAttribute("id")}}}return u(e.replace(z,"$1"),t,n,i)}function ae(){var e=[]
|
||
return function t(r,i){return e.push(r+" ")>n.cacheLength&&delete t[e.shift()],t[r+" "]=i}}function se(e){return e[_]=!0,e}function ue(e){var t=d.createElement("fieldset")
|
||
try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var r=e.split("|"),i=r.length;i--;)n.attrHandle[r[i]]=t}function le(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex
|
||
if(n)return n
|
||
if(r)for(;r=r.nextSibling;)if(r===t)return-1
|
||
return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var r=t.nodeName.toLowerCase()
|
||
return("input"===r||"button"===r)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pe(e){return se(function(t){return t=+t,se(function(r,n){for(var i,o=e([],r.length,t),a=o.length;a--;)r[i=o[a]]&&(r[i]=!(n[i]=r[i]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in r=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement
|
||
return!!t&&"HTML"!==t.nodeName},h=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w
|
||
return a!==d&&9===a.nodeType&&a.documentElement?(p=(d=a).documentElement,m=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",ne,!1):i.attachEvent&&i.attachEvent("onunload",ne)),r.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=X.test(d.getElementsByClassName),r.getById=ue(function(e){return p.appendChild(e).id=_,!d.getElementsByName||!d.getElementsByName(_).length}),r.getById?(n.filter.ID=function(e){var t=e.replace(Z,ee)
|
||
return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var r=t.getElementById(e)
|
||
return r?[r]:[]}}):(n.filter.ID=function(e){var t=e.replace(Z,ee)
|
||
return function(e){var r=void 0!==e.getAttributeNode&&e.getAttributeNode("id")
|
||
return r&&r.value===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var r,n,i,o=t.getElementById(e)
|
||
if(o){if((r=o.getAttributeNode("id"))&&r.value===e)return[o]
|
||
for(i=t.getElementsByName(e),n=0;o=i[n++];)if((r=o.getAttributeNode("id"))&&r.value===e)return[o]}return[]}}),n.find.TAG=r.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):r.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,n=[],i=0,o=t.getElementsByTagName(e)
|
||
if("*"===e){for(;r=o[i++];)1===r.nodeType&&n.push(r)
|
||
return n}return o},n.find.CLASS=r.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},g=[],y=[],(r.qsa=X.test(d.querySelectorAll))&&(ue(function(e){p.appendChild(e).innerHTML="<a id='"+_+"'></a><select id='"+_+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+j+"*(?:value|"+N+")"),e.querySelectorAll("[id~="+_+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>"
|
||
var t=d.createElement("input")
|
||
t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+j+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(r.matchesSelector=X.test(b=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ue(function(e){r.disconnectedMatch=b.call(e,"*"),b.call(e,"[s!='']:x"),g.push("!=",U)}),y=y.length&&new RegExp(y.join("|")),g=g.length&&new RegExp(g.join("|")),t=X.test(p.compareDocumentPosition),v=t||X.test(p.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode
|
||
return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0
|
||
return!1},A=t?function(e,t){if(e===t)return f=!0,0
|
||
var n=!e.compareDocumentPosition-!t.compareDocumentPosition
|
||
return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!r.sortDetached&&t.compareDocumentPosition(e)===n?e===d||e.ownerDocument===w&&v(w,e)?-1:t===d||t.ownerDocument===w&&v(w,t)?1:l?B(l,e)-B(l,t):0:4&n?-1:1)}:function(e,t){if(e===t)return f=!0,0
|
||
var r,n=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t]
|
||
if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:l?B(l,e)-B(l,t):0
|
||
if(i===o)return le(e,t)
|
||
for(r=e;r=r.parentNode;)a.unshift(r)
|
||
for(r=t;r=r.parentNode;)s.unshift(r)
|
||
for(;a[n]===s[n];)n++
|
||
return n?le(a[n],s[n]):a[n]===w?-1:s[n]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&h(e),t=t.replace(H,"='$1']"),r.matchesSelector&&m&&!C[t+" "]&&(!g||!g.test(t))&&(!y||!y.test(t)))try{var n=b.call(e,t)
|
||
if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&h(e),v(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&h(e)
|
||
var i=n.attrHandle[t.toLowerCase()],o=i&&T.call(n.attrHandle,t.toLowerCase())?i(e,t,!m):void 0
|
||
return void 0!==o?o:r.attributes||!m?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,re)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,n=[],i=0,o=0
|
||
if(f=!r.detectDuplicates,l=!r.sortStable&&e.slice(0),e.sort(A),f){for(;t=e[o++];)t===e[o]&&(i=n.push(o))
|
||
for(;i--;)e.splice(n[i],1)}return l=null,e},i=oe.getText=function(e){var t,r="",n=0,o=e.nodeType
|
||
if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent
|
||
for(e=e.firstChild;e;e=e.nextSibling)r+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)r+=i(t)
|
||
return r},(n=oe.selectors={cacheLength:50,createPseudo:se,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2]
|
||
return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&K.test(r)&&(t=a(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase()
|
||
return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "]
|
||
return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&k(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(n){var i=oe.attr(n,e)
|
||
return null==i?"!="===t:!t||(i+="","="===t?i===r:"!="===t?i!==r:"^="===t?r&&0===i.indexOf(r):"*="===t?r&&i.indexOf(r)>-1:"$="===t?r&&i.slice(-r.length)===r:"~="===t?(" "+i.replace(F," ")+" ").indexOf(r)>-1:"|="===t&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,r,n,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t
|
||
return 1===n&&0===i?function(e){return!!e.parentNode}:function(t,r,u){var c,l,f,h,d,p,m=o!==a?"nextSibling":"previousSibling",y=t.parentNode,g=s&&t.nodeName.toLowerCase(),b=!u&&!s,v=!1
|
||
if(y){if(o){for(;m;){for(h=t;h=h[m];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1
|
||
p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?y.firstChild:y.lastChild],a&&b){for(v=(d=(c=(l=(f=(h=y)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===S&&c[1])&&c[2],h=d&&y.childNodes[d];h=++d&&h&&h[m]||(v=d=0)||p.pop();)if(1===h.nodeType&&++v&&h===t){l[e]=[S,d,v]
|
||
break}}else if(b&&(v=d=(c=(l=(f=(h=t)[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]||[])[0]===S&&c[1]),!1===v)for(;(h=++d&&h&&h[m]||(v=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++v||(b&&((l=(f=h[_]||(h[_]={}))[h.uniqueID]||(f[h.uniqueID]={}))[e]=[S,v]),h!==t)););return(v-=i)===n||v%n==0&&v/n>=0}}},PSEUDO:function(e,t){var r,i=n.pseudos[e]||n.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e)
|
||
return i[_]?i(t):i.length>1?(r=[e,e,"",t],n.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,r){for(var n,o=i(e,t),a=o.length;a--;)e[n=B(e,o[a])]=!(r[n]=o[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:se(function(e){var t=[],r=[],n=s(e.replace(z,"$1"))
|
||
return n[_]?se(function(e,t,r,i){for(var o,a=n(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,n(t,null,o,r),t[0]=null,!r.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return W.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var r
|
||
do{if(r=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(r=r.toLowerCase())===e||0===r.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType)
|
||
return!1}}),target:function(t){var r=e.location&&e.location.hash
|
||
return r&&r.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase()
|
||
return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1
|
||
return!0},parent:function(e){return!n.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase()
|
||
return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t
|
||
return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:pe(function(){return[0]}),last:pe(function(e,t){return[t-1]}),eq:pe(function(e,t,r){return[r<0?r+t:r]}),even:pe(function(e,t){for(var r=0;r<t;r+=2)e.push(r)
|
||
return e}),odd:pe(function(e,t){for(var r=1;r<t;r+=2)e.push(r)
|
||
return e}),lt:pe(function(e,t,r){for(var n=r<0?r+t:r;--n>=0;)e.push(n)
|
||
return e}),gt:pe(function(e,t,r){for(var n=r<0?r+t:r;++n<t;)e.push(n)
|
||
return e})}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[t]=fe(t)
|
||
for(t in{submit:!0,reset:!0})n.pseudos[t]=he(t)
|
||
function ye(){}function ge(e){for(var t=0,r=e.length,n="";t<r;t++)n+=e[t].value
|
||
return n}function be(e,t,r){var n=t.dir,i=t.next,o=i||n,a=r&&"parentNode"===o,s=E++
|
||
return t.first?function(t,r,i){for(;t=t[n];)if(1===t.nodeType||a)return e(t,r,i)
|
||
return!1}:function(t,r,u){var c,l,f,h=[S,s]
|
||
if(u){for(;t=t[n];)if((1===t.nodeType||a)&&e(t,r,u))return!0}else for(;t=t[n];)if(1===t.nodeType||a)if(l=(f=t[_]||(t[_]={}))[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[n]||t
|
||
else{if((c=l[o])&&c[0]===S&&c[1]===s)return h[2]=c[2]
|
||
if(l[o]=h,h[2]=e(t,r,u))return!0}return!1}}function ve(e){return e.length>1?function(t,r,n){for(var i=e.length;i--;)if(!e[i](t,r,n))return!1
|
||
return!0}:e[0]}function _e(e,t,r,n,i){for(var o,a=[],s=0,u=e.length,c=null!=t;s<u;s++)(o=e[s])&&(r&&!r(o,n,i)||(a.push(o),c&&t.push(s)))
|
||
return a}function we(e,t,r,n,i,o){return n&&!n[_]&&(n=we(n)),i&&!i[_]&&(i=we(i,o)),se(function(o,a,s,u){var c,l,f,h=[],d=[],p=a.length,m=o||function(e,t,r){for(var n=0,i=t.length;n<i;n++)oe(e,t[n],r)
|
||
return r}(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?m:_e(m,h,e,s,u),g=r?i||(o?e:p||n)?[]:a:y
|
||
if(r&&r(y,g,s,u),n)for(c=_e(g,d),n(c,[],s,u),l=c.length;l--;)(f=c[l])&&(g[d[l]]=!(y[d[l]]=f))
|
||
if(o){if(i||e){if(i){for(c=[],l=g.length;l--;)(f=g[l])&&c.push(y[l]=f)
|
||
i(null,g=[],c,u)}for(l=g.length;l--;)(f=g[l])&&(c=i?B(o,f):h[l])>-1&&(o[c]=!(a[c]=f))}}else g=_e(g===a?g.splice(p,g.length):g),i?i(null,a,g,u):R.apply(a,g)})}function Se(e){for(var t,r,i,o=e.length,a=n.relative[e[0].type],s=a||n.relative[" "],u=a?1:0,l=be(function(e){return e===t},s,!0),f=be(function(e){return B(t,e)>-1},s,!0),h=[function(e,r,n){var i=!a&&(n||r!==c)||((t=r).nodeType?l(e,r,n):f(e,r,n))
|
||
return t=null,i}];u<o;u++)if(r=n.relative[e[u].type])h=[be(ve(h),r)]
|
||
else{if((r=n.filter[e[u].type].apply(null,e[u].matches))[_]){for(i=++u;i<o&&!n.relative[e[i].type];i++);return we(u>1&&ve(h),u>1&&ge(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(z,"$1"),r,u<i&&Se(e.slice(u,i)),i<o&&Se(e=e.slice(i)),i<o&&ge(e))}h.push(r)}return ve(h)}return ye.prototype=n.filters=n.pseudos,n.setFilters=new ye,a=oe.tokenize=function(e,t){var r,i,o,a,s,u,c,l=x[e+" "]
|
||
if(l)return t?0:l.slice(0)
|
||
for(s=e,u=[],c=n.preFilter;s;){for(a in r&&!(i=q.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=V.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(z," ")}),s=s.slice(r.length)),n.filter)!(i=G[a].exec(s))||c[a]&&!(i=c[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length))
|
||
if(!r)break}return t?s.length:s?oe.error(e):x(e,u).slice(0)},s=oe.compile=function(e,t){var r,i=[],o=[],s=C[e+" "]
|
||
if(!s){for(t||(t=a(e)),r=t.length;r--;)(s=Se(t[r]))[_]?i.push(s):o.push(s);(s=C(e,function(e,t){var r=t.length>0,i=e.length>0,o=function(o,a,s,u,l){var f,p,y,g=0,b="0",v=o&&[],_=[],w=c,E=o||i&&n.find.TAG("*",l),k=S+=null==w?1:Math.random()||.1,x=E.length
|
||
for(l&&(c=a===d||a||l);b!==x&&null!=(f=E[b]);b++){if(i&&f){for(p=0,a||f.ownerDocument===d||(h(f),s=!m);y=e[p++];)if(y(f,a||d,s)){u.push(f)
|
||
break}l&&(S=k)}r&&((f=!y&&f)&&g--,o&&v.push(f))}if(g+=b,r&&b!==g){for(p=0;y=t[p++];)y(v,_,a,s)
|
||
if(o){if(g>0)for(;b--;)v[b]||_[b]||(_[b]=P.call(u))
|
||
_=_e(_)}R.apply(u,_),l&&!o&&_.length>0&&g+t.length>1&&oe.uniqueSort(u)}return l&&(S=k,c=w),v}
|
||
return r?se(o):o}(o,i))).selector=e}return s},u=oe.select=function(e,t,r,i){var o,u,c,l,f,h="function"==typeof e&&e,d=!i&&a(e=h.selector||e)
|
||
if(r=r||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===t.nodeType&&m&&n.relative[u[1].type]){if(!(t=(n.find.ID(c.matches[0].replace(Z,ee),t)||[])[0]))return r
|
||
h&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=G.needsContext.test(e)?0:u.length;o--&&(c=u[o],!n.relative[l=c.type]);)if((f=n.find[l])&&(i=f(c.matches[0].replace(Z,ee),J.test(u[0].type)&&me(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ge(u)))return R.apply(r,i),r
|
||
break}}return(h||s(e,d))(i,t,!m,r,!t||J.test(e)&&me(t.parentNode)||t),r},r.sortStable=_.split("").sort(A).join("")===_,r.detectDuplicates=!!f,h(),r.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ce("type|href|height|width",function(e,t,r){if(!r)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),r.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ce("value",function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||ce(N,function(e,t,r){var n
|
||
if(!r)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),oe}(e)
|
||
_.find=E,_.expr=E.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=E.uniqueSort,_.text=E.getText,_.isXMLDoc=E.isXML,_.contains=E.contains,_.escapeSelector=E.escape
|
||
var k=function(e,t,r){for(var n=[],i=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&_(e).is(r))break
|
||
n.push(e)}return n},x=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e)
|
||
return r},C=_.expr.match.needsContext
|
||
function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var T=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i
|
||
function I(e,t,r){return m(t)?_.grep(e,function(e,n){return!!t.call(e,n,e)!==r}):t.nodeType?_.grep(e,function(e){return e===t!==r}):"string"!=typeof t?_.grep(e,function(e){return u.call(t,e)>-1!==r}):_.filter(t,e,r)}_.filter=function(e,t,r){var n=t[0]
|
||
return r&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?_.find.matchesSelector(n,e)?[n]:[]:_.find.matches(e,_.grep(t,function(e){return 1===e.nodeType}))},_.fn.extend({find:function(e){var t,r,n=this.length,i=this
|
||
if("string"!=typeof e)return this.pushStack(_(e).filter(function(){for(t=0;t<n;t++)if(_.contains(i[t],this))return!0}))
|
||
for(r=this.pushStack([]),t=0;t<n;t++)_.find(e,i[t],r)
|
||
return n>1?_.uniqueSort(r):r},filter:function(e){return this.pushStack(I(this,e||[],!1))},not:function(e){return this.pushStack(I(this,e||[],!0))},is:function(e){return!!I(this,"string"==typeof e&&C.test(e)?_(e):e||[],!1).length}})
|
||
var P,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,r){var i,o
|
||
if(!e)return this
|
||
if(r=r||P,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:M.exec(e))||!i[1]&&t)return!t||t.jquery?(t||r).find(e):this.constructor(t).find(e)
|
||
if(i[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:n,!0)),T.test(i[1])&&_.isPlainObject(t))for(i in t)m(this[i])?this[i](t[i]):this.attr(i,t[i])
|
||
return this}return(o=n.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==r.ready?r.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,P=_(n)
|
||
var R=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0}
|
||
function B(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),r=t.length
|
||
return this.filter(function(){for(var e=0;e<r;e++)if(_.contains(this,t[e]))return!0})},closest:function(e,t){var r,n=0,i=this.length,o=[],a="string"!=typeof e&&_(e)
|
||
if(!C.test(e))for(;n<i;n++)for(r=this[n];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(a?a.index(r)>-1:1===r.nodeType&&_.find.matchesSelector(r,e))){o.push(r)
|
||
break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(_(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode
|
||
return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,r){return k(e,"parentNode",r)},next:function(e){return B(e,"nextSibling")},prev:function(e){return B(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,r){return k(e,"nextSibling",r)},prevUntil:function(e,t,r){return k(e,"previousSibling",r)},siblings:function(e){return x((e.parentNode||{}).firstChild,e)},children:function(e){return x(e.firstChild)},contents:function(e){return A(e,"iframe")?e.contentDocument:(A(e,"template")&&(e=e.content||e),_.merge([],e.childNodes))}},function(e,t){_.fn[e]=function(r,n){var i=_.map(this,t,r)
|
||
return"Until"!==e.slice(-5)&&(n=r),n&&"string"==typeof n&&(i=_.filter(n,i)),this.length>1&&(O[e]||_.uniqueSort(i),R.test(e)&&i.reverse()),this.pushStack(i)}})
|
||
var N=/[^\x20\t\r\n\f]+/g
|
||
function j(e){return e}function L(e){throw e}function D(e,t,r,n){var i
|
||
try{e&&m(i=e.promise)?i.call(e).done(t).fail(r):e&&m(i=e.then)?i.call(e,t,r):t.apply(void 0,[e].slice(n))}catch(e){r.apply(void 0,[e])}}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={}
|
||
return _.each(e.match(N)||[],function(e,r){t[r]=!0}),t}(e):_.extend({},e)
|
||
var t,r,n,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,n=t=!0;a.length;s=-1)for(r=a.shift();++s<o.length;)!1===o[s].apply(r[0],r[1])&&e.stopOnFalse&&(s=o.length,r=!1)
|
||
e.memory||(r=!1),t=!1,i&&(o=r?[]:"")},c={add:function(){return o&&(r&&!t&&(s=o.length-1,a.push(r)),function t(r){_.each(r,function(r,n){m(n)?e.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==v(n)&&t(n)})}(arguments),r&&!t&&u()),this},remove:function(){return _.each(arguments,function(e,t){for(var r;(r=_.inArray(t,o,r))>-1;)o.splice(r,1),r<=s&&s--}),this},has:function(e){return e?_.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=r="",this},disabled:function(){return!o},lock:function(){return i=a=[],r||t||(o=r=""),this},locked:function(){return!!i},fireWith:function(e,r){return i||(r=[e,(r=r||[]).slice?r.slice():r],a.push(r),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}}
|
||
return c},_.extend({Deferred:function(t){var r=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments
|
||
return _.Deferred(function(t){_.each(r,function(r,n){var i=m(e[n[4]])&&e[n[4]]
|
||
o[n[1]](function(){var e=i&&i.apply(this,arguments)
|
||
e&&m(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[n[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,n,i){var o=0
|
||
function a(t,r,n,i){return function(){var s=this,u=arguments,c=function(){var e,c
|
||
if(!(t<o)){if((e=n.apply(s,u))===r.promise())throw new TypeError("Thenable self-resolution")
|
||
c=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(c)?i?c.call(e,a(o,r,j,i),a(o,r,L,i)):(o++,c.call(e,a(o,r,j,i),a(o,r,L,i),a(o,r,j,r.notifyWith))):(n!==j&&(s=void 0,u=[e]),(i||r.resolveWith)(s,u))}},l=i?c:function(){try{c()}catch(e){_.Deferred.exceptionHook&&_.Deferred.exceptionHook(e,l.stackTrace),t+1>=o&&(n!==L&&(s=void 0,u=[e]),r.rejectWith(s,u))}}
|
||
t?l():(_.Deferred.getStackHook&&(l.stackTrace=_.Deferred.getStackHook()),e.setTimeout(l))}}return _.Deferred(function(e){r[0][3].add(a(0,e,m(i)?i:j,e.notifyWith)),r[1][3].add(a(0,e,m(t)?t:j)),r[2][3].add(a(0,e,m(n)?n:L))}).promise()},promise:function(e){return null!=e?_.extend(e,i):i}},o={}
|
||
return _.each(r,function(e,t){var a=t[2],s=t[5]
|
||
i[t[1]]=a.add,s&&a.add(function(){n=s},r[3-e][2].disable,r[3-e][3].disable,r[0][2].lock,r[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,r=t,n=Array(r),i=o.call(arguments),a=_.Deferred(),s=function(e){return function(r){n[e]=this,i[e]=arguments.length>1?o.call(arguments):r,--t||a.resolveWith(n,i)}}
|
||
if(t<=1&&(D(e,a.done(s(r)).resolve,a.reject,!t),"pending"===a.state()||m(i[r]&&i[r].then)))return a.then()
|
||
for(;r--;)D(i[r],s(r),a.reject)
|
||
return a.promise()}})
|
||
var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/
|
||
_.Deferred.exceptionHook=function(t,r){e.console&&e.console.warn&&t&&U.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,r)},_.readyException=function(t){e.setTimeout(function(){throw t})}
|
||
var F=_.Deferred()
|
||
function z(){n.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),_.ready()}_.fn.ready=function(e){return F.then(e).catch(function(e){_.readyException(e)}),this},_.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==e&&--_.readyWait>0||F.resolveWith(n,[_]))}}),_.ready.then=F.then,"complete"===n.readyState||"loading"!==n.readyState&&!n.documentElement.doScroll?e.setTimeout(_.ready):(n.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z))
|
||
var q=function(e,t,r,n,i,o,a){var s=0,u=e.length,c=null==r
|
||
if("object"===v(r))for(s in i=!0,r)q(e,t,s,r[s],!0,o,a)
|
||
else if(void 0!==n&&(i=!0,m(n)||(a=!0),c&&(a?(t.call(e,n),t=null):(c=t,t=function(e,t,r){return c.call(_(e),r)})),t))for(;s<u;s++)t(e[s],r,a?n:n.call(e[s],s,t(e[s],r)))
|
||
return i?e:c?t.call(e):u?t(e[0],r):o},V=/^-ms-/,H=/-([a-z])/g
|
||
function K(e,t){return t.toUpperCase()}function W(e){return e.replace(V,"ms-").replace(H,K)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}
|
||
function Y(){this.expando=_.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando]
|
||
return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,r){var n,i=this.cache(e)
|
||
if("string"==typeof t)i[W(t)]=r
|
||
else for(n in t)i[W(n)]=t[n]
|
||
return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][W(t)]},access:function(e,t,r){return void 0===t||t&&"string"==typeof t&&void 0===r?this.get(e,t):(this.set(e,t,r),void 0!==r?r:t)},remove:function(e,t){var r,n=e[this.expando]
|
||
if(void 0!==n){if(void 0!==t){r=(t=Array.isArray(t)?t.map(W):(t=W(t))in n?[t]:t.match(N)||[]).length
|
||
for(;r--;)delete n[t[r]]}(void 0===t||_.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando]
|
||
return void 0!==t&&!_.isEmptyObject(t)}}
|
||
var Q=new Y,X=new Y,$=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,J=/[A-Z]/g
|
||
function Z(e,t,r){var n
|
||
if(void 0===r&&1===e.nodeType)if(n="data-"+t.replace(J,"-$&").toLowerCase(),"string"==typeof(r=e.getAttribute(n))){try{r=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:$.test(e)?JSON.parse(e):e)}(r)}catch(e){}X.set(e,t,r)}else r=void 0
|
||
return r}_.extend({hasData:function(e){return X.hasData(e)||Q.hasData(e)},data:function(e,t,r){return X.access(e,t,r)},removeData:function(e,t){X.remove(e,t)},_data:function(e,t,r){return Q.access(e,t,r)},_removeData:function(e,t){Q.remove(e,t)}}),_.fn.extend({data:function(e,t){var r,n,i,o=this[0],a=o&&o.attributes
|
||
if(void 0===e){if(this.length&&(i=X.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(r=a.length;r--;)a[r]&&0===(n=a[r].name).indexOf("data-")&&(n=W(n.slice(5)),Z(o,n,i[n]))
|
||
Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){X.set(this,e)}):q(this,function(t){var r
|
||
if(o&&void 0===t)return void 0!==(r=X.get(o,e))?r:void 0!==(r=Z(o,e))?r:void 0
|
||
this.each(function(){X.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){X.remove(this,e)})}}),_.extend({queue:function(e,t,r){var n
|
||
if(e)return t=(t||"fx")+"queue",n=Q.get(e,t),r&&(!n||Array.isArray(r)?n=Q.access(e,t,_.makeArray(r)):n.push(r)),n||[]},dequeue:function(e,t){t=t||"fx"
|
||
var r=_.queue(e,t),n=r.length,i=r.shift(),o=_._queueHooks(e,t)
|
||
"inprogress"===i&&(i=r.shift(),n--),i&&("fx"===t&&r.unshift("inprogress"),delete o.stop,i.call(e,function(){_.dequeue(e,t)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks"
|
||
return Q.get(e,r)||Q.access(e,r,{empty:_.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",r])})})}}),_.fn.extend({queue:function(e,t){var r=2
|
||
return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?_.queue(this[0],e):void 0===t?this:this.each(function(){var r=_.queue(this,e,t)
|
||
_._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&_.dequeue(this,e)})},dequeue:function(e){return this.each(function(){_.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,n=1,i=_.Deferred(),o=this,a=this.length,s=function(){--n||i.resolveWith(o,[o])}
|
||
for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(r=Q.get(o[a],e+"queueHooks"))&&r.empty&&(n++,r.empty.add(s))
|
||
return s(),i.promise(t)}})
|
||
var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ne=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&_.contains(e.ownerDocument,e)&&"none"===_.css(e,"display")},ie=function(e,t,r,n){var i,o,a={}
|
||
for(o in t)a[o]=e.style[o],e.style[o]=t[o]
|
||
for(o in i=r.apply(e,n||[]),t)e.style[o]=a[o]
|
||
return i}
|
||
function oe(e,t,r,n){var i,o,a=20,s=n?function(){return n.cur()}:function(){return _.css(e,t,"")},u=s(),c=r&&r[3]||(_.cssNumber[t]?"":"px"),l=(_.cssNumber[t]||"px"!==c&&+u)&&te.exec(_.css(e,t))
|
||
if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)_.style(e,t,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o
|
||
l*=2,_.style(e,t,l+c),r=r||[]}return r&&(l=+l||+u||0,i=r[1]?l+(r[1]+1)*r[2]:+r[2],n&&(n.unit=c,n.start=l,n.end=i)),i}var ae={}
|
||
function se(e){var t,r=e.ownerDocument,n=e.nodeName,i=ae[n]
|
||
return i||(t=r.body.appendChild(r.createElement(n)),i=_.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),ae[n]=i,i)}function ue(e,t){for(var r,n,i=[],o=0,a=e.length;o<a;o++)(n=e[o]).style&&(r=n.style.display,t?("none"===r&&(i[o]=Q.get(n,"display")||null,i[o]||(n.style.display="")),""===n.style.display&&ne(n)&&(i[o]=se(n))):"none"!==r&&(i[o]="none",Q.set(n,"display",r)))
|
||
for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o])
|
||
return e}_.fn.extend({show:function(){return ue(this,!0)},hide:function(){return ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ne(this)?_(this).show():_(this).hide()})}})
|
||
var ce=/^(?:checkbox|radio)$/i,le=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,fe=/^$|^module$|\/(?:java|ecma)script/i,he={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]}
|
||
function de(e,t){var r
|
||
return r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?_.merge([e],r):r}function pe(e,t){for(var r=0,n=e.length;r<n;r++)Q.set(e[r],"globalEval",!t||Q.get(t[r],"globalEval"))}he.optgroup=he.option,he.tbody=he.tfoot=he.colgroup=he.caption=he.thead,he.th=he.td
|
||
var me,ye,ge=/<|&#?\w+;/
|
||
function be(e,t,r,n,i){for(var o,a,s,u,c,l,f=t.createDocumentFragment(),h=[],d=0,p=e.length;d<p;d++)if((o=e[d])||0===o)if("object"===v(o))_.merge(h,o.nodeType?[o]:o)
|
||
else if(ge.test(o)){for(a=a||f.appendChild(t.createElement("div")),s=(le.exec(o)||["",""])[1].toLowerCase(),u=he[s]||he._default,a.innerHTML=u[1]+_.htmlPrefilter(o)+u[2],l=u[0];l--;)a=a.lastChild
|
||
_.merge(h,a.childNodes),(a=f.firstChild).textContent=""}else h.push(t.createTextNode(o))
|
||
for(f.textContent="",d=0;o=h[d++];)if(n&&_.inArray(o,n)>-1)i&&i.push(o)
|
||
else if(c=_.contains(o.ownerDocument,o),a=de(f.appendChild(o),"script"),c&&pe(a),r)for(l=0;o=a[l++];)fe.test(o.type||"")&&r.push(o)
|
||
return f}me=n.createDocumentFragment().appendChild(n.createElement("div")),(ye=n.createElement("input")).setAttribute("type","radio"),ye.setAttribute("checked","checked"),ye.setAttribute("name","t"),me.appendChild(ye),p.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue
|
||
var ve=n.documentElement,_e=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Se=/^([^.]*)(?:\.(.+)|)/
|
||
function Ee(){return!0}function ke(){return!1}function xe(){try{return n.activeElement}catch(e){}}function Ce(e,t,r,n,i,o){var a,s
|
||
if("object"==typeof t){for(s in"string"!=typeof r&&(n=n||r,r=void 0),t)Ce(e,s,r,n,t[s],o)
|
||
return e}if(null==n&&null==i?(i=r,n=r=void 0):null==i&&("string"==typeof r?(i=n,n=void 0):(i=n,n=r,r=void 0)),!1===i)i=ke
|
||
else if(!i)return e
|
||
return 1===o&&(a=i,(i=function(e){return _().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=_.guid++)),e.each(function(){_.event.add(this,t,i,n,r)})}_.event={global:{},add:function(e,t,r,n,i){var o,a,s,u,c,l,f,h,d,p,m,y=Q.get(e)
|
||
if(y)for(r.handler&&(r=(o=r).handler,i=o.selector),i&&_.find.matchesSelector(ve,i),r.guid||(r.guid=_.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(N)||[""]).length;c--;)d=m=(s=Se.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),d&&(f=_.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=_.event.special[d]||{},l=_.extend({type:d,origType:m,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=u[d])||((h=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,n,p,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=r.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),_.event.global[d]=!0)},remove:function(e,t,r,n,i){var o,a,s,u,c,l,f,h,d,p,m,y=Q.hasData(e)&&Q.get(e)
|
||
if(y&&(u=y.events)){for(c=(t=(t||"").match(N)||[""]).length;c--;)if(d=m=(s=Se.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),d){for(f=_.event.special[d]||{},h=u[d=(n?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)l=h[o],!i&&m!==l.origType||r&&r.guid!==l.guid||s&&!s.test(l.namespace)||n&&n!==l.selector&&("**"!==n||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(e,l))
|
||
a&&!h.length&&(f.teardown&&!1!==f.teardown.call(e,p,y.handle)||_.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)_.event.remove(e,d+t[c],r,n,!0)
|
||
_.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,r,n,i,o,a,s=_.event.fix(e),u=new Array(arguments.length),c=(Q.get(this,"events")||{})[s.type]||[],l=_.event.special[s.type]||{}
|
||
for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t]
|
||
if(s.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,s)){for(a=_.event.handlers.call(this,s,c),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,r=0;(o=i.handlers[r++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(n=((_.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=n)&&(s.preventDefault(),s.stopPropagation()))
|
||
return l.postDispatch&&l.postDispatch.call(this,s),s.result}},handlers:function(e,t){var r,n,i,o,a,s=[],u=t.delegateCount,c=e.target
|
||
if(u&&c.nodeType&&!("click"===e.type&&e.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},r=0;r<u;r++)void 0===a[i=(n=t[r]).selector+" "]&&(a[i]=n.needsContext?_(i,this).index(c)>-1:_.find(i,this,null,[c]).length),a[i]&&o.push(n)
|
||
o.length&&s.push({elem:c,handlers:o})}return c=this,u<t.length&&s.push({elem:c,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(_.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[_.expando]?e:new _.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==xe()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===xe()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&A(this,"input"))return this.click(),!1},_default:function(e){return A(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},_.removeEvent=function(e,t,r){e.removeEventListener&&e.removeEventListener(t,r)},_.Event=function(e,t){if(!(this instanceof _.Event))return new _.Event(e,t)
|
||
e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&_.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[_.expando]=!0},_.Event.prototype={constructor:_.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent
|
||
this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent
|
||
this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent
|
||
this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},_.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button
|
||
return null==e.which&&_e.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},_.event.addProp),_.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){_.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,n=e.relatedTarget,i=e.handleObj
|
||
return n&&(n===this||_.contains(this,n))||(e.type=i.origType,r=i.handler.apply(this,arguments),e.type=t),r}}}),_.fn.extend({on:function(e,t,r,n){return Ce(this,e,t,r,n)},one:function(e,t,r,n){return Ce(this,e,t,r,n,1)},off:function(e,t,r){var n,i
|
||
if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,_(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this
|
||
if("object"==typeof e){for(i in e)this.off(i,t,e[i])
|
||
return this}return!1!==t&&"function"!=typeof t||(r=t,t=void 0),!1===r&&(r=ke),this.each(function(){_.event.remove(this,e,r,t)})}})
|
||
var Ae=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Te=/<script|<style|<link/i,Ie=/checked\s*(?:[^=]|=\s*.checked.)/i,Pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g
|
||
function Me(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Re(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var r,n,i,o,a,s,u,c
|
||
if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),c=o.events))for(i in delete a.handle,a.events={},c)for(r=0,n=c[i].length;r<n;r++)_.event.add(t,i,c[i][r])
|
||
X.hasData(e)&&(s=X.access(e),u=_.extend({},s),X.set(t,u))}}function Ne(e,t,r,n){t=a.apply([],t)
|
||
var i,o,s,u,c,l,f=0,h=e.length,d=h-1,y=t[0],g=m(y)
|
||
if(g||h>1&&"string"==typeof y&&!p.checkClone&&Ie.test(y))return e.each(function(i){var o=e.eq(i)
|
||
g&&(t[0]=y.call(this,i,o.html())),Ne(o,t,r,n)})
|
||
if(h&&(o=(i=be(t,e[0].ownerDocument,!1,e,n)).firstChild,1===i.childNodes.length&&(i=o),o||n)){for(u=(s=_.map(de(i,"script"),Re)).length;f<h;f++)c=i,f!==d&&(c=_.clone(c,!0,!0),u&&_.merge(s,de(c,"script"))),r.call(e[f],c,f)
|
||
if(u)for(l=s[s.length-1].ownerDocument,_.map(s,Oe),f=0;f<u;f++)c=s[f],fe.test(c.type||"")&&!Q.access(c,"globalEval")&&_.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?_._evalUrl&&_._evalUrl(c.src):b(c.textContent.replace(Pe,""),l,c))}return e}function je(e,t,r){for(var n,i=t?_.filter(t,e):e,o=0;null!=(n=i[o]);o++)r||1!==n.nodeType||_.cleanData(de(n)),n.parentNode&&(r&&_.contains(n.ownerDocument,n)&&pe(de(n,"script")),n.parentNode.removeChild(n))
|
||
return e}_.extend({htmlPrefilter:function(e){return e.replace(Ae,"<$1></$2>")},clone:function(e,t,r){var n,i,o,a,s,u,c,l=e.cloneNode(!0),f=_.contains(e.ownerDocument,e)
|
||
if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||_.isXMLDoc(e)))for(a=de(l),n=0,i=(o=de(e)).length;n<i;n++)s=o[n],u=a[n],void 0,"input"===(c=u.nodeName.toLowerCase())&&ce.test(s.type)?u.checked=s.checked:"input"!==c&&"textarea"!==c||(u.defaultValue=s.defaultValue)
|
||
if(t)if(r)for(o=o||de(e),a=a||de(l),n=0,i=o.length;n<i;n++)Be(o[n],a[n])
|
||
else Be(e,l)
|
||
return(a=de(l,"script")).length>0&&pe(a,!f&&de(e,"script")),l},cleanData:function(e){for(var t,r,n,i=_.event.special,o=0;void 0!==(r=e[o]);o++)if(G(r)){if(t=r[Q.expando]){if(t.events)for(n in t.events)i[n]?_.event.remove(r,n):_.removeEvent(r,n,t.handle)
|
||
r[Q.expando]=void 0}r[X.expando]&&(r[X.expando]=void 0)}}}),_.fn.extend({detach:function(e){return je(this,e,!0)},remove:function(e){return je(this,e)},text:function(e){return q(this,function(e){return void 0===e?_.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ne(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)})},prepend:function(){return Ne(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(this,e)
|
||
t.insertBefore(e,t.firstChild)}})},before:function(){return Ne(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ne(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(_.cleanData(de(e,!1)),e.textContent="")
|
||
return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return _.clone(this,e,t)})},html:function(e){return q(this,function(e){var t=this[0]||{},r=0,n=this.length
|
||
if(void 0===e&&1===t.nodeType)return t.innerHTML
|
||
if("string"==typeof e&&!Te.test(e)&&!he[(le.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e)
|
||
try{for(;r<n;r++)1===(t=this[r]||{}).nodeType&&(_.cleanData(de(t,!1)),t.innerHTML=e)
|
||
t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[]
|
||
return Ne(this,arguments,function(t){var r=this.parentNode
|
||
_.inArray(this,e)<0&&(_.cleanData(de(this)),r&&r.replaceChild(t,this))},e)}}),_.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){_.fn[e]=function(e){for(var r,n=[],i=_(e),o=i.length-1,a=0;a<=o;a++)r=a===o?this:this.clone(!0),_(i[a])[t](r),s.apply(n,r.get())
|
||
return this.pushStack(n)}})
|
||
var Le=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),De=function(t){var r=t.ownerDocument.defaultView
|
||
return r&&r.opener||(r=e),r.getComputedStyle(t)},Ue=new RegExp(re.join("|"),"i")
|
||
function Fe(e,t,r){var n,i,o,a,s=e.style
|
||
return(r=r||De(e))&&(""!==(a=r.getPropertyValue(t)||r[t])||_.contains(e.ownerDocument,e)||(a=_.style(e,t)),!p.pixelBoxStyles()&&Le.test(a)&&Ue.test(t)&&(n=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=r.width,s.width=n,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments)
|
||
delete this.get}}}(function(){function t(){if(l){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ve.appendChild(c).appendChild(l)
|
||
var t=e.getComputedStyle(l)
|
||
i="1%"!==t.top,u=12===r(t.marginLeft),l.style.right="60%",s=36===r(t.right),o=36===r(t.width),l.style.position="absolute",a=36===l.offsetWidth||"absolute",ve.removeChild(c),l=null}}function r(e){return Math.round(parseFloat(e))}var i,o,a,s,u,c=n.createElement("div"),l=n.createElement("div")
|
||
l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===l.style.backgroundClip,_.extend(p,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))})()
|
||
var qe=/^(none|table(?!-c[ea]).+)/,Ve=/^--/,He={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"},We=["Webkit","Moz","ms"],Ge=n.createElement("div").style
|
||
function Ye(e){var t=_.cssProps[e]
|
||
return t||(t=_.cssProps[e]=function(e){if(e in Ge)return e
|
||
for(var t=e[0].toUpperCase()+e.slice(1),r=We.length;r--;)if((e=We[r]+t)in Ge)return e}(e)||e),t}function Qe(e,t,r){var n=te.exec(t)
|
||
return n?Math.max(0,n[2]-(r||0))+(n[3]||"px"):t}function Xe(e,t,r,n,i,o){var a="width"===t?1:0,s=0,u=0
|
||
if(r===(n?"border":"content"))return 0
|
||
for(;a<4;a+=2)"margin"===r&&(u+=_.css(e,r+re[a],!0,i)),n?("content"===r&&(u-=_.css(e,"padding"+re[a],!0,i)),"margin"!==r&&(u-=_.css(e,"border"+re[a]+"Width",!0,i))):(u+=_.css(e,"padding"+re[a],!0,i),"padding"!==r?u+=_.css(e,"border"+re[a]+"Width",!0,i):s+=_.css(e,"border"+re[a]+"Width",!0,i))
|
||
return!n&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function $e(e,t,r){var n=De(e),i=Fe(e,t,n),o="border-box"===_.css(e,"boxSizing",!1,n),a=o
|
||
if(Le.test(i)){if(!r)return i
|
||
i="auto"}return a=a&&(p.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===_.css(e,"display",!1,n))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Xe(e,t,r||(o?"border":"content"),a,n,i)+"px"}function Je(e,t,r,n,i){return new Je.prototype.init(e,t,r,n,i)}_.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=Fe(e,"opacity")
|
||
return""===r?"1":r}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,r,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=W(t),u=Ve.test(t),c=e.style
|
||
if(u||(t=Ye(s)),a=_.cssHooks[t]||_.cssHooks[s],void 0===r)return a&&"get"in a&&void 0!==(i=a.get(e,!1,n))?i:c[t]
|
||
"string"===(o=typeof r)&&(i=te.exec(r))&&i[1]&&(r=oe(e,t,i),o="number"),null!=r&&r==r&&("number"===o&&(r+=i&&i[3]||(_.cssNumber[s]?"":"px")),p.clearCloneStyle||""!==r||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(r=a.set(e,r,n))||(u?c.setProperty(t,r):c[t]=r))}},css:function(e,t,r,n){var i,o,a,s=W(t)
|
||
return Ve.test(t)||(t=Ye(s)),(a=_.cssHooks[t]||_.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,r)),void 0===i&&(i=Fe(e,t,n)),"normal"===i&&t in Ke&&(i=Ke[t]),""===r||r?(o=parseFloat(i),!0===r||isFinite(o)?o||0:i):i}}),_.each(["height","width"],function(e,t){_.cssHooks[t]={get:function(e,r,n){if(r)return!qe.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?$e(e,t,n):ie(e,He,function(){return $e(e,t,n)})},set:function(e,r,n){var i,o=De(e),a="border-box"===_.css(e,"boxSizing",!1,o),s=n&&Xe(e,t,n,a,o)
|
||
return a&&p.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Xe(e,t,"border",!1,o)-.5)),s&&(i=te.exec(r))&&"px"!==(i[3]||"px")&&(e.style[t]=r,r=_.css(e,t)),Qe(0,r,s)}}}),_.cssHooks.marginLeft=ze(p.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),_.each({margin:"",padding:"",border:"Width"},function(e,t){_.cssHooks[e+t]={expand:function(r){for(var n=0,i={},o="string"==typeof r?r.split(" "):[r];n<4;n++)i[e+re[n]+t]=o[n]||o[n-2]||o[0]
|
||
return i}},"margin"!==e&&(_.cssHooks[e+t].set=Qe)}),_.fn.extend({css:function(e,t){return q(this,function(e,t,r){var n,i,o={},a=0
|
||
if(Array.isArray(t)){for(n=De(e),i=t.length;a<i;a++)o[t[a]]=_.css(e,t[a],!1,n)
|
||
return o}return void 0!==r?_.style(e,t,r):_.css(e,t)},e,t,arguments.length>1)}}),_.Tween=Je,Je.prototype={constructor:Je,init:function(e,t,r,n,i,o){this.elem=e,this.prop=r,this.easing=i||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=o||(_.cssNumber[r]?"":"px")},cur:function(){var e=Je.propHooks[this.prop]
|
||
return e&&e.get?e.get(this):Je.propHooks._default.get(this)},run:function(e){var t,r=Je.propHooks[this.prop]
|
||
return this.options.duration?this.pos=t=_.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):Je.propHooks._default.set(this),this}},Je.prototype.init.prototype=Je.prototype,Je.propHooks={_default:{get:function(e){var t
|
||
return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[_.cssProps[e.prop]]&&!_.cssHooks[e.prop]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},Je.propHooks.scrollTop=Je.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=Je.prototype.init,_.fx.step={}
|
||
var Ze,et,tt=/^(?:toggle|show|hide)$/,rt=/queueHooks$/
|
||
function nt(){et&&(!1===n.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(nt):e.setTimeout(nt,_.fx.interval),_.fx.tick())}function it(){return e.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function ot(e,t){var r,n=0,i={height:e}
|
||
for(t=t?1:0;n<4;n+=2-t)i["margin"+(r=re[n])]=i["padding"+r]=e
|
||
return t&&(i.opacity=i.width=e),i}function at(e,t,r){for(var n,i=(st.tweeners[t]||[]).concat(st.tweeners["*"]),o=0,a=i.length;o<a;o++)if(n=i[o].call(r,t,e))return n}function st(e,t,r){var n,i,o=0,a=st.prefilters.length,s=_.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1
|
||
for(var t=Ze||it(),r=Math.max(0,c.startTime+c.duration-t),n=1-(r/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(n)
|
||
return s.notifyWith(e,[c,n,r]),n<1&&a?r:(a||s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c]),!1)},c=s.promise({elem:e,props:_.extend({},t),opts:_.extend(!0,{specialEasing:{},easing:_.easing._default},r),originalProperties:t,originalOptions:r,startTime:Ze||it(),duration:r.duration,tweens:[],createTween:function(t,r){var n=_.Tween(e,c.opts,t,r,c.opts.specialEasing[t]||c.opts.easing)
|
||
return c.tweens.push(n),n},stop:function(t){var r=0,n=t?c.tweens.length:0
|
||
if(i)return this
|
||
for(i=!0;r<n;r++)c.tweens[r].run(1)
|
||
return t?(s.notifyWith(e,[c,1,0]),s.resolveWith(e,[c,t])):s.rejectWith(e,[c,t]),this}}),l=c.props
|
||
for(function(e,t){var r,n,i,o,a
|
||
for(r in e)if(i=t[n=W(r)],o=e[r],Array.isArray(o)&&(i=o[1],o=e[r]=o[0]),r!==n&&(e[n]=o,delete e[r]),(a=_.cssHooks[n])&&"expand"in a)for(r in o=a.expand(o),delete e[n],o)r in e||(e[r]=o[r],t[r]=i)
|
||
else t[n]=i}(l,c.opts.specialEasing);o<a;o++)if(n=st.prefilters[o].call(c,e,l,c.opts))return m(n.stop)&&(_._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n
|
||
return _.map(l,at,c),m(c.opts.start)&&c.opts.start.call(e,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),_.fx.timer(_.extend(u,{elem:e,anim:c,queue:c.opts.queue})),c}_.Animation=_.extend(st,{tweeners:{"*":[function(e,t){var r=this.createTween(e,t)
|
||
return oe(r.elem,e,te.exec(t),r),r}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(N)
|
||
for(var r,n=0,i=e.length;n<i;n++)r=e[n],st.tweeners[r]=st.tweeners[r]||[],st.tweeners[r].unshift(t)},prefilters:[function(e,t,r){var n,i,o,a,s,u,c,l,f="width"in t||"height"in t,h=this,d={},p=e.style,m=e.nodeType&&ne(e),y=Q.get(e,"fxshow")
|
||
for(n in r.queue||(null==(a=_._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always(function(){h.always(function(){a.unqueued--,_.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[n],tt.test(i)){if(delete t[n],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!y||void 0===y[n])continue
|
||
m=!0}d[n]=y&&y[n]||_.style(e,n)}if((u=!_.isEmptyObject(t))||!_.isEmptyObject(d))for(n in f&&1===e.nodeType&&(r.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=y&&y.display)&&(c=Q.get(e,"display")),"none"===(l=_.css(e,"display"))&&(c?l=c:(ue([e],!0),c=e.style.display||c,l=_.css(e,"display"),ue([e]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===_.css(e,"float")&&(u||(h.done(function(){p.display=c}),null==c&&(l=p.display,c="none"===l?"":l)),p.display="inline-block")),r.overflow&&(p.overflow="hidden",h.always(function(){p.overflow=r.overflow[0],p.overflowX=r.overflow[1],p.overflowY=r.overflow[2]})),u=!1,d)u||(y?"hidden"in y&&(m=y.hidden):y=Q.access(e,"fxshow",{display:c}),o&&(y.hidden=!m),m&&ue([e],!0),h.done(function(){for(n in m||ue([e]),Q.remove(e,"fxshow"),d)_.style(e,n,d[n])})),u=at(m?y[n]:0,n,h),n in y||(y[n]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?st.prefilters.unshift(e):st.prefilters.push(e)}}),_.speed=function(e,t,r){var n=e&&"object"==typeof e?_.extend({},e):{complete:r||!r&&t||m(e)&&e,duration:e,easing:r&&t||t&&!m(t)&&t}
|
||
return _.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in _.fx.speeds?n.duration=_.fx.speeds[n.duration]:n.duration=_.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){m(n.old)&&n.old.call(this),n.queue&&_.dequeue(this,n.queue)},n},_.fn.extend({fadeTo:function(e,t,r,n){return this.filter(ne).css("opacity",0).show().end().animate({opacity:t},e,r,n)},animate:function(e,t,r,n){var i=_.isEmptyObject(e),o=_.speed(t,r,n),a=function(){var t=st(this,_.extend({},e),o);(i||Q.get(this,"finish"))&&t.stop(!0)}
|
||
return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,r){var n=function(e){var t=e.stop
|
||
delete e.stop,t(r)}
|
||
return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=_.timers,a=Q.get(this)
|
||
if(i)a[i]&&a[i].stop&&n(a[i])
|
||
else for(i in a)a[i]&&a[i].stop&&rt.test(i)&&n(a[i])
|
||
for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(r),t=!1,o.splice(i,1))
|
||
!t&&r||_.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,r=Q.get(this),n=r[e+"queue"],i=r[e+"queueHooks"],o=_.timers,a=n?n.length:0
|
||
for(r.finish=!0,_.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1))
|
||
for(t=0;t<a;t++)n[t]&&n[t].finish&&n[t].finish.call(this)
|
||
delete r.finish})}}),_.each(["toggle","show","hide"],function(e,t){var r=_.fn[t]
|
||
_.fn[t]=function(e,n,i){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(ot(t,!0),e,n,i)}}),_.each({slideDown:ot("show"),slideUp:ot("hide"),slideToggle:ot("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){_.fn[e]=function(e,r,n){return this.animate(t,e,r,n)}}),_.timers=[],_.fx.tick=function(){var e,t=0,r=_.timers
|
||
for(Ze=Date.now();t<r.length;t++)(e=r[t])()||r[t]!==e||r.splice(t--,1)
|
||
r.length||_.fx.stop(),Ze=void 0},_.fx.timer=function(e){_.timers.push(e),_.fx.start()},_.fx.interval=13,_.fx.start=function(){et||(et=!0,nt())},_.fx.stop=function(){et=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(t,r){return t=_.fx&&_.fx.speeds[t]||t,r=r||"fx",this.queue(r,function(r,n){var i=e.setTimeout(r,t)
|
||
n.stop=function(){e.clearTimeout(i)}})},function(){var e=n.createElement("input"),t=n.createElement("select").appendChild(n.createElement("option"))
|
||
e.type="checkbox",p.checkOn=""!==e.value,p.optSelected=t.selected,(e=n.createElement("input")).value="t",e.type="radio",p.radioValue="t"===e.value}()
|
||
var ut,ct=_.expr.attrHandle
|
||
_.fn.extend({attr:function(e,t){return q(this,_.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){_.removeAttr(this,e)})}}),_.extend({attr:function(e,t,r){var n,i,o=e.nodeType
|
||
if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?_.prop(e,t,r):(1===o&&_.isXMLDoc(e)||(i=_.attrHooks[t.toLowerCase()]||(_.expr.match.bool.test(t)?ut:void 0)),void 0!==r?null===r?void _.removeAttr(e,t):i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:(e.setAttribute(t,r+""),r):i&&"get"in i&&null!==(n=i.get(e,t))?n:null==(n=_.find.attr(e,t))?void 0:n)},attrHooks:{type:{set:function(e,t){if(!p.radioValue&&"radio"===t&&A(e,"input")){var r=e.value
|
||
return e.setAttribute("type",t),r&&(e.value=r),t}}}},removeAttr:function(e,t){var r,n=0,i=t&&t.match(N)
|
||
if(i&&1===e.nodeType)for(;r=i[n++];)e.removeAttribute(r)}}),ut={set:function(e,t,r){return!1===t?_.removeAttr(e,r):e.setAttribute(r,r),r}},_.each(_.expr.match.bool.source.match(/\w+/g),function(e,t){var r=ct[t]||_.find.attr
|
||
ct[t]=function(e,t,n){var i,o,a=t.toLowerCase()
|
||
return n||(o=ct[a],ct[a]=i,i=null!=r(e,t,n)?a:null,ct[a]=o),i}})
|
||
var lt=/^(?:input|select|textarea|button)$/i,ft=/^(?:a|area)$/i
|
||
function ht(e){return(e.match(N)||[]).join(" ")}function dt(e){return e.getAttribute&&e.getAttribute("class")||""}function pt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(N)||[]}_.fn.extend({prop:function(e,t){return q(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[_.propFix[e]||e]})}}),_.extend({prop:function(e,t,r){var n,i,o=e.nodeType
|
||
if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(e)||(t=_.propFix[t]||t,i=_.propHooks[t]),void 0!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:e[t]=r:i&&"get"in i&&null!==(n=i.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex")
|
||
return t?parseInt(t,10):lt.test(e.nodeName)||ft.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(_.propHooks.selected={get:function(e){var t=e.parentNode
|
||
return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode
|
||
t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this}),_.fn.extend({addClass:function(e){var t,r,n,i,o,a,s,u=0
|
||
if(m(e))return this.each(function(t){_(this).addClass(e.call(this,t,dt(this)))})
|
||
if((t=pt(e)).length)for(;r=this[u++];)if(i=dt(r),n=1===r.nodeType&&" "+ht(i)+" "){for(a=0;o=t[a++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ")
|
||
i!==(s=ht(n))&&r.setAttribute("class",s)}return this},removeClass:function(e){var t,r,n,i,o,a,s,u=0
|
||
if(m(e))return this.each(function(t){_(this).removeClass(e.call(this,t,dt(this)))})
|
||
if(!arguments.length)return this.attr("class","")
|
||
if((t=pt(e)).length)for(;r=this[u++];)if(i=dt(r),n=1===r.nodeType&&" "+ht(i)+" "){for(a=0;o=t[a++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ")
|
||
i!==(s=ht(n))&&r.setAttribute("class",s)}return this},toggleClass:function(e,t){var r=typeof e,n="string"===r||Array.isArray(e)
|
||
return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):m(e)?this.each(function(r){_(this).toggleClass(e.call(this,r,dt(this),t),t)}):this.each(function(){var t,i,o,a
|
||
if(n)for(i=0,o=_(this),a=pt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t)
|
||
else void 0!==e&&"boolean"!==r||((t=dt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,r,n=0
|
||
for(t=" "+e+" ";r=this[n++];)if(1===r.nodeType&&(" "+ht(dt(r))+" ").indexOf(t)>-1)return!0
|
||
return!1}})
|
||
var mt=/\r/g
|
||
_.fn.extend({val:function(e){var t,r,n,i=this[0]
|
||
return arguments.length?(n=m(e),this.each(function(r){var i
|
||
1===this.nodeType&&(null==(i=n?e.call(this,r,_(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=_.map(i,function(e){return null==e?"":e+""})),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=_.valHooks[i.type]||_.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(r=t.get(i,"value"))?r:"string"==typeof(r=i.value)?r.replace(mt,""):null==r?"":r:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value")
|
||
return null!=t?t:ht(_.text(e))}},select:{get:function(e){var t,r,n,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length
|
||
for(n=o<0?u:a?o:0;n<u;n++)if(((r=i[n]).selected||n===o)&&!r.disabled&&(!r.parentNode.disabled||!A(r.parentNode,"optgroup"))){if(t=_(r).val(),a)return t
|
||
s.push(t)}return s},set:function(e,t){for(var r,n,i=e.options,o=_.makeArray(t),a=i.length;a--;)((n=i[a]).selected=_.inArray(_.valHooks.option.get(n),o)>-1)&&(r=!0)
|
||
return r||(e.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},p.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),p.focusin="onfocusin"in e
|
||
var yt=/^(?:focusinfocus|focusoutblur)$/,gt=function(e){e.stopPropagation()}
|
||
_.extend(_.event,{trigger:function(t,r,i,o){var a,s,u,c,l,h,d,p,g=[i||n],b=f.call(t,"type")?t.type:t,v=f.call(t,"namespace")?t.namespace.split("."):[]
|
||
if(s=p=u=i=i||n,3!==i.nodeType&&8!==i.nodeType&&!yt.test(b+_.event.triggered)&&(b.indexOf(".")>-1&&(b=(v=b.split(".")).shift(),v.sort()),l=b.indexOf(":")<0&&"on"+b,(t=t[_.expando]?t:new _.Event(b,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),r=null==r?[t]:_.makeArray(r,[t]),d=_.event.special[b]||{},o||!d.trigger||!1!==d.trigger.apply(i,r))){if(!o&&!d.noBubble&&!y(i)){for(c=d.delegateType||b,yt.test(c+b)||(s=s.parentNode);s;s=s.parentNode)g.push(s),u=s
|
||
u===(i.ownerDocument||n)&&g.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=g[a++])&&!t.isPropagationStopped();)p=s,t.type=a>1?c:d.bindType||b,(h=(Q.get(s,"events")||{})[t.type]&&Q.get(s,"handle"))&&h.apply(s,r),(h=l&&s[l])&&h.apply&&G(s)&&(t.result=h.apply(s,r),!1===t.result&&t.preventDefault())
|
||
return t.type=b,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(g.pop(),r)||!G(i)||l&&m(i[b])&&!y(i)&&((u=i[l])&&(i[l]=null),_.event.triggered=b,t.isPropagationStopped()&&p.addEventListener(b,gt),i[b](),t.isPropagationStopped()&&p.removeEventListener(b,gt),_.event.triggered=void 0,u&&(i[l]=u)),t.result}},simulate:function(e,t,r){var n=_.extend(new _.Event,r,{type:e,isSimulated:!0})
|
||
_.event.trigger(n,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each(function(){_.event.trigger(e,t,this)})},triggerHandler:function(e,t){var r=this[0]
|
||
if(r)return _.event.trigger(e,t,r,!0)}}),p.focusin||_.each({focus:"focusin",blur:"focusout"},function(e,t){var r=function(e){_.event.simulate(t,e.target,_.event.fix(e))}
|
||
_.event.special[t]={setup:function(){var n=this.ownerDocument||this,i=Q.access(n,t)
|
||
i||n.addEventListener(e,r,!0),Q.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=Q.access(n,t)-1
|
||
i?Q.access(n,t,i):(n.removeEventListener(e,r,!0),Q.remove(n,t))}}})
|
||
var bt=e.location,vt=Date.now(),_t=/\?/
|
||
_.parseXML=function(t){var r
|
||
if(!t||"string"!=typeof t)return null
|
||
try{r=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){r=void 0}return r&&!r.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+t),r}
|
||
var wt=/\[\]$/,St=/\r?\n/g,Et=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i
|
||
function xt(e,t,r,n){var i
|
||
if(Array.isArray(t))_.each(t,function(t,i){r||wt.test(e)?n(e,i):xt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,n)})
|
||
else if(r||"object"!==v(t))n(e,t)
|
||
else for(i in t)xt(e+"["+i+"]",t[i],r,n)}_.param=function(e,t){var r,n=[],i=function(e,t){var r=m(t)?t():t
|
||
n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==r?"":r)}
|
||
if(Array.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,function(){i(this.name,this.value)})
|
||
else for(r in e)xt(r,e[r],t,i)
|
||
return n.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=_.prop(this,"elements")
|
||
return e?_.makeArray(e):this}).filter(function(){var e=this.type
|
||
return this.name&&!_(this).is(":disabled")&&kt.test(this.nodeName)&&!Et.test(e)&&(this.checked||!ce.test(e))}).map(function(e,t){var r=_(this).val()
|
||
return null==r?null:Array.isArray(r)?_.map(r,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:r.replace(St,"\r\n")}}).get()}})
|
||
var Ct=/%20/g,At=/#.*$/,Tt=/([?&])_=[^&]*/,It=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Mt=/^\/\//,Rt={},Ot={},Bt="*/".concat("*"),Nt=n.createElement("a")
|
||
function jt(e){return function(t,r){"string"!=typeof t&&(r=t,t="*")
|
||
var n,i=0,o=t.toLowerCase().match(N)||[]
|
||
if(m(r))for(;n=o[i++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(r)):(e[n]=e[n]||[]).push(r)}}function Lt(e,t,r,n){var i={},o=e===Ot
|
||
function a(s){var u
|
||
return i[s]=!0,_.each(e[s]||[],function(e,s){var c=s(t,r,n)
|
||
return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Dt(e,t){var r,n,i=_.ajaxSettings.flatOptions||{}
|
||
for(r in t)void 0!==t[r]&&((i[r]?e:n||(n={}))[r]=t[r])
|
||
return n&&_.extend(!0,e,n),e}Nt.href=bt.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Bt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Dt(Dt(e,_.ajaxSettings),t):Dt(_.ajaxSettings,e)},ajaxPrefilter:jt(Rt),ajaxTransport:jt(Ot),ajax:function(t,r){"object"==typeof t&&(r=t,t=void 0),r=r||{}
|
||
var i,o,a,s,u,c,l,f,h,d,p=_.ajaxSetup({},r),m=p.context||p,y=p.context&&(m.nodeType||m.jquery)?_(m):_.event,g=_.Deferred(),b=_.Callbacks("once memory"),v=p.statusCode||{},w={},S={},E="canceled",k={readyState:0,getResponseHeader:function(e){var t
|
||
if(l){if(!s)for(s={};t=It.exec(a);)s[t[1].toLowerCase()]=t[2]
|
||
t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(e,t){return null==l&&(e=S[e.toLowerCase()]=S[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==l&&(p.mimeType=e),this},statusCode:function(e){var t
|
||
if(e)if(l)k.always(e[k.status])
|
||
else for(t in e)v[t]=[v[t],e[t]]
|
||
return this},abort:function(e){var t=e||E
|
||
return i&&i.abort(t),x(0,t),this}}
|
||
if(g.promise(k),p.url=((t||p.url||bt.href)+"").replace(Mt,bt.protocol+"//"),p.type=r.method||r.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(N)||[""],null==p.crossDomain){c=n.createElement("a")
|
||
try{c.href=p.url,c.href=c.href,p.crossDomain=Nt.protocol+"//"+Nt.host!=c.protocol+"//"+c.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=_.param(p.data,p.traditional)),Lt(Rt,p,r,k),l)return k
|
||
for(h in(f=_.event&&p.global)&&0==_.active++&&_.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Pt.test(p.type),o=p.url.replace(At,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ct,"+")):(d=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(_t.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Tt,"$1"),d=(_t.test(o)?"&":"?")+"_="+vt+++d),p.url=o+d),p.ifModified&&(_.lastModified[o]&&k.setRequestHeader("If-Modified-Since",_.lastModified[o]),_.etag[o]&&k.setRequestHeader("If-None-Match",_.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||r.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Bt+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(h,p.headers[h])
|
||
if(p.beforeSend&&(!1===p.beforeSend.call(m,k,p)||l))return k.abort()
|
||
if(E="abort",b.add(p.complete),k.done(p.success),k.fail(p.error),i=Lt(Ot,p,r,k)){if(k.readyState=1,f&&y.trigger("ajaxSend",[k,p]),l)return k
|
||
p.async&&p.timeout>0&&(u=e.setTimeout(function(){k.abort("timeout")},p.timeout))
|
||
try{l=!1,i.send(w,x)}catch(e){if(l)throw e
|
||
x(-1,e)}}else x(-1,"No Transport")
|
||
function x(t,r,n,s){var c,h,d,w,S,E=r
|
||
l||(l=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",k.readyState=t>0?4:0,c=t>=200&&t<300||304===t,n&&(w=function(e,t,r){for(var n,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"))
|
||
if(n)for(i in s)if(s[i]&&s[i].test(n)){u.unshift(i)
|
||
break}if(u[0]in r)o=u[0]
|
||
else{for(i in r){if(!u[0]||e.converters[i+" "+u[0]]){o=i
|
||
break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),r[o]}(p,k,n)),w=function(e,t,r,n){var i,o,a,s,u,c={},l=e.dataTypes.slice()
|
||
if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a]
|
||
for(o=l.shift();o;)if(e.responseFields[o]&&(r[e.responseFields[o]]=t),!u&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u
|
||
else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]))
|
||
break}if(!0!==a)if(a&&e.throws)t=a(t)
|
||
else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,w,k,c),c?(p.ifModified&&((S=k.getResponseHeader("Last-Modified"))&&(_.lastModified[o]=S),(S=k.getResponseHeader("etag"))&&(_.etag[o]=S)),204===t||"HEAD"===p.type?E="nocontent":304===t?E="notmodified":(E=w.state,h=w.data,c=!(d=w.error))):(d=E,!t&&E||(E="error",t<0&&(t=0))),k.status=t,k.statusText=(r||E)+"",c?g.resolveWith(m,[h,E,k]):g.rejectWith(m,[k,E,d]),k.statusCode(v),v=void 0,f&&y.trigger(c?"ajaxSuccess":"ajaxError",[k,p,c?h:d]),b.fireWith(m,[k,E]),f&&(y.trigger("ajaxComplete",[k,p]),--_.active||_.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,r){return _.get(e,t,r,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],function(e,t){_[t]=function(e,r,n,i){return m(r)&&(i=i||n,n=r,r=void 0),_.ajax(_.extend({url:e,type:t,dataType:i,data:r,success:n},_.isPlainObject(e)&&e))}}),_._evalUrl=function(e){return _.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},_.fn.extend({wrapAll:function(e){var t
|
||
return this[0]&&(m(e)&&(e=e.call(this[0])),t=_(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild
|
||
return e}).append(this)),this},wrapInner:function(e){return m(e)?this.each(function(t){_(this).wrapInner(e.call(this,t))}):this.each(function(){var t=_(this),r=t.contents()
|
||
r.length?r.wrapAll(e):t.append(e)})},wrap:function(e){var t=m(e)
|
||
return this.each(function(r){_(this).wrapAll(t?e.call(this,r):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){_(this).replaceWith(this.childNodes)}),this}}),_.expr.pseudos.hidden=function(e){return!_.expr.pseudos.visible(e)},_.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}}
|
||
var Ut={0:200,1223:204},Ft=_.ajaxSettings.xhr()
|
||
p.cors=!!Ft&&"withCredentials"in Ft,p.ajax=Ft=!!Ft,_.ajaxTransport(function(t){var r,n
|
||
if(p.cors||Ft&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr()
|
||
if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a]
|
||
for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a])
|
||
r=function(e){return function(){r&&(r=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Ut[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=r(),n=s.onerror=s.ontimeout=r("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){r&&n()})},r=r("abort")
|
||
try{s.send(t.hasContent&&t.data||null)}catch(e){if(r)throw e}},abort:function(){r&&r()}}}),_.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _.globalEval(e),e}}}),_.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),_.ajaxTransport("script",function(e){var t,r
|
||
if(e.crossDomain)return{send:function(i,o){t=_("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",r=function(e){t.remove(),r=null,e&&o("error"===e.type?404:200,e.type)}),n.head.appendChild(t[0])},abort:function(){r&&r()}}})
|
||
var zt,qt=[],Vt=/(=)\?(?=&|$)|\?\?/
|
||
_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=qt.pop()||_.expando+"_"+vt++
|
||
return this[e]=!0,e}}),_.ajaxPrefilter("json jsonp",function(t,r,n){var i,o,a,s=!1!==t.jsonp&&(Vt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(t.data)&&"data")
|
||
if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=m(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Vt,"$1"+i):!1!==t.jsonp&&(t.url+=(_t.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||_.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},n.always(function(){void 0===o?_(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=r.jsonpCallback,qt.push(i)),a&&m(o)&&o(a[0]),a=o=void 0}),"script"}),p.createHTMLDocument=((zt=n.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===zt.childNodes.length),_.parseHTML=function(e,t,r){return"string"!=typeof e?[]:("boolean"==typeof t&&(r=t,t=!1),t||(p.createHTMLDocument?((i=(t=n.implementation.createHTMLDocument("")).createElement("base")).href=n.location.href,t.head.appendChild(i)):t=n),o=T.exec(e),a=!r&&[],o?[t.createElement(o[1])]:(o=be([e],t,a),a&&a.length&&_(a).remove(),_.merge([],o.childNodes)))
|
||
var i,o,a},_.fn.load=function(e,t,r){var n,i,o,a=this,s=e.indexOf(" ")
|
||
return s>-1&&(n=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(r=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&_.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(n?_("<div>").append(_.parseHTML(e)).find(n):e)}).always(r&&function(e,t){a.each(function(){r.apply(this,o||[e.responseText,t,e])})}),this},_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){_.fn[t]=function(e){return this.on(t,e)}}),_.expr.pseudos.animated=function(e){return _.grep(_.timers,function(t){return e===t.elem}).length},_.offset={setOffset:function(e,t,r){var n,i,o,a,s,u,c=_.css(e,"position"),l=_(e),f={}
|
||
"static"===c&&(e.style.position="relative"),s=l.offset(),o=_.css(e,"top"),u=_.css(e,"left"),("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1?(a=(n=l.position()).top,i=n.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,r,_.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):l.css(f)}},_.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){_.offset.setOffset(this,e,t)})
|
||
var t,r,n=this[0]
|
||
return n?n.getClientRects().length?(t=n.getBoundingClientRect(),r=n.ownerDocument.defaultView,{top:t.top+r.pageYOffset,left:t.left+r.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,r,n=this[0],i={top:0,left:0}
|
||
if("fixed"===_.css(n,"position"))t=n.getBoundingClientRect()
|
||
else{for(t=this.offset(),r=n.ownerDocument,e=n.offsetParent||r.documentElement;e&&(e===r.body||e===r.documentElement)&&"static"===_.css(e,"position");)e=e.parentNode
|
||
e&&e!==n&&1===e.nodeType&&((i=_(e).offset()).top+=_.css(e,"borderTopWidth",!0),i.left+=_.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-_.css(n,"marginTop",!0),left:t.left-i.left-_.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===_.css(e,"position");)e=e.offsetParent
|
||
return e||ve})}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var r="pageYOffset"===t
|
||
_.fn[e]=function(n){return q(this,function(e,n,i){var o
|
||
if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[n]
|
||
o?o.scrollTo(r?o.pageXOffset:i,r?i:o.pageYOffset):e[n]=i},e,n,arguments.length)}}),_.each(["top","left"],function(e,t){_.cssHooks[t]=ze(p.pixelPosition,function(e,r){if(r)return r=Fe(e,t),Le.test(r)?_(e).position()[t]+"px":r})}),_.each({Height:"height",Width:"width"},function(e,t){_.each({padding:"inner"+e,content:t,"":"outer"+e},function(r,n){_.fn[n]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(!0===i||!0===o?"margin":"border")
|
||
return q(this,function(t,r,i){var o
|
||
return y(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?_.css(t,r,s):_.style(t,r,i,s)},t,a?i:void 0,a)}})}),_.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){_.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}}),_.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),_.fn.extend({bind:function(e,t,r){return this.on(e,null,t,r)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,r,n){return this.on(t,e,r,n)},undelegate:function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)}}),_.proxy=function(e,t){var r,n,i
|
||
if("string"==typeof t&&(r=e[t],t=e,e=r),m(e))return n=o.call(arguments,2),(i=function(){return e.apply(t||this,n.concat(o.call(arguments)))}).guid=e.guid=e.guid||_.guid++,i},_.holdReady=function(e){e?_.readyWait++:_.ready(!0)},_.isArray=Array.isArray,_.parseJSON=JSON.parse,_.nodeName=A,_.isFunction=m,_.isWindow=y,_.camelCase=W,_.type=v,_.now=Date.now,_.isNumeric=function(e){var t=_.type(e)
|
||
return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return _})
|
||
var Ht=e.jQuery,Kt=e.$
|
||
return _.noConflict=function(t){return e.$===_&&(e.$=Kt),t&&e.jQuery===_&&(e.jQuery=Ht),_},t||(e.jQuery=e.$=_),_}),function(){var e,t,r
|
||
mainContext=this,function(){function n(e,r){var a=e,s=i[a]
|
||
s||(s=i[a+="/index"])
|
||
var u=o[a]
|
||
if(void 0!==u)return u
|
||
u=o[a]={},s||function(e,t){throw t?new Error("Could not find module "+e+" required by: "+t):new Error("Could not find module "+e)}(e,r)
|
||
for(var c=s.deps,l=s.callback,f=new Array(c.length),h=0;h<c.length;h++)"exports"===c[h]?f[h]=u:"require"===c[h]?f[h]=t:f[h]=n(c[h],a)
|
||
return l.apply(this,f),u}if("undefined"==typeof window&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)||(r=this.Ember=this.Ember||{}),void 0===r&&(r={}),void 0===r.__loader){var i={},o={}
|
||
e=function(e,t,r){var n={}
|
||
r?(n.deps=t,n.callback=r):(n.deps=[],n.callback=t),i[e]=n},(t=function(e){return n(e,null)}).default=t,t.has=function(e){return!!i[e]||!!i[e+"/index"]},t._eak_seen=i,r.__loader={define:e,require:t,registry:i}}else e=r.__loader.define,t=r.__loader.require}(),e("@glimmer/encoder",["exports"],function(e){"use strict"
|
||
e.InstructionEncoder=void 0
|
||
var t=function(){function e(e){this.buffer=e,this.typePos=0,this.size=0}return e.prototype.encode=function(e,t){var r,n
|
||
if(e>255)throw new Error("Opcode type over 8-bits. Got "+e+".")
|
||
for(this.buffer.push(e|t|arguments.length-2<<8),this.typePos=this.buffer.length-1,r=2;r<arguments.length;r++){if("number"==typeof(n=arguments[r])&&n>65535)throw new Error("Operand over 16-bits. Got "+n+".")
|
||
this.buffer.push(n)}this.size=this.buffer.length},e.prototype.patch=function(e,t){if(-1!==this.buffer[e+1])throw new Error("Trying to patch operand in populated slot instead of a reserved slot.")
|
||
this.buffer[e+1]=t},e}()
|
||
e.InstructionEncoder=t}),e("@glimmer/low-level",["exports"],function(e){"use strict"
|
||
e.Stack=e.Storage=void 0
|
||
var t=function(){function e(){this.array=[],this.next=0}return e.prototype.add=function(e){var t,r=this.next,n=this.array
|
||
return r===n.length?this.next++:(t=n[r],this.next=t),this.array[r]=e,r},e.prototype.deref=function(e){return this.array[e]},e.prototype.drop=function(e){this.array[e]=this.next,this.next=e},e}(),r=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]
|
||
this.vec=e}return e.prototype.clone=function(){return new e(this.vec.slice())},e.prototype.sliceFrom=function(t){return new e(this.vec.slice(t))},e.prototype.slice=function(t,r){return new e(this.vec.slice(t,r))},e.prototype.copy=function(e,t){this.vec[t]=this.vec[e]},e.prototype.writeRaw=function(e,t){this.vec[e]=t},e.prototype.writeSmi=function(e,t){var r
|
||
this.vec[e]=(r=t)<0?Math.abs(r)<<3|4:r<<3|0},e.prototype.getRaw=function(e){return this.vec[e]},e.prototype.getSmi=function(e){return function(e){switch(7&e){case 0:return e>>3
|
||
case 4:return-(e>>3)
|
||
default:throw new Error("unreachable")}}(this.vec[e])},e.prototype.reset=function(){this.vec.length=0},e.prototype.len=function(){return this.vec.length},e}()
|
||
e.Storage=t,e.Stack=r}),e("@glimmer/node",["exports","ember-babel","@glimmer/runtime"],function(e,t,r){"use strict"
|
||
e.serializeBuilder=e.NodeDOMTreeConstruction=void 0
|
||
var n=function(e){function n(r){return(0,t.possibleConstructorReturn)(this,e.call(this,r))}return(0,t.inherits)(n,e),n.prototype.setupUselessElement=function(){},n.prototype.insertHTMLBefore=function(e,t,n){var i=t?t.previousSibling:e.lastChild,o=this.document.createRawHTMLSection(n)
|
||
e.insertBefore(o,t)
|
||
var a=i?i.nextSibling:e.firstChild,s=t?t.previousSibling:e.lastChild
|
||
return new r.ConcreteBounds(e,a,s)},n.prototype.createElement=function(e){return this.document.createElement(e)},n.prototype.setAttribute=function(e,t,r){e.setAttribute(t,r)},n}(r.DOMTreeConstruction)
|
||
var i=function(e){function n(){var r=(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))
|
||
return r.serializeBlockDepth=0,r.inTable=!1,r}return(0,t.inherits)(n,e),n.prototype.__openBlock=function(){var t=this.serializeBlockDepth++
|
||
this.__appendComment("%+b:"+t+"%"),e.prototype.__openBlock.call(this)},n.prototype.__closeBlock=function(){e.prototype.__closeBlock.call(this),this.__appendComment("%-b:"+--this.serializeBlockDepth+"%")},n.prototype.__appendHTML=function(t){var n,i=this.__appendComment("%glmr%")
|
||
"TABLE"===this.element.tagName&&(n=t.indexOf("<"))>-1&&"tr"===t.slice(n+1,n+3)&&(t="<tbody>"+t+"</tbody>"),e.prototype.__appendHTML.call(this,t)
|
||
var o=this.__appendComment("%glmr%")
|
||
return new r.ConcreteBounds(this.element,i,o)},n.prototype.__appendText=function(t){var r,n,i,o=(n=(r=this).element,null===(i=r.nextSibling)?n.lastChild:i.previousSibling)
|
||
return""===t?this.__appendComment("% %"):(o&&3===o.nodeType&&this.__appendComment("%|%"),e.prototype.__appendText.call(this,t))},n.prototype.closeElement=function(){!0===this.element.needsExtraClose&&(this.element.needsExtraClose=!1,e.prototype.closeElement.call(this)),e.prototype.closeElement.call(this)},n.prototype.openElement=function(t){return"tr"===t&&("TBODY"!==this.element.tagName&&(this.openElement("tbody"),this.constructing.needsExtraClose=!0,this.flushElement()),this.inTable=!1),e.prototype.openElement.call(this,t)},n.prototype.pushRemoteElement=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.dom,o=i.createElement("script")
|
||
o.setAttribute("glmr",r),i.insertBefore(t,o,n),e.prototype.pushRemoteElement.call(this,t,r,n)},n}(r.NewElementBuilder)
|
||
e.NodeDOMTreeConstruction=n,e.serializeBuilder=function(e,t){return i.forInitialRender(e,t)}}),e("@glimmer/opcode-compiler",["exports","ember-babel","@glimmer/util","@glimmer/vm","@glimmer/wire-format","@glimmer/encoder"],function(e,t,r,n,i,o){"use strict"
|
||
var a,s
|
||
e.PLACEHOLDER_HANDLE=e.WrappedBuilder=e.logOpcode=e.debugSlice=e.debug=e.CompilableTemplate=e.templateFactory=e.PartialDefinition=e.SimpleOpcodeBuilder=e.OpcodeBuilder=e.EagerOpcodeBuilder=e.LazyOpcodeBuilder=e.Macros=e.ATTRS_BLOCK=void 0,(s=a||(a={}))[s.OpenComponentElement=0]="OpenComponentElement",s[s.DidCreateElement=1]="DidCreateElement",s[s.SetComponentAttrs=2]="SetComponentAttrs",s[s.DidRenderLayout=3]="DidRenderLayout",s[s.Debugger=4]="Debugger"
|
||
var u=i.Ops,c="&attrs",l=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0
|
||
this.offset=e,this.names=(0,r.dict)(),this.funcs=[]}return e.prototype.add=function(e,t){this.funcs.push(t),this.names[e]=this.funcs.length-1},e.prototype.compile=function(e,t){var r=e[this.offset],n=this.names[r];(0,this.funcs[n])(e,t)},e}(),f=void 0
|
||
function h(e,t,r){var n=e[1],i=e[2],o=e[3]
|
||
r.expr(i),o?r.dynamicAttr(n,o,t):r.dynamicAttr(n,null,t)}var d=void 0
|
||
var p=function(){function e(){this.names=(0,r.dict)(),this.funcs=[]}return e.prototype.add=function(e,t){this.funcs.push(t),this.names[e]=this.funcs.length-1},e.prototype.addMissing=function(e){this.missing=e},e.prototype.compile=function(e,t,r,n,i,o){var a=this.names[e]
|
||
void 0===a?(0,this.missing)(e,t,r,n,i,o):(0,this.funcs[a])(t,r,n,i,o)},e}(),m=function(){function e(){this.names=(0,r.dict)(),this.funcs=[]}return e.prototype.add=function(e,t){this.funcs.push(t),this.names[e]=this.funcs.length-1},e.prototype.addMissing=function(e){this.missing=e},e.prototype.compile=function(e,t){var r,n,i=e[1]
|
||
if(!Array.isArray(i))return["expr",i]
|
||
var o=void 0,a=void 0,s=void 0
|
||
if(i[0]===u.Helper)o=i[1],a=i[2],s=i[3]
|
||
else{if(i[0]!==u.Unknown)return["expr",i]
|
||
o=i[1],a=s=null}var c=this.names[o]
|
||
return void 0===c&&this.missing?!1===(r=(0,this.missing)(o,a,s,t))?["expr",i]:r:void 0!==c?!1===(n=(0,this.funcs[c])(o,a,s,t))?["expr",i]:n:["expr",i]},e}()
|
||
var y=function(){function e(e,t,o,s){this.statements=e,this.containingLayout=t,this.options=o,this.symbolTable=s,this.compiled=null,this.statementCompiler=function(){if(f)return f
|
||
var e=f=new l
|
||
e.add(u.Text,function(e,t){t.text(e[1])}),e.add(u.Comment,function(e,t){t.comment(e[1])}),e.add(u.CloseElement,function(e,t){t.closeElement()}),e.add(u.FlushElement,function(e,t){t.flushElement()}),e.add(u.Modifier,function(e,t){var r=t.resolver,n=t.referrer,i=e[1],o=e[2],a=e[3],s=r.lookupModifier(i,n)
|
||
if(!s)throw new Error("Compile Error "+i+" is not a modifier: Helpers may not be used in the element form.")
|
||
t.modifier(s,o,a)}),e.add(u.StaticAttr,function(e,t){var r=e[1],n=e[2],i=e[3]
|
||
t.staticAttr(r,i,n)}),e.add(u.DynamicAttr,function(e,t){h(e,!1,t)}),e.add(u.TrustingAttr,function(e,t){h(e,!0,t)}),e.add(u.OpenElement,function(e,t){t.openPrimitiveElement(e[1])}),e.add(u.OpenSplattedElement,function(e,t){t.setComponentAttrs(!0),t.putComponentOperations(),t.openPrimitiveElement(e[1])}),e.add(u.Component,function(e,t){var n,i,o,s,c,l=e[1],f=e[2],h=e[3],d=e[4],p=t.resolver,m=t.referrer,y=p.lookupComponentDefinition(l,m)
|
||
if(null===y)throw new Error("Compile Error: Cannot find component "+l)
|
||
n=p.getCapabilities(y),i=[[u.ClientSideStatement,a.SetComponentAttrs,!0]].concat(f,[[u.ClientSideStatement,a.SetComponentAttrs,!1]]),o=t.inlineBlock({statements:i,parameters:r.EMPTY_ARRAY}),s=t.template(d),!1===n.dynamicLayout?(c=p.getLayout(y),t.pushComponentDefinition(y),t.invokeStaticComponent(n,c,o,null,h,!1,s&&s)):(t.pushComponentDefinition(y),t.invokeComponent(o,null,h,!1,s&&s))}),e.add(u.Partial,function(e,t){var r=e[1],n=e[2],i=t.referrer
|
||
t.startLabels(),t.pushFrame(),t.returnTo("END"),t.expr(r),t.dup(),t.enter(2),t.jumpUnless("ELSE"),t.invokePartial(i,t.evalSymbols(),n),t.popScope(),t.popFrame(),t.label("ELSE"),t.exit(),t.return(),t.label("END"),t.popFrame(),t.stopLabels()}),e.add(u.Yield,function(e,t){var r=e[1],n=e[2]
|
||
t.yield(r,n)}),e.add(u.AttrSplat,function(e,t){var r=e[1]
|
||
t.yield(r,[]),t.didCreateElement(n.Register.s0),t.setComponentAttrs(!1)}),e.add(u.Debugger,function(e,t){var r=e[1]
|
||
t.debugger(t.evalSymbols(),r)}),e.add(u.ClientSideStatement,function(e,r){t.compile(e,r)}),e.add(u.Append,function(e,t){var r=e[1],o=e[2]
|
||
if(!0!==(t.macros.inlines.compile(e,t)||r)){var a=(0,i.isGet)(r),s=(0,i.isMaybeLocal)(r)
|
||
o?t.guardedAppend(r,!0):a||s?t.guardedAppend(r,!1):(t.expr(r),t.primitive(!1),t.load(n.Register.t0),t.dynamicContent())}}),e.add(u.Block,function(e,t){var r=e[1],n=e[2],i=e[3],o=e[4],a=e[5],s=t.template(o),u=t.template(a)
|
||
t.macros.blocks.compile(r,n,i,s&&s,u&&u,t)})
|
||
var t=new l(1)
|
||
return t.add(a.OpenComponentElement,function(e,t){t.putComponentOperations(),t.openPrimitiveElement(e[2])}),t.add(a.DidCreateElement,function(e,t){t.didCreateElement(n.Register.s0)}),t.add(a.SetComponentAttrs,function(e,t){t.setComponentAttrs(e[2])}),t.add(a.Debugger,function(){}),t.add(a.DidRenderLayout,function(e,t){t.didRenderLayout(n.Register.s0)}),e}()}return e.topLevel=function(t,r){return new e(t.statements,{block:t,referrer:r.referrer},r,{hasEval:t.hasEval,symbols:t.symbols})},e.prototype.compile=function(e){var t,r=this.compiled
|
||
if(null!==r)return r
|
||
this.compiled=-1
|
||
var n=this.options,i=this.statements,o=this.containingLayout,a=o.referrer,s=n.program,u=n.resolver,c=n.macros,l=n.asPartial,f=new(0,n.Builder)(s,u,a,c,o,l,e)
|
||
for(t=0;t<i.length;t++)this.statementCompiler.compile(i[t],f)
|
||
var h=f.commit(s.heap,o.block.symbols.length)
|
||
return this.compiled=h},e}(),g=function(){function e(e,t){this.options=e,this.layout=t
|
||
var r=t.block
|
||
this.symbolTable={hasEval:r.hasEval,symbols:r.symbols.concat([c])}}return e.prototype.compile=function(){var e=this.options,t=this.layout,i=this.referrer,o=e.program,a=e.resolver,s=e.macros,u=e.asPartial,c=new(0,e.Builder)(o,a,i,s,t,u)
|
||
return c.startLabels(),c.fetch(n.Register.s1),c.getComponentTagName(n.Register.s0),c.primitiveReference(),c.dup(),c.load(n.Register.s1),c.jumpUnless("BODY"),c.fetch(n.Register.s1),c.putComponentOperations(),c.openDynamicElement(),c.didCreateElement(n.Register.s0),c.flushElement(),c.label("BODY"),c.invokeStaticBlock(function(e,t){var n=e.block,i=e.referrer
|
||
return new y(n.statements,e,t,{referrer:i,parameters:r.EMPTY_ARRAY})}(t,this.options)),c.fetch(n.Register.s1),c.jumpUnless("END"),c.closeElement(),c.label("END"),c.load(n.Register.s1),c.stopLabels(),c.commit(e.program.heap,t.block.symbols.length)},e}()
|
||
var b=function(){function e(e){this.builder=e}return e.prototype.static=function(e,t){var r,n,i=t[0],o=t[1],a=t[2],s=t[3],u=this.builder,c=u.resolver
|
||
null!==e&&(!1===(r=c.getCapabilities(e)).dynamicLayout?(n=c.getLayout(e),u.pushComponentDefinition(e),u.invokeStaticComponent(r,n,null,i,o,!1,a,s)):(u.pushComponentDefinition(e),u.invokeComponent(null,i,o,!1,a,s)))},e}(),v=function(){function e(){this.labels=(0,r.dict)(),this.targets=[]}return e.prototype.label=function(e,t){this.labels[e]=t},e.prototype.target=function(e,t){this.targets.push({at:e,target:t})},e.prototype.patch=function(e){var t,r,n,i,o=this.targets,a=this.labels
|
||
for(t=0;t<o.length;t++)n=(r=o[t]).at,i=a[r.target]-n,e.patch(n,i)},e}(),_=function(){function e(){this.encoder=new o.InstructionEncoder([])}return e.prototype.push=function(e){switch(arguments.length){case 1:return this.encoder.encode(e,0)
|
||
case 2:return this.encoder.encode(e,0,arguments[1])
|
||
case 3:return this.encoder.encode(e,0,arguments[1],arguments[2])
|
||
default:return this.encoder.encode(e,0,arguments[1],arguments[2],arguments[3])}},e.prototype.pushMachine=function(e){switch(arguments.length){case 1:return this.encoder.encode(e,1024)
|
||
case 2:return this.encoder.encode(e,1024,arguments[1])
|
||
case 3:return this.encoder.encode(e,1024,arguments[1],arguments[2])
|
||
default:return this.encoder.encode(e,1024,arguments[1],arguments[2],arguments[3])}},e.prototype.commit=function(e,t){this.pushMachine(20)
|
||
var r,n,i=this.encoder.buffer,o=e.malloc()
|
||
for(r=0;r<i.length;r++)"function"==typeof(n=i[r])?e.pushPlaceholder(n):e.push(n)
|
||
return e.finishMalloc(o,t),o},e.prototype.reserve=function(e){this.encoder.encode(e,0,-1)},e.prototype.reserveMachine=function(e){this.encoder.encode(e,1024,-1)},e.prototype.main=function(){this.push(56,n.Register.s0),this.invokePreparedComponent(!1)},e.prototype.dynamicContent=function(){this.push(24)},e.prototype.beginComponentTransaction=function(){this.push(75)},e.prototype.commitComponentTransaction=function(){this.push(76)},e.prototype.pushDynamicScope=function(){this.push(36)},e.prototype.popDynamicScope=function(){this.push(37)},e.prototype.pushRemoteElement=function(){this.push(33)},e.prototype.popRemoteElement=function(){this.push(34)},e.prototype.pushRootScope=function(e,t){this.push(17,e,t?1:0)},e.prototype.pushChildScope=function(){this.push(18)},e.prototype.popScope=function(){this.push(19)},e.prototype.prepareArgs=function(e){this.push(65,e)},e.prototype.createComponent=function(e,t){this.push(67,0|t,e)},e.prototype.registerComponentDestructor=function(e){this.push(68,e)},e.prototype.putComponentOperations=function(){this.push(69)},e.prototype.getComponentSelf=function(e){this.push(70,e)},e.prototype.getComponentTagName=function(e){this.push(71,e)},e.prototype.getComponentLayout=function(e){this.push(72,e)},e.prototype.invokeComponentLayout=function(e){this.push(74,e)},e.prototype.didCreateElement=function(e){this.push(77,e)},e.prototype.didRenderLayout=function(e){this.push(78,e)},e.prototype.pushFrame=function(){this.pushMachine(47)},e.prototype.popFrame=function(){this.pushMachine(48)},e.prototype.invokeVirtual=function(){this.pushMachine(41)},e.prototype.invokeYield=function(){this.push(43)},e.prototype.toBoolean=function(){this.push(51)},e.prototype.invokePreparedComponent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
|
||
this.beginComponentTransaction(),this.pushDynamicScope(),this.createComponent(n.Register.s0,e),t&&t(),this.registerComponentDestructor(n.Register.s0),this.getComponentSelf(n.Register.s0),this.invokeComponentLayout(n.Register.s0),this.didRenderLayout(n.Register.s0),this.popFrame(),this.popScope(),this.popDynamicScope(),this.commitComponentTransaction()},(0,t.createClass)(e,[{key:"pos",get:function(){return this.encoder.typePos}},{key:"nextPos",get:function(){return this.encoder.size}}]),e}(),w=function(e){function i(n,i,o,a,s,c,f){var h=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return h.program=n,h.resolver=i,h.referrer=o,h.macros=a,h.containingLayout=s,h.asPartial=c,h.stdLib=f,h.component=new b(h),h.expressionCompiler=function(){if(d)return d
|
||
var e=d=new l
|
||
return e.add(u.Unknown,function(e,t){var r=t.resolver,n=t.asPartial,i=t.referrer,o=e[1],a=r.lookupHelper(o,i)
|
||
null!==a?t.helper(a,null,null):n?t.resolveMaybeLocal(o):(t.getVariable(0),t.getProperty(o))}),e.add(u.Concat,function(e,t){var r,n=e[1]
|
||
for(r=0;r<n.length;r++)t.expr(n[r])
|
||
t.concat(n.length)}),e.add(u.Helper,function(e,t){var r,n,i=t.resolver,o=t.referrer,a=e[1],s=e[2],u=e[3]
|
||
if("component"===a)return r=s[0],n=s.slice(1),void t.curryComponent(r,n,u,!0)
|
||
var c=i.lookupHelper(a,o)
|
||
if(null===c)throw new Error("Compile Error: "+a+" is not a helper")
|
||
t.helper(c,s,u)}),e.add(u.Get,function(e,t){var r,n=e[1],i=e[2]
|
||
for(t.getVariable(n),r=0;r<i.length;r++)t.getProperty(i[r])}),e.add(u.MaybeLocal,function(e,t){var r,n,i=e[1]
|
||
for(t.asPartial?(r=i[0],i=i.slice(1),t.resolveMaybeLocal(r)):t.getVariable(0),n=0;n<i.length;n++)t.getProperty(i[n])}),e.add(u.Undefined,function(e,t){return t.pushPrimitiveReference(void 0)}),e.add(u.HasBlock,function(e,t){t.hasBlock(e[1])}),e.add(u.HasBlockParams,function(e,t){t.hasBlockParams(e[1])}),e}(),h.labelsStack=new r.Stack,h.isComponentAttrs=!1,h.constants=n.constants,h}return(0,t.inherits)(i,e),i.prototype.label=function(e){this.labels.label(e,this.nextPos)},i.prototype.setComponentAttrs=function(e){this.isComponentAttrs=e},i.prototype.expr=function(e){Array.isArray(e)?this.expressionCompiler.compile(e,this):this.pushPrimitiveReference(e)},i.prototype.pushArgs=function(e,t){var r=this.constants.stringArray(e)
|
||
this.push(63,r,t)},i.prototype.startLabels=function(){this.labelsStack.push(new v)},i.prototype.stopLabels=function(){this.labelsStack.pop().patch(this.encoder)},i.prototype.pushComponentDefinition=function(e){this.push(59,this.constants.handle(e))},i.prototype.pushCurriedComponent=function(){this.push(61)},i.prototype.pushDynamicComponentInstance=function(){this.push(60)},i.prototype.resolveDynamicComponent=function(e){this.push(62,this.constants.serializable(e))},i.prototype.staticComponentHelper=function(e,t,r){var n,i,o,a=this.resolver.lookupComponentDefinition(e,this.referrer)
|
||
if(a&&!1===(n=this.resolver.getCapabilities(a)).dynamicLayout){if(t)for(i=0;i<t.length;i+=2)t[i][0]="@"+t[i][0]
|
||
return o=this.resolver.getLayout(a),this.pushComponentDefinition(a),this.invokeStaticComponent(n,o,null,null,t,!1,r&&r),!0}return!1},i.prototype.invokePartial=function(e,t,r){var n=this.constants.serializable(e),i=this.constants.stringArray(t),o=this.constants.array(r)
|
||
this.push(79,n,i,o)},i.prototype.resolveMaybeLocal=function(e){this.push(80,this.string(e))},i.prototype.debugger=function(e,t){this.push(81,this.constants.stringArray(e),this.constants.array(t))},i.prototype.text=function(e){this.push(22,this.constants.string(e))},i.prototype.openPrimitiveElement=function(e){this.push(25,this.constants.string(e))},i.prototype.openDynamicElement=function(){this.push(26)},i.prototype.flushElement=function(){this.push(30)},i.prototype.closeElement=function(){this.push(31)},i.prototype.staticAttr=function(e,t,r){var n,i=this.constants.string(e),o=t?this.constants.string(t):0
|
||
this.isComponentAttrs?(this.pushPrimitiveReference(r),this.push(29,i,1,o)):(n=this.constants.string(r),this.push(27,i,n,o))},i.prototype.dynamicAttr=function(e,t,r){var n=this.constants.string(e),i=t?this.constants.string(t):0
|
||
this.isComponentAttrs?this.push(29,n,!0===r?1:0,i):this.push(28,n,!0===r?1:0,i)},i.prototype.comment=function(e){var t=this.constants.string(e)
|
||
this.push(23,t)},i.prototype.modifier=function(e,t,r){this.pushFrame(),this.compileArgs(t,r,null,!0),this.push(32,this.constants.handle(e)),this.popFrame()},i.prototype.putIterator=function(){this.push(54)},i.prototype.enterList=function(e){this.reserve(52),this.labels.target(this.pos,e)},i.prototype.exitList=function(){this.push(53)},i.prototype.iterate=function(e){this.reserve(55),this.labels.target(this.pos,e)},i.prototype.setVariable=function(e){this.push(2,e)},i.prototype.setBlock=function(e){this.push(3,e)},i.prototype.getVariable=function(e){this.push(4,e)},i.prototype.getProperty=function(e){this.push(5,this.string(e))},i.prototype.getBlock=function(e){this.push(6,e)},i.prototype.hasBlock=function(e){this.push(7,e)},i.prototype.hasBlockParams=function(e){this.getBlock(e),this.resolveBlock(),this.push(8)},i.prototype.concat=function(e){this.push(9,e)},i.prototype.load=function(e){this.push(15,e)},i.prototype.fetch=function(e){this.push(16,e)},i.prototype.dup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.Register.sp,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0
|
||
return this.push(13,e,t)},i.prototype.pop=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1
|
||
return this.push(14,e)},i.prototype.returnTo=function(e){this.reserveMachine(21),this.labels.target(this.pos,e)},i.prototype.primitive=function(e){var t=0,r=void 0
|
||
switch(typeof e){case"number":e%1==0?e>-1?r=e:(r=this.constants.number(e),t=4):(r=this.constants.number(e),t=1)
|
||
break
|
||
case"string":r=this.string(e),t=2
|
||
break
|
||
case"boolean":r=0|e,t=3
|
||
break
|
||
case"object":r=2,t=3
|
||
break
|
||
case"undefined":r=3,t=3
|
||
break
|
||
default:throw new Error("Invalid primitive passed to pushPrimitive")}var n=this.sizeImmediate(r<<3|t,r)
|
||
this.push(11,n)},i.prototype.sizeImmediate=function(e,t){return e>=65535||e<0?this.constants.number(t)<<3|5:e},i.prototype.pushPrimitiveReference=function(e){this.primitive(e),this.primitiveReference()},i.prototype.primitiveReference=function(){this.push(12)},i.prototype.helper=function(e,t,r){this.pushFrame(),this.compileArgs(t,r,null,!0),this.push(1,this.constants.handle(e)),this.popFrame(),this.fetch(n.Register.v0)},i.prototype.bindDynamicScope=function(e){this.push(35,this.names(e))},i.prototype.enter=function(e){this.push(49,e)},i.prototype.exit=function(){this.push(50)},i.prototype.return=function(){this.pushMachine(20)},i.prototype.jump=function(e){this.reserveMachine(44),this.labels.target(this.pos,e)},i.prototype.jumpIf=function(e){this.reserve(45),this.labels.target(this.pos,e)},i.prototype.jumpUnless=function(e){this.reserve(46),this.labels.target(this.pos,e)},i.prototype.string=function(e){return this.constants.string(e)},i.prototype.names=function(e){var t,r,n=[]
|
||
for(t=0;t<e.length;t++)r=e[t],n[t]=this.constants.string(r)
|
||
return this.constants.array(n)},i.prototype.symbols=function(e){return this.constants.array(e)},i.prototype.inlineBlock=function(e){var t=e.parameters,r=e.statements,n={parameters:t,referrer:this.containingLayout.referrer},i={program:this.program,macros:this.macros,Builder:this.constructor,resolver:this.resolver,asPartial:this.asPartial,referrer:this.referrer}
|
||
return new y(r,this.containingLayout,i,n)},i.prototype.evalSymbols=function(){var e=this.containingLayout.block
|
||
return e.hasEval?e.symbols:null},i.prototype.compileParams=function(e){var t
|
||
if(!e)return 0
|
||
for(t=0;t<e.length;t++)this.expr(e[t])
|
||
return e.length},i.prototype.compileArgs=function(e,t,n,i){n&&(this.pushYieldableBlock(n.main),this.pushYieldableBlock(n.else),this.pushYieldableBlock(n.attrs))
|
||
var o,a,s=this.compileParams(e)<<4
|
||
i&&(s|=8),n&&(s|=7)
|
||
var u=r.EMPTY_ARRAY
|
||
if(t)for(u=t[0],o=t[1],a=0;a<o.length;a++)this.expr(o[a])
|
||
this.pushArgs(u,s)},i.prototype.invokeStaticBlock=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e.symbolTable.parameters,o=i.length,a=Math.min(r,o)
|
||
if(this.pushFrame(),a)for(this.pushChildScope(),t=0;t<a;t++)this.dup(n.Register.fp,r-t),this.setVariable(i[t])
|
||
this.pushBlock(e),this.resolveBlock(),this.invokeVirtual(),a&&this.popScope(),this.popFrame()},i.prototype.builtInGuardedAppend=function(){this.dup(),this.startLabels(),this.isComponent(),this.enter(2),this.jumpUnless("ELSE"),this.pushCurriedComponent(),this.pushDynamicComponentInstance(),this.invokeComponent(null,null,null,!1,null,null),this.exit(),this.return(),this.label("ELSE"),this.dynamicContent(),this.exit(),this.return(),this.stopLabels()},i.prototype.guardedAppend=function(e,t){this.startLabels(),this.pushFrame(),this.returnTo("END"),this.stdLib?(this.primitive(!!t),this.load(n.Register.t0),this.expr(e),this.primitive(this.stdLib.guardedAppend),this.invokeVirtual()):(this.expr(e),this.dup(),this.isComponent(),this.enter(2),this.jumpUnless("ELSE"),this.pushCurriedComponent(),this.pushDynamicComponentInstance(),this.invokeComponent(null,null,null,!1,null,null),this.exit(),this.return(),this.label("ELSE"),this.primitive(!!t),this.load(n.Register.t0),this.dynamicContent(),this.exit(),this.return()),this.label("END"),this.popFrame(),this.stopLabels()},i.prototype.yield=function(e,t){this.compileArgs(t,null,null,!1),this.getBlock(e),this.resolveBlock(),this.invokeYield(),this.popScope(),this.popFrame()},i.prototype.populateLayout=function(e){this.push(73,e)},i.prototype.invokeComponent=function(e,t,r,i,o){var a=this,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=arguments[6]
|
||
this.fetch(n.Register.s0),this.dup(n.Register.sp,1),this.load(n.Register.s0),this.pushFrame(),this.compileArgs(t,r,{main:o,else:s,attrs:e},i),this.prepareArgs(n.Register.s0),this.invokePreparedComponent(null!==o,function(){u?(a.pushSymbolTable(u.symbolTable),a.pushLayout(u),a.resolveLayout()):a.getComponentLayout(n.Register.s0),a.populateLayout(n.Register.s0)}),this.load(n.Register.s0)},i.prototype.invokeStaticComponent=function(e,t,i,o,a,s,u){var l,f,h,d,p,m,y,g,b,v,_=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,w=t.symbolTable
|
||
if(w.hasEval||e.prepareArgs)this.invokeComponent(i,o,a,s,u,_,t)
|
||
else{this.fetch(n.Register.s0),this.dup(n.Register.sp,1),this.load(n.Register.s0)
|
||
var S=w.symbols
|
||
e.createArgs&&(this.pushFrame(),this.compileArgs(null,a,null,s)),this.beginComponentTransaction(),this.pushDynamicScope(),this.createComponent(n.Register.s0,null!==u),e.createArgs&&this.popFrame(),this.registerComponentDestructor(n.Register.s0)
|
||
var E=[]
|
||
for(this.getComponentSelf(n.Register.s0),E.push({symbol:0,isBlock:!1}),l=0;l<S.length;l++)switch((f=S[l]).charAt(0)){case"&":if(h=null,"&default"===f)h=u
|
||
else if("&inverse"===f)h=_
|
||
else{if(f!==c)throw(0,r.unreachable)()
|
||
h=i}h?(this.pushYieldableBlock(h),E.push({symbol:l+1,isBlock:!0})):(this.pushYieldableBlock(null),E.push({symbol:l+1,isBlock:!0}))
|
||
break
|
||
case"@":if(!a)break
|
||
d=a[0],p=a[1],m=f,s&&(m=f.slice(1)),-1!==(y=d.indexOf(m))&&(this.expr(p[y]),E.push({symbol:l+1,isBlock:!1}))}for(this.pushRootScope(S.length+1,!!(u||_||i)),g=E.length-1;g>=0;g--)v=(b=E[g]).symbol,b.isBlock?this.setBlock(v):this.setVariable(v)
|
||
this.pushFrame(),this.invokeStatic(t),this.didRenderLayout(n.Register.s0),this.popFrame(),this.popScope(),this.popDynamicScope(),this.commitComponentTransaction(),this.load(n.Register.s0)}},i.prototype.dynamicComponent=function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null
|
||
this.startLabels(),this.pushFrame(),this.returnTo("END"),this.expr(e),this.dup(),this.enter(2),this.jumpUnless("ELSE"),this.resolveDynamicComponent(this.referrer),this.pushDynamicComponentInstance(),this.invokeComponent(null,t,r,n,i,o),this.label("ELSE"),this.exit(),this.return(),this.label("END"),this.popFrame(),this.stopLabels()},i.prototype.isComponent=function(){this.push(57)},i.prototype.curryComponent=function(e,t,r,i){var o=this.referrer
|
||
this.pushFrame(),this.compileArgs(t,r,null,i),this.push(66),this.expr(e),this.push(58,this.constants.serializable(o)),this.popFrame(),this.fetch(n.Register.v0)},i.prototype.pushSymbolTable=function(e){var t
|
||
e?(t=this.constants.serializable(e),this.push(40,t)):this.primitive(null)},i.prototype.pushBlockScope=function(){this.push(39)},i.prototype.pushYieldableBlock=function(e){this.pushSymbolTable(e&&e.symbolTable),this.pushBlockScope(),this.pushBlock(e)},i.prototype.template=function(e){return e?this.inlineBlock(e):null},(0,t.createClass)(i,[{key:"labels",get:function(){return this.labelsStack.current}}]),i}(_),S=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.pushBlock=function(e){e?this.pushOther(e):this.primitive(null)},r.prototype.resolveBlock=function(){this.push(38)},r.prototype.pushLayout=function(e){e?this.pushOther(e):this.primitive(null)},r.prototype.resolveLayout=function(){this.push(38)},r.prototype.invokeStatic=function(e){this.pushOther(e),this.push(38),this.pushMachine(41)},r.prototype.pushOther=function(e){this.push(10,this.other(e))},r.prototype.other=function(e){return this.constants.other(e)},r}(w),E=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.pushBlock=function(e){var t=e?e.compile(this.stdLib):null
|
||
this.primitive(t)},r.prototype.resolveBlock=function(){},r.prototype.pushLayout=function(e){e?this.primitive(e.compile(this.stdLib)):this.primitive(null)},r.prototype.resolveLayout=function(){},r.prototype.invokeStatic=function(e){var t=this,r=e.compile();-1===r?this.pushMachine(42,function(){return e.compile(t.stdLib)}):this.pushMachine(42,r)},r}(w),k=function(){function e(e,t){this.name=e,this.template=t}return e.prototype.getPartial=function(){var e=this.template.asPartial(),t=e.compile()
|
||
return{symbolTable:e.symbolTable,handle:t}},e}(),x=0,C=function(){function e(e,t){this.options=e,this.parsedLayout=t,this.layout=null,this.partial=null,this.wrappedLayout=null
|
||
var r=t.block
|
||
this.symbols=r.symbols,this.hasEval=r.hasEval,this.statements=r.statements,this.referrer=t.referrer,this.id=t.id||"client-"+x++}return e.prototype.asLayout=function(){return this.layout?this.layout:this.layout=A(this.parsedLayout,this.options,!1)},e.prototype.asPartial=function(){return this.partial?this.partial:this.partial=A(this.parsedLayout,this.options,!0)},e.prototype.asWrappedLayout=function(){if(this.wrappedLayout)return this.wrappedLayout
|
||
var e=(0,r.assign)({},this.options,{asPartial:!1,referrer:this.referrer})
|
||
return this.wrappedLayout=new g(e,this.parsedLayout)},e}()
|
||
function A(e,t,n){var i=e.block,o=e.referrer,a=i.hasEval,s=i.symbols,u=(0,r.assign)({},t,{asPartial:n,referrer:o})
|
||
return new y(i.statements,e,u,{referrer:o,hasEval:a,symbols:s})}e.ATTRS_BLOCK=c,e.Macros=function(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new p,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new m
|
||
return e.add("if",function(e,t,r,n,i){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #if requires a single argument")
|
||
i.startLabels(),i.pushFrame(),i.returnTo("END"),i.expr(e[0]),i.toBoolean(),i.enter(1),i.jumpUnless("ELSE"),i.invokeStaticBlock(r),n?(i.jump("EXIT"),i.label("ELSE"),i.invokeStaticBlock(n),i.label("EXIT"),i.exit(),i.return()):(i.label("ELSE"),i.exit(),i.return()),i.label("END"),i.popFrame(),i.stopLabels()}),e.add("unless",function(e,t,r,n,i){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #unless requires a single argument")
|
||
i.startLabels(),i.pushFrame(),i.returnTo("END"),i.expr(e[0]),i.toBoolean(),i.enter(1),i.jumpIf("ELSE"),i.invokeStaticBlock(r),n?(i.jump("EXIT"),i.label("ELSE"),i.invokeStaticBlock(n),i.label("EXIT"),i.exit(),i.return()):(i.label("ELSE"),i.exit(),i.return()),i.label("END"),i.popFrame(),i.stopLabels()}),e.add("with",function(e,t,r,n,i){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #with requires a single argument")
|
||
i.startLabels(),i.pushFrame(),i.returnTo("END"),i.expr(e[0]),i.dup(),i.toBoolean(),i.enter(2),i.jumpUnless("ELSE"),i.invokeStaticBlock(r,1),n?(i.jump("EXIT"),i.label("ELSE"),i.invokeStaticBlock(n),i.label("EXIT"),i.exit(),i.return()):(i.label("ELSE"),i.exit(),i.return()),i.label("END"),i.popFrame(),i.stopLabels()}),e.add("each",function(e,t,r,i,o){o.startLabels(),o.pushFrame(),o.returnTo("END"),t&&"key"===t[0][0]?o.expr(t[1][0]):o.pushPrimitiveReference(null),o.expr(e[0]),o.enter(2),o.putIterator(),o.jumpUnless("ELSE"),o.pushFrame(),o.returnTo("ITER"),o.dup(n.Register.fp,1),o.enterList("BODY"),o.label("ITER"),o.iterate("BREAK"),o.label("BODY"),o.invokeStaticBlock(r,2),o.pop(2),o.exit(),o.return(),o.label("BREAK"),o.exitList(),o.popFrame(),i?(o.jump("EXIT"),o.label("ELSE"),o.invokeStaticBlock(i),o.label("EXIT"),o.exit(),o.return()):(o.label("ELSE"),o.exit(),o.return()),o.label("END"),o.popFrame(),o.stopLabels()}),e.add("in-element",function(e,t,r,n,i){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #in-element requires a single argument")
|
||
i.startLabels(),i.pushFrame(),i.returnTo("END")
|
||
var o,a,s=t[0],u=t[1]
|
||
for(o=0;o<s.length;o++){if("nextSibling"!==(a=s[o])&&"guid"!==a)throw new Error("SYNTAX ERROR: #in-element does not take a `"+s[0]+"` option")
|
||
i.expr(u[o])}i.expr(e[0]),i.dup(),i.enter(4),i.jumpUnless("ELSE"),i.pushRemoteElement(),i.invokeStaticBlock(r),i.popRemoteElement(),i.label("ELSE"),i.exit(),i.return(),i.label("END"),i.popFrame(),i.stopLabels()}),e.add("-with-dynamic-vars",function(e,t,r,n,i){var o,a
|
||
t?(o=t[0],a=t[1],i.compileParams(a),i.pushDynamicScope(),i.bindDynamicScope(o),i.invokeStaticBlock(r),i.popDynamicScope()):i.invokeStaticBlock(r)}),e.add("component",function(e,t,r,n,i){if("string"!=typeof e[0]||!i.staticComponentHelper(e[0],t,r)){var o=e[0],a=e.slice(1)
|
||
i.dynamicComponent(o,a,t,!0,r,n)}}),t.add("component",function(e,t,r,n){var i=t&&t[0]
|
||
if("string"==typeof i&&n.staticComponentHelper(i,r,null))return!0
|
||
var o=t[0],a=t.slice(1)
|
||
return n.dynamicComponent(o,a,r,!0,null,null),!0}),{blocks:e,inlines:t}}(),t=e.blocks,r=e.inlines
|
||
this.blocks=t,this.inlines=r},e.LazyOpcodeBuilder=S,e.EagerOpcodeBuilder=E,e.OpcodeBuilder=w,e.SimpleOpcodeBuilder=_,e.PartialDefinition=k,e.templateFactory=function(e){var t=e.id,n=e.meta,i=e.block,o=void 0,a=t||"client-"+x++
|
||
return{id:a,meta:n,create:function(e,t){var s=t?(0,r.assign)({},t,n):n
|
||
return o||(o=JSON.parse(i)),new C(e,{id:a,block:o,referrer:s})}}},e.CompilableTemplate=y,e.debug=function(e,t){for(n=arguments.length,i=Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o]
|
||
var n,i,o
|
||
throw(0,r.unreachable)("Missing Opcode Metadata for "+t)},e.debugSlice=function(){},e.logOpcode=function(e,t){var r=e
|
||
return t&&(r+=Object.keys(t).map(function(e){return" "+e+"="+void t[e]}).join("")),"("+r+")"},e.WrappedBuilder=g,e.PLACEHOLDER_HANDLE=-1}),e("@glimmer/program",["exports","ember-babel","@glimmer/util"],function(e,t){"use strict"
|
||
e.Opcode=e.Program=e.RuntimeProgram=e.WriteOnlyProgram=e.Heap=e.LazyConstants=e.Constants=e.RuntimeConstants=e.WriteOnlyConstants=void 0
|
||
var r={},n=Object.freeze([]),i=function(){function e(){this.strings=[],this.arrays=[n],this.tables=[],this.handles=[],this.resolved=[],this.numbers=[]}return e.prototype.string=function(e){var t=this.strings.indexOf(e)
|
||
return t>-1?t:this.strings.push(e)-1},e.prototype.stringArray=function(e){var t,r=new Array(e.length)
|
||
for(t=0;t<e.length;t++)r[t]=this.string(e[t])
|
||
return this.array(r)},e.prototype.array=function(e){if(0===e.length)return 0
|
||
var t=this.arrays.indexOf(e)
|
||
return t>-1?t:this.arrays.push(e)-1},e.prototype.handle=function(e){var t=this.handles.indexOf(e)
|
||
return t>-1?t:(this.resolved.push(r),this.handles.push(e)-1)},e.prototype.serializable=function(e){var t=JSON.stringify(e),r=this.strings.indexOf(t)
|
||
return r>-1?r:this.strings.push(t)-1},e.prototype.number=function(e){var t=this.numbers.indexOf(e)
|
||
return t>-1?t:this.numbers.push(e)-1},e.prototype.toPool=function(){return{strings:this.strings,arrays:this.arrays,handles:this.handles,numbers:this.numbers}},e}(),o=function(){function e(e,t){this.resolver=e,this.strings=t.strings,this.arrays=t.arrays,this.handles=t.handles,this.resolved=this.handles.map(function(){return r}),this.numbers=t.numbers}return e.prototype.getString=function(e){return this.strings[e]},e.prototype.getNumber=function(e){return this.numbers[e]},e.prototype.getStringArray=function(e){var t,r,n=this.getArray(e),i=new Array(n.length)
|
||
for(t=0;t<n.length;t++)r=n[t],i[t]=this.getString(r)
|
||
return i},e.prototype.getArray=function(e){return this.arrays[e]},e.prototype.resolveHandle=function(e){var t,n=this.resolved[e]
|
||
return n===r&&(t=this.handles[e],n=this.resolved[e]=this.resolver.resolve(t)),n},e.prototype.getSerializable=function(e){return JSON.parse(this.strings[e])},e}(),a=function(e){function n(n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return o.resolver=n,i&&(o.strings=i.strings,o.arrays=i.arrays,o.handles=i.handles,o.resolved=o.handles.map(function(){return r}),o.numbers=i.numbers),o}return(0,t.inherits)(n,e),n.prototype.getNumber=function(e){return this.numbers[e]},n.prototype.getString=function(e){return this.strings[e]},n.prototype.getStringArray=function(e){var t,r,n=this.getArray(e),i=new Array(n.length)
|
||
for(t=0;t<n.length;t++)r=n[t],i[t]=this.getString(r)
|
||
return i},n.prototype.getArray=function(e){return this.arrays[e]},n.prototype.resolveHandle=function(e){var t,n=this.resolved[e]
|
||
return n===r&&(t=this.handles[e],n=this.resolved[e]=this.resolver.resolve(t)),n},n.prototype.getSerializable=function(e){return JSON.parse(this.strings[e])},n}(i),s=function(e){function r(){var r=(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))
|
||
return r.others=[],r.serializables=[],r}return(0,t.inherits)(r,e),r.prototype.serializable=function(e){var t=this.serializables.indexOf(e)
|
||
return t>-1?t:this.serializables.push(e)-1},r.prototype.getSerializable=function(e){return this.serializables[e]},r.prototype.getOther=function(e){return this.others[e-1]},r.prototype.other=function(e){return this.others.push(e)},r}(a),u=function(){function e(e){this.heap=e,this.offset=0}return(0,t.createClass)(e,[{key:"size",get:function(){return 1+((768&this.heap.getbyaddr(this.offset))>>8)}},{key:"isMachine",get:function(){return 1024&this.heap.getbyaddr(this.offset)}},{key:"type",get:function(){return 255&this.heap.getbyaddr(this.offset)}},{key:"op1",get:function(){return this.heap.getbyaddr(this.offset+1)}},{key:"op2",get:function(){return this.heap.getbyaddr(this.offset+2)}},{key:"op3",get:function(){return this.heap.getbyaddr(this.offset+3)}}]),e}()
|
||
function c(e,t,r){return e|t<<16|r<<30}function l(e,t){return e|t<<30}var f=function(){function e(e){var t,r,n
|
||
this.placeholders=[],this.offset=0,this.handle=0,e?(t=e.buffer,r=e.table,n=e.handle,this.heap=new Uint16Array(t),this.table=r,this.offset=this.heap.length,this.handle=n):(this.heap=new Uint16Array(1048576),this.table=[])}return e.prototype.push=function(e){this.heap[this.offset++]=e},e.prototype.getbyaddr=function(e){return this.heap[e]},e.prototype.setbyaddr=function(e,t){this.heap[e]=t},e.prototype.malloc=function(){this.table.push(this.offset,0)
|
||
var e=this.handle
|
||
return this.handle+=2,e},e.prototype.finishMalloc=function(e,t){var r=this.table[e],n=c(this.offset-r,t,0)
|
||
this.table[e+1]=n},e.prototype.size=function(){return this.offset},e.prototype.getaddr=function(e){return this.table[e]},e.prototype.gethandle=function(e){this.table.push(e,c(0,0,3))
|
||
var t=this.handle
|
||
return this.handle+=2,t},e.prototype.sizeof=function(){return-1},e.prototype.scopesizeof=function(e){return(1073676288&this.table[e+1])>>16},e.prototype.free=function(e){var t=this.table[e+1]
|
||
this.table[e+1]=l(t,1)},e.prototype.compact=function(){var e,t,r,n,i,o,a=0,s=this.table,u=this.table.length,c=this.heap
|
||
for(e=0;e<u;e+=2)if(t=s[e],n=65535&(r=s[e+1]),2!==(i=-1&r))if(1===i)s[e+1]=l(r,2),a+=n
|
||
else if(0===i){for(o=t;o<=e+n;o++)c[o-a]=c[o]
|
||
s[e]=t-a}else 3===i&&(s[e]=t-a)
|
||
this.offset=this.offset-a},e.prototype.pushPlaceholder=function(e){var t=this.offset++
|
||
this.heap[t]=65535,this.placeholders.push([t,e])},e.prototype.patchPlaceholders=function(){var e,t,r,n,i=this.placeholders
|
||
for(e=0;e<i.length;e++)r=(t=i[e])[0],n=t[1],this.setbyaddr(r,n())},e.prototype.capture=function(){this.patchPlaceholders()
|
||
var e=function(e,t,r){var n
|
||
if(e instanceof Uint16Array){if(void 0!==e.slice)return e.slice(t,r).buffer
|
||
for(n=new Uint16Array(r);t<r;t++)n[t]=e[t]
|
||
return n.buffer}return null}(this.heap,0,this.offset)
|
||
return{handle:this.handle,table:this.table,buffer:e}},e}(),h=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new f
|
||
this.constants=e,this.heap=t,this._opcode=new u(this.heap)}return e.prototype.opcode=function(e){return this._opcode.offset=e,this._opcode},e}(),d=function(){function e(e,t){this.constants=e,this.heap=t,this._opcode=new u(this.heap)}return e.hydrate=function(t,r,n){var i=new f(t)
|
||
return new e(new o(n,r),i)},e.prototype.opcode=function(e){return this._opcode.offset=e,this._opcode},e}(),p=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r}(h)
|
||
e.WriteOnlyConstants=i,e.RuntimeConstants=o,e.Constants=a,e.LazyConstants=s,e.Heap=f,e.WriteOnlyProgram=h,e.RuntimeProgram=d,e.Program=p,e.Opcode=u}),e("@glimmer/reference",["exports","ember-babel","@glimmer/util"],function(e,t,r){"use strict"
|
||
e.isModified=e.ReferenceCache=e.map=e.CachedReference=e.UpdatableTag=e.CachedTag=e.combine=e.combineSlice=e.combineTagged=e.DirtyableTag=e.isConstTag=e.isConst=e.CURRENT_TAG=e.VOLATILE_TAG=e.CONSTANT_TAG=e.TagWrapper=e.RevisionTag=e.VOLATILE=e.INITIAL=e.CONSTANT=e.IteratorSynchronizer=e.ReferenceIterator=e.IterationArtifacts=e.ListItem=e.ConstReference=void 0
|
||
var n=1,i=function(){function e(){}return e.prototype.validate=function(e){return this.value()===e},e}()
|
||
i.id=0
|
||
var o=[],a=[],s=function(){function e(e,t){this.type=e,this.inner=t}return e.prototype.value=function(){return(0,o[this.type])(this.inner)},e.prototype.validate=function(e){return(0,a[this.type])(this.inner,e)},e}()
|
||
function u(e){var t=o.length
|
||
o.push(function(e){return e.value()}),a.push(function(e,t){return e.validate(t)}),e.id=t}o.push(function(){return 0}),a.push(function(e,t){return 0===t})
|
||
var c=new s(0,null)
|
||
o.push(function(){return NaN}),a.push(function(e,t){return NaN===t})
|
||
var l=new s(1,null)
|
||
o.push(function(){return h}),a.push(function(e,t){return t===h})
|
||
var f=new s(2,null),h=n,d=function(e){function r(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,n=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return n.revision=r,n}return(0,t.inherits)(r,e),r.create=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h
|
||
return new s(this.id,new r(e))},r.prototype.value=function(){return this.revision},r.prototype.dirty=function(){this.revision=++h},r}(i)
|
||
function p(e){switch(e.length){case 0:return c
|
||
case 1:return e[0]
|
||
case 2:return y.create(e[0],e[1])
|
||
default:return g.create(e)}}u(d)
|
||
var m=function(e){function r(){var r=(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))
|
||
return r.lastChecked=null,r.lastValue=null,r}return(0,t.inherits)(r,e),r.prototype.value=function(){var e=this.lastChecked
|
||
this.lastValue
|
||
return e!==h&&(this.lastChecked=h,this.lastValue=this.compute()),this.lastValue},r.prototype.invalidate=function(){this.lastChecked=null},r}(i),y=function(e){function r(r,n){var i=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return i.first=r,i.second=n,i}return(0,t.inherits)(r,e),r.create=function(e,t){return new s(this.id,new r(e,t))},r.prototype.compute=function(){return Math.max(this.first.value(),this.second.value())},r}(m)
|
||
u(y)
|
||
var g=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return n.tags=r,n}return(0,t.inherits)(r,e),r.create=function(e){return new s(this.id,new r(e))},r.prototype.compute=function(){var e,t,r=this.tags,n=-1
|
||
for(e=0;e<r.length;e++)t=r[e].value(),n=Math.max(t,n)
|
||
return n},r}(m)
|
||
u(g)
|
||
var b=function(e){function r(r){var i=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return i.tag=r,i.lastUpdated=n,i}return(0,t.inherits)(r,e),r.create=function(e){return new s(this.id,new r(e))},r.prototype.compute=function(){return Math.max(this.lastUpdated,this.tag.value())},r.prototype.update=function(e){e!==this.tag&&(this.tag=e,this.lastUpdated=h,this.invalidate())},r}(m)
|
||
u(b)
|
||
var v,_=function(){function e(){this.lastRevision=null,this.lastValue=null}return e.prototype.value=function(){var e=this.tag,t=this.lastRevision,r=this.lastValue
|
||
return null!==t&&e.validate(t)||(r=this.lastValue=this.compute(),this.lastRevision=e.value()),r},e.prototype.invalidate=function(){this.lastRevision=null},e}(),w=function(e){function r(r,n){var i=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return i.tag=r.tag,i.reference=r,i.mapper=n,i}return(0,t.inherits)(r,e),r.prototype.compute=function(){var e=this.reference
|
||
return(0,this.mapper)(e.value())},r}(_),S=function(){function e(e){this.lastValue=null,this.lastRevision=null,this.initialized=!1,this.tag=e.tag,this.reference=e}return e.prototype.peek=function(){return this.initialized?this.lastValue:this.initialize()},e.prototype.revalidate=function(){if(!this.initialized)return this.initialize()
|
||
var e=this.reference,t=this.lastRevision,r=e.tag
|
||
if(r.validate(t))return E
|
||
this.lastRevision=r.value()
|
||
var n=this.lastValue,i=e.value()
|
||
return i===n?E:(this.lastValue=i,i)},e.prototype.initialize=function(){var e=this.reference,t=this.lastValue=e.value()
|
||
return this.lastRevision=e.tag.value(),this.initialized=!0,t},e}(),E="adb3b78e-3d22-4e4b-877a-6317c2c5c145",k=function(){function e(e){this.inner=e,this.tag=c}return e.prototype.value=function(){return this.inner},e}(),x=function(e){function r(r,n){var i=(0,t.possibleConstructorReturn)(this,e.call(this,r.valueReferenceFor(n)))
|
||
return i.retained=!1,i.seen=!1,i.key=n.key,i.iterable=r,i.memo=r.memoReferenceFor(n),i}return(0,t.inherits)(r,e),r.prototype.update=function(e){this.retained=!0,this.iterable.updateValueReference(this.value,e),this.iterable.updateMemoReference(this.memo,e)},r.prototype.shouldRemove=function(){return!this.retained},r.prototype.reset=function(){this.retained=!1,this.seen=!1},r}(r.ListNode),C=function(){function e(e){this.iterator=null,this.map=(0,r.dict)(),this.list=new r.LinkedList,this.tag=e.tag,this.iterable=e}return e.prototype.isEmpty=function(){return(this.iterator=this.iterable.iterate()).isEmpty()},e.prototype.iterate=function(){var e=void 0
|
||
return e=null===this.iterator?this.iterable.iterate():this.iterator,this.iterator=null,e},e.prototype.has=function(e){return!!this.map[e]},e.prototype.get=function(e){return this.map[e]},e.prototype.wasSeen=function(e){var t=this.map[e]
|
||
return void 0!==t&&t.seen},e.prototype.append=function(e){var t=this.map,r=this.list,n=this.iterable,i=t[e.key]=new x(n,e)
|
||
return r.append(i),i},e.prototype.insertBefore=function(e,t){var r=this.map,n=this.list,i=this.iterable,o=r[e.key]=new x(i,e)
|
||
return o.retained=!0,n.insertBefore(o,t),o},e.prototype.move=function(e,t){var r=this.list
|
||
e.retained=!0,r.remove(e),r.insertBefore(e,t)},e.prototype.remove=function(e){this.list.remove(e),delete this.map[e.key]},e.prototype.nextNode=function(e){return this.list.nextNode(e)},e.prototype.head=function(){return this.list.head()},e}(),A=function(){function e(e){this.iterator=null
|
||
var t=new C(e)
|
||
this.artifacts=t}return e.prototype.next=function(){var e=this.artifacts,t=(this.iterator=this.iterator||e.iterate()).next()
|
||
return null===t?null:e.append(t)},e}();(function(e){e[e.Append=0]="Append",e[e.Prune=1]="Prune",e[e.Done=2]="Done"})(v||(v={}))
|
||
var T=function(){function e(e){var t=e.target,r=e.artifacts
|
||
this.target=t,this.artifacts=r,this.iterator=r.iterate(),this.current=r.head()}return e.prototype.sync=function(){for(var e=v.Append;;)switch(e){case v.Append:e=this.nextAppend()
|
||
break
|
||
case v.Prune:e=this.nextPrune()
|
||
break
|
||
case v.Done:return void this.nextDone()}},e.prototype.advanceToKey=function(e){for(var t=this.current,r=this.artifacts,n=t;null!==n&&n.key!==e;)n.seen=!0,n=r.nextNode(n)
|
||
null!==n&&(this.current=r.nextNode(n))},e.prototype.nextAppend=function(){var e=this.iterator,t=this.current,r=this.artifacts,n=e.next()
|
||
if(null===n)return this.startPrune()
|
||
var i=n.key
|
||
return null!==t&&t.key===i?this.nextRetain(n):r.has(i)?this.nextMove(n):this.nextInsert(n),v.Append},e.prototype.nextRetain=function(e){var t=this.artifacts,r=this.current;(r=r).update(e),this.current=t.nextNode(r),this.target.retain(e.key,r.value,r.memo)},e.prototype.nextMove=function(e){var t=this.current,r=this.artifacts,n=this.target,i=e.key,o=r.get(e.key)
|
||
o.update(e),r.wasSeen(e.key)?(r.move(o,t),n.move(o.key,o.value,o.memo,t?t.key:null)):this.advanceToKey(i)},e.prototype.nextInsert=function(e){var t=this.artifacts,r=this.target,n=this.current,i=t.insertBefore(e,n)
|
||
r.insert(i.key,i.value,i.memo,n?n.key:null)},e.prototype.startPrune=function(){return this.current=this.artifacts.head(),v.Prune},e.prototype.nextPrune=function(){var e=this.artifacts,t=this.target,r=this.current
|
||
if(null===r)return v.Done
|
||
var n=r
|
||
return this.current=e.nextNode(n),n.shouldRemove()?(e.remove(n),t.delete(n.key)):n.reset(),v.Prune},e.prototype.nextDone=function(){this.target.done()},e}()
|
||
e.ConstReference=k,e.ListItem=x,e.IterationArtifacts=C,e.ReferenceIterator=A,e.IteratorSynchronizer=T,e.CONSTANT=0,e.INITIAL=n,e.VOLATILE=NaN,e.RevisionTag=i,e.TagWrapper=s,e.CONSTANT_TAG=c,e.VOLATILE_TAG=l,e.CURRENT_TAG=f,e.isConst=function(e){return e.tag===c},e.isConstTag=function(e){return e===c},e.DirtyableTag=d,e.combineTagged=function(e){var t,r,n,i=[]
|
||
for(t=0,r=e.length;t<r;t++){if((n=e[t].tag)===l)return l
|
||
n!==c&&i.push(n)}return p(i)},e.combineSlice=function(e){for(var t,r=[],n=e.head();null!==n;){if((t=n.tag)===l)return l
|
||
t!==c&&r.push(t),n=e.nextNode(n)}return p(r)},e.combine=function(e){var t,r,n,i=[]
|
||
for(t=0,r=e.length;t<r;t++){if((n=e[t])===l)return l
|
||
n!==c&&i.push(n)}return p(i)},e.CachedTag=m,e.UpdatableTag=b,e.CachedReference=_,e.map=function(e,t){return new w(e,t)},e.ReferenceCache=S,e.isModified=function(e){return e!==E}}),e("@glimmer/runtime",["exports","ember-babel","@glimmer/util","@glimmer/vm","@glimmer/reference","@glimmer/low-level"],function(e,t,r,n,i,o){"use strict"
|
||
e.hasCapability=e.capabilityFlagsFrom=e.Cursor=e.ConcreteBounds=e.RehydrateBuilder=e.rehydrationBuilder=e.clientBuilder=e.NewElementBuilder=e.normalizeProperty=e.insertHTMLBefore=e.isWhitespace=e.DOMTreeConstruction=e.IDOMChanges=e.SVG_NAMESPACE=e.DOMChanges=e.ARGS=e.curry=e.isCurriedComponentDefinition=e.CurriedComponentDefinition=e.MINIMAL_CAPABILITIES=e.DEFAULT_CAPABILITIES=e.DefaultEnvironment=e.Environment=e.Scope=e.EMPTY_ARGS=e.DynamicAttribute=e.SimpleDynamicAttribute=e.RenderResult=e.UpdatingVM=e.LowLevelVM=e.getDynamicVar=e.resetDebuggerCallback=e.setDebuggerCallback=e.ConditionalReference=e.PrimitiveReference=e.UNDEFINED_REFERENCE=e.NULL_REFERENCE=e.renderMain=void 0
|
||
var a=new(function(){function e(){this.evaluateOpcode=(0,r.fillNulls)(82).slice()}return e.prototype.add=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"syscall"
|
||
this.evaluateOpcode[e]={syscall:"syscall"===r,evaluate:t}},e.prototype.debugBefore=function(){return{sp:void 0,state:void 0}},e.prototype.debugAfter=function(e,t,r,n){n.sp,n.state},e.prototype.evaluate=function(e,t,r){var n=this.evaluateOpcode[r]
|
||
n.syscall?n.evaluate(e,t):n.evaluate(e.inner,t)},e}()),s=function(e){function r(){var r=(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))
|
||
return r.next=null,r.prev=null,r}return(0,t.inherits)(r,e),r}(function(){(0,r.initializeGuid)(this)}),u=function(e){function r(r){return(0,t.possibleConstructorReturn)(this,e.call(this,r))}return(0,t.inherits)(r,e),r.create=function(e){return void 0===e?f:null===e?h:!0===e?d:!1===e?p:"number"==typeof e?new l(e):new c(e)},r.prototype.get=function(){return f},r}(i.ConstReference),c=function(e){function r(){var r=(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))
|
||
return r.lengthReference=null,r}return(0,t.inherits)(r,e),r.prototype.get=function(t){var r
|
||
return"length"===t?(null===(r=this.lengthReference)&&(r=this.lengthReference=new l(this.inner.length)),r):e.prototype.get.call(this,t)},r}(u),l=function(e){function r(r){return(0,t.possibleConstructorReturn)(this,e.call(this,r))}return(0,t.inherits)(r,e),r}(u),f=new l(void 0),h=new l(null),d=new l(!0),p=new l(!1),m=function(){function e(e){this.inner=e,this.tag=e.tag}return e.prototype.value=function(){return this.toBool(this.inner.value())},e.prototype.toBool=function(e){return!!e},e}(),y=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return n.parts=r,n.tag=(0,i.combineTagged)(r),n}return(0,t.inherits)(r,e),r.prototype.compute=function(){var e,t,r=new Array
|
||
for(e=0;e<this.parts.length;e++)null!==(t=this.parts[e].value())&&void 0!==t&&(r[e]=g(t))
|
||
return r.length>0?r.join(""):null},r}(i.CachedReference)
|
||
function g(e){return"function"!=typeof e.toString?"":String(e)}a.add(1,function(e,t){var r=t.op1,i=e.stack,o=e.constants.resolveHandle(r)(e,i.pop())
|
||
e.loadValue(n.Register.v0,o)}),a.add(4,function(e,t){var r=t.op1,n=e.referenceForSymbol(r)
|
||
e.stack.push(n)}),a.add(2,function(e,t){var r=t.op1,n=e.stack.pop()
|
||
e.scope().bindSymbol(r,n)}),a.add(3,function(e,t){var r=t.op1,n=e.stack.pop(),i=e.stack.pop(),o=e.stack.pop(),a=o?[n,i,o]:null
|
||
e.scope().bindBlock(r,a)}),a.add(80,function(e,t){var r=t.op1,n=e.constants.getString(r),i=e.scope().getPartialMap()[n]
|
||
void 0===i&&(i=e.getSelf().get(n)),e.stack.push(i)}),a.add(17,function(e,t){var r=t.op1,n=t.op2
|
||
e.pushRootScope(r,!!n)}),a.add(5,function(e,t){var r=t.op1,n=e.constants.getString(r),i=e.stack.pop()
|
||
e.stack.push(i.get(n))}),a.add(6,function(e,t){var r=t.op1,n=e.stack,i=e.scope().getBlock(r)
|
||
i?(n.push(i[2]),n.push(i[1]),n.push(i[0])):(n.push(null),n.push(null),n.push(null))}),a.add(7,function(e,t){var r=t.op1,n=!!e.scope().getBlock(r)
|
||
e.stack.push(n?d:p)}),a.add(8,function(e){e.stack.pop(),e.stack.pop()
|
||
var t=e.stack.pop(),r=t&&t.parameters.length
|
||
e.stack.push(r?d:p)}),a.add(9,function(e,t){var r,n=t.op1,i=new Array(n)
|
||
for(r=n;r>0;r--)i[r-1]=e.stack.pop()
|
||
e.stack.push(new y(i))})
|
||
var b=function(){function e(){this.stack=null,this.positional=new v,this.named=new w,this.blocks=new E}return e.prototype.setup=function(e,t,r,n,i){this.stack=e
|
||
var o=this.named,a=t.length,s=e.sp-a+1
|
||
o.setup(e,s,a,t,i)
|
||
var u=s-n
|
||
this.positional.setup(e,u,n)
|
||
var c=this.blocks,l=r.length
|
||
c.setup(e,u-3*l,l,r)},e.prototype.at=function(e){return this.positional.at(e)},e.prototype.realloc=function(e){var t,r,n,i,o
|
||
if(e>0){for(t=this.positional,r=this.named,n=this.stack,i=t.base+e,o=t.length+r.length-1;o>=0;o--)n.copy(o+t.base,o+i)
|
||
t.base+=e,r.base+=e,n.sp+=e}},e.prototype.capture=function(){var e=0===this.positional.length?C:this.positional.capture(),t=0===this.named.length?x:this.named.capture()
|
||
return{tag:this.tag,length:this.length,positional:e,named:t}},e.prototype.clear=function(){var e=this.stack,t=this.length
|
||
e.pop(t)},(0,t.createClass)(e,[{key:"tag",get:function(){return(0,i.combineTagged)([this.positional,this.named])}},{key:"base",get:function(){return this.blocks.base}},{key:"length",get:function(){return this.positional.length+this.named.length+3*this.blocks.length}}]),e}(),v=function(){function e(){this.base=0,this.length=0,this.stack=null,this._tag=null,this._references=null}return e.prototype.setup=function(e,t,n){this.stack=e,this.base=t,this.length=n,0===n?(this._tag=i.CONSTANT_TAG,this._references=r.EMPTY_ARRAY):(this._tag=null,this._references=null)},e.prototype.at=function(e){var t=this.base,r=this.length,n=this.stack
|
||
return e<0||e>=r?f:n.get(e,t)},e.prototype.capture=function(){return new _(this.tag,this.references)},e.prototype.prepend=function(e){var t,r,n,i,o=e.length
|
||
if(o>0){for(t=this.base,r=this.length,n=this.stack,this.base=t-=o,this.length=r+o,i=0;i<o;i++)n.set(e.at(i),i,t)
|
||
this._tag=null,this._references=null}},(0,t.createClass)(e,[{key:"tag",get:function(){var e=this._tag
|
||
return e||(e=this._tag=(0,i.combineTagged)(this.references)),e}},{key:"references",get:function(){var e,t,r,n=this._references
|
||
return n||(e=this.stack,t=this.base,r=this.length,n=this._references=e.sliceArray(t,t+r)),n}}]),e}(),_=function(){function e(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length
|
||
this.tag=e,this.references=t,this.length=r}return e.empty=function(){return new e(i.CONSTANT_TAG,r.EMPTY_ARRAY,0)},e.prototype.at=function(e){return this.references[e]},e.prototype.value=function(){return this.references.map(this.valueOf)},e.prototype.get=function(e){var t,r=this.references,n=this.length
|
||
return"length"===e?u.create(n):(t=parseInt(e,10))<0||t>=n?f:r[t]},e.prototype.valueOf=function(e){return e.value()},e}(),w=function(){function e(){this.base=0,this.length=0,this._references=null,this._names=r.EMPTY_ARRAY,this._atNames=r.EMPTY_ARRAY}return e.prototype.setup=function(e,t,n,i,o){this.stack=e,this.base=t,this.length=n,0===n?(this._references=r.EMPTY_ARRAY,this._names=r.EMPTY_ARRAY,this._atNames=r.EMPTY_ARRAY):(this._references=null,o?(this._names=i,this._atNames=null):(this._names=null,this._atNames=i))},e.prototype.has=function(e){return-1!==this.names.indexOf(e)},e.prototype.get=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.base,n=this.stack,i=(t?this.names:this.atNames).indexOf(e)
|
||
return-1===i?f:n.get(i,r)},e.prototype.capture=function(){return new S(this.tag,this.names,this.references)},e.prototype.merge=function(e){var t,r,n,i,o,a,s=e.length
|
||
if(s>0){for(t=this.names,r=this.length,n=this.stack,i=e.names,Object.isFrozen(t)&&0===t.length&&(t=[]),o=0;o<s;o++)a=i[o],-1===t.indexOf(a)&&(r=t.push(a),n.push(e.references[o]))
|
||
this.length=r,this._references=null,this._names=t,this._atNames=null}},e.prototype.toSyntheticName=function(e){return e.slice(1)},e.prototype.toAtName=function(e){return"@"+e},(0,t.createClass)(e,[{key:"tag",get:function(){return(0,i.combineTagged)(this.references)}},{key:"names",get:function(){var e=this._names
|
||
return e||(e=this._names=this._atNames.map(this.toSyntheticName)),e}},{key:"atNames",get:function(){var e=this._atNames
|
||
return e||(e=this._atNames=this._names.map(this.toAtName)),e}},{key:"references",get:function(){var e,t,r,n=this._references
|
||
return n||(e=this.base,t=this.length,r=this.stack,n=this._references=r.sliceArray(e,e+t)),n}}]),e}(),S=function(){function e(e,t,r){this.tag=e,this.names=t,this.references=r,this.length=t.length,this._map=null}return e.prototype.has=function(e){return-1!==this.names.indexOf(e)},e.prototype.get=function(e){var t=this.names,r=this.references,n=t.indexOf(e)
|
||
return-1===n?f:r[n]},e.prototype.value=function(){var e,t=this.names,n=this.references,i=(0,r.dict)()
|
||
for(e=0;e<t.length;e++)i[t[e]]=n[e].value()
|
||
return i},(0,t.createClass)(e,[{key:"map",get:function(){var e,t,n,i=this._map
|
||
if(!i)for(e=this.names,t=this.references,i=this._map=(0,r.dict)(),n=0;n<e.length;n++)i[e[n]]=t[n]
|
||
return i}}]),e}(),E=function(){function e(){this.internalValues=null,this.internalTag=null,this.names=r.EMPTY_ARRAY,this.length=0,this.base=0}return e.prototype.setup=function(e,t,n,o){this.stack=e,this.names=o,this.base=t,this.length=n,0===n?(this.internalTag=i.CONSTANT_TAG,this.internalValues=r.EMPTY_ARRAY):(this.internalTag=null,this.internalValues=null)},e.prototype.has=function(e){return-1!==this.names.indexOf(e)},e.prototype.get=function(e){var t=this.base,r=this.stack,n=this.names,i=n.indexOf(e)
|
||
if(-1===n.indexOf(e))return null
|
||
var o=r.get(3*i,t),a=r.get(3*i+1,t),s=r.get(3*i+2,t)
|
||
return null===s?null:[s,a,o]},e.prototype.capture=function(){return new k(this.names,this.values)},(0,t.createClass)(e,[{key:"values",get:function(){var e,t,r,n=this.internalValues
|
||
return n||(e=this.base,t=this.length,r=this.stack,n=this.internalValues=r.sliceArray(e,e+3*t)),n}}]),e}(),k=function(){function e(e,t){this.names=e,this.values=t,this.length=e.length}return e.prototype.has=function(e){return-1!==this.names.indexOf(e)},e.prototype.get=function(e){var t=this.names.indexOf(e)
|
||
return-1===t?null:[this.values[3*t+2],this.values[3*t+1],this.values[3*t]]},e}(),x=new S(i.CONSTANT_TAG,r.EMPTY_ARRAY,r.EMPTY_ARRAY),C=new _(i.CONSTANT_TAG,r.EMPTY_ARRAY),A={tag:i.CONSTANT_TAG,length:0,positional:C,named:x},T="CURRIED COMPONENT DEFINITION [id=6f00feb9-a0ef-4547-99ea-ac328f80acea]"
|
||
function I(e){return!(!e||!e[T])}var P=function(){function e(e,t){this.inner=e,this.args=t,this[T]=!0}return e.prototype.unwrap=function(e){e.realloc(this.offset)
|
||
for(var t,r,n,i=this;;){if(r=(t=i).args,n=t.inner,r&&(e.positional.prepend(r.positional),e.named.merge(r.named)),!I(n))return n
|
||
i=n}},(0,t.createClass)(e,[{key:"offset",get:function(){var e=this.inner,t=this.args,r=t?t.positional.length:0
|
||
return I(e)?r+e.offset:r}}]),e}(),M=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.create=function(e){return new r(e)},r.prototype.toBool=function(e){return I(e)},r}(m)
|
||
a.add(24,function(e){var t=e.stack.pop(),r=e.fetchValue(n.Register.t0),o=t.value(),a=void 0
|
||
a=r?e.elements().appendTrustingDynamicContent(o):e.elements().appendCautiousDynamicContent(o),(0,i.isConst)(t)||e.updateWith(new R(t,a)),e.loadValue(n.Register.t0,null)})
|
||
var R=function(e){function r(r,n){var i=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return i.reference=r,i.content=n,i.tag=r.tag,i}return(0,t.inherits)(r,e),r.prototype.evaluate=function(e){var t=this.content,r=this.reference
|
||
t.update(e.env,r.value())},r}(s)
|
||
a.add(18,function(e){return e.pushChildScope()}),a.add(19,function(e){return e.popScope()}),a.add(36,function(e){return e.pushDynamicScope()}),a.add(37,function(e){return e.popDynamicScope()}),a.add(10,function(e,t){var r=t.op1
|
||
e.stack.push(e.constants.getOther(r))}),a.add(11,function(e,t){var r=t.op1,n=e.stack,i=r>>3
|
||
switch(7&r){case 0:n.push(i)
|
||
break
|
||
case 1:n.push(e.constants.getNumber(i))
|
||
break
|
||
case 2:n.push(e.constants.getString(i))
|
||
break
|
||
case 3:n.pushEncodedImmediate(r)
|
||
break
|
||
case 4:case 5:n.push(e.constants.getNumber(i))}}),a.add(12,function(e){var t=e.stack
|
||
t.push(u.create(t.pop()))}),a.add(13,function(e,t){var r=t.op1,n=t.op2,i=e.fetchValue(r)-n
|
||
e.stack.dup(i)}),a.add(14,function(e,t){var r=t.op1
|
||
e.stack.pop(r)}),a.add(15,function(e,t){var r=t.op1
|
||
e.load(r)}),a.add(16,function(e,t){var r=t.op1
|
||
e.fetch(r)}),a.add(35,function(e,t){var r=t.op1,n=e.constants.getArray(r)
|
||
e.bindDynamicScope(n)}),a.add(49,function(e,t){var r=t.op1
|
||
e.enter(r)}),a.add(50,function(e){e.exit()}),a.add(40,function(e,t){var r=t.op1
|
||
e.stack.push(e.constants.getSerializable(r))}),a.add(39,function(e){e.stack.push(e.scope())}),a.add(38,function(e){var t=e.stack,r=t.pop()
|
||
r?t.pushSmi(r.compile()):t.pushNull()}),a.add(43,function(e){var t,r,n,i=e.stack,o=i.pop(),a=i.pop(),s=i.pop(),u=i.pop()
|
||
if(null===s)return e.pushFrame(),void e.pushScope(a)
|
||
var c=a
|
||
if((r=(t=s.parameters).length)>0)for(c=c.child(),n=0;n<r;n++)c.bindSymbol(t[n],u.at(n))
|
||
e.pushFrame(),e.pushScope(c),e.call(o)}),a.add(45,function(e,t){var r,n=t.op1,o=e.stack.pop();(0,i.isConst)(o)?o.value()&&e.goto(n):((r=new i.ReferenceCache(o)).peek()&&e.goto(n),e.updateWith(new O(r)))}),a.add(46,function(e,t){var r,n=t.op1,o=e.stack.pop();(0,i.isConst)(o)?o.value()||e.goto(n):((r=new i.ReferenceCache(o)).peek()||e.goto(n),e.updateWith(new O(r)))}),a.add(51,function(e){var t=e.env,r=e.stack
|
||
r.push(t.toConditionalReference(r.pop()))})
|
||
var O=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return n.type="assert",n.tag=r.tag,n.cache=r,n}return(0,t.inherits)(r,e),r.prototype.evaluate=function(e){var t=this.cache;(0,i.isModified)(t.revalidate())&&e.throw()},r}(s),B=function(e){function r(r,n){var i=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return i.target=n,i.type="jump-if-not-modified",i.tag=r,i.lastRevision=r.value(),i}return(0,t.inherits)(r,e),r.prototype.evaluate=function(e){var t=this.tag,r=this.target,n=this.lastRevision
|
||
!e.alwaysRevalidate&&t.validate(n)&&e.goto(r)},r.prototype.didModify=function(){this.lastRevision=this.tag.value()},r}(s),N=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return n.target=r,n.type="did-modify",n.tag=i.CONSTANT_TAG,n}return(0,t.inherits)(r,e),r.prototype.evaluate=function(){this.target.didModify()},r}(s),j=function(){function e(e){this.tag=i.CONSTANT_TAG,this.type="label",this.label=null,this.prev=null,this.next=null,(0,r.initializeGuid)(this),this.label=e}return e.prototype.evaluate=function(){},e.prototype.inspect=function(){return this.label+" ["+this._guid+"]"},e}()
|
||
a.add(22,function(e,t){var r=t.op1
|
||
e.elements().appendText(e.constants.getString(r))}),a.add(23,function(e,t){var r=t.op1
|
||
e.elements().appendComment(e.constants.getString(r))}),a.add(25,function(e,t){var r=t.op1
|
||
e.elements().openElement(e.constants.getString(r))}),a.add(26,function(e){var t=e.stack.pop().value()
|
||
e.elements().openElement(t)}),a.add(33,function(e){var t,r,n=e.stack.pop(),o=e.stack.pop(),a=void 0,s=void 0,u=e.stack.pop().value();(0,i.isConst)(n)?a=n.value():(a=(t=new i.ReferenceCache(n)).peek(),e.updateWith(new O(t))),(0,i.isConst)(o)?s=o.value():(s=(r=new i.ReferenceCache(o)).peek(),e.updateWith(new O(r))),e.elements().pushRemoteElement(a,u,s)}),a.add(34,function(e){e.elements().popRemoteElement()}),a.add(30,function(e){var t=e.fetchValue(n.Register.t0)
|
||
t&&(t.flush(e),e.loadValue(n.Register.t0,null)),e.elements().flushElement()}),a.add(31,function(e){e.elements().closeElement()}),a.add(32,function(e,t){var r=t.op1,n=e.constants.resolveHandle(r),o=e.stack.pop(),a=e.elements(),s=a.constructing,u=a.updateOperations,c=e.dynamicScope(),l=n.create(s,o,c,u)
|
||
e.env.scheduleInstallModifier(l,n)
|
||
var f=n.getDestructor(l)
|
||
f&&e.newDestroyable(f)
|
||
var h=n.getTag(l);(0,i.isConstTag)(h)||e.updateWith(new L(h,n,l))})
|
||
var L=function(e){function r(r,n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return o.tag=r,o.manager=n,o.modifier=i,o.type="update-modifier",o.lastUpdated=r.value(),o}return(0,t.inherits)(r,e),r.prototype.evaluate=function(e){var t=this.manager,r=this.modifier,n=this.tag,i=this.lastUpdated
|
||
n.validate(i)||(e.env.scheduleUpdateModifier(r,t),this.lastUpdated=n.value())},r}(s)
|
||
a.add(27,function(e,t){var r=t.op1,n=t.op2,i=t.op3,o=e.constants.getString(r),a=e.constants.getString(n),s=i?e.constants.getString(i):null
|
||
e.elements().setStaticAttribute(o,a,s)}),a.add(28,function(e,t){var r=t.op1,n=t.op2,o=t.op3,a=e.constants.getString(r),s=e.stack.pop(),u=s.value(),c=o?e.constants.getString(o):null,l=e.elements().setDynamicAttribute(a,u,!!n,c);(0,i.isConst)(s)||e.updateWith(new D(s,l))})
|
||
var D=function(e){function r(r,n){var i=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return i.reference=r,i.attribute=n,i.type="patch-element",i.tag=r.tag,i.lastRevision=i.tag.value(),i}return(0,t.inherits)(r,e),r.prototype.evaluate=function(e){var t=this.attribute,r=this.reference,n=this.tag
|
||
n.validate(this.lastRevision)||(this.lastRevision=n.value(),t.update(r.value(),e.env))},r}(s)
|
||
function U(e,t,r){return e.lookupComponent(t,r)}var F=function(){function e(e,t,r,n){this.inner=e,this.resolver=t,this.meta=r,this.args=n,this.tag=e.tag,this.lastValue=null,this.lastDefinition=null}return e.prototype.value=function(){var e=this.inner,t=this.lastValue,r=e.value()
|
||
if(r===t)return this.lastDefinition
|
||
var n=null
|
||
return I(r)?n=r:"string"==typeof r&&r&&(n=U(this.resolver,r,this.meta)),n=this.curry(n),this.lastValue=r,this.lastDefinition=n,n},e.prototype.get=function(){return f},e.prototype.curry=function(e){var t=this.args
|
||
return!t&&I(e)?e:e?new P(e,t):null},e}()
|
||
function z(e){return q(e)?"":String(e)}function q(e){return null===e||void 0===e||"function"!=typeof e.toString}function V(e){return"object"==typeof e&&null!==e&&"function"==typeof e.toHTML}function H(e){return"object"==typeof e&&null!==e&&"number"==typeof e.nodeType}function K(e){return H(e)&&11===e.nodeType}function W(e){return"string"==typeof e}var G=function(){function e(e){this.list=e,this.tag=(0,i.combineTagged)(e),this.list=e}return e.prototype.value=function(){var e,t,r=[],n=this.list
|
||
for(t=0;t<n.length;t++)(e=z(n[t].value()))&&r.push(e)
|
||
return 0===r.length?null:r.join(" ")},e}()
|
||
function Y(e){return 0|(e.dynamicLayout?1:0)|(e.dynamicTag?2:0)|(e.prepareArgs?4:0)|(e.createArgs?8:0)|(e.attributeHook?16:0)|(e.elementHook?32:0)}function Q(e,t){return!!(e&t)}var X=new b
|
||
a.add(57,function(e){var t=e.stack,r=t.pop()
|
||
t.push(M.create(r))}),a.add(58,function(e,t){var r=t.op1,i=e.stack,o=i.pop(),a=i.pop(),s=e.constants.getSerializable(r),u=e.constants.resolver
|
||
e.loadValue(n.Register.v0,new F(o,u,s,a))}),a.add(59,function(e,t){var r=t.op1,n=e.constants.resolveHandle(r),i=n.manager,o=Y(i.getCapabilities(n.state))
|
||
e.stack.push({definition:n,manager:i,capabilities:o,state:null,handle:null,table:null})}),a.add(62,function(e,t){var i=t.op1,o=e.stack,a=o.pop().value(),s=e.constants.getSerializable(i)
|
||
e.loadValue(n.Register.t1,null)
|
||
var u=void 0
|
||
if("string"==typeof a)u=U(e.constants.resolver,a,s)
|
||
else{if(!I(a))throw(0,r.unreachable)()
|
||
u=a}o.push(u)}),a.add(60,function(e){var t=e.stack,r=t.pop(),n=void 0,i=void 0
|
||
I(r)?i=n=null:n=Y((i=r.manager).getCapabilities(r.state)),t.push({definition:r,capabilities:n,manager:i,state:null,handle:null,table:null})}),a.add(61,function(e,t){t.op1
|
||
var n=e.stack,i=n.pop().value(),o=void 0
|
||
if(!I(i))throw(0,r.unreachable)()
|
||
o=i,n.push(o)}),a.add(63,function(e,t){var r=t.op1,n=t.op2,i=e.stack,o=e.constants.getStringArray(r),a=[]
|
||
4&n&&a.push("main"),2&n&&a.push("else"),1&n&&a.push("attrs"),X.setup(i,o,a,n>>4,!!(8&n)),i.push(X)}),a.add(66,function(e){var t=e.stack,r=t.pop().capture()
|
||
t.push(r)}),a.add(65,function(e,t){var r,n,i,o,a,s,u,c=t.op1,l=e.stack,f=e.fetchValue(c),h=l.pop(),d=f.definition
|
||
I(d)&&(d=function(e,t,r){var n=e.definition=t.unwrap(r),i=n.manager,o=n.state
|
||
return e.manager=i,e.capabilities=Y(i.getCapabilities(o)),n}(f,d,h))
|
||
var p=d,m=p.manager,y=p.state
|
||
if(!0===Q(f.capabilities,4)){var g=h.blocks.values,b=h.blocks.names,v=m.prepareArgs(y,h)
|
||
if(v){for(h.clear(),r=0;r<g.length;r++)l.push(g[r])
|
||
for(n=v.positional,i=v.named,o=n.length,a=0;a<o;a++)l.push(n[a])
|
||
for(s=Object.keys(i),u=0;u<s.length;u++)l.push(i[s[u]])
|
||
h.setup(l,s,b,o,!0)}l.push(h)}else l.push(h)}),a.add(67,function(e,t){var r=t.op1,n=t.op2,o=e.dynamicScope(),a=e.fetchValue(n),s=a.definition,u=a.manager,c=null
|
||
Q(a.capabilities=Y(u.getCapabilities(s.state)),8)&&(c=e.stack.peek())
|
||
var l=u.create(e.env,s.state,c,o,e.getSelf(),!!(1&r))
|
||
a.state=l
|
||
var f=u.getTag(l);(0,i.isConstTag)(f)||e.updateWith(new J(f,l,u,o))}),a.add(68,function(e,t){var r=t.op1,n=e.fetchValue(r),i=n.manager,o=n.state,a=i.getDestructor(o)
|
||
a&&e.newDestroyable(a)}),a.add(75,function(e){e.beginCacheGroup(),e.elements().pushSimpleBlock()}),a.add(69,function(e){e.loadValue(n.Register.t0,new $)}),a.add(29,function(e,t){var r=t.op1,i=t.op2,o=t.op3,a=e.constants.getString(r),s=e.stack.pop(),u=o?e.constants.getString(o):null
|
||
e.fetchValue(n.Register.t0).setAttribute(a,s,!!i,u)})
|
||
var $=function(){function e(){this.attributes=(0,r.dict)(),this.classes=[]}return e.prototype.setAttribute=function(e,t,r,n){"class"===e&&this.classes.push(t),this.attributes[e]={value:t,namespace:n,trusting:r}},e.prototype.flush=function(e){var t,r,n,o
|
||
for(var a in this.attributes){var s=(t=this.attributes[a]).value,u=t.namespace,c=t.trusting
|
||
"class"===a&&(s=new G(this.classes)),"type"!==a&&(r=e.elements().setDynamicAttribute(a,s.value(),c,u),(0,i.isConst)(s)||e.updateWith(new D(s,r)))}"type"in this.attributes&&(s=(n=this.attributes.type).value,u=n.namespace,c=n.trusting,o=e.elements().setDynamicAttribute("type",s.value(),c,u),(0,i.isConst)(s)||e.updateWith(new D(s,o)))},e}()
|
||
a.add(77,function(e,t){var r=t.op1,i=e.fetchValue(r),o=i.definition,a=i.state,s=o.manager,u=e.fetchValue(n.Register.t0)
|
||
s.didCreateElement(a,e.elements().expectConstructing("DidCreateElementOpcode#evaluate"),u)}),a.add(70,function(e,t){var r=t.op1,n=e.fetchValue(r),i=n.definition,o=n.state,a=i.manager
|
||
e.stack.push(a.getSelf(o))}),a.add(71,function(e,t){var r=t.op1,n=e.fetchValue(r),i=n.definition,o=n.state,a=i.manager
|
||
e.stack.push(a.getTagName(o))}),a.add(72,function(e,t){var n=t.op1,i=e.fetchValue(n),o=i.manager,a=i.definition,s=e.constants.resolver,u=e.stack,c=i.state,l=i.capabilities,f=a.state,h=void 0
|
||
if(function(e){return!1===Q(e,1)}(l))h=o.getLayout(f,s)
|
||
else{if(!function(e){return!0===Q(e,1)}(l))throw(0,r.unreachable)()
|
||
h=o.getDynamicLayout(c,s)}u.push(h.symbolTable),u.push(h.handle)}),a.add(56,function(e,t){var r=t.op1,n=e.stack.pop(),i=e.stack.pop(),o=n.manager,a={definition:n,manager:o,capabilities:Y(o.getCapabilities(n.state)),state:null,handle:i.handle,table:i.symbolTable}
|
||
e.loadValue(r,a)}),a.add(73,function(e,t){var r=t.op1,n=e.stack,i=n.pop(),o=n.pop(),a=e.fetchValue(r)
|
||
a.handle=i,a.table=o}),a.add(74,function(e,t){var n,i,o,a,s,u,c,l,f,h,d,p=t.op1,m=e.stack,y=e.fetchValue(p),g=y.handle,b=y.table,v=b.symbols,_=b.hasEval
|
||
for(n=m.pop(),(i=e.pushRootScope(v.length+1,!0)).bindSelf(n),o=e.stack.pop(),a=null,_&&(a=(0,r.dict)()),u=(s=o.named.atNames).length-1;u>=0;u--)c=s[u],l=v.indexOf(s[u]),f=o.named.get(c,!1),-1!==l&&i.bindSymbol(l+1,f),_&&(a[c]=f)
|
||
h=function(e,t){var r=v.indexOf(e),n=d.get(t);-1!==r&&i.bindBlock(r+1,n),a&&(a[e]=n)},d=o.blocks,h("&attrs","attrs"),h("&inverse","else"),h("&default","main"),a&&i.bindEvalScope(a),e.call(g)}),a.add(78,function(e,t){var r=t.op1,n=e.fetchValue(r),i=n.manager,o=n.state,a=e.elements().popBlock()
|
||
i.didRenderLayout(o,a),e.env.didCreate(o,i),e.updateWith(new Z(i,o,a))}),a.add(76,function(e){e.commitCacheGroup()})
|
||
var J=function(e){function r(r,n,i,o){var a=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return a.tag=r,a.component=n,a.manager=i,a.dynamicScope=o,a.type="update-component",a}return(0,t.inherits)(r,e),r.prototype.evaluate=function(){var e=this.component,t=this.manager,r=this.dynamicScope
|
||
t.update(e,r)},r}(s),Z=function(e){function r(r,n,o){var a=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return a.manager=r,a.component=n,a.bounds=o,a.type="did-update-layout",a.tag=i.CONSTANT_TAG,a}return(0,t.inherits)(r,e),r.prototype.evaluate=function(e){var t=this.manager,r=this.component,n=this.bounds
|
||
t.didUpdateLayout(r,n),e.env.didUpdate(r,t)},r}(s)
|
||
function ee(e,t){console.info("Use `context`, and `get(<path>)` to debug this template."),t("this")}var te=ee,re=function(){function e(e,t,n){var i,o,a,s
|
||
for(this.scope=e,this.locals=(0,r.dict)(),i=0;i<n.length;i++)a=t[(o=n[i])-1],s=e.getSymbol(o),this.locals[a]=s}return e.prototype.get=function(e){var t=this.scope,r=this.locals,n=e.split("."),i=e.split("."),o=i[0],a=i.slice(1),s=t.getEvalScope(),u=void 0
|
||
return"this"===o?u=t.getSelf():r[o]?u=r[o]:0===o.indexOf("@")&&s[o]?u=s[o]:(u=this.scope.getSelf(),a=n),a.reduce(function(e,t){return e.get(t)},u)},e}()
|
||
a.add(81,function(e,t){var r=t.op1,n=t.op2,i=e.constants.getStringArray(r),o=e.constants.getArray(n),a=new re(e.scope(),i,o)
|
||
te(e.getSelf().value(),function(e){return a.get(e).value()})}),a.add(79,function(e,t){var r,n,i,o,a,s,u,c,l,f,h,d,p=t.op1,m=t.op2,y=t.op3,g=e.constants,b=e.constants.resolver,v=e.stack.pop().value(),_=g.getSerializable(p),w=g.getStringArray(m),S=g.getArray(y),E=b.lookupPartial(v,_),k=b.resolve(E).getPartial(),x=k.symbolTable,C=k.handle
|
||
for(r=x.symbols,n=e.scope(),i=e.pushRootScope(r.length,!1),o=n.getEvalScope(),i.bindCallerScope(n.getCallerScope()),i.bindEvalScope(o),i.bindSelf(n.getSelf()),a=Object.create(n.getPartialMap()),s=0;s<S.length;s++)c=w[(u=S[s])-1],l=n.getSymbol(u),a[c]=l
|
||
if(o)for(f=0;f<r.length;f++)h=f+1,void 0!==(d=o[r[f]])&&i.bind(h,d)
|
||
i.bindPartialMap(a),e.pushFrame(),e.call(C)})
|
||
var ne=function(){function e(e){this.tag=e.tag,this.artifacts=e}return e.prototype.value=function(){return!this.artifacts.isEmpty()},e}()
|
||
a.add(54,function(e){var t=e.stack,r=t.pop(),n=t.pop(),o=e.env.iterableFor(r,n.value()),a=new i.ReferenceIterator(o)
|
||
t.push(a),t.push(new ne(a.artifacts))}),a.add(52,function(e,t){var r=t.op1
|
||
e.enterList(r)}),a.add(53,function(e){e.exitList()}),a.add(55,function(e,t){var r,n=t.op1,i=e.stack.peek().next()
|
||
i?(r=e.iterate(i.memo,i.value),e.enterItem(i.key,r)):e.goto(n)})
|
||
var ie=function(e,t){this.element=e,this.nextSibling=t},oe=function(){function e(e,t,r){this.parentNode=e,this.first=t,this.last=r}return e.prototype.parentElement=function(){return this.parentNode},e.prototype.firstNode=function(){return this.first},e.prototype.lastNode=function(){return this.last},e}(),ae=function(){function e(e,t){this.parentNode=e,this.node=t}return e.prototype.parentElement=function(){return this.parentNode},e.prototype.firstNode=function(){return this.node},e.prototype.lastNode=function(){return this.node},e}()
|
||
function se(e,t,r){return new oe(e,t,r)}function ue(e,t){return new ae(e,t)}function ce(e,t){for(var r,n=e.parentElement(),i=e.firstNode(),o=e.lastNode(),a=i;a;){if(r=a.nextSibling,n.insertBefore(a,t),a===o)return r
|
||
a=r}return null}function le(e){for(var t,r=e.parentElement(),n=e.firstNode(),i=e.lastNode(),o=n;o;){if(t=o.nextSibling,r.removeChild(o),o===i)return t
|
||
o=t}return null}function fe(e,r,n){if(!e)return r
|
||
if(!function(e,t){var r=e.createElementNS(t,"svg")
|
||
try{r.insertAdjacentHTML("beforeend","<circle></circle>")}catch(e){}finally{return 1!==r.childNodes.length||"http://www.w3.org/2000/svg"!==r.firstChild.namespaceURI}}(e,n))return r
|
||
var i=e.createElement("div")
|
||
return function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.insertHTMLBefore=function(t,r,o){return null===o||""===o?e.prototype.insertHTMLBefore.call(this,t,r,o):t.namespaceURI!==n?e.prototype.insertHTMLBefore.call(this,t,r,o):function(e,t,r,n){t.innerHTML="<svg>"+r+"</svg>"
|
||
var i=function(e,t,r){var n=e.firstChild,i=null,o=n
|
||
for(;o;)i=o,o=o.nextSibling,t.insertBefore(i,r)
|
||
return[n,i]}(t.firstChild,e,n),o=i[0],a=i[1]
|
||
return new oe(e,o,a)}(t,i,o,r)},r}(r)}function he(e,r){return e&&function(e){var t=e.createElement("div")
|
||
if(t.innerHTML="first",t.insertAdjacentHTML("beforeend","second"),2===t.childNodes.length)return!1
|
||
return!0}(e)?function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this,r))
|
||
return n.uselessComment=r.createComment(""),n}return(0,t.inherits)(r,e),r.prototype.insertHTMLBefore=function(t,r,n){if(null===n)return e.prototype.insertHTMLBefore.call(this,t,r,n)
|
||
var i=!1,o=r?r.previousSibling:t.lastChild
|
||
o&&o instanceof Text&&(i=!0,t.insertBefore(this.uselessComment,r))
|
||
var a=e.prototype.insertHTMLBefore.call(this,t,r,n)
|
||
return i&&t.removeChild(this.uselessComment),a},r}(r):r}var de="http://www.w3.org/2000/svg",pe={foreignObject:1,desc:1,title:1},me=Object.create(null);["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","main","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].forEach(function(e){return me[e]=1})
|
||
var ye=/[\t-\r \xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/,ge="undefined"==typeof document?null:document
|
||
var be,ve=function(){function e(e){this.document=e,this.setupUselessElement()}return e.prototype.setupUselessElement=function(){this.uselessElement=this.document.createElement("div")},e.prototype.createElement=function(e,t){var r=void 0,n=void 0
|
||
if(t?(r=t.namespaceURI===de||"svg"===e,n=pe[t.tagName]):(r="svg"===e,n=!1),r&&!n){if(me[e])throw new Error("Cannot create a "+e+" inside an SVG context")
|
||
return this.document.createElementNS(de,e)}return this.document.createElement(e)},e.prototype.insertBefore=function(e,t,r){e.insertBefore(t,r)},e.prototype.insertHTMLBefore=function(e,t,r){return we(this.uselessElement,e,t,r)},e.prototype.createTextNode=function(e){return this.document.createTextNode(e)},e.prototype.createComment=function(e){return this.document.createComment(e)},e}();(function(e){var r=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.createElementNS=function(e,t){return this.document.createElementNS(e,t)},r.prototype.setAttribute=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null
|
||
n?e.setAttributeNS(n,t,r):e.setAttribute(t,r)},r}(ve)
|
||
e.TreeConstruction=r
|
||
var n=r
|
||
n=he(ge,n),n=fe(ge,n,de),e.DOMTreeConstruction=n})(be||(be={}))
|
||
var _e=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this,r))
|
||
return n.document=r,n.namespace=null,n}return(0,t.inherits)(r,e),r.prototype.setAttribute=function(e,t,r){e.setAttribute(t,r)},r.prototype.removeAttribute=function(e,t){e.removeAttribute(t)},r.prototype.insertAfter=function(e,t,r){this.insertBefore(e,t,r.nextSibling)},r}(ve)
|
||
function we(e,t,r,n){var i=t,o=r,a=o?o.previousSibling:i.lastChild,s=void 0
|
||
if(null===n||""===n)return new oe(i,null,null)
|
||
null===o?(i.insertAdjacentHTML("beforeend",n),s=i.lastChild):o instanceof HTMLElement?(o.insertAdjacentHTML("beforebegin",n),s=o.previousSibling):(i.insertBefore(e,o),e.insertAdjacentHTML("beforebegin",n),s=e.previousSibling,i.removeChild(e))
|
||
var u=a?a.nextSibling:i.firstChild
|
||
return new oe(i,u,s)}var Se=_e
|
||
Se=he(ge,Se)
|
||
var Ee=Se=fe(ge,Se,de),ke=be.DOMTreeConstruction,xe=["javascript:","vbscript:"],Ce=["A","BODY","LINK","IMG","IFRAME","BASE","FORM"],Ae=["EMBED"],Te=["href","src","background","action"],Ie=["src"]
|
||
function Pe(e,t){return-1!==e.indexOf(t)}function Me(e,t){return(null===e||Pe(Ce,e))&&Pe(Te,t)}function Re(e,t){return null!==e&&(Pe(Ae,e)&&Pe(Ie,t))}function Oe(e,t){return Me(e,t)||Re(e,t)}function Be(e,t,r,n){var i,o=null
|
||
if(null===n||void 0===n)return n
|
||
if(V(n))return n.toHTML()
|
||
o=t?t.tagName.toUpperCase():null
|
||
var a=z(n)
|
||
return Me(o,r)&&(i=e.protocolForURL(a),Pe(xe,i))?"unsafe:"+a:Re(o,r)?"unsafe:"+a:a}function Ne(e,t){var r,n,i,o,a=void 0,s=void 0
|
||
return t in e?(s=t,a="prop"):(r=t.toLowerCase())in e?(a="prop",s=r):(a="attr",s=t),"prop"===a&&("style"===s.toLowerCase()||(n=e.tagName,i=s,(o=je[n.toUpperCase()])&&o[i.toLowerCase()]))&&(a="attr"),{normalized:s,type:a}}var je={INPUT:{form:!0,autocorrect:!0,list:!0},SELECT:{form:!0},OPTION:{form:!0},TEXTAREA:{form:!0},LABEL:{form:!0},FIELDSET:{form:!0},LEGEND:{form:!0},OBJECT:{form:!0}}
|
||
function Le(e,t){var r=e.tagName
|
||
if(e.namespaceURI===de)return De(r,t)
|
||
var n=Ne(e,t),i=n.type,o=n.normalized
|
||
return"attr"===i?De(r,o):function(e,t){if(Oe(e,t))return qe
|
||
if(function(e,t){return("INPUT"===e||"TEXTAREA"===e)&&"value"===t}(e,t))return He
|
||
if(function(e,t){return"OPTION"===e&&"selected"===t}(e,t))return Ke
|
||
return ze}(r,o)}function De(e,t){return Oe(e,t)?Ve:Fe}var Ue=function(e){this.attribute=e},Fe=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.set=function(e,t){var r,n,i,o=We(t)
|
||
null!==o&&(n=(r=this.attribute).name,i=r.namespace,e.__setAttribute(n,o,i))},r.prototype.update=function(e){var t=We(e),r=this.attribute,n=r.element,i=r.name
|
||
null===t?n.removeAttribute(i):n.setAttribute(i,t)},r}(Ue),ze=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.set=function(e,t){var r
|
||
null!==t&&void 0!==t&&(r=this.attribute.name,this.value=t,e.__setProperty(r,t))},r.prototype.update=function(e){var t=this.attribute,r=t.element,n=t.name
|
||
this.value!==e&&(r[n]=this.value=e,null!==e&&void 0!==e||this.removeAttribute())},r.prototype.removeAttribute=function(){var e=this.attribute,t=e.element,r=e.name,n=e.namespace
|
||
n?t.removeAttributeNS(n,r):t.removeAttribute(r)},r}(Ue),qe=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.set=function(t,r,n){var i=this.attribute,o=Be(n,i.element,i.name,r)
|
||
e.prototype.set.call(this,t,o,n)},r.prototype.update=function(t,r){var n=this.attribute,i=Be(r,n.element,n.name,t)
|
||
e.prototype.update.call(this,i,r)},r}(ze),Ve=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.set=function(t,r,n){var i=this.attribute,o=Be(n,i.element,i.name,r)
|
||
e.prototype.set.call(this,t,o,n)},r.prototype.update=function(t,r){var n=this.attribute,i=Be(r,n.element,n.name,t)
|
||
e.prototype.update.call(this,i,r)},r}(Fe),He=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.set=function(e,t){e.__setProperty("value",z(t))},r.prototype.update=function(e){var t=this.attribute.element,r=t.value,n=z(e)
|
||
r!==n&&(t.value=n)},r}(ze),Ke=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.set=function(e,t){null!==t&&void 0!==t&&!1!==t&&e.__setProperty("selected",!0)},r.prototype.update=function(e){var t=this.attribute.element
|
||
t.selected=!!e},r}(ze)
|
||
function We(e){return!1===e||void 0===e||null===e||void 0===e.toString?null:!0===e?"":"function"==typeof e?null:String(e)}var Ge=function(){function e(e,t,r,n){this.slots=e,this.callerScope=t,this.evalScope=r,this.partialMap=n}return e.root=function(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=new Array(n+1)
|
||
for(r=0;r<=n;r++)i[r]=f
|
||
return new e(i,null,null,null).init({self:t})},e.sized=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=new Array(r+1)
|
||
for(t=0;t<=r;t++)n[t]=f
|
||
return new e(n,null,null,null)},e.prototype.init=function(e){var t=e.self
|
||
return this.slots[0]=t,this},e.prototype.getSelf=function(){return this.get(0)},e.prototype.getSymbol=function(e){return this.get(e)},e.prototype.getBlock=function(e){return this.get(e)},e.prototype.getEvalScope=function(){return this.evalScope},e.prototype.getPartialMap=function(){return this.partialMap},e.prototype.bind=function(e,t){this.set(e,t)},e.prototype.bindSelf=function(e){this.set(0,e)},e.prototype.bindSymbol=function(e,t){this.set(e,t)},e.prototype.bindBlock=function(e,t){this.set(e,t)},e.prototype.bindEvalScope=function(e){this.evalScope=e},e.prototype.bindPartialMap=function(e){this.partialMap=e},e.prototype.bindCallerScope=function(e){this.callerScope=e},e.prototype.getCallerScope=function(){return this.callerScope},e.prototype.child=function(){return new e(this.slots.slice(),this.callerScope,this.evalScope,this.partialMap)},e.prototype.get=function(e){if(e>=this.slots.length)throw new RangeError("BUG: cannot get $"+e+" from scope; length="+this.slots.length)
|
||
return this.slots[e]},e.prototype.set=function(e,t){if(e>=this.slots.length)throw new RangeError("BUG: cannot get $"+e+" from scope; length="+this.slots.length)
|
||
this.slots[e]=t},e}(),Ye=function(){function e(){this.scheduledInstallManagers=[],this.scheduledInstallModifiers=[],this.scheduledUpdateModifierManagers=[],this.scheduledUpdateModifiers=[],this.createdComponents=[],this.createdManagers=[],this.updatedComponents=[],this.updatedManagers=[],this.destructors=[]}return e.prototype.didCreate=function(e,t){this.createdComponents.push(e),this.createdManagers.push(t)},e.prototype.didUpdate=function(e,t){this.updatedComponents.push(e),this.updatedManagers.push(t)},e.prototype.scheduleInstallModifier=function(e,t){this.scheduledInstallManagers.push(t),this.scheduledInstallModifiers.push(e)},e.prototype.scheduleUpdateModifier=function(e,t){this.scheduledUpdateModifierManagers.push(t),this.scheduledUpdateModifiers.push(e)},e.prototype.didDestroy=function(e){this.destructors.push(e)},e.prototype.commit=function(){var e,t,r,n,i,o,a,s,u,c,l,f=this.createdComponents,h=this.createdManagers
|
||
for(e=0;e<f.length;e++)t=f[e],h[e].didCreate(t)
|
||
var d=this.updatedComponents,p=this.updatedManagers
|
||
for(r=0;r<d.length;r++)n=d[r],p[r].didUpdate(n)
|
||
var m=this.destructors
|
||
for(i=0;i<m.length;i++)m[i].destroy()
|
||
var y=this.scheduledInstallManagers,g=this.scheduledInstallModifiers
|
||
for(o=0;o<y.length;o++)a=y[o],s=g[o],a.install(s)
|
||
var b=this.scheduledUpdateModifierManagers,v=this.scheduledUpdateModifiers
|
||
for(u=0;u<b.length;u++)c=b[u],l=v[u],c.update(l)},e}(),Qe=function(){function e(e){var t=e.appendOperations,r=e.updateOperations
|
||
this._transaction=null,this.appendOperations=t,this.updateOperations=r}return e.prototype.toConditionalReference=function(e){return new m(e)},e.prototype.getAppendOperations=function(){return this.appendOperations},e.prototype.getDOM=function(){return this.updateOperations},e.prototype.begin=function(){this._transaction=new Ye},e.prototype.didCreate=function(e,t){this.transaction.didCreate(e,t)},e.prototype.didUpdate=function(e,t){this.transaction.didUpdate(e,t)},e.prototype.scheduleInstallModifier=function(e,t){this.transaction.scheduleInstallModifier(e,t)},e.prototype.scheduleUpdateModifier=function(e,t){this.transaction.scheduleUpdateModifier(e,t)},e.prototype.didDestroy=function(e){this.transaction.didDestroy(e)},e.prototype.commit=function(){var e=this.transaction
|
||
this._transaction=null,e.commit()},e.prototype.attributeFor=function(e,t){return arguments.length>3&&void 0!==arguments[3]&&arguments[3],Le(e,t)},(0,t.createClass)(e,[{key:"transaction",get:function(){return this._transaction}}]),e}(),Xe=function(e){function r(r){var n
|
||
return r||(n=window.document,r={appendOperations:new ke(n),updateOperations:new _e(n)}),(0,t.possibleConstructorReturn)(this,e.call(this,r))}return(0,t.inherits)(r,e),r}(Qe),$e=function(){function e(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:-1
|
||
this.stack=e,this.heap=t,this.program=r,this.externs=n,this.pc=i,this.ra=o,this.currentOpSize=0}return e.prototype.pushFrame=function(){this.stack.pushSmi(this.ra),this.stack.pushSmi(this.stack.fp),this.stack.fp=this.stack.sp-1},e.prototype.popFrame=function(){this.stack.sp=this.stack.fp-1,this.ra=this.stack.getSmi(0),this.stack.fp=this.stack.getSmi(1)},e.prototype.goto=function(e){var t=this.pc+e-this.currentOpSize
|
||
this.pc=t},e.prototype.call=function(e){this.ra=this.pc,this.pc=this.heap.getaddr(e)},e.prototype.returnTo=function(e){var t=this.pc+e-this.currentOpSize
|
||
this.ra=t},e.prototype.return=function(){this.pc=this.ra},e.prototype.nextStatement=function(){var e=this.pc,t=this.program
|
||
if(-1===e)return null
|
||
var r=this.program.opcode(e).size,n=this.currentOpSize=r
|
||
return this.pc+=n,t.opcode(e)},e.prototype.evaluateOuter=function(e,t){this.evaluateInner(e,t)},e.prototype.evaluateInner=function(e,t){e.isMachine?this.evaluateMachine(e):this.evaluateSyscall(e,t)},e.prototype.evaluateMachine=function(e){switch(e.type){case 47:return this.pushFrame()
|
||
case 48:return this.popFrame()
|
||
case 42:return this.call(e.op1)
|
||
case 41:return this.call(this.stack.popSmi())
|
||
case 44:return this.goto(e.op1)
|
||
case 20:return this.return()
|
||
case 21:return this.returnTo(e.op1)}},e.prototype.evaluateSyscall=function(e,t){a.evaluate(t,e,e.type)},e}(),Je=function(){function e(e){this.trusting=e}return e.prototype.retry=function(e,t){var r=this.bounds,n=r.parentElement(),i=le(r),o=at.forInitialRender(e,{element:n,nextSibling:i})
|
||
return this.trusting?o.__appendTrustingDynamicContent(t):o.__appendCautiousDynamicContent(t)},e}(),Ze=function(){function e(e){this.inner=e,this.bounds=e.bounds}return e.prototype.parentElement=function(){return this.bounds.parentElement()},e.prototype.firstNode=function(){return this.bounds.firstNode()},e.prototype.lastNode=function(){return this.bounds.lastNode()},e.prototype.update=function(e,t){var r=this.inner=this.inner.update(e,t)
|
||
return this.bounds=r.bounds,this},e}(),et=function(e){function r(r,n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this,i))
|
||
return o.bounds=r,o.lastValue=n,o}return(0,t.inherits)(r,e),r.prototype.update=function(e,t){var r=this.lastValue
|
||
if(t===r)return this
|
||
if(H(t)||V(t))return this.retry(e,t)
|
||
var n=void 0
|
||
return(n=q(t)?"":W(t)?t:String(t))!==r&&(this.bounds.firstNode().nodeValue=this.lastValue=n),this},r}(Je),tt=function(e){function r(r,n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this,i))
|
||
return o.bounds=r,o.lastValue=n,o}return(0,t.inherits)(r,e),r.prototype.update=function(e,t){return t===this.lastValue?this:this.retry(e,t)},r}(Je),rt=function(e){function r(r,n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this,i))
|
||
return o.bounds=r,o.lastValue=n,o}return(0,t.inherits)(r,e),r.prototype.update=function(e,t){var r=this.lastValue
|
||
return t===r?this:V(t)&&t.toHTML()===r.toHTML()?(this.lastValue=t,this):this.retry(e,t)},r}(Je),nt=function(e){function r(r,n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this,i))
|
||
return o.bounds=r,o.lastValue=n,o}return(0,t.inherits)(r,e),r.prototype.update=function(e,t){var r=this.lastValue
|
||
return t===r?this:function(e){return q(e)?"":W(e)?e:V(e)?e.toHTML():H(e)?e:String(e)}(t)===r?this:this.retry(e,t)},r}(Je),it=function(){function e(e){this.node=e}return e.prototype.firstNode=function(){return this.node},e}(),ot=function(){function e(e){this.node=e}return e.prototype.lastNode=function(){return this.node},e}(),at=function(){function e(e,t,n){this.constructing=null,this.operations=null,this.cursorStack=new r.Stack,this.blockStack=new r.Stack,this.pushElement(t,n),this.env=e,this.dom=e.getAppendOperations(),this.updateOperations=e.getDOM()}return e.forInitialRender=function(e,t){var r=new this(e,t.element,t.nextSibling)
|
||
return r.pushSimpleBlock(),r},e.resume=function(e,t,r){var n=new this(e,t.parentElement(),r)
|
||
return n.pushSimpleBlock(),n.pushBlockTracker(t),n},e.prototype.expectConstructing=function(){return this.constructing},e.prototype.block=function(){return this.blockStack.current},e.prototype.popElement=function(){this.cursorStack.pop(),this.cursorStack.current},e.prototype.pushSimpleBlock=function(){return this.pushBlockTracker(new st(this.element))},e.prototype.pushUpdatableBlock=function(){return this.pushBlockTracker(new ct(this.element))},e.prototype.pushBlockList=function(e){return this.pushBlockTracker(new lt(this.element,e))},e.prototype.pushBlockTracker=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.blockStack.current
|
||
return null!==r&&(r.newDestroyable(e),t||r.didAppendBounds(e)),this.__openBlock(),this.blockStack.push(e),e},e.prototype.popBlock=function(){return this.block().finalize(this),this.__closeBlock(),this.blockStack.pop()},e.prototype.__openBlock=function(){},e.prototype.__closeBlock=function(){},e.prototype.openElement=function(e){var t=this.__openElement(e)
|
||
return this.constructing=t,t},e.prototype.__openElement=function(e){return this.dom.createElement(e,this.element)},e.prototype.flushElement=function(){var e=this.element,t=this.constructing
|
||
this.__flushElement(e,t),this.constructing=null,this.operations=null,this.pushElement(t,null),this.didOpenElement(t)},e.prototype.__flushElement=function(e,t){this.dom.insertBefore(e,t,this.nextSibling)},e.prototype.closeElement=function(){this.willCloseElement(),this.popElement()},e.prototype.pushRemoteElement=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null
|
||
this.__pushRemoteElement(e,t,r)},e.prototype.__pushRemoteElement=function(e,t,r){this.pushElement(e,r)
|
||
var n=new ut(e)
|
||
this.pushBlockTracker(n,!0)},e.prototype.popRemoteElement=function(){this.popBlock(),this.popElement()},e.prototype.pushElement=function(e,t){this.cursorStack.push(new ie(e,t))},e.prototype.didAddDestroyable=function(e){this.block().newDestroyable(e)},e.prototype.didAppendBounds=function(e){return this.block().didAppendBounds(e),e},e.prototype.didAppendNode=function(e){return this.block().didAppendNode(e),e},e.prototype.didOpenElement=function(e){return this.block().openElement(e),e},e.prototype.willCloseElement=function(){this.block().closeElement()},e.prototype.appendText=function(e){return this.didAppendNode(this.__appendText(e))},e.prototype.__appendText=function(e){var t=this.dom,r=this.element,n=this.nextSibling,i=t.createTextNode(e)
|
||
return t.insertBefore(r,i,n),i},e.prototype.__appendNode=function(e){return this.dom.insertBefore(this.element,e,this.nextSibling),e},e.prototype.__appendFragment=function(e){var t,r=e.firstChild
|
||
return r?(t=se(this.element,r,e.lastChild),this.dom.insertBefore(this.element,e,this.nextSibling),t):ue(this.element,this.__appendComment(""))},e.prototype.__appendHTML=function(e){return this.dom.insertHTMLBefore(this.element,this.nextSibling,e)},e.prototype.appendTrustingDynamicContent=function(e){var t=new Ze(this.__appendTrustingDynamicContent(e))
|
||
return this.didAppendBounds(t),t},e.prototype.__appendTrustingDynamicContent=function(e){var t,r
|
||
return W(e)?this.trustedContent(e):q(e)?this.trustedContent(""):V(e)?this.trustedContent(e.toHTML()):K(e)?(t=this.__appendFragment(e),new tt(t,e,!0)):H(e)?(r=this.__appendNode(e),new tt(ue(this.element,r),r,!0)):this.trustedContent(String(e))},e.prototype.appendCautiousDynamicContent=function(e){var t=new Ze(this.__appendCautiousDynamicContent(e))
|
||
return this.didAppendBounds(t.bounds),t},e.prototype.__appendCautiousDynamicContent=function(e){var t,r,n,i
|
||
return W(e)?this.untrustedContent(e):q(e)?this.untrustedContent(""):K(e)?(t=this.__appendFragment(e),new tt(t,e,!1)):H(e)?(r=this.__appendNode(e),new tt(ue(this.element,r),r,!1)):V(e)?(n=e.toHTML(),i=this.__appendHTML(n),new rt(i,e,!1)):this.untrustedContent(String(e))},e.prototype.trustedContent=function(e){var t=this.__appendHTML(e)
|
||
return new nt(t,e,!0)},e.prototype.untrustedContent=function(e){var t=this.__appendText(e),r=ue(this.element,t)
|
||
return new et(r,e,!1)},e.prototype.appendComment=function(e){return this.didAppendNode(this.__appendComment(e))},e.prototype.__appendComment=function(e){var t=this.dom,r=this.element,n=this.nextSibling,i=t.createComment(e)
|
||
return t.insertBefore(r,i,n),i},e.prototype.__setAttribute=function(e,t,r){this.dom.setAttribute(this.constructing,e,t,r)},e.prototype.__setProperty=function(e,t){this.constructing[e]=t},e.prototype.setStaticAttribute=function(e,t,r){this.__setAttribute(e,t,r)},e.prototype.setDynamicAttribute=function(e,t,r,n){var i=this.constructing,o=new(this.env.attributeFor(i,e,r,n))({element:i,name:e,namespace:n||null})
|
||
return o.set(this,t,this.env),o},(0,t.createClass)(e,[{key:"element",get:function(){return this.cursorStack.current.element}},{key:"nextSibling",get:function(){return this.cursorStack.current.nextSibling}}]),e}(),st=function(){function e(e){this.parent=e,this.first=null,this.last=null,this.destroyables=null,this.nesting=0}return e.prototype.destroy=function(){var e,t=this.destroyables
|
||
if(t&&t.length)for(e=0;e<t.length;e++)t[e].destroy()},e.prototype.parentElement=function(){return this.parent},e.prototype.firstNode=function(){return this.first&&this.first.firstNode()},e.prototype.lastNode=function(){return this.last&&this.last.lastNode()},e.prototype.openElement=function(e){this.didAppendNode(e),this.nesting++},e.prototype.closeElement=function(){this.nesting--},e.prototype.didAppendNode=function(e){0===this.nesting&&(this.first||(this.first=new it(e)),this.last=new ot(e))},e.prototype.didAppendBounds=function(e){0===this.nesting&&(this.first||(this.first=e),this.last=e)},e.prototype.newDestroyable=function(e){this.destroyables=this.destroyables||[],this.destroyables.push(e)},e.prototype.finalize=function(e){this.first||e.appendComment("")},e}(),ut=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.destroy=function(){e.prototype.destroy.call(this),le(this)},r}(st),ct=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype.reset=function(e){var t,r=this.destroyables
|
||
if(r&&r.length)for(t=0;t<r.length;t++)e.didDestroy(r[t])
|
||
var n=le(this)
|
||
return this.first=null,this.last=null,this.destroyables=null,this.nesting=0,n},r}(st),lt=function(){function e(e,t){this.parent=e,this.boundList=t,this.parent=e,this.boundList=t}return e.prototype.destroy=function(){this.boundList.forEachNode(function(e){return e.destroy()})},e.prototype.parentElement=function(){return this.parent},e.prototype.firstNode=function(){var e=this.boundList.head()
|
||
return e&&e.firstNode()},e.prototype.lastNode=function(){var e=this.boundList.tail()
|
||
return e&&e.lastNode()},e.prototype.openElement=function(){},e.prototype.closeElement=function(){},e.prototype.didAppendNode=function(){},e.prototype.didAppendBounds=function(){},e.prototype.newDestroyable=function(){},e.prototype.finalize=function(){},e}(),ft=2147483648,ht=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new o.Stack,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]
|
||
this.inner=e,this.js=t}return e.prototype.slice=function(t,r){return new e("number"==typeof t&&"number"==typeof r?this.inner.slice(t,r):"number"==typeof t&&void 0===r?this.inner.sliceFrom(t):this.inner.clone(),this.js.slice(t,r))},e.prototype.sliceInner=function(e,t){var r,n=[]
|
||
for(r=e;r<t;r++)n.push(this.get(r))
|
||
return n},e.prototype.copy=function(e,t){this.inner.copy(e,t)},e.prototype.write=function(e,t){var r
|
||
!function(e){if(null===e||void 0===e)return!0
|
||
switch(typeof e){case"boolean":case"undefined":return!0
|
||
case"number":return e%1==0&&!(Math.abs(e)>ft)
|
||
default:return!1}}(t)?(r=this.js.length,this.js.push(t),this.inner.writeRaw(e,r|ft)):this.inner.writeRaw(e,pt(t))},e.prototype.writeSmi=function(e,t){this.inner.writeSmi(e,t)},e.prototype.writeImmediate=function(e,t){this.inner.writeRaw(e,t)},e.prototype.get=function(e){var t=this.inner.getRaw(e)
|
||
return t&ft?this.js[2147483647&t]:function(e){switch(e){case 3:return!1
|
||
case 11:return!0
|
||
case 19:return null
|
||
case 27:return
|
||
default:return function(e){switch(7&e){case 0:return e>>3
|
||
case 4:return-(e>>3)
|
||
default:throw(0,r.unreachable)()}}(e)}}(t)},e.prototype.getSmi=function(e){return this.inner.getSmi(e)},e.prototype.reset=function(){this.inner.reset()},(0,t.createClass)(e,[{key:"length",get:function(){return this.inner.len()}}]),e}(),dt=function(){function e(e,t,r){this.stack=e,this.fp=t,this.sp=r}return e.empty=function(){return new this(new ht,0,-1)},e.restore=function(e){var t,r=new ht
|
||
for(t=0;t<e.length;t++)r.write(t,e[t])
|
||
return new this(r,0,e.length-1)},e.prototype.push=function(e){this.stack.write(++this.sp,e)},e.prototype.pushSmi=function(e){this.stack.writeSmi(++this.sp,e)},e.prototype.pushImmediate=function(e){this.stack.writeImmediate(++this.sp,pt(e))},e.prototype.pushEncodedImmediate=function(e){this.stack.writeImmediate(++this.sp,e)},e.prototype.pushNull=function(){this.stack.writeImmediate(++this.sp,19)},e.prototype.dup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.sp
|
||
this.stack.copy(e,++this.sp)},e.prototype.copy=function(e,t){this.stack.copy(e,t)},e.prototype.pop=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this.stack.get(this.sp)
|
||
return this.sp-=e,t},e.prototype.popSmi=function(){return this.stack.getSmi(this.sp--)},e.prototype.peek=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0
|
||
return this.stack.get(this.sp-e)},e.prototype.peekSmi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0
|
||
return this.stack.getSmi(this.sp-e)},e.prototype.get=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.fp
|
||
return this.stack.get(t+e)},e.prototype.getSmi=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.fp
|
||
return this.stack.getSmi(t+e)},e.prototype.set=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.fp
|
||
this.stack.write(r+t,e)},e.prototype.slice=function(e,t){return this.stack.slice(e,t)},e.prototype.sliceArray=function(e,t){return this.stack.sliceInner(e,t)},e.prototype.capture=function(e){var t=this.sp+1
|
||
return this.stack.sliceInner(t-e,t)},e.prototype.reset=function(){this.stack.reset()},e.prototype.toArray=function(){return this.stack.sliceInner(this.fp,this.sp+1)},e}()
|
||
function pt(e){switch(typeof e){case"number":return function(e){return e<0?Math.abs(e)<<3|4:e<<3|0}(e)
|
||
case"boolean":return e?11:3
|
||
case"object":return 19
|
||
case"undefined":return 27
|
||
default:throw(0,r.unreachable)()}}var mt=function(){function e(e,t,n){var i=n.alwaysRevalidate,o=void 0!==i&&i
|
||
this.frameStack=new r.Stack,this.env=e,this.constants=t.constants,this.dom=e.getDOM(),this.alwaysRevalidate=o}return e.prototype.execute=function(e,t){var r,n=this.frameStack
|
||
for(this.try(e,t);!n.isEmpty();)null!==(r=this.frame.nextStatement())?r.evaluate(this):this.frameStack.pop()},e.prototype.goto=function(e){this.frame.goto(e)},e.prototype.try=function(e,t){this.frameStack.push(new _t(e,t))},e.prototype.throw=function(){this.frame.handleException(),this.frameStack.pop()},(0,t.createClass)(e,[{key:"frame",get:function(){return this.frameStack.current}}]),e}(),yt=function(e){function r(r,n,i,o){var a=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
return a.start=r,a.state=n,a.type="block",a.next=null,a.prev=null,a.children=o,a.bounds=i,a}return(0,t.inherits)(r,e),r.prototype.parentElement=function(){return this.bounds.parentElement()},r.prototype.firstNode=function(){return this.bounds.firstNode()},r.prototype.lastNode=function(){return this.bounds.lastNode()},r.prototype.evaluate=function(e){e.try(this.children,null)},r.prototype.destroy=function(){this.bounds.destroy()},r.prototype.didDestroy=function(){this.state.env.didDestroy(this.bounds)},r}(s),gt=function(e){function n(r,n,o,a){var s=(0,t.possibleConstructorReturn)(this,e.call(this,r,n,o,a))
|
||
return s.type="try",s.tag=s._tag=i.UpdatableTag.create(i.CONSTANT_TAG),s}return(0,t.inherits)(n,e),n.prototype.didInitializeChildren=function(){this._tag.inner.update((0,i.combineSlice)(this.children))},n.prototype.evaluate=function(e){e.try(this.children,this)},n.prototype.handleException=function(){var e=this,t=this.state,n=this.bounds,i=this.children,o=this.start,a=this.prev,s=this.next
|
||
i.clear()
|
||
var u=at.resume(t.env,n,n.reset(t.env)),c=St.resume(t,u),l=new r.LinkedList
|
||
c.execute(o,function(r){r.stack=dt.restore(t.stack),r.updatingOpcodeStack.push(l),r.updateWith(e),r.updatingOpcodeStack.push(i)}),this.prev=a,this.next=s},n}(yt),bt=function(){function e(e,t){this.opcode=e,this.marker=t,this.didInsert=!1,this.didDelete=!1,this.map=e.map,this.updating=e.children}return e.prototype.insert=function(e,t,n,i){var o=this.map,a=this.opcode,s=this.updating,u=null,c=null
|
||
u=i?(c=o[i]).bounds.firstNode():this.marker
|
||
var l=a.vmForInsertion(u),f=null,h=a.start
|
||
l.execute(h,function(i){o[e]=f=i.iterate(n,t),i.updatingOpcodeStack.push(new r.LinkedList),i.updateWith(f),i.updatingOpcodeStack.push(f.children)}),s.insertBefore(f,c),this.didInsert=!0},e.prototype.retain=function(){},e.prototype.move=function(e,t,r,n){var i=this.map,o=this.updating,a=i[e],s=i[n]||null
|
||
ce(a,n?s.firstNode():this.marker),o.remove(a),o.insertBefore(a,s)},e.prototype.delete=function(e){var t=this.map,r=t[e]
|
||
r.didDestroy(),le(r),this.updating.remove(r),delete t[e],this.didDelete=!0},e.prototype.done=function(){this.opcode.didInitializeChildren(this.didInsert||this.didDelete)},e}(),vt=function(e){function n(n,o,a,s,u){var c=(0,t.possibleConstructorReturn)(this,e.call(this,n,o,a,s))
|
||
c.type="list-block",c.map=(0,r.dict)(),c.lastIterated=i.INITIAL,c.artifacts=u
|
||
var l=c._tag=i.UpdatableTag.create(i.CONSTANT_TAG)
|
||
return c.tag=(0,i.combine)([u.tag,l]),c}return(0,t.inherits)(n,e),n.prototype.didInitializeChildren=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0]
|
||
this.lastIterated=this.artifacts.tag.value(),e&&this._tag.inner.update((0,i.combineSlice)(this.children))},n.prototype.evaluate=function(t){var r,n,o,a,s=this.artifacts,u=this.lastIterated
|
||
s.tag.validate(u)||(r=this.bounds,o=(n=t.dom).createComment(""),n.insertAfter(r.parentElement(),o,r.lastNode()),a=new bt(this,o),new i.IteratorSynchronizer({target:a,artifacts:s}).sync(),this.parentElement().removeChild(o)),e.prototype.evaluate.call(this,t)},n.prototype.vmForInsertion=function(e){var t=this.bounds,r=this.state,n=at.forInitialRender(r.env,{element:t.parentElement(),nextSibling:e})
|
||
return St.resume(r,n)},n}(yt),_t=function(){function e(e,t){this.ops=e,this.exceptionHandler=t,this.current=e.head()}return e.prototype.goto=function(e){this.current=e},e.prototype.nextStatement=function(){var e=this.current,t=this.ops
|
||
return e&&(this.current=t.nextNode(e)),e},e.prototype.handleException=function(){this.exceptionHandler&&this.exceptionHandler.handleException()},e}(),wt=function(){function e(e,t,r,n){this.env=e,this.program=t,this.updating=r,this.bounds=n}return e.prototype.rerender=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{alwaysRevalidate:!1}).alwaysRevalidate,t=void 0!==e&&e,r=this.env,n=this.program,i=this.updating
|
||
new mt(r,n,{alwaysRevalidate:t}).execute(i,this)},e.prototype.parentElement=function(){return this.bounds.parentElement()},e.prototype.firstNode=function(){return this.bounds.firstNode()},e.prototype.lastNode=function(){return this.bounds.lastNode()},e.prototype.handleException=function(){throw"this should never happen"},e.prototype.destroy=function(){this.bounds.destroy(),le(this.bounds)},e}(),St=function(){function e(e,t,n,i,o){var s=this
|
||
this.program=e,this.env=t,this.elementStack=o,this.dynamicScopeStack=new r.Stack,this.scopeStack=new r.Stack,this.updatingOpcodeStack=new r.Stack,this.cacheGroups=new r.Stack,this.listBlockStack=new r.Stack,this.s0=null,this.s1=null,this.t0=null,this.t1=null,this.v0=null,this.env=t,this.heap=e.heap,this.constants=e.constants,this.elementStack=o,this.scopeStack.push(n),this.dynamicScopeStack.push(i),this.inner=new $e(dt.empty(),this.heap,e,{debugBefore:function(e){return a.debugBefore(s,e,e.type)},debugAfter:function(e,t){a.debugAfter(s,e,e.type,t)}})}return e.prototype.fetch=function(e){this.stack.push(this[n.Register[e]])},e.prototype.load=function(e){this[n.Register[e]]=this.stack.pop()},e.prototype.fetchValue=function(e){return this[n.Register[e]]},e.prototype.loadValue=function(e,t){this[n.Register[e]]=t},e.prototype.pushFrame=function(){this.inner.pushFrame()},e.prototype.popFrame=function(){this.inner.popFrame()},e.prototype.goto=function(e){this.inner.goto(e)},e.prototype.call=function(e){this.inner.call(e)},e.prototype.returnTo=function(e){this.inner.returnTo(e)},e.prototype.return=function(){this.inner.return()},e.initial=function(t,n,i,o,a,s){var u=t.heap.scopesizeof(s),c=new e(t,n,Ge.root(i,u),o,a)
|
||
return c.pc=c.heap.getaddr(s),c.updatingOpcodeStack.push(new r.LinkedList),c},e.empty=function(t,n,i){var o={get:function(){return f},set:function(){return f},child:function(){return o}},a=new e(t,n,Ge.root(f,0),o,i)
|
||
return a.updatingOpcodeStack.push(new r.LinkedList),a},e.resume=function(t,r){return new e(t.program,t.env,t.scope,t.dynamicScope,r)},e.prototype.capture=function(e){return{env:this.env,program:this.program,dynamicScope:this.dynamicScope(),scope:this.scope(),stack:this.stack.capture(e)}},e.prototype.beginCacheGroup=function(){this.cacheGroups.push(this.updating().tail())},e.prototype.commitCacheGroup=function(){var e=new j("END"),t=this.updating(),n=this.cacheGroups.pop(),o=n?t.nextNode(n):t.head(),a=t.tail(),s=(0,i.combineSlice)(new r.ListSlice(o,a)),u=new B(s,e)
|
||
t.insertBefore(u,o),t.append(new N(u)),t.append(e)},e.prototype.enter=function(e){var t=new r.LinkedList,n=this.capture(e),i=this.elements().pushUpdatableBlock(),o=new gt(this.heap.gethandle(this.pc),n,i,t)
|
||
this.didEnter(o)},e.prototype.iterate=function(e,t){var n=this.stack
|
||
n.push(t),n.push(e)
|
||
var i=this.capture(2),o=this.elements().pushUpdatableBlock()
|
||
return new gt(this.heap.gethandle(this.pc),i,o,new r.LinkedList)},e.prototype.enterItem=function(e,t){this.listBlock().map[e]=t,this.didEnter(t)},e.prototype.enterList=function(e){var t=new r.LinkedList,n=this.capture(0),i=this.elements().pushBlockList(t),o=this.stack.peek().artifacts,a=this.pc+e-this.currentOpSize,s=this.heap.gethandle(a),u=new vt(s,n,i,t,o)
|
||
this.listBlockStack.push(u),this.didEnter(u)},e.prototype.didEnter=function(e){this.updateWith(e),this.updatingOpcodeStack.push(e.children)},e.prototype.exit=function(){this.elements().popBlock(),this.updatingOpcodeStack.pop(),this.updating().tail().didInitializeChildren()},e.prototype.exitList=function(){this.exit(),this.listBlockStack.pop()},e.prototype.updateWith=function(e){this.updating().append(e)},e.prototype.listBlock=function(){return this.listBlockStack.current},e.prototype.updating=function(){return this.updatingOpcodeStack.current},e.prototype.elements=function(){return this.elementStack},e.prototype.scope=function(){return this.scopeStack.current},e.prototype.dynamicScope=function(){return this.dynamicScopeStack.current},e.prototype.pushChildScope=function(){this.scopeStack.push(this.scope().child())},e.prototype.pushDynamicScope=function(){var e=this.dynamicScope().child()
|
||
return this.dynamicScopeStack.push(e),e},e.prototype.pushRootScope=function(e,t){var r=Ge.sized(e)
|
||
return t&&r.bindCallerScope(this.scope()),this.scopeStack.push(r),r},e.prototype.pushScope=function(e){this.scopeStack.push(e)},e.prototype.popScope=function(){this.scopeStack.pop()},e.prototype.popDynamicScope=function(){this.dynamicScopeStack.pop()},e.prototype.newDestroyable=function(e){this.elements().didAddDestroyable(e)},e.prototype.getSelf=function(){return this.scope().getSelf()},e.prototype.referenceForSymbol=function(e){return this.scope().getSymbol(e)},e.prototype.execute=function(e,t){this.pc=this.heap.getaddr(e),t&&t(this)
|
||
for(var r=void 0;!(r=this.next()).done;);return r.value},e.prototype.next=function(){var e=this.env,t=this.program,r=this.updatingOpcodeStack,n=this.elementStack,i=this.inner.nextStatement(),o=void 0
|
||
return null!==i?(this.inner.evaluateOuter(i,this),o={done:!1,value:null}):(this.stack.reset(),o={done:!0,value:new wt(e,t,r.pop(),n.popBlock())}),o},e.prototype.bindDynamicScope=function(e){var t,r,n=this.dynamicScope()
|
||
for(t=e.length-1;t>=0;t--)r=this.constants.getString(e[t]),n.set(r,this.stack.pop())},(0,t.createClass)(e,[{key:"stack",get:function(){return this.inner.stack},set:function(e){this.inner.stack=e}},{key:"currentOpSize",set:function(e){this.inner.currentOpSize=e},get:function(){return this.inner.currentOpSize}},{key:"pc",get:function(){return this.inner.pc},set:function(e){this.inner.pc=e}},{key:"ra",get:function(){return this.inner.ra},set:function(e){this.inner.ra=e}},{key:"fp",get:function(){return this.stack.fp},set:function(e){this.stack.fp=e}},{key:"sp",get:function(){return this.stack.sp},set:function(e){this.stack.sp=e}}]),e}(),Et=function(){function e(e){this.vm=e}return e.prototype.next=function(){return this.vm.next()},e}(),kt=function(){function e(e,t){this.scope=e,this.nameRef=t
|
||
var r=this.varTag=i.UpdatableTag.create(i.CONSTANT_TAG)
|
||
this.tag=(0,i.combine)([t.tag,r])}return e.prototype.value=function(){return this.getVar().value()},e.prototype.get=function(e){return this.getVar().get(e)},e.prototype.getVar=function(){var e=String(this.nameRef.value()),t=this.scope.get(e)
|
||
return this.varTag.inner.update(t.tag),t},e}(),xt=function(e){function r(r,n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this,r,n))
|
||
return o.startingBlockDepth=i,o.candidate=null,o.injectedOmittedNode=!1,o.openBlockDepth=i-1,o}return(0,t.inherits)(r,e),r}(ie),Ct=function(e){function r(r,n,i){var o=(0,t.possibleConstructorReturn)(this,e.call(this,r,n,i))
|
||
if(o.unmatchedAttributes=null,o.blockDepth=0,i)throw new Error("Rehydration with nextSibling not supported")
|
||
for(var a=o.currentCursor.element.firstChild;null!==a&&(!At(a)||"%+b:0%"!==a.nodeValue);)a=a.nextSibling
|
||
return o.candidate=a,o}return(0,t.inherits)(r,e),r.prototype.pushElement=function(e,t){var r=this.blockDepth,n=new xt(e,t,void 0===r?0:r),i=this.currentCursor
|
||
i&&i.candidate&&(n.candidate=e.firstChild,i.candidate=e.nextSibling),this.cursorStack.push(n)},r.prototype.clearMismatch=function(e){var t,r=e,n=this.currentCursor
|
||
if(null!==n){if((t=n.openBlockDepth)>=n.startingBlockDepth)for(;r&&(!At(r)||Tt(r)!==t);)r=this.remove(r)
|
||
else for(;null!==r;)r=this.remove(r)
|
||
n.nextSibling=r,n.candidate=null}},r.prototype.__openBlock=function(){var e=this.currentCursor
|
||
if(null!==e){var t=this.blockDepth
|
||
this.blockDepth++
|
||
var r,n=e.candidate
|
||
if(null!==n)At(n)&&((r=n.nodeValue.match(/^%\+b:(\d+)%$/))&&r[1]?Number(r[1]):null)===t?(e.candidate=this.remove(n),e.openBlockDepth=t):this.clearMismatch(n)}},r.prototype.__closeBlock=function(){var e=this.currentCursor
|
||
if(null!==e){var t=e.openBlockDepth
|
||
this.blockDepth--
|
||
var r=e.candidate
|
||
null!==r&&(At(r)&&Tt(r)===t?(e.candidate=this.remove(r),e.openBlockDepth--):this.clearMismatch(r)),e.openBlockDepth===this.blockDepth&&(e.candidate=this.remove(e.nextSibling),e.openBlockDepth--)}},r.prototype.__appendNode=function(t){var r=this.candidate
|
||
return r||e.prototype.__appendNode.call(this,t)},r.prototype.__appendHTML=function(t){var r,n,i,o=this.markerBounds()
|
||
return o?(r=o.firstNode(),n=o.lastNode(),i=se(this.element,r.nextSibling,n.previousSibling),this.remove(r),this.remove(n),i):e.prototype.__appendHTML.call(this,t)},r.prototype.remove=function(e){var t=e.parentNode,r=e.nextSibling
|
||
return t.removeChild(e),r},r.prototype.markerBounds=function(){var e,t,r=this.candidate
|
||
if(r&&Pt(r)){for(t=(e=r).nextSibling;t&&!Pt(t);)t=t.nextSibling
|
||
return se(this.element,e,t)}return null},r.prototype.__appendText=function(t){var r,n,i=this.candidate
|
||
return i?3===i.nodeType?(i.nodeValue!==t&&(i.nodeValue=t),this.candidate=i.nextSibling,i):i&&(function(e){return 8===e.nodeType&&"%|%"===e.nodeValue}(i)||Mt(i))?(this.candidate=i.nextSibling,this.remove(i),this.__appendText(t)):Mt(i)?(r=this.remove(i),this.candidate=r,n=this.dom.createTextNode(t),this.dom.insertBefore(this.element,n,r),n):(this.clearMismatch(i),e.prototype.__appendText.call(this,t)):e.prototype.__appendText.call(this,t)},r.prototype.__appendComment=function(t){var r=this.candidate
|
||
return r&&At(r)?(r.nodeValue!==t&&(r.nodeValue=t),this.candidate=r.nextSibling,r):(r&&this.clearMismatch(r),e.prototype.__appendComment.call(this,t))},r.prototype.__openElement=function(t){var r=this.candidate
|
||
if(r&&It(r)&&function(e,t){if(e.namespaceURI===de)return e.tagName===t
|
||
return e.tagName===t.toUpperCase()}(r,t))return this.unmatchedAttributes=[].slice.call(r.attributes),r
|
||
if(r){if(It(r)&&"TBODY"===r.tagName)return this.pushElement(r,null),this.currentCursor.injectedOmittedNode=!0,this.__openElement(t)
|
||
this.clearMismatch(r)}return e.prototype.__openElement.call(this,t)},r.prototype.__setAttribute=function(t,r,n){var i,o=this.unmatchedAttributes
|
||
return o&&(i=Rt(o,t))?(i.value!==r&&(i.value=r),void o.splice(o.indexOf(i),1)):e.prototype.__setAttribute.call(this,t,r,n)},r.prototype.__setProperty=function(t,r){var n,i=this.unmatchedAttributes
|
||
return i&&(n=Rt(i,t))?(n.value!==r&&(n.value=r),void i.splice(i.indexOf(n),1)):e.prototype.__setProperty.call(this,t,r)},r.prototype.__flushElement=function(t,r){var n,i=this.unmatchedAttributes
|
||
if(i){for(n=0;n<i.length;n++)this.constructing.removeAttribute(i[n].name)
|
||
this.unmatchedAttributes=null}else e.prototype.__flushElement.call(this,t,r)},r.prototype.appendCautiousDynamicContent=function(t){var r=e.prototype.appendCautiousDynamicContent.call(this,t)
|
||
return r.update(this.env,t),r},r.prototype.willCloseElement=function(){var t=this.candidate,r=this.currentCursor
|
||
null!==t&&this.clearMismatch(t),r&&r.injectedOmittedNode&&this.popElement(),e.prototype.willCloseElement.call(this)},r.prototype.getMarker=function(e,t){var r=e.querySelector('script[glmr="'+t+'"]')
|
||
if(r)return r
|
||
throw new Error("Cannot find serialized cursor for `in-element`")},r.prototype.__pushRemoteElement=function(e,t){var r,n,i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.getMarker(e,t)
|
||
a.parentNode===e&&(n=(r=this.currentCursor).candidate,this.pushElement(e,o),r.candidate=n,this.candidate=this.remove(a),i=new ut(e),this.pushBlockTracker(i,!0))},r.prototype.didAppendBounds=function(t){var r
|
||
return e.prototype.didAppendBounds.call(this,t),this.candidate&&(r=t.lastNode(),this.candidate=r&&r.nextSibling),t},(0,t.createClass)(r,[{key:"currentCursor",get:function(){return this.cursorStack.current}},{key:"candidate",get:function(){return this.currentCursor?this.currentCursor.candidate:null},set:function(e){this.currentCursor.candidate=e}}]),r}(at)
|
||
function At(e){return 8===e.nodeType}function Tt(e){var t=e.nodeValue.match(/^%\-b:(\d+)%$/)
|
||
return t&&t[1]?Number(t[1]):null}function It(e){return 1===e.nodeType}function Pt(e){return 8===e.nodeType&&"%glmr%"===e.nodeValue}function Mt(e){return 8===e.nodeType&&"% %"===e.nodeValue}function Rt(e,t){var r,n
|
||
for(r=0;r<e.length;r++)if((n=e[r]).name===t)return n}e.renderMain=function(e,t,r,n,i,o){var a=St.initial(e,t,r,n,i,o)
|
||
return new Et(a)},e.NULL_REFERENCE=h,e.UNDEFINED_REFERENCE=f,e.PrimitiveReference=u,e.ConditionalReference=m,e.setDebuggerCallback=function(e){te=e},e.resetDebuggerCallback=function(){te=ee},e.getDynamicVar=function(e,t){var r=e.dynamicScope(),n=t.positional.at(0)
|
||
return new kt(r,n)},e.LowLevelVM=St,e.UpdatingVM=mt,e.RenderResult=wt,e.SimpleDynamicAttribute=Fe,e.DynamicAttribute=Ue,e.EMPTY_ARGS=A,e.Scope=Ge,e.Environment=Qe,e.DefaultEnvironment=Xe,e.DEFAULT_CAPABILITIES={dynamicLayout:!0,dynamicTag:!0,prepareArgs:!0,createArgs:!0,attributeHook:!1,elementHook:!1},e.MINIMAL_CAPABILITIES={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!1,attributeHook:!1,elementHook:!1},e.CurriedComponentDefinition=P,e.isCurriedComponentDefinition=I,e.curry=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
|
||
return new P(e,t)},e.ARGS=X,e.DOMChanges=Ee,e.SVG_NAMESPACE=de,e.IDOMChanges=_e,e.DOMTreeConstruction=ke,e.isWhitespace=function(e){return ye.test(e)},e.insertHTMLBefore=we,e.normalizeProperty=Ne
|
||
e.NewElementBuilder=at,e.clientBuilder=function(e,t){return at.forInitialRender(e,t)},e.rehydrationBuilder=function(e,t){return Ct.forInitialRender(e,t)},e.RehydrateBuilder=Ct,e.ConcreteBounds=oe,e.Cursor=ie,e.capabilityFlagsFrom=Y,e.hasCapability=Q}),e("@glimmer/util",["exports","ember-babel"],function(e,t){"use strict"
|
||
e.unreachable=e.expect=e.unwrap=e.EMPTY_ARRAY=e.ListSlice=e.ListNode=e.LinkedList=e.EMPTY_SLICE=e.dict=e.DictSet=e.Stack=e.initializeGuid=e.ensureGuid=e.fillNulls=e.assign=e.assert=void 0
|
||
var r=Object.keys,n=0
|
||
function i(e){return e._guid=++n}function o(e){return e._guid||i(e)}function a(){return Object.create(null)}var s=function(){function e(){this.dict=a()}return e.prototype.add=function(e){return"string"==typeof e?this.dict[e]=e:this.dict[o(e)]=e,this},e.prototype.delete=function(e){"string"==typeof e?delete this.dict[e]:e._guid&&delete this.dict[e._guid]},e}(),u=function(){function e(){this.stack=[],this.current=null}return e.prototype.push=function(e){this.current=e,this.stack.push(e)},e.prototype.pop=function(){var e=this.stack.pop(),t=this.stack.length
|
||
return this.current=0===t?null:this.stack[t-1],void 0===e?null:e},e.prototype.isEmpty=function(){return 0===this.stack.length},(0,t.createClass)(e,[{key:"size",get:function(){return this.stack.length}}]),e}(),c=function(){function e(){this.clear()}return e.prototype.head=function(){return this._head},e.prototype.tail=function(){return this._tail},e.prototype.clear=function(){this._head=this._tail=null},e.prototype.toArray=function(){var e=[]
|
||
return this.forEachNode(function(t){return e.push(t)}),e},e.prototype.nextNode=function(e){return e.next},e.prototype.forEachNode=function(e){for(var t=this._head;null!==t;)e(t),t=t.next},e.prototype.insertBefore=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null
|
||
return null===t?this.append(e):(t.prev?t.prev.next=e:this._head=e,e.prev=t.prev,e.next=t,t.prev=e,e)},e.prototype.append=function(e){var t=this._tail
|
||
return t?(t.next=e,e.prev=t,e.next=null):this._head=e,this._tail=e},e.prototype.remove=function(e){return e.prev?e.prev.next=e.next:this._head=e.next,e.next?e.next.prev=e.prev:this._tail=e.prev,e},e}(),l=function(){function e(e,t){this._head=e,this._tail=t}return e.prototype.forEachNode=function(e){for(var t=this._head;null!==t;)e(t),t=this.nextNode(t)},e.prototype.head=function(){return this._head},e.prototype.tail=function(){return this._tail},e.prototype.toArray=function(){var e=[]
|
||
return this.forEachNode(function(t){return e.push(t)}),e},e.prototype.nextNode=function(e){return e===this._tail?null:e.next},e}(),f=new l(null,null),h=Object.freeze([])
|
||
e.assert=function(e,t){if(!e)throw new Error(t||"assertion failure")},e.assign=function(e){var t,n,i,o,a
|
||
for(t=1;t<arguments.length;t++)if(null!==(n=arguments[t])&&"object"==typeof n)for(i=r(n),o=0;o<i.length;o++)e[a=i[o]]=n[a]
|
||
return e},e.fillNulls=function(e){var t,r=new Array(e)
|
||
for(t=0;t<e;t++)r[t]=null
|
||
return r},e.ensureGuid=o,e.initializeGuid=i,e.Stack=u,e.DictSet=s,e.dict=a,e.EMPTY_SLICE=f,e.LinkedList=c,e.ListNode=function(e){this.next=null,this.prev=null,this.value=e},e.ListSlice=l,e.EMPTY_ARRAY=h,e.unwrap=function(e){if(null===e||void 0===e)throw new Error("Expected value to be present")
|
||
return e},e.expect=function(e,t){if(null===e||void 0===e)throw new Error(t)
|
||
return e},e.unreachable=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unreachable"
|
||
return new Error(e)}}),e("@glimmer/vm",["exports"],function(e){"use strict"
|
||
var t;(function(e){e[e.pc=0]="pc",e[e.ra=1]="ra",e[e.fp=2]="fp",e[e.sp=3]="sp",e[e.s0=4]="s0",e[e.s1=5]="s1",e[e.t0=6]="t0",e[e.t1=7]="t1",e[e.v0=8]="v0"})(t||(e.Register=t={})),e.Register=t}),e("@glimmer/wire-format",["exports"],function(e){"use strict"
|
||
var t
|
||
function r(e){return function(t){return Array.isArray(t)&&t[0]===e}}(function(e){e[e.Text=0]="Text",e[e.Append=1]="Append",e[e.Comment=2]="Comment",e[e.Modifier=3]="Modifier",e[e.Block=4]="Block",e[e.Component=5]="Component",e[e.OpenElement=6]="OpenElement",e[e.OpenSplattedElement=7]="OpenSplattedElement",e[e.FlushElement=8]="FlushElement",e[e.CloseElement=9]="CloseElement",e[e.StaticAttr=10]="StaticAttr",e[e.DynamicAttr=11]="DynamicAttr",e[e.AttrSplat=12]="AttrSplat",e[e.Yield=13]="Yield",e[e.Partial=14]="Partial",e[e.DynamicArg=15]="DynamicArg",e[e.StaticArg=16]="StaticArg",e[e.TrustingAttr=17]="TrustingAttr",e[e.Debugger=18]="Debugger",e[e.ClientSideStatement=19]="ClientSideStatement",e[e.Unknown=20]="Unknown",e[e.Get=21]="Get",e[e.MaybeLocal=22]="MaybeLocal",e[e.HasBlock=23]="HasBlock",e[e.HasBlockParams=24]="HasBlockParams",e[e.Undefined=25]="Undefined",e[e.Helper=26]="Helper",e[e.Concat=27]="Concat",e[e.ClientSideExpression=28]="ClientSideExpression"})(t||(e.Ops=t={}))
|
||
var n=r(t.Modifier),i=r(t.FlushElement),o=r(t.Get),a=r(t.MaybeLocal)
|
||
e.is=r,e.isModifier=n,e.isFlushElement=i,e.isAttribute=function(e){return e[0]===t.StaticAttr||e[0]===t.DynamicAttr||e[0]===t.TrustingAttr},e.isArgument=function(e){return e[0]===t.StaticArg||e[0]===t.DynamicArg},e.isGet=o,e.isMaybeLocal=a,e.Ops=t}),e("backburner",["exports"],function(e){"use strict"
|
||
var t=/\d+/
|
||
function r(e){var r=typeof e
|
||
return"number"===r&&e==e||"string"===r&&t.test(e)}function n(e){return e.onError||e.onErrorTarget&&e.onErrorTarget[e.onErrorMethod]}function i(e,t,r){var n,i,o=-1
|
||
for(n=0,i=r.length;n<i;n+=4)if(r[n]===e&&r[n+1]===t){o=n
|
||
break}return o}function o(e,t){var r,n=-1
|
||
for(r=3;r<t.length;r+=4)if(t[r]===e){n=r-3
|
||
break}return n}var a=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
|
||
this._queueBeingFlushed=[],this.targetQueues=new Map,this.index=0,this._queue=[],this.name=e,this.options=t,this.globalOptions=r}return e.prototype.stackFor=function(e){var t
|
||
if(e<this._queue.length)return(t=this._queue[3*e+4])?t.stack:null},e.prototype.flush=function(e){var t,r,i=this.options,o=i.before,a=i.after,s=void 0
|
||
this.targetQueues.clear(),0===this._queueBeingFlushed.length&&(this._queueBeingFlushed=this._queue,this._queue=[]),void 0!==o&&o()
|
||
var u=void 0,c=this._queueBeingFlushed
|
||
if(c.length>0)for(u=(t=n(this.globalOptions))?this.invokeWithOnError:this.invoke,r=this.index;r<c.length;r+=4)if(this.index+=4,null!==(s=c[r+1])&&u(c[r],s,c[r+2],t,c[r+3]),this.index!==this._queueBeingFlushed.length&&this.globalOptions.mustYield&&this.globalOptions.mustYield())return 1
|
||
void 0!==a&&a(),this._queueBeingFlushed.length=0,this.index=0,!1!==e&&this._queue.length>0&&this.flush(!0)},e.prototype.hasWork=function(){return this._queueBeingFlushed.length>0||this._queue.length>0},e.prototype.cancel=function(e){var t=e.target,r=e.method,n=this._queue,o=this.targetQueues.get(t)
|
||
void 0!==o&&o.delete(r)
|
||
var a=i(t,r,n)
|
||
return a>-1?(n.splice(a,4),!0):(a=i(t,r,n=this._queueBeingFlushed))>-1&&(n[a+1]=null,!0)},e.prototype.push=function(e,t,r,n){return this._queue.push(e,t,r,n),{queue:this,target:e,method:t}},e.prototype.pushUnique=function(e,t,r,n){var i,o,a=this.targetQueues.get(e)
|
||
void 0===a&&(a=new Map,this.targetQueues.set(e,a))
|
||
var s=a.get(t)
|
||
return void 0===s?(i=this._queue.push(e,t,r,n)-4,a.set(t,i)):((o=this._queue)[s+2]=r,o[s+3]=n),{queue:this,target:e,method:t}},e.prototype.invoke=function(e,t,r){void 0===r?t.call(e):t.apply(e,r)},e.prototype.invokeWithOnError=function(e,t,r,n,i){try{void 0===r?t.call(e):t.apply(e,r)}catch(e){n(e,i)}},e}(),s=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1]
|
||
this.queues={},this.queueNameIndex=0,this.queueNames=e,e.reduce(function(e,r){return e[r]=new a(r,t[r],t),e},this.queues)}return e.prototype.schedule=function(e,t,r,n,i,o){var a=this.queues[e]
|
||
if(void 0===a)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist")
|
||
if(void 0===r||null===r)throw new Error("You attempted to schedule an action in a queue ("+e+") for a method that doesn't exist")
|
||
return i?a.pushUnique(t,r,n,o):a.push(t,r,n,o)},e.prototype.flush=function(){for(var e=void 0,t=void 0,r=this.queueNames.length;this.queueNameIndex<r;)if(t=this.queueNames[this.queueNameIndex],!1===(e=this.queues[t]).hasWork())this.queueNameIndex++
|
||
else{if(1===e.flush(!1))return 1
|
||
this.queueNameIndex=0}},e}(),u=function(e){for(var t=e(),r=t.next();!1===r.done;)r.value(),r=t.next()},c=function(){},l=setTimeout
|
||
function f(){var e,t=arguments.length,r=void 0,n=void 0,i=void 0
|
||
if(1===t)r=arguments[0],n=null
|
||
else if(n=arguments[0],"string"==typeof(r=arguments[1])&&(r=n[r]),t>2)for(i=new Array(t-2),e=0;e<t-2;e++)i[e]=arguments[e+2]
|
||
return[n,r,i]}var h=0,d=function(){function e(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
this.DEBUG=!1,this.currentInstance=null,this.instanceStack=[],this._debouncees=[],this._throttlers=[],this._eventCallbacks={end:[],begin:[]},this._timerTimeoutId=null,this._timers=[],this._autorun=null,this.queueNames=e,this.options=r,this.options.defaultQueue||(this.options.defaultQueue=e[0]),this._onBegin=this.options.onBegin||c,this._onEnd=this.options.onEnd||c
|
||
var n=this.options._platform||{},i=Object.create(null)
|
||
i.setTimeout=n.setTimeout||function(e,t){return setTimeout(e,t)},i.clearTimeout=n.clearTimeout||function(e){return clearTimeout(e)},i.next=n.next||function(e){return l(e,0)},i.clearNext=n.clearNext||i.clearTimeout,i.now=n.now||function(){return Date.now()},this._platform=i,this._boundRunExpiredTimers=function(){t._runExpiredTimers()},this._boundAutorunEnd=function(){t._autorun=null,t.end()}}return e.prototype.begin=function(){var e=this.options,t=this.currentInstance,r=void 0
|
||
return null!==this._autorun?(r=t,this._cancelAutorun()):(null!==t&&this.instanceStack.push(t),r=this.currentInstance=new s(this.queueNames,e),this._trigger("begin",r,t)),this._onBegin(r,t),r},e.prototype.end=function(){var e,t=this.currentInstance,r=null
|
||
if(null===t)throw new Error("end called without begin")
|
||
var n=!1,i=void 0
|
||
try{i=t.flush()}finally{n||(n=!0,1===i?(e=this._platform.next,this._autorun=e(this._boundAutorunEnd)):(this.currentInstance=null,this.instanceStack.length>0&&(r=this.instanceStack.pop(),this.currentInstance=r),this._trigger("end",t,r),this._onEnd(t,r)))}},e.prototype.on=function(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function")
|
||
var r=this._eventCallbacks[e]
|
||
if(void 0===r)throw new TypeError("Cannot on() event "+e+" because it does not exist")
|
||
r.push(t)},e.prototype.off=function(e,t){var r,n=this._eventCallbacks[e]
|
||
if(!e||void 0===n)throw new TypeError("Cannot off() event "+e+" because it does not exist")
|
||
var i=!1
|
||
if(t)for(r=0;r<n.length;r++)n[r]===t&&(i=!0,n.splice(r,1),r--)
|
||
if(!i)throw new TypeError("Cannot off() callback that does not exist")},e.prototype.run=function(){var e=f.apply(void 0,arguments),t=e[0],r=e[1],n=e[2]
|
||
return this._run(t,r,n)},e.prototype.join=function(){var e=f.apply(void 0,arguments),t=e[0],r=e[1],n=e[2]
|
||
return this._join(t,r,n)},e.prototype.defer=function(e,t){var r,n,i
|
||
for(r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]
|
||
return this.schedule.apply(this,[e,t].concat(n))},e.prototype.schedule=function(e){for(t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n]
|
||
var t,r,n,i=f.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=this.DEBUG?new Error:void 0
|
||
return this._ensureInstance().schedule(e,o,a,s,!1,u)},e.prototype.scheduleIterable=function(e,t){var r=this.DEBUG?new Error:void 0
|
||
return this._ensureInstance().schedule(e,null,u,[t],!1,r)},e.prototype.deferOnce=function(e,t){var r,n,i
|
||
for(r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]
|
||
return this.scheduleOnce.apply(this,[e,t].concat(n))},e.prototype.scheduleOnce=function(e){for(t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n]
|
||
var t,r,n,i=f.apply(void 0,r),o=i[0],a=i[1],s=i[2],u=this.DEBUG?new Error:void 0
|
||
return this._ensureInstance().schedule(e,o,a,s,!0,u)},e.prototype.setTimeout=function(){return this.later.apply(this,arguments)},e.prototype.later=function(){for(e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
var e,t,n,i,o=t.length,a=0,s=void 0,u=void 0,c=void 0,l=void 0
|
||
if(0!==o)return 1===o?s=t.shift():(r(t[t.length-1])&&(a=parseInt(t.pop(),10)),c=t[0],"function"===(i=typeof(l=t[1]))?(u=t.shift(),s=t.shift()):s=null!==c&&"string"===i&&l in c?(u=t.shift())[t.shift()]:t.shift()),this._setTimeout(u,s,t,a)},e.prototype.throttle=function(e){var t,n,a,s,u=this,c=void 0,l=void 0,f=void 0,h=void 0,d=void 0
|
||
for(t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a]
|
||
1===n.length?(l=e,d=n.pop(),c=null,h=!0):(c=e,l=n.shift(),f=n.pop(),"string"===(s=typeof l)?l=c[l]:"function"!==s&&(n.unshift(l),l=c,c=null),r(f)?(d=f,h=!0):(d=n.pop(),h=!0===f))
|
||
var p=i(c,l,this._throttlers)
|
||
if(p>-1)return this._throttlers[p+2]=n,this._throttlers[p+3]
|
||
d=parseInt(d,10)
|
||
var m=this._platform.setTimeout(function(){var e=o(m,u._throttlers),t=u._throttlers.splice(e,4),r=t[0],n=t[1],i=t[2]
|
||
!1===h&&u._run(r,n,i)},d)
|
||
return h&&this._join(c,l,n),this._throttlers.push(c,l,n,m),m},e.prototype.debounce=function(e){var t,n,a,s,u,c=this,l=void 0,f=void 0,h=void 0,d=void 0,p=void 0
|
||
for(t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a]
|
||
1===n.length?(f=e,p=n.pop(),l=null,d=!1):(l=e,f=n.shift(),h=n.pop(),"string"===(s=typeof f)?f=l[f]:"function"!==s&&(n.unshift(f),f=l,l=null),r(h)?(p=h,d=!1):(p=n.pop(),d=!0===h)),p=parseInt(p,10)
|
||
var m=i(l,f,this._debouncees)
|
||
m>-1&&(u=this._debouncees[m+3],this._platform.clearTimeout(u),this._debouncees.splice(m,4))
|
||
var y=this._platform.setTimeout(function(){var e=o(y,c._debouncees),t=c._debouncees.splice(e,4),r=t[0],n=t[1],i=t[2]
|
||
!1===d&&c._run(r,n,i)},p)
|
||
return d&&-1===m&&this._join(l,f,n),this._debouncees.push(l,f,n,y),y},e.prototype.cancelTimers=function(){var e,t
|
||
for(e=3;e<this._throttlers.length;e+=4)this._platform.clearTimeout(this._throttlers[e])
|
||
for(this._throttlers=[],t=3;t<this._debouncees.length;t+=4)this._platform.clearTimeout(this._debouncees[t])
|
||
this._debouncees=[],this._clearTimerTimeout(),this._timers=[],this._cancelAutorun()},e.prototype.hasTimers=function(){return this._timers.length>0||this._debouncees.length>0||this._throttlers.length>0||null!==this._autorun},e.prototype.cancel=function(e){if(!e)return!1
|
||
var t=typeof e
|
||
return"number"===t?this._cancelItem(e,this._throttlers)||this._cancelItem(e,this._debouncees):"string"===t?this._cancelLaterTimer(e):!("object"!==t||!e.queue||!e.method)&&e.queue.cancel(e)},e.prototype.ensureInstance=function(){this._ensureInstance()},e.prototype._join=function(e,t,r){return null===this.currentInstance?this._run(e,t,r):void 0===e&&void 0===r?t():t.apply(e,r)},e.prototype._run=function(e,t,r){var i=n(this.options)
|
||
if(this.begin(),i)try{return t.apply(e,r)}catch(e){i(e)}finally{this.end()}else try{return t.apply(e,r)}finally{this.end()}},e.prototype._cancelAutorun=function(){null!==this._autorun&&(this._platform.clearNext(this._autorun),this._autorun=null)},e.prototype._setTimeout=function(e,t,r,n){var i=this.DEBUG?new Error:void 0,o=this._platform.now()+n,a=h+++""
|
||
if(0===this._timers.length)return this._timers.push(o,a,e,t,r,i),this._installTimerTimeout(),a
|
||
var s=function(e,t){for(var r=0,n=t.length-6,i=void 0,o=void 0;r<n;)e>=t[i=r+(o=(n-r)/6)-o%6]?r=i+6:n=i
|
||
return e>=t[r]?r+6:r}(o,this._timers)
|
||
return this._timers.splice(s,0,o,a,e,t,r,i),0===s&&this._reinstallTimerTimeout(),a},e.prototype._cancelLaterTimer=function(e){var t
|
||
for(t=1;t<this._timers.length;t+=6)if(this._timers[t]===e)return t-=1,this._timers.splice(t,6),0===t&&this._reinstallTimerTimeout(),!0
|
||
return!1},e.prototype._cancelItem=function(e,t){var r=o(e,t)
|
||
return r>-1&&(this._platform.clearTimeout(e),t.splice(r,4),!0)},e.prototype._trigger=function(e,t,r){var n,i=this._eventCallbacks[e]
|
||
if(void 0!==i)for(n=0;n<i.length;n++)i[n](t,r)},e.prototype._runExpiredTimers=function(){this._timerTimeoutId=null,0!==this._timers.length&&(this.begin(),this._scheduleExpiredTimers(),this.end())},e.prototype._scheduleExpiredTimers=function(){for(var e,t,r,n,i=this._timers,o=0,a=i.length,s=this.options.defaultQueue,u=this._platform.now();o<a&&i[o]<=u;o+=6)e=i[o+2],t=i[o+3],r=i[o+4],n=i[o+5],this.currentInstance.schedule(s,e,t,r,!1,n)
|
||
i.splice(0,o),this._installTimerTimeout()},e.prototype._reinstallTimerTimeout=function(){this._clearTimerTimeout(),this._installTimerTimeout()},e.prototype._clearTimerTimeout=function(){null!==this._timerTimeoutId&&(this._platform.clearTimeout(this._timerTimeoutId),this._timerTimeoutId=null)},e.prototype._installTimerTimeout=function(){if(0!==this._timers.length){var e=this._timers[0],t=this._platform.now(),r=Math.max(0,e-t)
|
||
this._timerTimeoutId=this._platform.setTimeout(this._boundRunExpiredTimers,r)}},e.prototype._ensureInstance=function(){var e,t=this.currentInstance
|
||
return null===t&&(t=this.begin(),e=this._platform.next,this._autorun=e(this._boundAutorunEnd)),t},e}()
|
||
d.Queue=a,e.default=d}),e("container",["exports","ember-utils","ember-debug","ember-environment"],function(e,t,r,n){"use strict"
|
||
e.FACTORY_FOR=e.Container=e.privatize=e.Registry=void 0
|
||
var i=function(){function e(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
this.registry=e,this.owner=r.owner||null,this.cache=(0,t.dictionary)(r.cache||null),this.factoryManagerCache=(0,t.dictionary)(r.factoryManagerCache||null),this.isDestroyed=!1}return e.prototype.lookup=function(e,t){return s(this,this.registry.normalize(e),t)},e.prototype.destroy=function(){c(this),this.isDestroyed=!0},e.prototype.reset=function(e){var r
|
||
void 0===e?(c(r=this),r.cache=(0,t.dictionary)(null),r.factoryManagerCache=(0,t.dictionary)(null)):function(e,t){var r=e.cache[t]
|
||
delete e.factoryManagerCache[t],r&&(delete e.cache[t],r.destroy&&r.destroy())}(this,this.registry.normalize(e))},e.prototype.ownerInjection=function(){var e
|
||
return(e={})[t.OWNER]=this.owner,e},e.prototype._resolverCacheKey=function(e,t){return this.registry.resolverCacheKey(e,t)},e.prototype.factoryFor=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.registry.normalize(e)
|
||
if(r.source){if(!(t=this.registry.expandLocalLookup(e,r)))return
|
||
n=t}var i=this._resolverCacheKey(n,r),o=this.factoryManagerCache[i]
|
||
if(void 0!==o)return o
|
||
var a=this.registry.resolve(n)
|
||
if(void 0!==a){var s=new f(this,a,e,n)
|
||
return this.factoryManagerCache[i]=s,s}},e}()
|
||
function o(e,t){return!1!==e.registry.getOption(t,"singleton")}function a(e,t){return!1!==e.registry.getOption(t,"instantiate")}function s(e,t){var r,n,i,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}
|
||
if(s.source){if(!(r=e.registry.expandLocalLookup(t,s)))return
|
||
t=r}return!1!==s.singleton&&(n=e._resolverCacheKey(t,s),void 0!==(i=e.cache[n]))?i:function(e,t,r){var n,i=e.factoryFor(t)
|
||
if(void 0===i)return
|
||
if(function(e,t,r){var n=r.instantiate
|
||
return!1!==r.singleton&&!1!==n&&o(e,t)&&a(e,t)}(e,t,r))return n=e._resolverCacheKey(t,r),e.cache[n]=i.create()
|
||
if(function(e,t,r){var n=r.instantiate,i=r.singleton
|
||
return!1!==n&&(!1!==i||o(e,t))&&a(e,t)}(e,t,r))return i.create()
|
||
if(function(e,t,r){var n=r.instantiate
|
||
return!1!==r.singleton&&!n&&o(e,t)&&!a(e,t)}(e,t,r)||function(e,t,r){var n=r.instantiate,i=r.singleton
|
||
return!(!1!==n||!1!==i&&o(e,t)||a(e,t))}(e,t,r))return i.class
|
||
throw new Error("Could not create factory")}(e,t,s)}function u(e,t){var r=e.registry,n=t.split(":")[0]
|
||
return function(e,t){var r,n,i={},a=!1
|
||
if(t.length>0)for(r=void 0,n=0;n<t.length;n++)i[(r=t[n]).property]=s(e,r.fullName),a||(a=!o(e,r.fullName))
|
||
return{injections:i,isDynamic:a}}(e,r.getTypeInjections(n).concat(r.getInjections(t)))}function c(e){var t,r,n=e.cache,i=Object.keys(n)
|
||
for(t=0;t<i.length;t++)(r=n[i[t]]).destroy&&r.destroy()}var l=new WeakMap,f=function(){function e(e,t,r,n){this.container=e,this.owner=e.owner,this.class=t,this.fullName=r,this.normalizedName=n,this.madeToString=void 0,this.injections=void 0,l.set(this,this)}return e.prototype.toString=function(){return void 0===this.madeToString&&(this.madeToString=this.container.registry.makeToString(this.class,this.fullName)),this.madeToString},e.prototype.create=function(){var e,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this.injections
|
||
void 0===i&&(i=r=(e=u(this.container,this.normalizedName)).injections,e.isDynamic||(this.injections=r))
|
||
var o=(0,t.assign)({},i,n)
|
||
if(!this.class.create)throw new Error("Failed to create an instance of '"+this.normalizedName+"'. Most likely an improperly defined class or an invalid module export.")
|
||
"function"==typeof this.class._initFactory?this.class._initFactory(this):(0,t.setOwner)(o,this.owner)
|
||
var a=this.class.create(o)
|
||
return l.set(a,this),a},e}(),h=/^[^:]+:[^:]+$/,d=function(){function e(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
||
this.fallback=r.fallback||null,this.resolver=r.resolver||null,n.ENV._ENABLE_RESOLVER_FUNCTION_SUPPORT,"function"==typeof this.resolver&&!0===n.ENV._ENABLE_RESOLVER_FUNCTION_SUPPORT&&((e=this).resolver={resolve:e.resolver}),this.registrations=(0,t.dictionary)(r.registrations||null),this._typeInjections=(0,t.dictionary)(null),this._injections=(0,t.dictionary)(null),this._localLookupCache=Object.create(null),this._normalizeCache=(0,t.dictionary)(null),this._resolveCache=(0,t.dictionary)(null),this._failSet=new Set,this._options=(0,t.dictionary)(null),this._typeOptions=(0,t.dictionary)(null)}return e.prototype.container=function(e){return new i(this,e)},e.prototype.register=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.normalize(e)
|
||
this._failSet.delete(n),this.registrations[n]=t,this._options[n]=r},e.prototype.unregister=function(e){var t=this.normalize(e)
|
||
this._localLookupCache=Object.create(null),delete this.registrations[t],delete this._resolveCache[t],delete this._options[t],this._failSet.delete(t)},e.prototype.resolve=function(e,t){var r,n=function(e,t,r){if(r&&r.source){if(!(n=e.expandLocalLookup(t,r)))return
|
||
t=n}var n,i=e.resolverCacheKey(t,r),o=e._resolveCache[i]
|
||
if(void 0!==o)return o
|
||
if(e._failSet.has(i))return
|
||
var a=void 0
|
||
e.resolver&&(a=e.resolver.resolve(t,r&&r.source))
|
||
void 0===a&&(a=e.registrations[t])
|
||
void 0===a?e._failSet.add(i):e._resolveCache[i]=a
|
||
return a}(this,this.normalize(e),t)
|
||
return void 0===n&&null!==this.fallback&&(n=(r=this.fallback).resolve.apply(r,arguments)),n},e.prototype.describe=function(e){return null!==this.resolver&&this.resolver.lookupDescription?this.resolver.lookupDescription(e):null!==this.fallback?this.fallback.describe(e):e},e.prototype.normalizeFullName=function(e){return null!==this.resolver&&this.resolver.normalize?this.resolver.normalize(e):null!==this.fallback?this.fallback.normalizeFullName(e):e},e.prototype.normalize=function(e){return this._normalizeCache[e]||(this._normalizeCache[e]=this.normalizeFullName(e))},e.prototype.makeToString=function(e,t){return null!==this.resolver&&this.resolver.makeToString?this.resolver.makeToString(e,t):null!==this.fallback?this.fallback.makeToString(e,t):e.toString()},e.prototype.has=function(e,t){if(!this.isValidFullName(e))return!1
|
||
var r=t&&t.source&&this.normalize(t.source)
|
||
return function(e,t,r){return void 0!==e.resolve(t,{source:r})}(this,this.normalize(e),r)},e.prototype.optionsForType=function(e,t){this._typeOptions[e]=t},e.prototype.getOptionsForType=function(e){var t=this._typeOptions[e]
|
||
return void 0===t&&null!==this.fallback&&(t=this.fallback.getOptionsForType(e)),t},e.prototype.options=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.normalize(e)
|
||
this._options[r]=t},e.prototype.getOptions=function(e){var t=this.normalize(e),r=this._options[t]
|
||
return void 0===r&&null!==this.fallback&&(r=this.fallback.getOptions(e)),r},e.prototype.getOption=function(e,t){var r=this._options[e]
|
||
if(r&&void 0!==r[t])return r[t]
|
||
var n=e.split(":")[0]
|
||
return(r=this._typeOptions[n])&&void 0!==r[t]?r[t]:null!==this.fallback?this.fallback.getOption(e,t):void 0},e.prototype.typeInjection=function(e,t,r){r.split(":")[0];(this._typeInjections[e]||(this._typeInjections[e]=[])).push({property:t,fullName:r})},e.prototype.injection=function(e,t,r){var n=this.normalize(r)
|
||
if(-1===e.indexOf(":"))return this.typeInjection(e,t,n)
|
||
var i=this.normalize(e);(this._injections[i]||(this._injections[i]=[])).push({property:t,fullName:n})},e.prototype.knownForType=function(e){var r,n,i=(0,t.dictionary)(null),o=Object.keys(this.registrations)
|
||
for(r=0;r<o.length;r++)(n=o[r]).split(":")[0]===e&&(i[n]=!0)
|
||
var a=void 0,s=void 0
|
||
return null!==this.fallback&&(a=this.fallback.knownForType(e)),null!==this.resolver&&this.resolver.knownForType&&(s=this.resolver.knownForType(e)),(0,t.assign)({},a,i,s)},e.prototype.isValidFullName=function(e){return h.test(e)},e.prototype.getInjections=function(e){var t=this._injections[e]||[]
|
||
return null!==this.fallback&&(t=t.concat(this.fallback.getInjections(e))),t},e.prototype.getTypeInjections=function(e){var t=this._typeInjections[e]||[]
|
||
return null!==this.fallback&&(t=t.concat(this.fallback.getTypeInjections(e))),t},e.prototype.resolverCacheKey=function(e,t){return e},e.prototype.expandLocalLookup=function(e,t){return null!==this.resolver&&this.resolver.expandLocalLookup?function(e,t,r){var n=e._localLookupCache,i=n[t]
|
||
i||(i=n[t]=Object.create(null))
|
||
var o=i[r]
|
||
if(void 0!==o)return o
|
||
var a=e.resolver.expandLocalLookup(t,r)
|
||
return i[r]=a}(this,this.normalize(e),this.normalize(t.source)):null!==this.fallback?this.fallback.expandLocalLookup(e,t):null},e}()
|
||
var p=(0,t.dictionary)(null),m=(""+Math.random()+Date.now()).replace(".","")
|
||
e.Registry=d,e.privatize=function(e){var r=e[0],n=p[r]
|
||
if(n)return n
|
||
var i=r.split(":"),o=i[0],a=i[1]
|
||
return p[r]=(0,t.intern)(o+":"+a+"-"+m)},e.Container=i,e.FACTORY_FOR=l}),e("dag-map",["exports"],function(e){"use strict"
|
||
var t=function(){function e(){this._vertices=new r}return e.prototype.add=function(e,t,r,n){if(!e)throw new Error("argument `key` is required")
|
||
var i=this._vertices,o=i.add(e)
|
||
if(o.val=t,r)if("string"==typeof r)i.addEdge(o,i.add(r))
|
||
else for(var a=0;a<r.length;a++)i.addEdge(o,i.add(r[a]))
|
||
if(n)if("string"==typeof n)i.addEdge(i.add(n),o)
|
||
else for(a=0;a<n.length;a++)i.addEdge(i.add(n[a]),o)},e.prototype.addEdges=function(e,t,r,n){this.add(e,t,r,n)},e.prototype.each=function(e){this._vertices.walk(e)},e.prototype.topsort=function(e){this.each(e)},e}()
|
||
e.default=t
|
||
var r=function(){function e(){this.length=0,this.stack=new n,this.path=new n,this.result=new n}return e.prototype.add=function(e){if(!e)throw new Error("missing key")
|
||
var t,r,n=0|this.length
|
||
for(t=0;t<n;t++)if((r=this[t]).key===e)return r
|
||
return this.length=n+1,this[n]={idx:n,key:e,val:void 0,out:!1,flag:!1,length:0}},e.prototype.addEdge=function(e,t){this.check(e,t.key)
|
||
var r,n=0|t.length
|
||
for(r=0;r<n;r++)if(t[r]===e.idx)return
|
||
t.length=n+1,t[n]=e.idx,e.out=!0},e.prototype.walk=function(e){var t,r
|
||
for(this.reset(),t=0;t<this.length;t++)(r=this[t]).out||this.visit(r,"")
|
||
this.each(this.result,e)},e.prototype.check=function(e,t){var r,n
|
||
if(e.key===t)throw new Error("cycle detected: "+t+" <- "+t)
|
||
if(0!==e.length){for(r=0;r<e.length;r++)if(this[e[r]].key===t)throw new Error("cycle detected: "+t+" <- "+e.key+" <- "+t)
|
||
if(this.reset(),this.visit(e,t),this.path.length>0)throw n="cycle detected: "+t,this.each(this.path,function(e){n+=" <- "+e}),new Error(n)}},e.prototype.reset=function(){var e,t
|
||
for(this.stack.length=0,this.path.length=0,this.result.length=0,e=0,t=this.length;e<t;e++)this[e].flag=!1},e.prototype.visit=function(e,t){var r,n,i=this.stack,o=this.path,a=this.result
|
||
for(i.push(e.idx);i.length;)if((r=0|i.pop())>=0){if((n=this[r]).flag)continue
|
||
if(n.flag=!0,o.push(r),t===n.key)break
|
||
i.push(~r),this.pushIncoming(n)}else o.pop(),a.push(~r)},e.prototype.pushIncoming=function(e){var t,r,n=this.stack
|
||
for(t=e.length-1;t>=0;t--)this[r=e[t]].flag||n.push(r)},e.prototype.each=function(e,t){var r,n,i
|
||
for(r=0,n=e.length;r<n;r++)t((i=this[e[r]]).key,i.val)},e}(),n=function(){function e(){this.length=0}return e.prototype.push=function(e){this[this.length++]=0|e},e.prototype.pop=function(){return 0|this[--this.length]},e}()}),e("ember-application/index",["exports","ember-application/system/application","ember-application/system/application-instance","ember-application/system/resolver","ember-application/system/engine","ember-application/system/engine-instance","ember-application/system/engine-parent","ember-application/initializers/dom-templates"],function(e,t,r,n,i,o,a){"use strict"
|
||
e.setEngineParent=e.getEngineParent=e.EngineInstance=e.Engine=e.Resolver=e.ApplicationInstance=e.Application=void 0,Object.defineProperty(e,"Application",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"ApplicationInstance",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"Resolver",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"Engine",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"EngineInstance",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"getEngineParent",{enumerable:!0,get:function(){return a.getEngineParent}}),Object.defineProperty(e,"setEngineParent",{enumerable:!0,get:function(){return a.setEngineParent}})}),e("ember-application/initializers/dom-templates",["require","ember-glimmer","ember-environment","ember-application/system/application"],function(e,t,r,n){"use strict"
|
||
var i=function(){}
|
||
n.default.initializer({name:"domTemplates",initialize:function(){var n=void 0
|
||
r.environment.hasDOM&&(0,e.has)("ember-template-compiler/system/bootstrap")&&(i=(0,e.default)("ember-template-compiler/system/bootstrap").default,n=document),i({context:n,hasTemplate:t.hasTemplate,setTemplate:t.setTemplate})}})}),e("ember-application/system/application-instance",["exports","ember-utils","ember-metal","ember-environment","ember-views","ember-application/system/engine-instance","ember-glimmer"],function(e,t,r,n,i,o,a){"use strict"
|
||
var s=o.default.extend({application:null,customEvents:null,rootElement:null,init:function(){this._super.apply(this,arguments),this.application._watchInstance(this),this.register("-application-instance:main",this,{instantiate:!1})},_bootSync:function(e){var t
|
||
return this._booted?this:(e=new u(e),this.setupRegistry(e),e.rootElement?this.rootElement=e.rootElement:this.rootElement=this.application.rootElement,e.location&&(t=(0,r.get)(this,"router"),(0,r.set)(t,"location",e.location)),this.application.runInstanceInitializers(this),e.isInteractive&&this.setupEventDispatcher(),this._booted=!0,this)},setupRegistry:function(e){this.constructor.setupRegistry(this.__registry__,e)},router:(0,r.computed)(function(){return this.lookup("router:main")}).readOnly(),didCreateRootView:function(e){e.appendTo(this.rootElement)},startRouting:function(){(0,r.get)(this,"router").startRouting(),this._didSetupRouter=!0},setupRouter:function(){this._didSetupRouter||(this._didSetupRouter=!0,(0,r.get)(this,"router").setupRouter())},handleURL:function(e){var t=(0,r.get)(this,"router")
|
||
return this.setupRouter(),t.handleURL(e)},setupEventDispatcher:function(){var e=this.lookup("event_dispatcher:main"),n=(0,r.get)(this.application,"customEvents"),i=(0,r.get)(this,"customEvents"),o=(0,t.assign)({},n,i)
|
||
return e.setup(o,this.rootElement),e},getURL:function(){return(0,r.get)(this,"router.url")},visit:function(e){var t=this
|
||
this.setupRouter()
|
||
var n=this.__container__.lookup("-environment:main"),i=(0,r.get)(this,"router"),o=function(){return n.options.shouldRender?(0,a.renderSettled)().then(function(){return t}):t},s=function(e){if(e.error)throw e.error
|
||
if("TransitionAborted"===e.name&&i._routerMicrolib.activeTransition)return i._routerMicrolib.activeTransition.then(o,s)
|
||
throw"TransitionAborted"===e.name?new Error(e.message):e},u=(0,r.get)(i,"location")
|
||
return u.setURL(e),i.handleURL(u.getURL()).then(o,s)},willDestroy:function(){this._super.apply(this,arguments),this.application._unwatchInstance(this)}})
|
||
function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
||
this.jQuery=i.jQuery,this.isInteractive=n.environment.hasDOM,void 0!==e.isBrowser?this.isBrowser=!!e.isBrowser:this.isBrowser=n.environment.hasDOM,this.isBrowser||(this.jQuery=null,this.isInteractive=!1,this.location="none"),void 0!==e.shouldRender?this.shouldRender=!!e.shouldRender:this.shouldRender=!0,this.shouldRender||(this.jQuery=null,this.isInteractive=!1),e.document?this.document=e.document:this.document="undefined"!=typeof document?document:null,e.rootElement&&(this.rootElement=e.rootElement),void 0!==e.location&&(this.location=e.location),void 0!==e.jQuery&&(this.jQuery=e.jQuery),void 0!==e.isInteractive&&(this.isInteractive=!!e.isInteractive)}s.reopenClass({setupRegistry:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
t.toEnvironment||(t=new u(t)),e.register("-environment:main",t.toEnvironment(),{instantiate:!1}),e.register("service:-document",t.document,{instantiate:!1}),this._super(e,t)}}),u.prototype.toEnvironment=function(){var e=(0,t.assign)({},n.environment)
|
||
return e.hasDOM=this.isBrowser,e.isInteractive=this.isInteractive,e.options=this,e},e.default=s}),e("ember-application/system/application",["exports","ember-babel","ember-utils","ember-environment","ember-debug","ember-metal","ember-runtime","ember-views","ember-routing","ember-application/system/application-instance","container","ember-application/system/engine","ember-glimmer"],function(e,t,r,n,i,o,a,s,u,c,l,f,h){"use strict"
|
||
var d=(0,t.taggedTemplateLiteralLoose)(["-bucket-cache:main"],["-bucket-cache:main"]),p=!1,m=f.default.extend({rootElement:"body",eventDispatcher:null,customEvents:null,autoboot:!0,_globalsMode:!0,_applicationInstances:null,init:function(){this._super.apply(this,arguments),this.$||(this.$=s.jQuery),p||(p=!0,n.environment.hasDOM&&!s.jQueryDisabled&&o.libraries.registerCoreLibrary("jQuery",(0,s.jQuery)().jquery)),this._readinessDeferrals=1,this._booted=!1,this._applicationInstances=[],this.autoboot=this._globalsMode=!!this.autoboot,this._globalsMode&&this._prepareForGlobalsMode(),this.autoboot&&this.waitForDOMReady()},buildInstance:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
||
return e.base=this,e.application=this,c.default.create(e)},_watchInstance:function(e){this._applicationInstances.push(e)},_unwatchInstance:function(e){var t=this._applicationInstances.indexOf(e)
|
||
t>-1&&this._applicationInstances.splice(t,1)},_prepareForGlobalsMode:function(){this.Router=(this.Router||u.Router).extend(),this._buildDeprecatedInstance()},_buildDeprecatedInstance:function(){var e=this.buildInstance()
|
||
this.__deprecatedInstance__=e,this.__container__=e.__container__},waitForDOMReady:function(){!this.$||this.$.isReady?o.run.schedule("actions",this,"domReady"):this.$().ready(o.run.bind(this,"domReady"))},domReady:function(){this.isDestroyed||this._bootSync()},deferReadiness:function(){this._readinessDeferrals++},advanceReadiness:function(){this._readinessDeferrals--,0===this._readinessDeferrals&&o.run.once(this,this.didBecomeReady)},boot:function(){if(this._bootPromise)return this._bootPromise
|
||
try{this._bootSync()}catch(e){}return this._bootPromise},_bootSync:function(){if(!this._booted){var e=this._bootResolver=a.RSVP.defer()
|
||
this._bootPromise=e.promise
|
||
try{this.runInitializers(),(0,a.runLoadHooks)("application",this),this.advanceReadiness()}catch(t){throw e.reject(t),t}}},reset:function(){var e=this.__deprecatedInstance__
|
||
this._readinessDeferrals=1,this._bootPromise=null,this._bootResolver=null,this._booted=!1,o.run.join(this,function(){(0,o.run)(e,"destroy"),this._buildDeprecatedInstance(),o.run.schedule("actions",this,"_bootSync")})},didBecomeReady:function(){var e
|
||
try{(0,i.isTesting)()||(a.Namespace.processAll(),(0,a.setNamespaceSearchDisabled)(!0)),this.autoboot&&(e=void 0,(e=this._globalsMode?this.__deprecatedInstance__:this.buildInstance())._bootSync(),this.ready(),e.startRouting()),this._bootResolver.resolve(this),this._booted=!0}catch(e){throw this._bootResolver.reject(e),e}},ready:function(){return this},willDestroy:function(){this._super.apply(this,arguments),(0,a.setNamespaceSearchDisabled)(!1),this._booted=!1,this._bootPromise=null,this._bootResolver=null,a._loaded.application===this&&(a._loaded.application=void 0),this._applicationInstances.length&&(this._applicationInstances.forEach(function(e){return e.destroy()}),this._applicationInstances.length=0)},visit:function(e,t){var r=this
|
||
return this.boot().then(function(){var n=r.buildInstance()
|
||
return n.boot(t).then(function(){return n.visit(e)}).catch(function(e){throw(0,o.run)(n,"destroy"),e})})}})
|
||
m.reopenClass({buildRegistry:function(){!(arguments.length>1&&void 0!==arguments[1])||arguments[1]
|
||
var e=this._super.apply(this,arguments)
|
||
return function(e){e.register("router:main",u.Router.extend()),e.register("-view-registry:main",{create:function(){return(0,r.dictionary)(null)}}),e.register("route:basic",u.Route),e.register("event_dispatcher:main",s.EventDispatcher),e.injection("router:main","namespace","application:main"),e.register("location:auto",u.AutoLocation),e.register("location:hash",u.HashLocation),e.register("location:history",u.HistoryLocation),e.register("location:none",u.NoneLocation),e.register((0,l.privatize)(d),u.BucketCache),e.register("service:router",u.RouterService),e.injection("service:router","_router","router:main")}(e),(0,h.setupApplicationRegistry)(e),e}}),e.default=m}),e("ember-application/system/engine-instance",["exports","ember-babel","ember-utils","ember-runtime","ember-debug","container","ember-application/system/engine-parent"],function(e,t,r,n,i,o,a){"use strict"
|
||
var s=(0,t.taggedTemplateLiteralLoose)(["-bucket-cache:main"],["-bucket-cache:main"]),u=(0,t.taggedTemplateLiteralLoose)(["template-options:main"],["template-options:main"]),c=n.Object.extend(n.RegistryProxyMixin,n.ContainerProxyMixin,{base:null,init:function(){this._super.apply(this,arguments),(0,r.guidFor)(this)
|
||
var e=this.base
|
||
e||(e=this.application,this.base=e)
|
||
var t=this.__registry__=new o.Registry({fallback:e.__registry__})
|
||
this.__container__=t.container({owner:this}),this._booted=!1},boot:function(e){var t=this
|
||
return this._bootPromise?this._bootPromise:(this._bootPromise=new n.RSVP.Promise(function(r){return r(t._bootSync(e))}),this._bootPromise)},_bootSync:function(e){return this._booted?this:(this.cloneParentDependencies(),this.setupRegistry(e),this.base.runInstanceInitializers(this),this._booted=!0,this)},setupRegistry:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.__container__.lookup("-environment:main")
|
||
this.constructor.setupRegistry(this.__registry__,e)},unregister:function(e){this.__container__.reset(e),this._super.apply(this,arguments)},buildChildEngineInstance:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.lookup("engine:"+e)
|
||
if(!r)throw new i.Error("You attempted to mount the engine '"+e+"', but it is not registered with its parent.")
|
||
var n=r.buildInstance(t)
|
||
return(0,a.setEngineParent)(n,this),n},cloneParentDependencies:function(){var e=this,t=(0,a.getEngineParent)(this);["route:basic","service:-routing","service:-glimmer-environment"].forEach(function(r){return e.register(r,t.resolveRegistration(r))})
|
||
var r=t.lookup("-environment:main")
|
||
this.register("-environment:main",r,{instantiate:!1})
|
||
var n=["router:main",(0,o.privatize)(s),"-view-registry:main","renderer:-"+(r.isInteractive?"dom":"inert"),"service:-document",(0,o.privatize)(u)]
|
||
r.isInteractive&&n.push("event_dispatcher:main"),n.forEach(function(r){return e.register(r,t.lookup(r),{instantiate:!1})}),this.inject("view","_environment","-environment:main"),this.inject("route","_environment","-environment:main")}})
|
||
c.reopenClass({setupRegistry:function(e,t){t&&(e.injection("view","_environment","-environment:main"),e.injection("route","_environment","-environment:main"),t.isInteractive?(e.injection("view","renderer","renderer:-dom"),e.injection("component","renderer","renderer:-dom")):(e.injection("view","renderer","renderer:-inert"),e.injection("component","renderer","renderer:-inert")))}}),e.default=c}),e("ember-application/system/engine-parent",["exports","ember-utils"],function(e,t){"use strict"
|
||
e.ENGINE_PARENT=void 0,e.getEngineParent=function(e){return e[r]},e.setEngineParent=function(e,t){e[r]=t}
|
||
var r=e.ENGINE_PARENT=(0,t.symbol)("ENGINE_PARENT")}),e("ember-application/system/engine",["exports","ember-babel","ember-utils","ember-runtime","container","dag-map","ember-debug","ember-metal","ember-application/system/resolver","ember-application/system/engine-instance","ember-routing","ember-extension-support","ember-views","ember-glimmer"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d){"use strict"
|
||
var p=(0,t.taggedTemplateLiteralLoose)(["-bucket-cache:main"],["-bucket-cache:main"])
|
||
var m=n.Namespace.extend(n.RegistryProxyMixin,{init:function(){this._super.apply(this,arguments),this.buildRegistry()},_initializersRan:!1,ensureInitializers:function(){this._initializersRan||(this.runInitializers(),this._initializersRan=!0)},buildInstance:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
||
return this.ensureInitializers(),e.base=this,c.default.create(e)},buildRegistry:function(){return this.__registry__=this.constructor.buildRegistry(this)},initializer:function(e){this.constructor.initializer(e)},instanceInitializer:function(e){this.constructor.instanceInitializer(e)},runInitializers:function(){var e=this
|
||
this._runInitializer("initializers",function(t,r){r.initialize(e)})},runInstanceInitializers:function(e){this._runInitializer("instanceInitializers",function(t,r){r.initialize(e)})},_runInitializer:function(e,t){var r,n=(0,s.get)(this.constructor,e),i=function(e){var t=[]
|
||
for(var r in e)t.push(r)
|
||
return t}(n),a=new o.default,u=void 0
|
||
for(r=0;r<i.length;r++)u=n[i[r]],a.add(u.name,u,u.before,u.after)
|
||
a.topsort(t)}})
|
||
function y(e,t){return function(t){var r
|
||
void 0!==this.superclass[e]&&this.superclass[e]===this[e]&&((r={})[e]=Object.create(this[e]),this.reopenClass(r)),this[e][t.name]=t}}m.reopenClass({initializers:Object.create(null),instanceInitializers:Object.create(null),initializer:y("initializers","initializer"),instanceInitializer:y("instanceInitializers","instance initializer"),buildRegistry:function(e){var t=new i.Registry({resolver:function(e){return(e.get("Resolver")||u.default).create({namespace:e})}(e)})
|
||
return t.set=s.set,t.register("application:main",e,{instantiate:!1}),function(e){e.optionsForType("component",{singleton:!1}),e.optionsForType("view",{singleton:!1}),e.register("controller:basic",n.Controller,{instantiate:!1}),e.injection("view","_viewRegistry","-view-registry:main"),e.injection("renderer","_viewRegistry","-view-registry:main"),e.injection("event_dispatcher:main","_viewRegistry","-view-registry:main"),e.injection("route","_topLevelViewTemplate","template:-outlet"),e.injection("view:-outlet","namespace","application:main"),e.injection("controller","target","router:main"),e.injection("controller","namespace","application:main"),e.injection("router","_bucketCache",(0,i.privatize)(p)),e.injection("route","_bucketCache",(0,i.privatize)(p)),e.injection("route","_router","router:main"),e.register("service:-routing",l.RoutingService),e.injection("service:-routing","router","router:main"),e.register("resolver-for-debugging:main",e.resolver,{instantiate:!1}),e.injection("container-debug-adapter:main","resolver","resolver-for-debugging:main"),e.injection("data-adapter:main","containerDebugAdapter","container-debug-adapter:main"),e.register("container-debug-adapter:main",f.ContainerDebugAdapter),e.register("component-lookup:main",h.ComponentLookup)}(t),(0,d.setupEngineRegistry)(t),t},resolver:null,Resolver:null}),e.default=m}),e("ember-application/system/resolver",["exports","ember-utils","ember-metal","ember-debug","ember-runtime","ember-application/utils/validate-type","ember-glimmer"],function(e,t,r,n,i,o,a){"use strict"
|
||
e.Resolver=void 0,e.Resolver=i.Object.extend({namespace:null,normalize:null,resolve:null,parseName:null,lookupDescription:null,makeToString:null,resolveOther:null,_logLookup:null})
|
||
var s=i.Object.extend({namespace:null,init:function(){this._parseNameCache=(0,t.dictionary)(null)},normalize:function(e){var t=e.split(":"),r=t[0],n=t[1]
|
||
return"template"!==r?r+":"+n.replace(/(\.|_|-)./g,function(e){return e.charAt(1).toUpperCase()}):e},resolve:function(e){var t=this.parseName(e),r=t.resolveMethodName,n=void 0
|
||
return this[r]&&(n=this[r](t)),(n=n||this.resolveOther(t))&&(0,o.default)(n,t),n},parseName:function(e){return this._parseNameCache[e]||(this._parseNameCache[e]=this._parseName(e))},_parseName:function(e){var t,n,o=e.split(":"),a=o[0],s=o[1],u=s,c=(0,r.get)(this,"namespace"),l=u.lastIndexOf("/"),f=-1!==l?u.slice(0,l):null
|
||
"template"!==a&&-1!==l&&(u=(t=u.split("/"))[t.length-1],n=i.String.capitalize(t.slice(0,-1).join(".")),c=i.Namespace.byName(n))
|
||
var h="main"===s?"Main":i.String.classify(a)
|
||
if(!u||!a)throw new TypeError("Invalid fullName: `"+e+"`, must be of the form `type:name` ")
|
||
return{fullName:e,type:a,fullNameWithoutType:s,dirname:f,name:u,root:c,resolveMethodName:"resolve"+h}},lookupDescription:function(e){var t=this.parseName(e),r=void 0
|
||
return"template"===t.type?"template at "+t.fullNameWithoutType.replace(/\./g,"/"):(r=t.root+"."+i.String.classify(t.name).replace(/\./g,""),"model"!==t.type&&(r+=i.String.classify(t.type)),r)},makeToString:function(e){return e.toString()},useRouterNaming:function(e){"basic"===e.name?e.name="":e.name=e.name.replace(/\./g,"_")},resolveTemplate:function(e){var t=e.fullNameWithoutType.replace(/\./g,"/")
|
||
return(0,a.getTemplate)(t)||(0,a.getTemplate)(i.String.decamelize(t))},resolveView:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveController:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveRoute:function(e){return this.useRouterNaming(e),this.resolveOther(e)},resolveModel:function(e){var t=i.String.classify(e.name)
|
||
return(0,r.get)(e.root,t)},resolveHelper:function(e){return this.resolveOther(e)},resolveOther:function(e){var t=i.String.classify(e.name)+i.String.classify(e.type)
|
||
return(0,r.get)(e.root,t)},resolveMain:function(e){var t=i.String.classify(e.type)
|
||
return(0,r.get)(e.root,t)},knownForType:function(e){var n,o,a=(0,r.get)(this,"namespace"),s=i.String.classify(e),u=new RegExp(s+"$"),c=(0,t.dictionary)(null),l=Object.keys(a)
|
||
for(n=0;n<l.length;n++)o=l[n],u.test(o)&&(c[this.translateToContainerFullname(e,o)]=!0)
|
||
return c},translateToContainerFullname:function(e,t){var r=i.String.classify(e),n=t.slice(0,-1*r.length)
|
||
return e+":"+i.String.dasherize(n)}})
|
||
e.default=s}),e("ember-application/utils/validate-type",["exports","ember-debug"],function(e,t){"use strict"
|
||
e.default=function(e,t){var n=r[t.type]
|
||
if(n)n[1],n[2]}
|
||
var r={route:["assert","isRouteFactory","Ember.Route"],component:["deprecate","isComponentFactory","Ember.Component"],view:["deprecate","isViewFactory","Ember.View"],service:["deprecate","isServiceFactory","Ember.Service"]}}),e("ember-babel",["exports"],function(e){"use strict"
|
||
function t(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t){for(var r=Object.getOwnPropertyNames(t),n=0;n<r.length;n++){var i=r[n],o=Object.getOwnPropertyDescriptor(t,i)
|
||
o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}e.inherits=function(e,t){e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))},e.taggedTemplateLiteralLoose=function(e,t){return e.raw=t,e},e.createClass=function(e,r,n){r&&t(e.prototype,r)
|
||
n&&t(e,n)
|
||
return e},e.defaults=r
|
||
e.possibleConstructorReturn=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?e:t},e.slice=Array.prototype.slice}),e("ember-console",["exports"],function(e){"use strict"
|
||
e.default={log:function(){var e
|
||
return(e=console).log.apply(e,arguments)},warn:function(){var e
|
||
return(e=console).warn.apply(e,arguments)},error:function(){var e
|
||
return(e=console).error.apply(e,arguments)},info:function(){var e
|
||
return(e=console).info.apply(e,arguments)},debug:function(){var e,t
|
||
return console.debug?(t=console).debug.apply(t,arguments):(e=console).info.apply(e,arguments)},assert:function(){var e
|
||
return(e=console).assert.apply(e,arguments)}}}),e("ember-debug/deprecate",["exports","ember-debug/error","ember-console","ember-environment","ember-debug/index","ember-debug/handlers"],function(e){"use strict"
|
||
e.missingOptionsUntilDeprecation=e.missingOptionsIdDeprecation=e.missingOptionsDeprecation=e.registerHandler=void 0,e.default=void 0,e.registerHandler=function(){},e.missingOptionsDeprecation=void 0,e.missingOptionsIdDeprecation=void 0,e.missingOptionsUntilDeprecation=void 0}),e("ember-debug/error",["exports","ember-babel"],function(e,t){"use strict"
|
||
var r=function(e){function r(n){var i,o=(0,t.possibleConstructorReturn)(this,e.call(this))
|
||
if(!(o instanceof r))return i=new r(n),(0,t.possibleConstructorReturn)(o,i)
|
||
var a=Error.call(o,n)
|
||
return o.stack=a.stack,o.description=a.description,o.fileName=a.fileName,o.lineNumber=a.lineNumber,o.message=a.message,o.name=a.name,o.number=a.number,o.code=a.code,o}return(0,t.inherits)(r,e),r}(function(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t}(Error))
|
||
e.default=r}),e("ember-debug/features",["exports","ember-environment","ember/features"],function(e,t,r){"use strict"
|
||
e.default=function(e){var r=n[e]
|
||
return!0===r||!1===r||void 0===r?r:!!t.ENV.ENABLE_OPTIONAL_FEATURES}
|
||
var n=r.FEATURES}),e("ember-debug/handlers",["exports"],function(e){"use strict"
|
||
e.HANDLERS={},e.registerHandler=function(){},e.invoke=function(){}})
|
||
e("ember-debug/index",["exports","ember-debug/warn","ember-debug/deprecate","ember-debug/features","ember-debug/error","ember-debug/testing","ember-environment","ember-console","ember/features"],function(e,t,r,n,i,o,a,s,u){"use strict"
|
||
e._warnIfUsingStrippedFeatureFlags=e.getDebugFunction=e.setDebugFunction=e.deprecateFunc=e.runInDebug=e.debugFreeze=e.debugSeal=e.deprecate=e.debug=e.warn=e.info=e.assert=e.setTesting=e.isTesting=e.Error=e.isFeatureEnabled=e.registerDeprecationHandler=e.registerWarnHandler=void 0,Object.defineProperty(e,"registerWarnHandler",{enumerable:!0,get:function(){return t.registerHandler}}),Object.defineProperty(e,"registerDeprecationHandler",{enumerable:!0,get:function(){return r.registerHandler}}),Object.defineProperty(e,"isFeatureEnabled",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"Error",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"isTesting",{enumerable:!0,get:function(){return o.isTesting}}),Object.defineProperty(e,"setTesting",{enumerable:!0,get:function(){return o.setTesting}})
|
||
u.DEFAULT_FEATURES,u.FEATURES
|
||
var c=function(){}
|
||
e.assert=c,e.info=c,e.warn=c,e.debug=c,e.deprecate=c,e.debugSeal=c,e.debugFreeze=c,e.runInDebug=c,e.deprecateFunc=function(){return arguments[arguments.length-1]},e.setDebugFunction=c,e.getDebugFunction=c,e._warnIfUsingStrippedFeatureFlags=void 0}),e("ember-debug/testing",["exports"],function(e){"use strict"
|
||
e.isTesting=function(){return t},e.setTesting=function(e){t=!!e}
|
||
var t=!1}),e("ember-debug/warn",["exports","ember-environment","ember-console","ember-debug/deprecate","ember-debug/index","ember-debug/handlers"],function(e){"use strict"
|
||
e.missingOptionsDeprecation=e.missingOptionsIdDeprecation=e.registerHandler=void 0,e.default=function(){},e.registerHandler=function(){},e.missingOptionsIdDeprecation=void 0,e.missingOptionsDeprecation=void 0}),e("ember-environment",["exports"],function(e){"use strict"
|
||
function t(e){return e&&e.Object===Object?e:void 0}var r,n=t((r="object"==typeof global&&global)&&void 0===r.nodeType?r:void 0)||t("object"==typeof self&&self)||t("object"==typeof window&&window)||mainContext||new Function("return this")()
|
||
function i(e){return!1!==e}function o(e){return!0===e}var a,s="object"==typeof n.EmberENV&&n.EmberENV||"object"==typeof n.ENV&&n.ENV||{}
|
||
s.ENABLE_ALL_FEATURES&&(s.ENABLE_OPTIONAL_FEATURES=!0),s.EXTEND_PROTOTYPES=!1===(a=s.EXTEND_PROTOTYPES)?{String:!1,Array:!1,Function:!1}:a&&!0!==a?{String:i(a.String),Array:i(a.Array),Function:i(a.Function)}:{String:!0,Array:!0,Function:!0},s.LOG_STACKTRACE_ON_DEPRECATION=i(s.LOG_STACKTRACE_ON_DEPRECATION),s.LOG_VERSION=i(s.LOG_VERSION),s.LOG_BINDINGS=o(s.LOG_BINDINGS),s.RAISE_ON_DEPRECATION=o(s.RAISE_ON_DEPRECATION),s._APPLICATION_TEMPLATE_WRAPPER=i(s._APPLICATION_TEMPLATE_WRAPPER),s._TEMPLATE_ONLY_GLIMMER_COMPONENTS=o(s._TEMPLATE_ONLY_GLIMMER_COMPONENTS)
|
||
var u="undefined"!=typeof window&&window===n&&window.document&&window.document.createElement&&!s.disableBrowserEnvironment,c=n.Ember||{},l={imports:c.imports||n,exports:c.exports||n,lookup:c.lookup||n},f=u?{hasDOM:!0,isChrome:!!window.chrome&&!window.opera,isFirefox:"undefined"!=typeof InstallTrigger,location:window.location,history:window.history,userAgent:window.navigator.userAgent,window:window}:{hasDOM:!1,isChrome:!1,isFirefox:!1,location:null,history:null,userAgent:"Lynx (textmode)",window:null}
|
||
e.ENV=s,e.context=l,e.environment=f}),e("ember-extension-support/container_debug_adapter",["exports","ember-runtime"],function(e,t){"use strict"
|
||
e.default=t.Object.extend({resolver:null,canCatalogEntriesByType:function(e){return"model"!==e&&"template"!==e},catalogEntriesByType:function(e){var r=(0,t.A)(t.Namespace.NAMESPACES),n=(0,t.A)(),i=new RegExp(t.String.classify(e)+"$")
|
||
return r.forEach(function(e){var r
|
||
for(var o in e)e.hasOwnProperty(o)&&i.test(o)&&(r=e[o],"class"===(0,t.typeOf)(r)&&n.push(t.String.dasherize(o.replace(i,""))))}),n}})}),e("ember-extension-support/data_adapter",["exports","ember-utils","ember-metal","ember-runtime"],function(e,t,r,n){"use strict"
|
||
e.default=n.Object.extend({init:function(){this._super.apply(this,arguments),this.releaseMethods=(0,n.A)()},containerDebugAdapter:void 0,attributeLimit:3,acceptsModelName:!0,releaseMethods:(0,n.A)(),getFilters:function(){return(0,n.A)()},watchModelTypes:function(e,t){var r=this,i=this.getModelTypes(),o=(0,n.A)()
|
||
e(i.map(function(e){var n=e.klass,i=r.wrapModelType(n,e.name)
|
||
return o.push(r.observeModelType(e.name,t)),i}))
|
||
var a=function(){o.forEach(function(e){return e()}),r.releaseMethods.removeObject(a)}
|
||
return this.releaseMethods.pushObject(a),a},_nameToClass:function(e){var r
|
||
return"string"==typeof e&&(e=(r=(0,t.getOwner)(this).factoryFor("model:"+e))&&r.class),e},watchRecords:function(e,t,i,o){var a=this,s=(0,n.A)(),u=this._nameToClass(e),c=this.getRecords(u,e),l=void 0
|
||
function f(e){i([e])}var h=c.map(function(e){return s.push(a.observeRecord(e,f)),a.wrapRecord(e)}),d={didChange:function(e,n,i,u){var c,l,h
|
||
for(c=n;c<n+u;c++)l=(0,r.objectAt)(e,c),h=a.wrapRecord(l),s.push(a.observeRecord(l,f)),t([h])
|
||
i&&o(n,i)},willChange:function(){return this}}
|
||
return(0,n.addArrayObserver)(c,this,d),l=function(){s.forEach(function(e){return e()}),(0,n.removeArrayObserver)(c,a,d),a.releaseMethods.removeObject(l)},t(h),this.releaseMethods.pushObject(l),l},willDestroy:function(){this._super.apply(this,arguments),this.releaseMethods.forEach(function(e){return e()})},detect:function(){return!1},columnsForType:function(){return(0,n.A)()},observeModelType:function(e,t){var i=this,o=this._nameToClass(e),a=this.getRecords(o,e)
|
||
function s(){t([this.wrapModelType(o,e)])}var u={didChange:function(e,t,n,i){(n>0||i>0)&&r.run.scheduleOnce("actions",this,s)},willChange:function(){return this}}
|
||
return(0,n.addArrayObserver)(a,this,u),function(){return(0,n.removeArrayObserver)(a,i,u)}},wrapModelType:function(e,t){var n=this.getRecords(e,t)
|
||
return{name:t,count:(0,r.get)(n,"length"),columns:this.columnsForType(e),object:e}},getModelTypes:function(){var e=this,t=this.get("containerDebugAdapter"),r=void 0
|
||
return r=t.canCatalogEntriesByType("model")?t.catalogEntriesByType("model"):this._getObjectsOnNamespaces(),r=(0,n.A)(r).map(function(t){return{klass:e._nameToClass(t),name:t}}),r=(0,n.A)(r).filter(function(t){return e.detect(t.klass)}),(0,n.A)(r)},_getObjectsOnNamespaces:function(){var e=this,t=(0,n.A)(n.Namespace.NAMESPACES),r=(0,n.A)()
|
||
return t.forEach(function(t){var i
|
||
for(var o in t)t.hasOwnProperty(o)&&e.detect(t[o])&&(i=n.String.dasherize(o),r.push(i))}),r},getRecords:function(){return(0,n.A)()},wrapRecord:function(e){var t={object:e}
|
||
return t.columnValues=this.getRecordColumnValues(e),t.searchKeywords=this.getRecordKeywords(e),t.filterValues=this.getRecordFilterValues(e),t.color=this.getRecordColor(e),t},getRecordColumnValues:function(){return{}},getRecordKeywords:function(){return(0,n.A)()},getRecordFilterValues:function(){return{}},getRecordColor:function(){return null},observeRecord:function(){return function(){}}})}),e("ember-extension-support/index",["exports","ember-extension-support/data_adapter","ember-extension-support/container_debug_adapter"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"DataAdapter",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"ContainerDebugAdapter",{enumerable:!0,get:function(){return r.default}})}),e("ember-glimmer",["exports","@glimmer/runtime","@glimmer/node","ember-babel","@glimmer/reference","ember-debug","ember-metal","ember-utils","ember-runtime","@glimmer/opcode-compiler","ember-views","ember-environment","node-module","rsvp","container","@glimmer/util","@glimmer/wire-format","@glimmer/program","ember-console","ember-routing"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v){"use strict"
|
||
e.NodeDOMTreeConstruction=e.DOMTreeConstruction=e.DOMChanges=e.OutletView=e.DebugStack=e.iterableFor=e.UpdatableReference=e.AbstractComponentManager=e._experimentalMacros=e._registerMacros=e.setupApplicationRegistry=e.setupEngineRegistry=e.setTemplates=e.getTemplates=e.hasTemplate=e.setTemplate=e.getTemplate=e.renderSettled=e._resetRenderers=e.InteractiveRenderer=e.InertRenderer=e.Renderer=e.isHTMLSafe=e.htmlSafe=e.escapeExpression=e.SafeString=e.Environment=e.helper=e.Helper=e.ROOT_REF=e.Component=e.LinkComponent=e.TextArea=e.TextField=e.Checkbox=e.template=e.RootTemplate=e.INVOKE=void 0,Object.defineProperty(e,"DOMChanges",{enumerable:!0,get:function(){return t.DOMChanges}}),Object.defineProperty(e,"DOMTreeConstruction",{enumerable:!0,get:function(){return t.DOMTreeConstruction}}),Object.defineProperty(e,"NodeDOMTreeConstruction",{enumerable:!0,get:function(){return r.NodeDOMTreeConstruction}})
|
||
var _,w=(0,n.taggedTemplateLiteralLoose)(["template:components/-default"],["template:components/-default"]),S=(0,n.taggedTemplateLiteralLoose)(["component:-default"],["component:-default"]),E=(0,n.taggedTemplateLiteralLoose)(["template:-root"],["template:-root"]),k=(0,n.taggedTemplateLiteralLoose)(["template-options:main"],["template-options:main"]),x=(0,s.symbol)("RECOMPUTE_TAG")
|
||
var C=u.FrameworkObject.extend({init:function(){this._super.apply(this,arguments),this[x]=i.DirtyableTag.create()},recompute:function(){this[x].inner.dirty()}})
|
||
C.reopenClass({isHelperFactory:!0,isSimpleHelper:!1})
|
||
var A=function(){function e(e){this.compute=e,this.isHelperFactory=!0,this.isSimpleHelper=!0}return e.prototype.create=function(){return this},e}()
|
||
function T(e){return new A(e)}function I(e){return!!e&&(!0===e||(!(0,u.isArray)(e)||0!==(0,a.get)(e,"length")))}var P=(0,s.symbol)("UPDATE"),M=function(){function e(){}return e.prototype.get=function(e){return B.create(this,e)},e}(),R=function(e){function t(){var t=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return t._lastRevision=null,t._lastValue=null,t}return(0,n.inherits)(t,e),t.prototype.compute=function(){},t.prototype.value=function(){var e=this.tag,t=this._lastRevision,r=this._lastValue
|
||
return t&&e.validate(t)||(r=this._lastValue=this.compute(),this._lastRevision=e.value()),r},t}(M),O=function(e){function t(t){var r=(0,n.possibleConstructorReturn)(this,e.call(this,t))
|
||
return r.children=Object.create(null),r}return(0,n.inherits)(t,e),t.prototype.get=function(e){var t=this.children[e]
|
||
return void 0===t&&(t=this.children[e]=new N(this.inner,e)),t},t}(i.ConstReference),B=function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.create=function(e,t){return(0,i.isConst)(e)?new N(e.value(),t):new j(e,t)},t.prototype.get=function(e){return new j(this,e)},t}(R),N=function(e){function t(t,r){var i=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return i._parentValue=t,i._propertyKey=r,i.tag=(0,a.tagForProperty)(t,r),i}return(0,n.inherits)(t,e),t.prototype.compute=function(){var e=this._parentValue,t=this._propertyKey
|
||
return(0,a.get)(e,t)},t.prototype[P]=function(e){(0,a.set)(this._parentValue,this._propertyKey,e)},t}(B),j=function(e){function t(t,r){var o=(0,n.possibleConstructorReturn)(this,e.call(this)),a=t.tag,s=i.UpdatableTag.create(i.CONSTANT_TAG)
|
||
return o._parentReference=t,o._parentObjectTag=s,o._propertyKey=r,o.tag=(0,i.combine)([a,s]),o}return(0,n.inherits)(t,e),t.prototype.compute=function(){var e=this._parentReference,t=this._parentObjectTag,r=this._propertyKey,n=e.value()
|
||
t.inner.update((0,a.tagForProperty)(n,r))
|
||
var i=typeof n
|
||
return"string"===i&&"length"===r?n.length:"object"===i&&null!==n||"function"===i?(0,a.get)(n,r):void 0},t.prototype[P]=function(e){var t=this._parentReference.value();(0,a.set)(t,this._propertyKey,e)},t}(B),L=function(e){function t(t){var r=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return r.tag=i.DirtyableTag.create(),r._value=t,r}return(0,n.inherits)(t,e),t.prototype.value=function(){return this._value},t.prototype.update=function(e){e!==this._value&&(this.tag.inner.dirty(),this._value=e)},t}(M),D=function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t}(L),U=function(e){function r(t){var r=(0,n.possibleConstructorReturn)(this,e.call(this,t))
|
||
return r.objectTag=i.UpdatableTag.create(i.CONSTANT_TAG),r.tag=(0,i.combine)([t.tag,r.objectTag]),r}return(0,n.inherits)(r,e),r.create=function(e){var n
|
||
return(0,i.isConst)(e)?(n=e.value(),(0,a.isProxy)(n)?new N(n,"isTruthy"):t.PrimitiveReference.create(I(n))):new r(e)},r.prototype.toBool=function(e){return(0,a.isProxy)(e)?(this.objectTag.inner.update((0,a.tagForProperty)(e,"isTruthy")),(0,a.get)(e,"isTruthy")):(this.objectTag.inner.update((0,a.tagFor)(e)),I(e))},r}(t.ConditionalReference),F=function(e){function t(t,r){var i=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return i.tag=r.tag,i.helper=t,i.args=r,i}return(0,n.inherits)(t,e),t.create=function(e,r){var n,o
|
||
return(0,i.isConst)(r)?(n=r.positional,o=r.named,K(e(n.value(),o.value()))):new t(e,r)},t.prototype.compute=function(){var e=this.helper,t=this.args,r=t.positional,n=t.named
|
||
return e(r.value(),n.value())},t}(R),z=function(e){function t(t,r){var o=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return o.tag=(0,i.combine)([t[x],r.tag]),o.instance=t,o.args=r,o}return(0,n.inherits)(t,e),t.create=function(e,r){return new t(e,r)},t.prototype.compute=function(){var e=this.instance,t=this.args,r=t.positional,n=t.named,i=r.value(),o=n.value()
|
||
return e.compute(i,o)},t}(R),q=function(e){function t(t,r){var i=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return i.tag=r.tag,i.helper=t,i.args=r,i}return(0,n.inherits)(t,e),t.prototype.compute=function(){return(0,this.helper)(this.args)},t}(R),V=function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.create=function(e){return K(e,!1)},t.prototype.get=function(e){return K((0,a.get)(this.inner,e),!1)},t}(i.ConstReference)
|
||
function H(e,t){var r,n=e
|
||
for(r=0;r<t.length;r++)n=n.get(t[r])
|
||
return n}function K(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]
|
||
return null!==e&&"object"==typeof e?r?new O(e):new V(e):"function"==typeof e?new V(e):t.PrimitiveReference.create(e)}var W=(0,s.symbol)("INVOKE"),G=(0,s.symbol)("ACTION")
|
||
function Y(e){return e}function Q(e,t,r,n,i){var o,s=void 0,u=void 0
|
||
return"function"==typeof r[W]?(s=r,u=r[W]):"string"===(o=typeof r)?(s=t,u=t.actions&&t.actions[r]):"function"===o&&(s=e,u=r),function(){for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
var e,t,r,i={target:s,args:t,label:"@glimmer/closure-action"}
|
||
return(0,a.flaggedInstrument)("interaction.ember-action",i,function(){return a.run.join.apply(a.run,[s,u].concat(n(t)))})}}function X(e){return new $((0,c.templateFactory)(e))}var $=function(){function e(e){this.factory=e,this.id=e.id,this.meta=e.meta}return e.prototype.create=function(e){var t=(0,s.getOwner)(e)
|
||
return this.factory.create(e.options,{owner:t})},e}(),J=X({id:"UYMQEP0l",block:'{"symbols":[],"statements":[[1,[26,"component",[[21,0,[]]],null],false]],"hasEval":false}',meta:{moduleName:"packages/ember-glimmer/lib/templates/root.hbs"}}),Z=(0,s.symbol)("DIRTY_TAG"),ee=(0,s.symbol)("ARGS"),te=(0,s.symbol)("ROOT_REF"),re=(0,s.symbol)("IS_DISPATCHING_ATTRS"),ne=(0,s.symbol)("HAS_BLOCK"),ie=(0,s.symbol)("BOUNDS"),oe=l.CoreView.extend(l.ChildViewsSupport,l.ViewStateSupport,l.ClassNamesSupport,u.TargetActionSupport,l.ActionSupport,l.ViewMixin,((_={isComponent:!0,init:function(){this._super.apply(this,arguments),this[re]=!1,this[Z]=i.DirtyableTag.create(),this[te]=new O(this),this[ie]=null},rerender:function(){this[Z].inner.dirty(),this._super()},__defineNonEnumerable:function(e){this[e.name]=e.descriptor.value}})[a.PROPERTY_DID_CHANGE]=function(e){if(!this[re]){var t=this[ee],r=t&&t[e]
|
||
r&&r[P]&&r[P]((0,a.get)(this,e))}},_.getAttr=function(e){return this.get(e)},_.readDOMAttr=function(e){var r=(0,l.getViewElement)(this),n=r.namespaceURI===t.SVG_NAMESPACE,i=(0,t.normalizeProperty)(r,e),o=i.type,a=i.normalized
|
||
return n?r.getAttribute(a):"attr"===o?r.getAttribute(a):r[a]},_))
|
||
oe.toString=function(){return"@ember/component"},oe.reopenClass({isComponentFactory:!0,positionalParams:[]})
|
||
var ae=X({id:"5jp2oO+o",block:'{"symbols":[],"statements":[],"hasEval":false}',meta:{moduleName:"packages/ember-glimmer/lib/templates/empty.hbs"}}),se=oe.extend({layout:ae,classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","indeterminate","disabled","tabindex","name","autofocus","required","form"],type:"checkbox",disabled:!1,indeterminate:!1,didInsertElement:function(){this._super.apply(this,arguments),(0,a.get)(this,"element").indeterminate=!!(0,a.get)(this,"indeterminate")},change:function(){(0,a.set)(this,"checked",this.element.checked)}})
|
||
se.toString=function(){return"@ember/component/checkbox"}
|
||
var ue=Object.create(null)
|
||
var ce=oe.extend(l.TextSupport,{layout:ae,classNames:["ember-text-field"],tagName:"input",attributeBindings:["accept","autocomplete","autosave","dir","formaction","formenctype","formmethod","formnovalidate","formtarget","height","inputmode","lang","list","type","max","min","multiple","name","pattern","size","step","value","width"],value:"",type:(0,a.computed)({get:function(){return"text"},set:function(e,t){var r="text"
|
||
return function(e){if(e in ue)return ue[e]
|
||
if(!f.environment.hasDOM)return ue[e]=e,e
|
||
var t=document.createElement("input")
|
||
try{t.type=e}catch(e){}return ue[e]=t.type===e}(t)&&(r=t),r}}),size:null,pattern:null,min:null,max:null})
|
||
ce.toString=function(){return"@ember/component/text-field"}
|
||
var le=oe.extend(l.TextSupport,{classNames:["ember-text-area"],layout:ae,tagName:"textarea",attributeBindings:["rows","cols","name","selectionEnd","selectionStart","wrap","lang","dir","value"],rows:null,cols:null})
|
||
le.toString=function(){return"@ember/component/text-area"}
|
||
var fe=X({id:"4GmgUGfN",block:'{"symbols":["&default"],"statements":[[4,"if",[[22,["linkTitle"]]],null,{"statements":[[1,[20,"linkTitle"],false]],"parameters":[]},{"statements":[[13,1]],"parameters":[]}]],"hasEval":false}',meta:{moduleName:"packages/ember-glimmer/lib/templates/link-to.hbs"}}),he=oe.extend({layout:fe,tagName:"a","current-when":null,title:null,rel:null,tabindex:null,target:null,activeClass:"active",loadingClass:"loading",disabledClass:"disabled",replace:!1,attributeBindings:["href","title","rel","tabindex","target"],classNameBindings:["active","loading","disabled","transitioningIn","transitioningOut"],eventName:"click",init:function(){this._super.apply(this,arguments)
|
||
var e=(0,a.get)(this,"eventName")
|
||
this.on(e,this,this._invoke)},_routing:u.inject.service("-routing"),disabled:(0,a.computed)({get:function(){return!1},set:function(e,t){return this._isDisabled=t,!!t&&(0,a.get)(this,"disabledClass")}}),_isActive:function(e){if((0,a.get)(this,"loading"))return!1
|
||
var t,r=(0,a.get)(this,"current-when")
|
||
if("boolean"==typeof r)return r
|
||
var n=!!r
|
||
r=(r=r||(0,a.get)(this,"qualifiedRouteName")).split(" ")
|
||
var i=(0,a.get)(this,"_routing"),o=(0,a.get)(this,"models"),s=(0,a.get)(this,"resolvedQueryParams")
|
||
for(t=0;t<r.length;t++)if(i.isActiveForRoute(o,s,r[t],e,n))return!0
|
||
return!1},active:(0,a.computed)("activeClass","_active",function(){return!!this.get("_active")&&(0,a.get)(this,"activeClass")}),_active:(0,a.computed)("_routing.currentState","attrs.params",function(){var e=(0,a.get)(this,"_routing.currentState")
|
||
return!!e&&this._isActive(e)}),willBeActive:(0,a.computed)("_routing.targetState",function(){var e=(0,a.get)(this,"_routing"),t=(0,a.get)(e,"targetState")
|
||
if((0,a.get)(e,"currentState")!==t)return this._isActive(t)}),transitioningIn:(0,a.computed)("active","willBeActive",function(){return!0===(0,a.get)(this,"willBeActive")&&!(0,a.get)(this,"_active")&&"ember-transitioning-in"}),transitioningOut:(0,a.computed)("active","willBeActive",function(){return!(!1!==(0,a.get)(this,"willBeActive")||!(0,a.get)(this,"_active"))&&"ember-transitioning-out"}),_invoke:function(e){if(!(0,l.isSimpleClick)(e))return!0
|
||
var t=(0,a.get)(this,"preventDefault"),r=(0,a.get)(this,"target")
|
||
if(!1!==t&&(r&&"_self"!==r||e.preventDefault()),!1===(0,a.get)(this,"bubbles")&&e.stopPropagation(),this._isDisabled)return!1
|
||
if((0,a.get)(this,"loading"))return!1
|
||
if(r&&"_self"!==r)return!1
|
||
var n=(0,a.get)(this,"qualifiedRouteName"),i=(0,a.get)(this,"models"),o=(0,a.get)(this,"queryParams.values"),s=(0,a.get)(this,"replace"),u={queryParams:o,routeName:n}
|
||
return(0,a.flaggedInstrument)("interaction.link-to",u,this._generateTransition(u,n,i,o,s)),!1},_generateTransition:function(e,t,r,n,i){var o=(0,a.get)(this,"_routing")
|
||
return function(){e.transition=o.transitionTo(t,r,n,i)}},queryParams:null,qualifiedRouteName:(0,a.computed)("targetRouteName","_routing.currentState",function(){var e=(0,a.get)(this,"params"),t=e.length,r=e[t-1]
|
||
return r&&r.isQueryParams&&t--,(this[ne]?0===t:1===t)?(0,a.get)(this,"_routing.currentRouteName"):(0,a.get)(this,"targetRouteName")}),resolvedQueryParams:(0,a.computed)("queryParams",function(){var e={},t=(0,a.get)(this,"queryParams")
|
||
if(!t)return e
|
||
var r=t.values
|
||
for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])
|
||
return e}),href:(0,a.computed)("models","qualifiedRouteName",function(){if("a"===(0,a.get)(this,"tagName")){var e=(0,a.get)(this,"qualifiedRouteName"),t=(0,a.get)(this,"models")
|
||
if((0,a.get)(this,"loading"))return(0,a.get)(this,"loadingHref")
|
||
var r=(0,a.get)(this,"_routing"),n=(0,a.get)(this,"queryParams.values")
|
||
return r.generateURL(e,t,n)}}),loading:(0,a.computed)("_modelsAreLoaded","qualifiedRouteName",function(){var e=(0,a.get)(this,"qualifiedRouteName")
|
||
if(!(0,a.get)(this,"_modelsAreLoaded")||null===e||void 0===e)return(0,a.get)(this,"loadingClass")}),_modelsAreLoaded:(0,a.computed)("models",function(){var e,t,r=(0,a.get)(this,"models")
|
||
for(e=0;e<r.length;e++)if(null===(t=r[e])||void 0===t)return!1
|
||
return!0}),_getModels:function(e){var t,r,n=e.length-1,i=new Array(n)
|
||
for(t=0;t<n;t++)r=e[t+1],i[t]=r
|
||
return i},loadingHref:"#",didReceiveAttrs:function(){var e=void 0,t=(0,a.get)(this,"params")
|
||
t&&(t=t.slice())
|
||
var r=(0,a.get)(this,"disabledWhen")
|
||
void 0!==r&&this.set("disabled",r),this[ne]||this.set("linkTitle",t.shift()),this.set("targetRouteName",t[0])
|
||
var n=t[t.length-1]
|
||
e=n&&n.isQueryParams?t.pop():{values:{}},this.set("queryParams",e),t.length>1?this.set("models",this._getModels(t)):this.set("models",[])}})
|
||
he.toString=function(){return"@ember/routing/link-component"},he.reopenClass({positionalParams:"params"})
|
||
var de=(0,s.symbol)("EACH_IN")
|
||
function pe(e,t){return function(e){return e&&e[de]}(e)?new we(e,function(e){switch(e){case"@index":case void 0:case null:return me
|
||
case"@identity":return ye
|
||
default:return function(t){return(0,a.get)(t,e)}}}(t)):new Se(e,function(e){switch(e){case"@index":return me
|
||
case"@identity":case void 0:case null:return ye
|
||
default:return function(t){return(0,a.get)(t,e)}}}(t))}function me(e,t){return String(t)}function ye(e){switch(typeof e){case"string":case"number":return String(e)
|
||
default:return(0,s.guidFor)(e)}}var ge=function(){function e(e,t,r){this.array=e,this.length=t,this.keyFor=r,this.position=0,this.seen=Object.create(null)}return e.from=function(e,t){return e.length>0?new this(e,e.length,t):_e},e.prototype.isEmpty=function(){return!1},e.prototype.getMemo=function(e){return e},e.prototype.getValue=function(e){return this.array[e]},e.prototype.next=function(){var e=this.length,t=this.keyFor,r=this.position,n=this.seen
|
||
if(r>=e)return null
|
||
var i=this.getValue(r),o=this.getMemo(r),a=function(e,t){var r=e[t]
|
||
return r>0?(e[t]++,t+"be277757-bbbe-4620-9fcb-213ef433cca2"+r):(e[t]=1,t)}(n,t(i,o))
|
||
return this.position++,{key:a,value:i,memo:o}},e}(),be=function(e){function t(t,r,i){return(0,n.possibleConstructorReturn)(this,e.call(this,t,r,i))}return(0,n.inherits)(t,e),t.from=function(e,t){var r=(0,a.get)(e,"length")
|
||
return r>0?new this(e,r,t):_e},t.prototype.getValue=function(e){return(0,a.objectAt)(this.array,e)},t}(ge),ve=function(e){function t(t,r,i,o){var a=(0,n.possibleConstructorReturn)(this,e.call(this,r,i,o))
|
||
return a.keys=t,a}return(0,n.inherits)(t,e),t.from=function(e,t){var r=Object.keys(e),n=r.length
|
||
return n>0?new this(r,r.map(function(t){return e[t]}),n,t):_e},t.prototype.getMemo=function(e){return this.keys[e]},t}(ge),_e=new(function(){function e(){}return e.prototype.isEmpty=function(){return!0},e.prototype.next=function(){throw new Error("Cannot call next() on an empty iterator")},e}()),we=function(){function e(e,t){this.ref=e,this.keyFor=t
|
||
var r=this.valueTag=i.UpdatableTag.create(i.CONSTANT_TAG)
|
||
this.tag=(0,i.combine)([e.tag,r])}return e.prototype.iterate=function(){var e=this.ref,t=this.keyFor,r=this.valueTag,n=e.value(),i=(0,a.tagFor)(n);(0,a.isProxy)(n)&&(n=(0,u._contentFor)(n)),r.inner.update(i)
|
||
var o=typeof n
|
||
return null===n||"object"!==o&&"function"!==o?_e:ve.from(n,t)},e.prototype.valueReferenceFor=function(e){return new D(e.memo)},e.prototype.updateValueReference=function(e,t){e.update(t.memo)},e.prototype.memoReferenceFor=function(e){return new L(e.value)},e.prototype.updateMemoReference=function(e,t){e.update(t.value)},e}(),Se=function(){function e(e,t){this.ref=e,this.keyFor=t
|
||
var r=this.valueTag=i.UpdatableTag.create(i.CONSTANT_TAG)
|
||
this.tag=(0,i.combine)([e.tag,r])}return e.prototype.iterate=function(){var e,t=this.ref,r=this.keyFor,n=this.valueTag,i=t.value()
|
||
return n.inner.update((0,a.tagForProperty)(i,"[]")),null===i||"object"!=typeof i?_e:Array.isArray(i)?ge.from(i,r):(0,u.isEmberArray)(i)?be.from(i,r):"function"==typeof i.forEach?(e=[],i.forEach(function(t){return e.push(t)}),ge.from(e,r)):_e},e.prototype.valueReferenceFor=function(e){return new L(e.value)},e.prototype.updateValueReference=function(e,t){e.update(t.value)},e.prototype.memoReferenceFor=function(e){return new D(e.memo)},e.prototype.updateMemoReference=function(e,t){e.update(t.memo)},e}(),Ee=function(){function e(e){this.string=e}return e.prototype.toString=function(){return""+this.string},e.prototype.toHTML=function(){return this.toString()},e}(),ke={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},xe=/[&<>"'`=]/,Ce=/[&<>"'`=]/g
|
||
function Ae(e){return ke[e]}function Te(e){return null===e||void 0===e?e="":"string"!=typeof e&&(e=""+e),new Ee(e)}function Ie(e){return null!==e&&"object"==typeof e&&"function"==typeof e.toHTML}var Pe=void 0,Me=void 0
|
||
function Re(e){return Me||(Me=document.createElement("a")),Me.href=e,Me.protocol}function Oe(e){var t=null
|
||
return"string"==typeof e&&(t=Pe.parse(e).protocol),null===t?":":t}var Be=function(e){function t(t){var r=(0,n.possibleConstructorReturn)(this,e.call(this,t))
|
||
return r.owner=t[s.OWNER],r.isInteractive=r.owner.lookup("-environment:main").isInteractive,r.destroyedComponents=[],function(e){var t=void 0
|
||
if(f.environment.hasDOM&&(t=Re.call(e,"foobar:baz")),"foobar:"===t)e.protocolForURL=Re
|
||
else if("object"==typeof URL)Pe=URL,e.protocolForURL=Oe
|
||
else{if(!h.IS_NODE)throw new Error("Could not find valid URL parsing mechanism for URL Sanitization")
|
||
Pe=(0,h.require)("url"),e.protocolForURL=Oe}}(r),r}return(0,n.inherits)(t,e),t.create=function(e){return new this(e)},t.prototype.protocolForURL=function(e){return e},t.prototype._resolveLocalLookupName=function(e,t,r){return r._resolveLocalLookupName(e,t)},t.prototype.lookupComponent=function(e,t){return(0,l.lookupComponent)(t.owner,e,t)},t.prototype.toConditionalReference=function(e){return U.create(e)},t.prototype.iterableFor=function(e,t){return pe(e,t)},t.prototype.scheduleInstallModifier=function(t,r){this.isInteractive&&e.prototype.scheduleInstallModifier.call(this,t,r)},t.prototype.scheduleUpdateModifier=function(t,r){this.isInteractive&&e.prototype.scheduleUpdateModifier.call(this,t,r)},t.prototype.didDestroy=function(e){e.destroy()},t.prototype.begin=function(){this.inTransaction=!0,e.prototype.begin.call(this)},t.prototype.commit=function(){var t,r=this.destroyedComponents
|
||
for(this.destroyedComponents=[],t=0;t<r.length;t++)r[t].destroy()
|
||
try{e.prototype.commit.call(this)}finally{this.inTransaction=!1}},t}(t.Environment),Ne=function(){function e(){this.debugStack=void 0}return e.prototype.prepareArgs=function(){return null},e.prototype.didCreateElement=function(){},e.prototype.didRenderLayout=function(){},e.prototype.didCreate=function(){},e.prototype.update=function(){},e.prototype.didUpdateLayout=function(){},e.prototype.didUpdate=function(){},e}()
|
||
function je(e){return{object:e.name+":"+e.outlet}}var Le={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!1,attributeHook:!1,elementHook:!1},De=function(e){function r(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(r,e),r.prototype.create=function(e,r,n,i){i.outletState=r.ref,void 0===i.rootOutletState&&(i.rootOutletState=i.outletState)
|
||
var o=r.controller
|
||
return{self:void 0===o?t.UNDEFINED_REFERENCE:new O(o),finalize:(0,a._instrumentStart)("render.outlet",je,r)}},r.prototype.layoutFor=function(){throw new Error("Method not implemented.")},r.prototype.getLayout=function(e){var t=e.template.asLayout()
|
||
return{handle:t.compile(),symbolTable:t.symbolTable}},r.prototype.getCapabilities=function(){return Le},r.prototype.getSelf=function(e){return e.self},r.prototype.getTag=function(){return i.CONSTANT_TAG},r.prototype.didRenderLayout=function(e){e.finalize()},r.prototype.getDestructor=function(){return null},r}(Ne),Ue=new De,Fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ue
|
||
this.state=e,this.manager=t}
|
||
function ze(){}var qe=function(){function e(e,t,r,n){this.environment=e,this.component=t,this.args=r,this.finalizer=n,this.classRef=null,this.classRef=null,this.argsRevision=null===r?0:r.tag.value()}return e.prototype.destroy=function(){var e=this.component,t=this.environment
|
||
t.isInteractive&&(e.trigger("willDestroyElement"),e.trigger("willClearRender")),t.destroyedComponents.push(e)},e.prototype.finalize=function(){(0,this.finalizer)(),this.finalizer=ze},e}()
|
||
function Ve(e,t){return e[te].get(t)}function He(e,t){return"attrs"===t[0]&&(t.shift(),1===t.length)?Ve(e,t[0]):H(e[te],t)}function Ke(e){if(null!==e){var t,r,n,i,o=e[0],a=e[1],s=null===o?-1:o.indexOf("class")
|
||
if(-1!==s){if(t=a[s],!Array.isArray(t))return;(r=t[0])!==y.Ops.Get&&r!==y.Ops.MaybeLocal||(i=(n=t[t.length-1])[n.length-1],a[s]=[y.Ops.Helper,"-class",[t,i],null])}}}var We={parse:function(e){var t=e.indexOf(":")
|
||
return-1===t?[e,e.toLowerCase(),!0]:[e.substring(0,t),e.substring(t+1),!1]},install:function(e,r,n,i){var o,s=n[0],u=n[1]
|
||
n[2]
|
||
if("id"===u)return void 0!==(o=(0,a.get)(r,s))&&null!==o||(o=r.elementId),o=t.PrimitiveReference.create(o),void i.setAttribute("id",o,!0,null)
|
||
var c=s.indexOf(".")>-1,l=c?He(r,s.split(".")):Ve(r,s)
|
||
"style"===u&&(l=new Ye(l,Ve(r,"isVisible"))),i.setAttribute(u,l,!1,null)}},Ge=Te("display: none;"),Ye=function(e){function t(t,r){var o=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return o.inner=t,o.isVisible=r,o.tag=(0,i.combine)([t.tag,r.tag]),o}return(0,n.inherits)(t,e),t.prototype.compute=function(){var e,t=this.inner.value()
|
||
return!1!==this.isVisible.value()?t:t?(e=t+" display: none;",Ie(t)?Te(e):e):Ge},t}(i.CachedReference),Qe={install:function(e,t,r){r.setAttribute("style",(0,i.map)(Ve(t,"isVisible"),this.mapStyleValue),!1,null)},mapStyleValue:function(e){return!1===e?Ge:null}},Xe=function(e,r,n,i){var o,a,s,u,c=n.split(":"),l=c[0],f=c[1],h=c[2]
|
||
""===l?i.setAttribute("class",t.PrimitiveReference.create(f),!0,null):(a=(o=l.indexOf(".")>-1)?l.split("."):[],s=o?He(r,a):Ve(r,l),u=void 0,u=void 0===f?new $e(s,o?a[a.length-1]:l):new Je(s,f,h),i.setAttribute("class",u,!1,null))},$e=function(e){function t(t,r){var i=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return i.inner=t,i.path=r,i.tag=t.tag,i.inner=t,i.path=r,i.dasherizedPath=null,i}return(0,n.inherits)(t,e),t.prototype.compute=function(){var e,t=this.inner.value()
|
||
return!0===t?(e=this.path,this.dasherizedPath||(this.dasherizedPath=u.String.dasherize(e))):t||0===t?String(t):null},t}(i.CachedReference),Je=function(e){function t(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return o.inner=t,o.truthy=r,o.falsy=i,o.tag=t.tag,o}return(0,n.inherits)(t,e),t.prototype.compute=function(){var e=this.inner,t=this.truthy,r=this.falsy
|
||
return e.value()?t:r},t}(i.CachedReference)
|
||
function Ze(e){var t,r,n,i,o=e.names,a=e.value(),s=Object.create(null),u=Object.create(null)
|
||
for(s[ee]=u,t=0;t<o.length;t++)r=o[t],n=e.get(r),"function"==typeof(i=a[r])&&i[G]?a[r]=i:n[P]&&(a[r]=new tt(n,i)),u[r]=n,s[r]=i
|
||
return s.attrs=a,s}var et=(0,s.symbol)("REF"),tt=function(){function e(e,t){this[l.MUTABLE_CELL]=!0,this[et]=e,this.value=t}return e.prototype.update=function(e){this[et][P](e)},e}()
|
||
var rt=(0,p.privatize)(w),nt=function(e){function r(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(r,e),r.prototype.getLayout=function(e){return{handle:e.handle,symbolTable:e.symbolTable}},r.prototype.templateFor=function(e,t){var r,n=(0,a.get)(e,"layout")
|
||
if(void 0!==n)return"function"==typeof n.create?t.createTemplate(n,(0,s.getOwner)(e)):n
|
||
var i=(0,s.getOwner)(e),o=(0,a.get)(e,"layoutName")
|
||
return o&&(r=i.lookup("template:"+o))?r:i.lookup(rt)},r.prototype.getDynamicLayout=function(e,t){var r=e.component,n=this.templateFor(r,t).asWrappedLayout()
|
||
return{handle:n.compile(),symbolTable:n.symbolTable}},r.prototype.getTagName=function(e){var t=e.component
|
||
return""===t.tagName?null:t&&t.tagName||"div"},r.prototype.getCapabilities=function(e){return e.capabilities},r.prototype.prepareArgs=function(e,t){var r,n,i,o=e.ComponentClass.class.positionalParams
|
||
if(void 0===o||null===o||0===t.positional.length)return null
|
||
var a=void 0
|
||
if("string"==typeof o)(r={})[o]=t.positional.capture(),a=r,(0,s.assign)(a,t.named.capture().map)
|
||
else{if(!(Array.isArray(o)&&o.length>0))return null
|
||
for(n=Math.min(o.length,t.positional.length),a={},(0,s.assign)(a,t.named.capture().map),i=0;i<n;i++)a[o[i]]=t.positional.at(i)}return{positional:m.EMPTY_ARRAY,named:a}},r.prototype.create=function(e,t,r,n,i,o){var s=n.view,u=t.ComponentClass,c=r.named.capture(),l=Ze(c);(function(e,t){e.named.has("id")&&(t.elementId=t.id)})(r,l),l.parentView=s,l[ne]=o,l._targetObject=i.value(),t.template&&(l.layout=t.template)
|
||
var f=u.create(l),h=(0,a._instrumentStart)("render.component",it,f)
|
||
n.view=f,null!==s&&void 0!==s&&s.appendChild(f),""===f.tagName&&(e.isInteractive&&f.trigger("willRender"),f._transitionTo("hasElement"),e.isInteractive&&f.trigger("willInsertElement"))
|
||
var d=new qe(e,f,c,h)
|
||
return r.named.has("class")&&(d.classRef=r.named.get("class")),e.isInteractive&&""!==f.tagName&&f.trigger("willRender"),d},r.prototype.getSelf=function(e){return e.component[te]},r.prototype.didCreateElement=function(e,r,n){var i,o=e.component,c=e.classRef,f=e.environment;(0,l.setViewElement)(o,r)
|
||
var h=o.attributeBindings,d=o.classNames,p=o.classNameBindings
|
||
n.setAttribute("id",t.PrimitiveReference.create((0,s.guidFor)(o)),!1,null),h&&h.length?function(e,r,n,i){for(var o,a,s,u=[],c=r.length-1;-1!==c;)o=r[c],s=(a=We.parse(o))[1],-1===u.indexOf(s)&&(u.push(s),We.install(e,n,a,i)),c--;-1===u.indexOf("id")&&i.setAttribute("id",t.PrimitiveReference.create(n.elementId),!0,null),-1===u.indexOf("style")&&Qe.install(e,n,i)}(r,h,o,n):(o.elementId&&n.setAttribute("id",t.PrimitiveReference.create(o.elementId),!1,null),Qe.install(r,o,n)),c&&c.value()&&(i=!0===c.value()?new Je(c,u.String.dasherize(c._propertyKey),null):c,n.setAttribute("class",i,!1,null)),d&&d.length&&d.forEach(function(e){n.setAttribute("class",t.PrimitiveReference.create(e),!1,null)}),p&&p.length&&p.forEach(function(e){Xe(r,o,e,n)}),n.setAttribute("class",t.PrimitiveReference.create("ember-view"),!1,null),(0,a.get)(o,"ariaRole")&&n.setAttribute("role",Ve(o,"ariaRole"),!1,null),o._transitionTo("hasElement"),f.isInteractive&&o.trigger("willInsertElement")},r.prototype.didRenderLayout=function(e,t){e.component[ie]=t,e.finalize()},r.prototype.getTag=function(e){var t=e.args,r=e.component
|
||
return t?(0,i.combine)([t.tag,r[Z]]):r[Z]},r.prototype.didCreate=function(e){var t=e.component
|
||
e.environment.isInteractive&&(t._transitionTo("inDOM"),t.trigger("didInsertElement"),t.trigger("didRender"))},r.prototype.update=function(e){var t,r=e.component,n=e.args,i=e.argsRevision,o=e.environment
|
||
e.finalizer=(0,a._instrumentStart)("render.component",ot,r),n&&!n.tag.validate(i)&&(t=Ze(n),e.argsRevision=n.tag.value(),r[re]=!0,r.setProperties(t),r[re]=!1,r.trigger("didUpdateAttrs"),r.trigger("didReceiveAttrs")),o.isInteractive&&(r.trigger("willUpdate"),r.trigger("willRender"))},r.prototype.didUpdateLayout=function(e){e.finalize()},r.prototype.didUpdate=function(e){var t=e.component
|
||
e.environment.isInteractive&&(t.trigger("didUpdate"),t.trigger("didRender"))},r.prototype.getDestructor=function(e){return e},r}(Ne)
|
||
function it(e){return e.instrumentDetails({initialRender:!0})}function ot(e){return e.instrumentDetails({initialRender:!1})}var at={dynamicLayout:!0,dynamicTag:!0,prepareArgs:!0,createArgs:!0,attributeHook:!0,elementHook:!0},st=new nt,ut=function(e){function t(t){var r=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return r.component=t,r}return(0,n.inherits)(t,e),t.prototype.getLayout=function(e,t){var r=this.templateFor(this.component,t).asWrappedLayout()
|
||
return{handle:r.compile(),symbolTable:r.symbolTable}},t.prototype.create=function(e,t,r,n){var i=this.component,o=(0,a._instrumentStart)("render.component",it,i)
|
||
return n.view=i,""===i.tagName&&(e.isInteractive&&i.trigger("willRender"),i._transitionTo("hasElement"),e.isInteractive&&i.trigger("willInsertElement")),new qe(e,i,null,o)},t}(nt),ct={dynamicLayout:!1,dynamicTag:!0,prepareArgs:!1,createArgs:!1,attributeHook:!0,elementHook:!0},lt=function(){function e(e){this.component=e
|
||
var t=new ut(e)
|
||
this.manager=t
|
||
var r=p.FACTORY_FOR.get(e)
|
||
this.state={name:r.fullName.slice(10),capabilities:ct,ComponentClass:r,handle:null}}return e.prototype.getTag=function(e){return e.component[Z]},e}(),ft=a.run.backburner,ht=function(){function e(e,t,r){this.view=e,this.outletState=t,this.rootOutletState=r}return e.prototype.child=function(){return new e(this.view,this.outletState,this.rootOutletState)},e.prototype.get=function(e){return this.outletState},e.prototype.set=function(e,t){return this.outletState=t,t},e}(),dt=function(){function e(e,r,n,i,o,a){var s=this
|
||
this.id=(0,l.getViewId)(e),this.env=r,this.root=e,this.result=void 0,this.shouldReflush=!1,this.destroyed=!1
|
||
var u=this.options={alwaysRevalidate:!1}
|
||
this.render=function(){var e=n.asLayout(),c=e.compile(),l=(0,t.renderMain)(e.options.program,r,i,a,(0,t.clientBuilder)(r,{element:o,nextSibling:null}),c),f=void 0
|
||
do{f=l.next()}while(!f.done)
|
||
var h=s.result=f.value
|
||
s.render=function(){return h.rerender(u)}}}return e.prototype.isFor=function(e){return this.root===e},e.prototype.destroy=function(){var e,t=this.result,r=this.env
|
||
if(this.destroyed=!0,this.env=void 0,this.root=null,this.result=void 0,this.render=void 0,t){(e=!r.inTransaction)&&r.begin()
|
||
try{t.destroy()}finally{e&&r.commit()}}},e}(),pt=[]
|
||
function mt(e){var t=pt.indexOf(e)
|
||
pt.splice(t,1)}function yt(){}(0,a.setHasViews)(function(){return pt.length>0})
|
||
var gt=null
|
||
var bt=0
|
||
ft.on("begin",function(){var e
|
||
for(e=0;e<pt.length;e++)pt[e]._scheduleRevalidate()}),ft.on("end",function(){var e,t
|
||
for(e=0;e<pt.length;e++)if(!pt[e]._isValid()){if(bt>10)throw bt=0,pt[e].destroy(),new Error("infinite rendering invalidation detected")
|
||
return bt++,ft.join(null,yt)}bt=0,null!==gt&&(t=gt.resolve,gt=null,ft.join(null,t))})
|
||
var vt=function(){function e(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.fallbackViewRegistry,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]
|
||
this._env=e,this._rootTemplate=t,this._viewRegistry=r,this._destinedForDOM=n,this._destroyed=!1,this._roots=[],this._lastRevision=-1,this._isRenderingRoots=!1,this._removedRoots=[]}return e.prototype.appendOutletView=function(e,r){var i,o,a,u=(i=e,f.ENV._APPLICATION_TEMPLATE_WRAPPER?(o=(0,s.assign)({},Le,{dynamicTag:!0,elementHook:!0}),a=new(function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.prototype.getTagName=function(){return"div"},t.prototype.getLayout=function(e){var t=e.template.asWrappedLayout()
|
||
return{handle:t.compile(),symbolTable:t.symbolTable}},t.prototype.getCapabilities=function(){return o},t.prototype.didCreateElement=function(e,t){t.setAttribute("class","ember-view"),t.setAttribute("id",(0,s.guidFor)(e))},t}(De)),new Fe(i.state,a)):new Fe(i.state))
|
||
this._appendDefinition(e,(0,t.curry)(u),r)},e.prototype.appendTo=function(e,r){var n=new lt(e)
|
||
this._appendDefinition(e,(0,t.curry)(n),r)},e.prototype._appendDefinition=function(e,r,n){var i=new V(r),o=new ht(null,t.UNDEFINED_REFERENCE),a=new dt(e,this._env,this._rootTemplate,i,n,o)
|
||
this._renderRoot(a)},e.prototype.rerender=function(){this._scheduleRevalidate()},e.prototype.register=function(e){var t=(0,l.getViewId)(e)
|
||
this._viewRegistry[t]=e},e.prototype.unregister=function(e){delete this._viewRegistry[(0,l.getViewId)(e)]},e.prototype.remove=function(e){e._transitionTo("destroying"),this.cleanupRootFor(e),(0,l.setViewElement)(e,null),this._destinedForDOM&&e.trigger("didDestroyElement"),e.isDestroying||e.destroy()},e.prototype.cleanupRootFor=function(e){if(!this._destroyed)for(var t,r=this._roots,n=this._roots.length;n--;)(t=r[n]).isFor(e)&&(t.destroy(),r.splice(n,1))},e.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._clearAllRoots())},e.prototype.getBounds=function(e){var t=e[ie]
|
||
return{parentElement:t.parentElement(),firstNode:t.firstNode(),lastNode:t.lastNode()}},e.prototype.createElement=function(e){return this._env.getAppendOperations().createElement(e)},e.prototype._renderRoot=function(e){var t,r=this._roots
|
||
r.push(e),1===r.length&&(t=this,pt.push(t)),this._renderRootsTransaction()},e.prototype._renderRoots=function(){var e,t,r,n,o,s=this._roots,u=this._env,c=this._removedRoots,l=void 0,f=void 0
|
||
do{u.begin()
|
||
try{for(f=s.length,l=!1,e=0;e<s.length;e++)(t=s[e]).destroyed?c.push(t):(r=t.shouldReflush,e>=f&&!r||(t.options.alwaysRevalidate=r,r=t.shouldReflush=(0,a.runInTransaction)(t,"render"),l=l||r))
|
||
this._lastRevision=i.CURRENT_TAG.value()}finally{u.commit()}}while(l||s.length>f)
|
||
for(;c.length;)n=c.pop(),o=s.indexOf(n),s.splice(o,1)
|
||
0===this._roots.length&&mt(this)},e.prototype._renderRootsTransaction=function(){if(!this._isRenderingRoots){this._isRenderingRoots=!0
|
||
var e=!1
|
||
try{this._renderRoots(),e=!0}finally{e||(this._lastRevision=i.CURRENT_TAG.value(),!0===this._env.inTransaction&&this._env.commit()),this._isRenderingRoots=!1}}},e.prototype._clearAllRoots=function(){var e,t=this._roots
|
||
for(e=0;e<t.length;e++)t[e].destroy()
|
||
this._removedRoots.length=0,this._roots=[],t.length&&mt(this)},e.prototype._scheduleRevalidate=function(){ft.scheduleOnce("render",this,this._revalidate)},e.prototype._isValid=function(){return this._destroyed||0===this._roots.length||i.CURRENT_TAG.validate(this._lastRevision)},e.prototype._revalidate=function(){this._isValid()||this._renderRootsTransaction()},e}(),_t=function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.create=function(e){return new this(e.env,e.rootTemplate,e._viewRegistry,!1)},t.prototype.getElement=function(){throw new Error("Accessing `this.element` is not allowed in non-interactive environments (such as FastBoot).")},t}(vt),wt=function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.create=function(e){return new this(e.env,e.rootTemplate,e._viewRegistry,!0)},t.prototype.getElement=function(e){return(0,l.getViewElement)(e)},t}(vt),St={},Et=T(function(e){return u.String.loc.apply(null,e)}),kt=function(){function e(e){this.resolver=e}return e.prototype.getCapabilities=function(e){var t=this.resolver.resolve(e),r=t.manager,n=t.state
|
||
return r.getCapabilities(n)},e.prototype.getLayout=function(e){var t=this.resolver.resolve(e),r=t.manager,n=t.state
|
||
if(r.getCapabilities(n).dynamicLayout)return null
|
||
var i=r.getLayout(n,this.resolver)
|
||
return{compile:function(){return i.handle},symbolTable:i.symbolTable}},e.prototype.lookupHelper=function(e,t){return this.resolver.lookupHelper(e,t)},e.prototype.lookupModifier=function(e,t){return this.resolver.lookupModifier(e,t)},e.prototype.lookupComponentDefinition=function(e,t){return this.resolver.lookupComponentDefinition(e,t)},e.prototype.lookupPartial=function(e,t){return this.resolver.lookupPartial(e,t)},e}(),xt={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!1,attributeHook:!1,elementHook:!1},Ct=new(function(e){function r(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(r,e),r.prototype.getLayout=function(e){var t=e.asLayout()
|
||
return{handle:t.compile(),symbolTable:t.symbolTable}},r.prototype.getCapabilities=function(){return xt},r.prototype.create=function(){return null},r.prototype.getSelf=function(){return t.NULL_REFERENCE},r.prototype.getTag=function(){return i.CONSTANT_TAG},r.prototype.getDestructor=function(){return null},r}(Ne))
|
||
function At(e){var t=e.positional,r=t.at(0),n=t.length,i=r.value()
|
||
return!0===i?n>1?u.String.dasherize(t.at(1).value()):null:!1===i?n>2?u.String.dasherize(t.at(2).value()):null:i}function Tt(e){var t=e.positional.at(0)
|
||
return new Ee(t.value())}function It(e){return"checkbox"===e.positional.at(0).value()?"-checkbox":"-text-field"}function Pt(e){var t=e.positional,r=t.at(0).value().split("."),n=r[r.length-1],i=t.at(1).value()
|
||
return!0===i?u.String.dasherize(n):i||0===i?String(i):""}var Mt=function(e){return function(e){return null===e||void 0===e||"function"!=typeof e.toString}(e)?"":String(e)}
|
||
function Rt(e){return e.positional.value().map(Mt).join("")}function Ot(e,r){return void 0===r||null===r||""===r?t.NULL_REFERENCE:"string"==typeof r&&r.indexOf(".")>-1?H(e,r.split(".")):e.get(r)}var Bt=function(e){function r(r,o){var a=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
a.sourceReference=r,a.pathReference=o,a.lastPath=null,a.innerReference=t.NULL_REFERENCE
|
||
var s=a.innerTag=i.UpdatableTag.create(i.CONSTANT_TAG)
|
||
return a.tag=(0,i.combine)([r.tag,o.tag,s]),a}return(0,n.inherits)(r,e),r.create=function(e,t){return(0,i.isConst)(t)?Ot(e,t.value()):new r(e,t)},r.prototype.compute=function(){var e=this.lastPath,t=this.innerReference,r=this.innerTag,n=this.pathReference.value()
|
||
return n!==e&&(t=Ot(this.sourceReference,n),r.inner.update(t.tag),this.innerReference=t,this.lastPath=n),t.value()},r.prototype[P]=function(e){(0,a.set)(this.sourceReference.value(),this.pathReference.value(),e)},r}(R),Nt=function(e){function t(t,r,o){var a=(0,n.possibleConstructorReturn)(this,e.call(this))
|
||
return a.branchTag=i.UpdatableTag.create(i.CONSTANT_TAG),a.tag=(0,i.combine)([t.tag,a.branchTag]),a.cond=t,a.truthy=r,a.falsy=o,a}return(0,n.inherits)(t,e),t.create=function(e,r,n){var o=U.create(e)
|
||
return(0,i.isConst)(o)?o.value()?r:n:new t(o,r,n)},t.prototype.compute=function(){var e=this.cond.value()?this.truthy:this.falsy
|
||
return this.branchTag.inner.update(e.tag),e.value()},t}(R)
|
||
function jt(e){var t=e.positional
|
||
b.default.log.apply(null,t.value())}var Lt=(0,s.symbol)("MUT"),Dt=(0,s.symbol)("SOURCE")
|
||
function Ut(e){e.positional
|
||
var t=e.named
|
||
return v.QueryParams.create({values:(0,s.assign)({},t.value())})}var Ft=["alt","shift","meta","ctrl"],zt=/^click|mouse|touch/
|
||
l.ActionManager.registeredActions
|
||
var qt=function(e){var t=e.actionId
|
||
return l.ActionManager.registeredActions[t]=e,t},Vt=function(e){var t=e.actionId
|
||
delete l.ActionManager.registeredActions[t]},Ht=function(){function e(e,t,r,n,i,o,a,s,u){this.element=e,this.actionId=t,this.actionName=r,this.actionArgs=n,this.namedArgs=i,this.positional=o,this.implicitTarget=a,this.dom=s,this.eventName=this.getEventName(),this.tag=u}return e.prototype.getEventName=function(){return this.namedArgs.get("on").value()||"click"},e.prototype.getActionArgs=function(){var e,t=new Array(this.actionArgs.length)
|
||
for(e=0;e<this.actionArgs.length;e++)t[e]=this.actionArgs[e].value()
|
||
return t},e.prototype.getTarget=function(){var e=this.implicitTarget,t=this.namedArgs
|
||
return t.has("target")?t.get("target").value():e.value()},e.prototype.handler=function(e){var t=this,r=this.actionName,n=this.namedArgs,i=n.get("bubbles"),o=n.get("preventDefault"),s=n.get("allowedKeys"),u=this.getTarget(),c=!1!==i.value()
|
||
return!function(e,t){var r
|
||
if(null===t||void 0===t){if(zt.test(e.type))return(0,l.isSimpleClick)(e)
|
||
t=""}if(t.indexOf("any")>=0)return!0
|
||
for(r=0;r<Ft.length;r++)if(e[Ft[r]+"Key"]&&-1===t.indexOf(Ft[r]))return!1
|
||
return!0}(e,s.value())||(!1!==o.value()&&e.preventDefault(),c||e.stopPropagation(),a.run.join(function(){var e=t.getActionArgs(),n={args:e,target:u,name:null}
|
||
"function"!=typeof r[W]?"function"!=typeof r?(n.name=r,u.send?(0,a.flaggedInstrument)("interaction.ember-action",n,function(){u.send.apply(u,[r].concat(e))}):(0,a.flaggedInstrument)("interaction.ember-action",n,function(){u[r].apply(u,e)})):(0,a.flaggedInstrument)("interaction.ember-action",n,function(){r.apply(u,e)}):(0,a.flaggedInstrument)("interaction.ember-action",n,function(){r[W].apply(r,e)})}),c)},e.prototype.destroy=function(){Vt(this)},e}(),Kt=function(){function e(){}return e.prototype.create=function(e,t,r,n){var i,o=t.capture(),a=o.named,u=o.positional,c=o.tag,l=void 0,f=void 0,h=void 0
|
||
u.length>1&&(l=u.at(0),(h=u.at(1))[W]?f=h:(h._propertyKey,f=h.value()))
|
||
var d=[]
|
||
for(i=2;i<u.length;i++)d.push(u.at(i))
|
||
var p=(0,s.uuid)()
|
||
return new Ht(e,p,f,d,a,u,l,n,c)},e.prototype.install=function(e){var t=e.dom,r=e.element,n=e.actionId
|
||
qt(e),t.setAttribute(r,"data-ember-action",""),t.setAttribute(r,"data-ember-action-"+n,n)},e.prototype.update=function(e){var t=e.positional.at(1)
|
||
t[W]||(e.actionName=t.value()),e.eventName=e.getEventName()},e.prototype.getTag=function(e){return e.tag},e.prototype.getDestructor=function(e){return e},e}()
|
||
function Wt(e){return null===e?null:[e[0].map(function(e){return"@"+e}),e[1]]}function Gt(e,t,r,n){var i=n.resolver.lookupComponentDefinition("-text-area",n.referrer)
|
||
return Ke(r),n.component.static(i,[t||[],Wt(r),null,null]),!0}function Yt(e,t,r,n){var i=n.resolver.lookupComponentDefinition(e,n.referrer)
|
||
return n.component.static(i,[t,Wt(r),null,null]),!0}function Qt(e,t,r,n){var i,o,a,s,u
|
||
if(null===t&&(t=[]),null!==r&&(i=r[0],o=r[1],(a=i.indexOf("type"))>-1)){if(s=o[a],Array.isArray(s))return u=t[0],n.dynamicComponent(u,t.slice(1),r,!0,null,null),!0
|
||
if("checkbox"===s)return Ke(r),Yt("-checkbox",t,r,n)}return Yt("-text-field",t,r,n)}var Xt={dynamicLayout:!0,dynamicTag:!1,prepareArgs:!1,createArgs:!1,attributeHook:!1,elementHook:!1},$t=new(function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.prototype.getDynamicLayout=function(e){var t=e.engine.lookup("template:application").asLayout()
|
||
return{handle:t.compile(),symbolTable:t.symbolTable}},t.prototype.getCapabilities=function(){return Xt},t.prototype.create=function(e,t){var r,n,o=e.owner.buildChildEngineInstance(t.name)
|
||
o.boot()
|
||
var a=o.factoryFor("controller:application")||(0,v.generateControllerFactory)(o,"application"),s=void 0,u=void 0,c=t.modelRef
|
||
return void 0===c?u={engine:o,controller:s=a.create(),self:new O(s),tag:i.CONSTANT_TAG}:(r=c.value(),n=c.tag.value(),u={engine:o,controller:s=a.create({model:r}),self:new O(s),tag:c.tag,modelRef:c,modelRev:n}),u},t.prototype.getSelf=function(e){return e.self},t.prototype.getTag=function(e){return e.tag},t.prototype.getDestructor=function(e){return e.engine},t.prototype.didRenderLayout=function(){},t.prototype.update=function(e){var t,r=e.controller,n=e.modelRef,i=e.modelRev
|
||
n.tag.validate(i)||(t=n.value(),e.modelRev=n.tag.value(),r.set("model",t))},t}(Ne))
|
||
function Jt(e,t,r,n){var i=[y.Ops.Helper,"-mount",t||[],r]
|
||
return n.dynamicComponent(i,[],null,!1,null,null),!0}var Zt=function(){function e(e,t,r){this.tag=e.tag,this.nameRef=e,this.modelRef=r,this.env=t,this._lastName=null,this._lastDef=null}return e.prototype.value=function(){var e=this.env,r=this.nameRef,n=this.modelRef,i=r.value()
|
||
return"string"==typeof i?this._lastName===i?this._lastDef:e.owner.hasRegistration("engine:"+i)?(this._lastName=i,this._lastDef=(0,t.curry)(new function(e,t){this.manager=$t,this.state={name:e,modelRef:t}}(i,n)),this._lastDef):null:(this._lastDef=null,this._lastName=null,null)},e.prototype.get=function(){return t.UNDEFINED_REFERENCE},e}(),er=function(){function e(e){this.outletState=e,this.tag=i.DirtyableTag.create()}return e.prototype.get=function(e){return new rr(this,e)},e.prototype.value=function(){return this.outletState},e.prototype.update=function(e){this.outletState.outlets.main=e,this.tag.inner.dirty()},e}(),tr=function(){function e(e,t){this.parentStateRef=e,this.outletNameRef=t,this.tag=(0,i.combine)([e.tag,t.tag])}return e.prototype.value=function(){var e=this.parentStateRef.value(),t=void 0===e?void 0:e.outlets
|
||
return void 0===t?void 0:t[this.outletNameRef.value()]},e.prototype.get=function(e){return new rr(this,e)},e}(),rr=function(){function e(e,t){this.parent=e,this.key=t,this.tag=e.tag}return e.prototype.get=function(t){return new e(this,t)},e.prototype.value=function(){var e=this.parent.value()
|
||
return e&&e[this.key]},e}(),nr=function(){function e(e,t){this.root=e,this.name=t,this.tag=e.tag}return e.prototype.value=function(){var e=this.root.value(),t=e&&e.outlets.main,r=t&&t.outlets
|
||
if(void 0!==(r=(t=r&&r.__ember_orphans__)&&t.outlets)){var n=r[this.name]
|
||
if(void 0!==n&&void 0!==n.render){var i=Object.create(null)
|
||
return i[n.render.outlet]=n,n.wasUsed=!0,{outlets:i,render:void 0}}}},e.prototype.get=function(e){return new rr(this,e)},e}()
|
||
function ir(e,t,r,n){var i=[y.Ops.Helper,"-outlet",t||[],r]
|
||
return n.dynamicComponent(i,[],null,!1,null,null),!0}var or=function(){function e(e){this.outletRef=e,this.definition=null,this.lastState=null,this.tag=e.tag}return e.prototype.value=function(){var e=function(e){var t=e.value()
|
||
if(void 0===t)return null
|
||
var r=t.render
|
||
if(void 0===r)return null
|
||
var n=r.template
|
||
return void 0===n?null:{ref:e,name:r.name,outlet:r.outlet,template:n,controller:r.controller}}(this.outletRef)
|
||
if(function(e,t){if(null===e)return null===t
|
||
if(null===t)return!1
|
||
return e.template===t.template&&e.controller===t.controller}(e,this.lastState))return this.definition
|
||
this.lastState=e
|
||
var r=null
|
||
return null!==e&&(r=(0,t.curry)(new Fe(e))),this.definition=r},e.prototype.get=function(){return t.UNDEFINED_REFERENCE},e}()
|
||
var ar=function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.prototype.create=function(e,t,r,n){var i=t.name
|
||
return n.rootOutletState&&(n.outletState=new nr(n.rootOutletState,i)),this.createRenderState(r,e.owner,i)},t.prototype.getLayout=function(e){var t=e.template.asLayout()
|
||
return{handle:t.compile(),symbolTable:t.symbolTable}},t.prototype.getSelf=function(e){var t=e.controller
|
||
return new O(t)},t}(Ne),sr={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!1,attributeHook:!1,elementHook:!1},ur=new(function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.prototype.createRenderState=function(e,t,r){return{controller:t.lookup("controller:"+r)||(0,v.generateController)(t,r)}},t.prototype.getCapabilities=function(){return sr},t.prototype.getTag=function(){return i.CONSTANT_TAG},t.prototype.getDestructor=function(){return null},t}(ar)),cr={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!0,attributeHook:!1,elementHook:!1},lr=new(function(e){function t(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(t,e),t.prototype.createRenderState=function(e,t,r){var n=e.positional.at(1)
|
||
return{controller:(t.factoryFor("controller:"+r)||(0,v.generateControllerFactory)(t,"controller:"+r)).create({model:n.value()}),model:n}},t.prototype.update=function(e){var t=e.controller,r=e.model
|
||
t.set("model",r.value())},t.prototype.getCapabilities=function(){return cr},t.prototype.getTag=function(e){return e.model.tag},t.prototype.getDestructor=function(e){return e.controller},t}(ar)),fr=function(e,t,r){this.manager=r,this.state={name:e,template:t}}
|
||
function hr(e,t,r,n){var i
|
||
return!0===f.ENV._ENABLE_RENDER_SUPPORT&&(i=[y.Ops.Helper,"-render",t||[],r],n.dynamicComponent(i,null,null,!1,null,null),!0)}function dr(e,t,r,n){if(-1===e.indexOf("-"))return!1
|
||
var i=n.resolver.lookupComponentDefinition(e,n.referrer)
|
||
return null!==i&&(n.component.static(i,[null===t?[]:t,Wt(r),null,null]),!0)}function pr(e,t,r,n,i,o){if(-1===e.indexOf("-"))return!1
|
||
var a=o.resolver.lookupComponentDefinition(e,o.referrer)
|
||
return null!==a&&(Ke(r),o.component.static(a,[t,Wt(r),n,i]),!0)}var mr=[]
|
||
function yr(e){return{object:"component:"+e}}function gr(e){return void 0!==e?{source:"template:"+e}:void 0}var br={if:function(e,t){var r=t.positional
|
||
return Nt.create(r.at(0),r.at(1),r.at(2))},action:function(e,t){var r=t.named,n=t.positional.capture().references,o=n[0],s=n[1],u=n.slice(2),c=(s._propertyKey,r.has("target")?r.get("target"):o),l=function(e,t){var r=void 0
|
||
t.length>0&&(r=function(e){return t.map(function(e){return e.value()}).concat(e)})
|
||
var n=void 0
|
||
return e&&(n=function(t){var r=e.value()
|
||
return r&&t.length>0&&(t[0]=(0,a.get)(t[0],r)),t}),r&&n?function(e){return n(r(e))}:r||n||Y}(r.has("value")&&r.get("value"),u),f=void 0
|
||
return(f="function"==typeof s[W]?Q(s,s,s[W],l):(0,i.isConst)(c)&&(0,i.isConst)(s)?Q(o.value(),c.value(),s.value(),l):function(e,t,r,n,i){return function(){return Q(e,t.value(),r.value(),n).apply(void 0,arguments)}}(o.value(),c,s,l))[G]=!0,new V(f)},concat:function(e,t){return new q(Rt,t.capture())},get:function(e,t){return Bt.create(t.positional.at(0),t.positional.at(1))},hash:function(e,t){return t.named.capture()},log:function(e,t){return new q(jt,t.capture())},mut:function(e,t){var r,n=t.positional.at(0)
|
||
if((r=n)&&r[Lt])return n
|
||
var i=Object.create(n)
|
||
return i[Dt]=n,i[W]=n[P],i[Lt]=!0,i},"query-params":function(e,t){return new q(Ut,t.capture())},readonly:function(e,t){var r=function(e){return e[Dt]||e}(t.positional.at(0)),n=Object.create(r)
|
||
return n[P]=void 0,n},unbound:function(e,t){return V.create(t.positional.at(0).value())},unless:function(e,t){var r=t.positional
|
||
return Nt.create(r.at(0),r.at(2),r.at(1))},"-class":function(e,t){return new q(At,t.capture())},"-each-in":function(e,t){var r=Object.create(t.positional.at(0))
|
||
return r[de]=!0,r},"-input-type":function(e,t){return new q(It,t.capture())},"-normalize-class":function(e,t){return new q(Pt,t.capture())},"-html-safe":function(e,t){return new q(Tt,t.capture())},"-get-dynamic-var":t.getDynamicVar,"-mount":function(e,t){var r=e.env,n=t.positional.at(0),i=t.named.has("model")?t.named.get("model"):void 0
|
||
return new Zt(n,r,i)},"-outlet":function(e,t){var r=e.dynamicScope(),n=void 0
|
||
return n=0===t.positional.length?new i.ConstReference("main"):t.positional.at(0),new or(new tr(r.outletState,n))},"-render":function(e,r){var n,i,o,a=e.env,s=r.positional.at(0),u=s.value(),c=a.owner.lookup("template:"+u),l=void 0
|
||
return l=r.named.has("controller")?r.named.get("controller").value():u,1===r.positional.length?(n=new fr(l,c,ur),V.create((0,t.curry)(n))):(i=new fr(l,c,lr),o=r.capture(),V.create((0,t.curry)(i,o)))}},vr={action:new Kt},_r=function(){function e(){this.templateOptions={program:new g.Program(new g.LazyConstants(this)),macros:new c.Macros,resolver:new kt(this),Builder:c.LazyOpcodeBuilder},this.handles=[void 0],this.objToHandle=new WeakMap,this.builtInHelpers=br,this.builtInModifiers=vr,this.templateCache=new WeakMap,this.templateCacheHits=0,this.templateCacheMisses=0,function(e){var t,r=e.inlines,n=e.blocks
|
||
for(r.add("outlet",ir),r.add("render",hr),r.add("mount",Jt),r.add("input",Qt),r.add("textarea",Gt),r.addMissing(dr),n.addMissing(pr),t=0;t<mr.length;t++)(0,mr[t])(n,r)}(this.templateOptions.macros)}return e.prototype.lookupComponent=function(e,t){var r=this.lookupComponentDefinition(e,t)
|
||
return null===r?null:this.resolve(r)},e.prototype.resolve=function(e){return this.handles[e]},e.prototype.lookupHelper=function(e,t){var r=this._lookupHelper(e,t)
|
||
return null!==r?this.handle(r):null},e.prototype.lookupComponentDefinition=function(e,t){return this.handle(this._lookupComponentDefinition(e,t))},e.prototype.lookupModifier=function(e){return this.handle(this._lookupModifier(e))},e.prototype.lookupPartial=function(e,t){var r=this._lookupPartial(e,t)
|
||
return this.handle(r)},e.prototype.createTemplate=function(e,t){var r,n=this.templateCache.get(t)
|
||
void 0===n&&(n=new WeakMap,this.templateCache.set(t,n))
|
||
var i=n.get(e)
|
||
return void 0===i?(r={options:this.templateOptions},(0,s.setOwner)(r,t),i=e.create(r),n.set(e,i),this.templateCacheMisses++):this.templateCacheHits++,i},e.prototype.handle=function(e){if(void 0===e||null===e)return null
|
||
var t=this.objToHandle.get(e)
|
||
return void 0===t&&(t=this.handles.push(e)-1,this.objToHandle.set(e,t)),t},e.prototype._lookupHelper=function(e,t){var r,n=this.builtInHelpers[e]
|
||
if(void 0!==n)return n
|
||
var i,o=t.owner,a=gr(t.moduleName),s=o.factoryFor("helper:"+e,a)||o.factoryFor("helper:"+e)
|
||
return"object"==typeof(i=s)&&null!==i&&i.class&&i.class.isHelperFactory?function(e){return e.class.isSimpleHelper}(s)?(r=s.create().compute,function(e,t){return F.create(r,t.capture())}):function(e,t){var r=s.create()
|
||
return e.newDestroyable(r),z.create(r,t.capture())}:null},e.prototype._lookupPartial=function(e,t){var r=(0,l.lookupPartial)(e,t.owner),n=new c.PartialDefinition(e,(0,l.lookupPartial)(e,t.owner))
|
||
if(r)return n
|
||
throw new Error(e+" is not a partial")},e.prototype._lookupModifier=function(e){var t=this.builtInModifiers[e]
|
||
return void 0!==t?t:null},e.prototype._lookupComponentDefinition=function(e,t){var r=(0,l.lookupComponent)(t.owner,e,gr(t.moduleName)),n=r.layout,i=r.component
|
||
if(n&&!i&&f.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS)return new function(e){this.state=e,this.manager=Ct}(n)
|
||
var o=(0,a._instrumentStart)("render.getComponentDefinition",yr,e),s=n||i?new function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:st,r=arguments[2],n=arguments[3],i=arguments[4],o=arguments[5]
|
||
this.name=e,this.manager=t,this.ComponentClass=r,this.handle=n
|
||
var a=i&&i.asLayout(),s=a?a.symbolTable:void 0
|
||
this.symbolTable=s,this.template=i,this.args=o,this.state={name:e,ComponentClass:r,handle:n,template:i,capabilities:at,symbolTable:s}}(e,void 0,i||t.owner.factoryFor((0,p.privatize)(S)),null,n):null
|
||
return o(),s},e}(),wr={create:function(){return(new _r).templateOptions}},Sr=X({id:"o98Iahwz",block:'{"symbols":["&default"],"statements":[[13,1]],"hasEval":false}',meta:{moduleName:"packages/ember-glimmer/lib/templates/component.hbs"}}),Er=X({id:"cNysaqQS",block:'{"symbols":[],"statements":[[1,[20,"outlet"],false]],"hasEval":false}',meta:{moduleName:"packages/ember-glimmer/lib/templates/outlet.hbs"}}),kr="-top-level",xr="main",Cr=function(){function e(e,t,r,n){this._environment=e,this.renderer=t,this.owner=r,this.template=n
|
||
var i=this.ref=new er({outlets:{main:void 0},render:{owner:r,into:void 0,outlet:xr,name:kr,controller:void 0,template:n}})
|
||
this.state={ref:i,name:kr,outlet:xr,template:n,controller:void 0}}return e.extend=function(t){return function(e){function r(){return(0,n.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,n.inherits)(r,e),r.create=function(r){return r?e.create.call(this,(0,s.assign)({},t,r)):e.create.call(this,t)},r}(e)},e.reopenClass=function(e){(0,s.assign)(this,e)},e.create=function(t){var r=t._environment,n=t.renderer,i=t.template
|
||
return new e(r,n,t[s.OWNER],i)},e.prototype.appendTo=function(e){var t=void 0
|
||
t=(this._environment||f.environment).hasDOM&&"string"==typeof e?document.querySelector(e):e,a.run.schedule("render",this.renderer,"appendOutletView",this,t)},e.prototype.rerender=function(){},e.prototype.setOutletState=function(e){this.ref.update(e)},e.prototype.destroy=function(){},e}()
|
||
e.INVOKE=W,e.RootTemplate=J,e.template=X,e.Checkbox=se,e.TextField=ce,e.TextArea=le,e.LinkComponent=he,e.Component=oe,e.ROOT_REF=te,e.Helper=C,e.helper=T,e.Environment=Be,e.SafeString=Ee,e.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML()
|
||
if(null===e||void 0===e)return""
|
||
if(!e)return e+""
|
||
e=""+e}return xe.test(e)?e.replace(Ce,Ae):e},e.htmlSafe=Te,e.isHTMLSafe=Ie,e.Renderer=vt,e.InertRenderer=_t,e.InteractiveRenderer=wt,e._resetRenderers=function(){pt.length=0},e.renderSettled=function(){return null===gt&&(gt=d.default.defer(),a.run.currentRunLoop||ft.schedule("actions",null,yt)),gt.promise},e.getTemplate=function(e){if(St.hasOwnProperty(e))return St[e]},e.setTemplate=function(e,t){return St[e]=t},e.hasTemplate=function(e){return St.hasOwnProperty(e)},e.getTemplates=function(){return St},e.setTemplates=function(e){St=e},e.setupEngineRegistry=function(e){e.register("view:-outlet",Cr),e.register("template:-outlet",Er),e.injection("view:-outlet","template","template:-outlet"),e.injection("service:-dom-changes","document","service:-document"),e.injection("service:-dom-tree-construction","document","service:-document"),e.register((0,p.privatize)(w),Sr),e.register("service:-glimmer-environment",Be),e.register((0,p.privatize)(k),wr),e.injection("template","options",(0,p.privatize)(k)),e.optionsForType("helper",{instantiate:!1}),e.register("helper:loc",Et),e.register("component:-text-field",ce),e.register("component:-text-area",le),e.register("component:-checkbox",se),e.register("component:link-to",he),f.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS||e.register((0,p.privatize)(S),oe)},e.setupApplicationRegistry=function(e){e.injection("service:-glimmer-environment","appendOperations","service:-dom-tree-construction"),e.injection("renderer","env","service:-glimmer-environment"),e.register((0,p.privatize)(E),J),e.injection("renderer","rootTemplate",(0,p.privatize)(E)),e.register("renderer:-dom",wt),e.register("renderer:-inert",_t),f.environment.hasDOM&&e.injection("service:-glimmer-environment","updateOperations","service:-dom-changes"),e.register("service:-dom-changes",{create:function(e){var r=e.document
|
||
return new t.DOMChanges(r)}}),e.register("service:-dom-tree-construction",{create:function(e){var n=e.document
|
||
return new(f.environment.hasDOM?t.DOMTreeConstruction:r.NodeDOMTreeConstruction)(n)}})},e._registerMacros=function(e){mr.push(e)},e._experimentalMacros=mr
|
||
e.AbstractComponentManager=Ne,e.UpdatableReference=L,e.iterableFor=pe,e.DebugStack=void 0,e.OutletView=Cr}),e("ember-metal",["exports","ember-environment","ember-utils","ember-debug","ember-babel","@glimmer/reference","container","backburner"],function(e,t,r,n,i,o,a,s){"use strict"
|
||
s=s&&s.hasOwnProperty("default")?s.default:s
|
||
var u="object"==typeof t.context.imports.Ember&&t.context.imports.Ember||{}
|
||
u.isNamespace=!0,u.toString=function(){return"Ember"}
|
||
var c={addToListeners:function(e,t,r,n){void 0===this._listeners&&(this._listeners=[]),this._listeners.push(e,t,r,n)},_finalizeListeners:function(){if(!this._listenersFinalized){void 0===this._listeners&&(this._listeners=[])
|
||
for(var e,t=this.parent;void 0!==t&&(void 0!==(e=t._listeners)&&(this._listeners=this._listeners.concat(e)),!t._listenersFinalized);)t=t.parent
|
||
this._listenersFinalized=!0}},removeFromListeners:function(e,t,r,n){for(var i,o,a=this;void 0!==a;){if(void 0!==(i=a._listeners))for(o=i.length-4;o>=0;o-=4)if(i[o]===e&&(!r||i[o+1]===t&&i[o+2]===r)){if(a!==this)return this._finalizeListeners(),this.removeFromListeners(e,t,r)
|
||
"function"==typeof n&&n(e,t,i[o+2]),i.splice(o,4)}if(a._listenersFinalized)break
|
||
a=a.parent}},matchingListeners:function(e){for(var t,r,n=this,i=void 0;void 0!==n;){if(void 0!==(t=n._listeners))for(r=0;r<t.length;r+=4)t[r]===e&&l(i=i||[],t,r)
|
||
if(n._listenersFinalized)break
|
||
n=n.parent}return i}}
|
||
function l(e,t,r){var n,i=t[r+1],o=t[r+2]
|
||
for(n=0;n<e.length;n+=3)if(e[n]===i&&e[n+1]===o)return
|
||
e.push(i,o,t[r+3])}function f(e,r,n,i,o){t.ENV._ENABLE_DID_INIT_ATTRS_SUPPORT,i||"function"!=typeof n||(i=n,n=null),me(e).addToListeners(r,n,i,o),"function"==typeof e.didAddListener&&e.didAddListener(r,n,i)}function h(e,t,r,n){n||"function"!=typeof r||(n=r,r=null)
|
||
var i="function"==typeof e.didRemoveListener?e.didRemoveListener.bind(e):function(){}
|
||
me(e).removeFromListeners(t,r,n,i)}function d(e,t,r,n,i){var o,a,s,u,c
|
||
if(void 0===n&&(n="object"==typeof(o=void 0===i?pe(e):i)&&null!==o&&o.matchingListeners(t)),void 0===n||0===n.length)return!1
|
||
for(a=n.length-3;a>=0;a-=3)s=n[a],u=n[a+1],c=n[a+2],u&&(c&&h(e,t,s,u),s||(s=e),"string"==typeof u&&(u=s[u]),u.apply(s,r))
|
||
return!0}var p=void 0,m={get onerror(){return p}},y=void 0,g=i.taggedTemplateLiteralLoose(["rsvpAfter"],["rsvpAfter"]),b=new s(["sync","actions","routerTransitions","render","afterRender","destroy",a.privatize(g)],{sync:{before:F,after:z},defaultQueue:"actions",onBegin:function(e){v.currentRunLoop=e},onEnd:function(e,t){v.currentRunLoop=t},onErrorTarget:m,onErrorMethod:"onerror"})
|
||
function v(){return b.run.apply(b,arguments)}v.join=function(){return b.join.apply(b,arguments)},v.bind=function(){var e,t,r
|
||
for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
return function(){var e,r,n
|
||
for(e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n]
|
||
return v.join.apply(v,t.concat(r))}},v.backburner=b,v.currentRunLoop=null,v.queues=b.queueNames,v.begin=function(){b.begin()},v.end=function(){b.end()},v.schedule=function(){return b.schedule.apply(b,arguments)},v.hasScheduledTimers=function(){return b.hasTimers()},v.cancelTimers=function(){b.cancelTimers()},v.later=function(){return b.later.apply(b,arguments)},v.once=function(){var e,t,r
|
||
for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
return t.unshift("actions"),b.scheduleOnce.apply(b,t)},v.scheduleOnce=function(){return b.scheduleOnce.apply(b,arguments)},v.next=function(){var e,t,r
|
||
for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
return t.push(1),b.later.apply(b,t)},v.cancel=function(e){return b.cancel(e)},v.debounce=function(){return b.debounce.apply(b,arguments)},v.throttle=function(){return b.throttle.apply(b,arguments)}
|
||
var _=function(){return!1}
|
||
function w(){return o.DirtyableTag.create()}function S(e,t){return"object"==typeof e&&null!==e?(void 0===t?me(e):t).writableTag(w):o.CONSTANT_TAG}function E(e,t){var r=e.readableTag()
|
||
void 0!==r&&(e.isProxy()?r.inner.first.inner.dirty():r.inner.dirty())
|
||
var n=e.readableTags(),i=void 0!==n?n[t]:void 0
|
||
void 0!==i&&i.inner.dirty(),void 0===r&&void 0===i||function(){void 0===k&&(k=v.backburner)
|
||
_()&&k.ensureInstance()}()}var k=void 0
|
||
var x=function(){function e(){this.added=new Map,this.queue=[]}return e.prototype.add=function(e,t,r){var n=this.added.get(e)
|
||
void 0===n&&(n=new Set,this.added.set(e,n)),n.has(t)||(this.queue.push(e,t,r),n.add(t))},e.prototype.flush=function(){var e,t,r,n,i=this.queue
|
||
for(this.added.clear(),this.queue=[],e=0;e<i.length;e+=3)t=i[e],r=i[e+1],n=i[e+2],t.isDestroying||t.isDestroyed||d(t,n,[t,r])},e}()
|
||
function C(e,t,r){if("object"==typeof e&&null!==e){var n=void 0===r?me(e):r,i=n.peekWatching(t)||0
|
||
n.writeWatching(t,i+1),0===i&&n.writableChains(ie).add(t)}}function A(e,t,r){if("object"==typeof e&&null!==e){var n=void 0===r?pe(e):r
|
||
if(void 0!==n){var i=n.peekWatching(t)||0
|
||
1===i?(n.writeWatching(t,0),n.writableChains(ie).remove(t)):i>1&&n.writeWatching(t,i-1)}}}function T(e,t,r){_e(t)?C(e,t,r):G(e,t,r)}function I(e,t){var r=pe(e)
|
||
return void 0!==r&&r.peekWatching(t)||0}function P(e,t,r){_e(t)?A(e,t,r):Y(e,t,r)}function M(e){return e+":change"}function R(e,t,r,n){f(e,M(t),r,n),T(e,t)}function O(e,t,r,n){P(e,t),h(e,M(t),r,n)}e.runInTransaction=void 0,e.runInTransaction=function(e,t){return e[t](),!1}
|
||
var B=r.symbol("PROPERTY_DID_CHANGE"),N=new x,j=0
|
||
function L(e,t,r){var n=void 0===r?pe(e):r,i=void 0!==n
|
||
if(!i||n.isInitialized(e)){var o=ye(e,t,n)
|
||
if(void 0!==o&&o.didChange&&o.didChange(e,t),i&&n.peekWatching(t)>0&&(function(e,t,r){if(r.isSourceDestroying()||!r.hasDeps(t))return
|
||
var n=D,i=null===n
|
||
i&&(n=D=new Map);(function(e,t,r,n,i){var o=n.get(t)
|
||
if(void 0===o&&(o=new Set,n.set(t,o)),!o.has(r)){var a=void 0
|
||
i.forEachInDeps(r,function(r,n){n&&(void 0!==(a=ye(t,r,i))&&a._suspended===t||e(t,r,i))})}})(L,e,t,n,r),i&&(D=null)}(e,t,n),function(e,t,r){var n=r.readableChainWatchers()
|
||
void 0!==n&&n.notify(t,!0,L)}(0,t,n),function(e,t,r){if(r.isSourceDestroying())return
|
||
var n=M(t)
|
||
j>0?N.add(e,t,n):d(e,n,[e,t])}(e,t,n)),B in e&&e[B](t),i){if(n.isSourceDestroying())return
|
||
E(n,t)}}}var D=null
|
||
function U(e,t,r){var n=r.readableChainWatchers()
|
||
void 0!==n&&n.revalidate(t)}function F(){j++}function z(){--j<=0&&N.flush()}function q(e){F()
|
||
try{e()}finally{z()}}function V(){this.isDescriptor=!0}var H=void 0
|
||
function K(e,t,r,n,i){void 0===i&&(i=me(e))
|
||
var o=i.peekWatching(t),a=void 0!==o&&o>0,s=ye(e,t,i),u=void 0!==s
|
||
u&&(s.teardown(e,t,i),i.removeDescriptors(t))
|
||
var c=!0
|
||
e===Array.prototype&&(c=!1)
|
||
var l=void 0
|
||
return r instanceof V?(l=r,Object.defineProperty(e,t,{configurable:!0,enumerable:c,get:H(t,l)}),i.writeDescriptors(t,l),function(e){if(!1===W)return
|
||
var t=Le(e)
|
||
void 0!==t&&t.delete("_computedProperties")}(e.constructor),"function"==typeof r.setup&&r.setup(e,t)):void 0===r||null===r?(l=n,u?Object.defineProperty(e,t,{configurable:!0,enumerable:c,writable:!0,value:l}):!1===c?Object.defineProperty(e,t,{configurable:!0,enumerable:c,writable:!0,value:l}):e[t]=n):(l=r,Object.defineProperty(e,t,r)),a&&U(0,t,i),"function"==typeof e.didDefineProperty&&e.didDefineProperty(e,t,l),this}H=function(e,t){return function(){return t.get(this,e)}}
|
||
var W=!1
|
||
function G(e,t,r){if("object"==typeof e&&null!==e){var n,i=void 0===r?me(e):r,o=i.peekWatching(t)||0
|
||
i.writeWatching(t,o+1),0===o&&(void 0!==(n=ye(e,t,i))&&n.willWatch&&n.willWatch(e,t,i),"function"==typeof e.willWatchProperty&&e.willWatchProperty(t))}}function Y(e,t,r){if("object"==typeof e&&null!==e){var n,i=void 0===r?pe(e):r
|
||
if(void 0!==i&&!i.isSourceDestroyed()){var o=i.peekWatching(t)
|
||
1===o?(i.writeWatching(t,0),void 0!==(n=ye(e,t,i))&&n.didUnwatch&&n.didUnwatch(e,t,i),"function"==typeof e.didUnwatchProperty&&e.didUnwatchProperty(t)):o>1&&i.writeWatching(t,o-1)}}}function Q(e,t){return"function"==typeof e.objectAt?e.objectAt(t):e[t]}var X=new WeakMap
|
||
function $(e){var t=X.get(e)
|
||
return void 0===t&&(t=new J(e),X.set(e,t)),t}var J=function(){function e(e){this._content=e,this._keys=void 0,me(this)}return e.prototype.arrayWillChange=function(e,t,r){var n=this._keys,i=r>0?t+r:-1
|
||
for(var o in n)i>0&&ee(e,o,this,t,i)},e.prototype.arrayDidChange=function(e,t,r,n){var i=this._keys,o=n>0?t+n:-1,a=pe(this)
|
||
for(var s in i)o>0&&Z(e,s,this,t,o),L(this,s,a)},e.prototype.willWatchProperty=function(e){this.beginObservingContentKey(e)},e.prototype.didUnwatchProperty=function(e){this.stopObservingContentKey(e)},e.prototype.beginObservingContentKey=function(e){var t,r=this._keys
|
||
r||(r=this._keys=Object.create(null)),r[e]?r[e]++:(r[e]=1,Z(t=this._content,e,this,0,ke(t,"length")))},e.prototype.stopObservingContentKey=function(e){var t,r=this._keys
|
||
r&&r[e]>0&&--r[e]<=0&&ee(t=this._content,e,this,0,ke(t,"length"))},e.prototype.contentKeyDidChange=function(e,t){L(this,t)},e}()
|
||
function Z(e,t,r,n,i){for(var o;--i>=n;)(o=Q(e,i))&&R(o,t,r,"contentKeyDidChange")}function ee(e,t,r,n,i){for(var o;--i>=n;)(o=Q(e,i))&&O(o,t,r,"contentKeyDidChange")}function te(e){return"object"==typeof e&&null!==e}var re=function(){function e(){this.chains=Object.create(null)}return e.prototype.add=function(e,t){var r=this.chains[e]
|
||
void 0===r?this.chains[e]=[t]:r.push(t)},e.prototype.remove=function(e,t){var r,n=this.chains[e]
|
||
if(void 0!==n)for(r=0;r<n.length;r++)if(n[r]===t){n.splice(r,1)
|
||
break}},e.prototype.has=function(e,t){var r,n=this.chains[e]
|
||
if(void 0!==n)for(r=0;r<n.length;r++)if(n[r]===t)return!0
|
||
return!1},e.prototype.revalidateAll=function(){for(var e in this.chains)this.notify(e,!0,void 0)},e.prototype.revalidate=function(e){this.notify(e,!0,void 0)},e.prototype.notify=function(e,t,r){var n,i,o=this.chains[e]
|
||
if(void 0!==o&&0!==o.length){var a=void 0
|
||
for(r&&(a=[]),n=0;n<o.length;n++)o[n].notify(t,a)
|
||
if(void 0!==r)for(i=0;i<a.length;i+=2)r(a[i],a[i+1])}},e}()
|
||
function ne(){return new re}function ie(e){return new se(null,null,e)}function oe(e,t,r){var n=me(e)
|
||
n.writableChainWatchers(ne).add(t,r),G(e,t,n)}function ae(e,t,r,n){if(te(e)){var i=void 0===n?pe(e):n
|
||
void 0!==i&&void 0!==i.readableChainWatchers()&&((i=me(e)).readableChainWatchers().remove(t,r),Y(e,t,i))}}var se=function(){function e(e,t,r){this._parent=e,this._key=t
|
||
var n,i=this._watching=void 0===r
|
||
if(this._chains=void 0,this._object=void 0,this.count=0,this._value=r,this._paths=void 0,i){if(!te(n=e.value()))return
|
||
this._object=n,oe(this._object,this._key,this)}}return e.prototype.value=function(){var e
|
||
return void 0===this._value&&this._watching&&(e=this._parent.value(),this._value=function(e,t){if(!te(e))return
|
||
var r=pe(e)
|
||
if(void 0!==r&&r.proto===e)return
|
||
return"@each"===t?$(e):function(e,t,r){var n=ye(e,t,r)
|
||
return!(void 0!==n&&!1===n._volatile)}(e,t,r)?ke(e,t):je(e,t)}(e,this._key)),this._value},e.prototype.destroy=function(){this._watching&&(ae(this._object,this._key,this),this._watching=!1)},e.prototype.copy=function(e){var t,r=ie(e),n=this._paths
|
||
if(void 0!==n)for(t in t=void 0,n)n[t]>0&&r.add(t)
|
||
return r},e.prototype.add=function(e){var t=this._paths||(this._paths={})
|
||
t[e]=(t[e]||0)+1
|
||
var r=e.split(".")
|
||
this.chain(r.shift(),r)},e.prototype.remove=function(e){var t=this._paths
|
||
if(void 0!==t){t[e]>0&&t[e]--
|
||
var r=e.split(".")
|
||
this.unchain(r.shift(),r)}},e.prototype.chain=function(t,r){var n=this._chains,i=void 0
|
||
void 0===n?n=this._chains=Object.create(null):i=n[t],void 0===i&&(i=n[t]=new e(this,t,void 0)),i.count++,r.length>0&&i.chain(r.shift(),r)},e.prototype.unchain=function(e,t){var r=this._chains,n=r[e]
|
||
t.length>0&&n.unchain(t.shift(),t),n.count--,n.count<=0&&(r[n._key]=void 0,n.destroy())},e.prototype.notify=function(e,t){e&&this._watching&&((r=this._parent.value())!==this._object&&(ae(this._object,this._key,this),te(r)?(this._object=r,oe(r,this._key,this)):this._object=void 0),this._value=void 0)
|
||
var r,n,i=this._chains
|
||
if(void 0!==i)for(var o in n=void 0,i)void 0!==(n=i[o])&&n.notify(e,t)
|
||
t&&this._parent&&this._parent.populateAffected(this._key,1,t)},e.prototype.populateAffected=function(e,t,r){this._key&&(e=this._key+"."+e),this._parent?this._parent.populateAffected(e,t+1,r):t>1&&r.push(this.value(),e)},e}()
|
||
var ue=r.symbol("undefined"),ce=[],le=function(){function e(e,r){this._descriptors=void 0,this._watching=void 0,this._mixins=void 0,t.ENV._ENABLE_BINDING_SUPPORT&&(this._bindings=void 0),this._values=void 0,this._deps=void 0,this._chainWatchers=void 0,this._chains=void 0,this._tag=void 0,this._tags=void 0,this._flags=0,this.source=e,this.proto=void 0,this.parent=r,this._listeners=void 0,this._listenersFinalized=!1}return e.prototype.isInitialized=function(e){return this.proto!==e},e.prototype.destroy=function(){if(!this.isMetaDestroyed()){var e,t=void 0,r=void 0,n=void 0,i=this.readableChains()
|
||
if(void 0!==i)for(ce.push(i);ce.length>0;){if(void 0!==(t=(i=ce.pop())._chains))for(r in t)void 0!==t[r]&&ce.push(t[r])
|
||
i._watching&&void 0!==(n=i._object)&&(e=pe(n))&&!e.isSourceDestroying()&&ae(n,i._key,i,e)}this.setMetaDestroyed()}},e.prototype.isSourceDestroying=function(){return 0!=(2&this._flags)},e.prototype.setSourceDestroying=function(){this._flags|=2},e.prototype.isSourceDestroyed=function(){return 0!=(4&this._flags)},e.prototype.setSourceDestroyed=function(){this._flags|=4},e.prototype.isMetaDestroyed=function(){return 0!=(8&this._flags)},e.prototype.setMetaDestroyed=function(){this._flags|=8},e.prototype.isProxy=function(){return 0!=(16&this._flags)},e.prototype.setProxy=function(){this._flags|=16},e.prototype._getOrCreateOwnMap=function(e){return this[e]||(this[e]=Object.create(null))},e.prototype._getInherited=function(e){for(var t,r=this;void 0!==r;){if(void 0!==(t=r[e]))return t
|
||
r=r.parent}},e.prototype._findInherited=function(e,t){for(var r,n,i=this;void 0!==i;){if(void 0!==(r=i[e])&&void 0!==(n=r[t]))return n
|
||
i=i.parent}},e.prototype.writeDeps=function(e,t,r){var n=this._getOrCreateOwnMap("_deps"),i=n[e]
|
||
void 0===i&&(i=n[e]=Object.create(null)),i[t]=r},e.prototype.peekDeps=function(e,t){for(var r,n,i,o=this;void 0!==o;){if(void 0!==(r=o._deps)&&void 0!==(n=r[e])&&void 0!==(i=n[t]))return i
|
||
o=o.parent}},e.prototype.hasDeps=function(e){for(var t,r=this;void 0!==r;){if(void 0!==(t=r._deps)&&void 0!==t[e])return!0
|
||
r=r.parent}return!1},e.prototype.forEachInDeps=function(e,t){return this._forEachIn("_deps",e,t)},e.prototype._forEachIn=function(e,t,r){for(var n,i,o,a=this,s=void 0,u=void 0;void 0!==a;){if(void 0!==(n=a[e])&&void 0!==(i=n[t]))for(var c in i)(s=void 0===s?new Set:s).has(c)||(s.add(c),(u=u||[]).push(c,i[c]))
|
||
a=a.parent}if(void 0!==u)for(o=0;o<u.length;o+=2)r(u[o],u[o+1])},e.prototype.writableTags=function(){return this._getOrCreateOwnMap("_tags")},e.prototype.readableTags=function(){return this._tags},e.prototype.writableTag=function(e){var t=this._tag
|
||
return void 0===t&&(t=this._tag=e(this.source)),t},e.prototype.readableTag=function(){return this._tag},e.prototype.writableChainWatchers=function(e){var t=this._chainWatchers
|
||
return void 0===t&&(t=this._chainWatchers=e(this.source)),t},e.prototype.readableChainWatchers=function(){return this._chainWatchers},e.prototype.writableChains=function(e){var t=this._chains
|
||
return void 0===t&&(t=void 0===this.parent?e(this.source):this.parent.writableChains(e).copy(this.source),this._chains=t),t},e.prototype.readableChains=function(){return this._getInherited("_chains")},e.prototype.writeWatching=function(e,t){this._getOrCreateOwnMap("_watching")[e]=t},e.prototype.peekWatching=function(e){return this._findInherited("_watching",e)},e.prototype.writeMixins=function(e,t){this._getOrCreateOwnMap("_mixins")[e]=t},e.prototype.peekMixins=function(e){return this._findInherited("_mixins",e)},e.prototype.forEachMixins=function(e){for(var t,r=this,n=void 0;void 0!==r;){if(void 0!==(t=r._mixins))for(var i in t)(n=void 0===n?new Set:n).has(i)||(n.add(i),e(i,t[i]))
|
||
r=r.parent}},e.prototype.writeBindings=function(e,t){this._getOrCreateOwnMap("_bindings")[e]=t},e.prototype.peekBindings=function(e){return this._findInherited("_bindings",e)},e.prototype.forEachBindings=function(e){for(var t,r=this,n=void 0;void 0!==r;){if(void 0!==(t=r._bindings))for(var i in t)void 0===(n=n||Object.create(null))[i]&&(n[i]=!0,e(i,t[i]))
|
||
r=r.parent}},e.prototype.clearBindings=function(){this._bindings=void 0},e.prototype.writeValues=function(e,t){this._getOrCreateOwnMap("_values")[e]=t},e.prototype.peekValues=function(e){return this._findInherited("_values",e)},e.prototype.deleteFromValues=function(e){delete this._getOrCreateOwnMap("_values")[e]},e}()
|
||
for(var fe in c)le.prototype[fe]=c[fe]
|
||
le.prototype.writeDescriptors=function(e,t){this._getOrCreateOwnMap("_descriptors")[e]=t},le.prototype.peekDescriptors=function(e){var t=this._findInherited("_descriptors",e)
|
||
return t===ue?void 0:t},le.prototype.removeDescriptors=function(e){this.writeDescriptors(e,ue)}
|
||
var he=Object.getPrototypeOf,de=new WeakMap
|
||
function pe(e){for(var t=e,r=void 0;void 0!==t&&null!==t;){if(void 0!==(r=de.get(t)))return r
|
||
t=he(t)}}function me(e){var t=pe(e),r=void 0
|
||
if(void 0!==t){if(t.source===e)return t
|
||
r=t}var n=new le(e,r)
|
||
return function(e,t){de.set(e,t)}(e,n),n}function ye(e,t,r){var n
|
||
if(void 0!==(n=void 0===r?pe(e):r))return n.peekDescriptors(t)}function ge(e){return null!==e&&"object"==typeof e&&e.isDescriptor}var be=function(){function e(e,t,r,n){this.size=0,this.misses=0,this.hits=0,this.limit=e,this.func=t,this.key=r,this.store=n||new Map}return e.prototype.get=function(e){var t=void 0===this.key?e:this.key(e),r=this.store.get(t)
|
||
return void 0===r?(this.misses++,r=this._set(t,this.func(e))):r===ue?(this.hits++,r=void 0):this.hits++,r},e.prototype.set=function(e,t){var r=void 0===this.key?e:this.key(e)
|
||
return this._set(r,t)},e.prototype._set=function(e,t){return this.limit>this.size&&(this.size++,void 0===t?this.store.set(e,ue):this.store.set(e,t)),t},e.prototype.purge=function(){this.store.clear(),this.size=0,this.hits=0,this.misses=0},e}(),ve=new be(1e3,function(e){return e.indexOf(".")})
|
||
function _e(e){return"string"==typeof e&&-1!==ve.get(e)}var we={object:!0,function:!0,string:!0},Se=r.symbol("PROXY_CONTENT")
|
||
function Ee(e,t){return e[t]}function ke(e,t){var r=typeof e,n="object"===r,i=void 0,o=void 0
|
||
if(n||"function"===r){if(void 0===(i=ye(e,t))&&ge(o=Ee(e,t))&&(i=o),void 0!==i)return i.get(e,t)}else o=e[t]
|
||
return _e(t)?xe(e,t):void 0!==o||!n||t in e||"function"!=typeof e.unknownProperty?o:e.unknownProperty(t)}function xe(e,t){var r,n=e,i=t.split(".")
|
||
for(r=0;r<i.length;r++){if(!Ce(n))return
|
||
if((n=ke(n,i[r]))&&n.isDestroyed)return}return n}function Ce(e){return void 0!==e&&null!==e&&we[typeof e]}function Ae(e,t,r,i){if(!e.isDestroyed){if(_e(t))return function(e,t,r,i){var o=t.split("."),a=o.pop(),s=o.join("."),u=xe(e,s)
|
||
if(u)return Ae(u,a,r)
|
||
if(!i)throw new n.Error('Property set failed: object in path "'+s+'" could not be found or was destroyed.')}(e,t,r,i)
|
||
if(void 0!==(o=ye(e,t)))return o.set(e,t,r),r
|
||
var o,a,s=Ee(e,t)
|
||
return ge(s)?s.set(e,t,r):void 0!==s||"object"!=typeof e||t in e||"function"!=typeof e.setUnknownProperty?s!==r&&(a=pe(e),e[t]=r,L(e,t,a)):e.setUnknownProperty(t,r),r}}var Te=/\.@each$/
|
||
function Ie(e,t){var r=e.indexOf("{")
|
||
r<0?t(e.replace(Te,".[]")):function e(t,r,n,i){var o=r.indexOf("}"),a=0,s=void 0,u=void 0
|
||
var c=r.substring(n+1,o).split(",")
|
||
var l=r.substring(o+1)
|
||
t+=r.substring(0,n)
|
||
u=c.length
|
||
for(;a<u;)(s=l.indexOf("{"))<0?i((t+c[a++]+l).replace(Te,".[]")):e(t+c[a++],l,s,i)}("",e,r,t)}function Pe(e,t,r,n){var i,o,a=e._dependentKeys
|
||
if(null!==a&&void 0!==a)for(i=0;i<a.length;i++)o=a[i],n.writeDeps(o,r,(n.peekDeps(o,r)||0)+1),T(t,o,n)}function Me(e,t,r,n){var i,o,a=e._dependentKeys
|
||
if(null!==a&&void 0!==a)for(i=0;i<a.length;i++)o=a[i],n.writeDeps(o,r,(n.peekDeps(o,r)||0)-1),P(t,o,n)}function Re(e,t){this.isDescriptor=!0
|
||
var r="function"==typeof e
|
||
r?this._getter=e:(this._getter=e.get,this._setter=e.set),this._suspended=void 0,this._meta=void 0,this._volatile=!1,this._dependentKeys=t&&t.dependentKeys,this._readOnly=t&&r&&!0===t.readOnly}Re.prototype=new V,Re.prototype.constructor=Re
|
||
var Oe=Re.prototype
|
||
Oe.volatile=function(){return this._volatile=!0,this},Oe.readOnly=function(){return this._readOnly=!0,this},Oe.property=function(){var e,t=[]
|
||
function r(e){t.push(e)}for(e=0;e<arguments.length;e++)Ie(arguments[e],r)
|
||
return this._dependentKeys=t,this},Oe.meta=function(e){return 0===arguments.length?this._meta||{}:(this._meta=e,this)},Oe.didChange=function(e,t){if(!this._volatile&&this._suspended!==e){var r=pe(e)
|
||
if(void 0!==r&&r.source===e){var n=Le(e)
|
||
void 0!==n&&n.delete(t)&&Me(this,e,t,r)}}},Oe.get=function(e,t){if(this._volatile)return this._getter.call(e,t)
|
||
var r=Ne(e)
|
||
if(r.has(t))return r.get(t)
|
||
var n=this._getter.call(e,t)
|
||
r.set(t,n)
|
||
var i=me(e),o=i.readableChainWatchers()
|
||
return void 0!==o&&o.revalidate(t),Pe(this,e,t,i),n},Oe.set=function(e,t,r){return this._readOnly&&this._throwReadOnlyError(e,t),this._setter?this._volatile?this.volatileSet(e,t,r):this.setWithSuspend(e,t,r):this.clobberSet(e,t,r)},Oe._throwReadOnlyError=function(e,t){throw new n.Error('Cannot set read-only property "'+t+'" on object: '+r.inspect(e))},Oe.clobberSet=function(e,t,r){return K(e,t,null,je(e,t)),Ae(e,t,r),r},Oe.volatileSet=function(e,t,r){return this._setter.call(e,t,r)},Oe.setWithSuspend=function(e,t,r){var n=this._suspended
|
||
this._suspended=e
|
||
try{return this._set(e,t,r)}finally{this._suspended=n}},Oe._set=function(e,t,r){var n=me(e),i=Ne(e),o=i.has(t),a=i.get(t),s=this._setter.call(e,t,r,a)
|
||
return o&&a===s?s:(o||Pe(this,e,t,n),i.set(t,s),L(e,t,n),s)},Oe.teardown=function(e,t,r){if(!this._volatile){var n=Le(e)
|
||
void 0!==n&&n.delete(t)&&Me(this,e,t,r)}}
|
||
var Be=new WeakMap
|
||
function Ne(e){var t=Be.get(e)
|
||
return void 0===t&&(t=new Map,Be.set(e,t)),t}function je(e,t){var r=Be.get(e)
|
||
if(void 0!==r)return r.get(t)}function Le(e){return Be.get(e)}var De={},Ue=function(e){function t(t){var r=i.possibleConstructorReturn(this,e.call(this))
|
||
return r.isDescriptor=!0,r.altKey=t,r._dependentKeys=[t],r}return i.inherits(t,e),t.prototype.setup=function(e,t){var r=me(e)
|
||
r.peekWatching(t)&&Pe(this,e,t,r)},t.prototype.teardown=function(e,t,r){r.peekWatching(t)&&Me(this,e,t,r)},t.prototype.willWatch=function(e,t,r){Pe(this,e,t,r)},t.prototype.didUnwatch=function(e,t,r){Me(this,e,t,r)},t.prototype.get=function(e,t){var r=ke(e,this.altKey),n=me(e),i=Ne(e)
|
||
return i.get(t)!==De&&(i.set(t,De),Pe(this,e,t,n)),r},t.prototype.set=function(e,t,r){return Ae(e,this.altKey,r)},t.prototype.readOnly=function(){return this.set=Fe,this},t.prototype.oneWay=function(){return this.set=ze,this},t}(V)
|
||
function Fe(e,t){throw new n.Error("Cannot set read-only property '"+t+"' on object: "+r.inspect(e))}function ze(e,t,r){return K(e,t,null),Ae(e,t,r)}Ue.prototype._meta=void 0,Ue.prototype.meta=Re.prototype.meta
|
||
var qe=[],Ve={}
|
||
var He,Ke,We=(He="undefined"!=typeof window&&window.performance||{},(Ke=He.now||He.mozNow||He.webkitNow||He.msNow||He.oNow)?Ke.bind(He):function(){return+new Date})
|
||
function Ge(){}function Ye(e,r,n){if(0===qe.length)return Ge
|
||
var i=Ve[e]
|
||
if(i||(i=function(e){var t,r=[],n=void 0
|
||
for(t=0;t<qe.length;t++)(n=qe[t]).regex.test(e)&&r.push(n.object)
|
||
return Ve[e]=r,r}(e)),0===i.length)return Ge
|
||
var o=r(n),a=t.ENV.STRUCTURED_PROFILE,s=void 0
|
||
a&&(s=e+": "+o.object,console.time(s))
|
||
var u=new Array(i.length),c=void 0,l=void 0,f=We()
|
||
for(c=0;c<i.length;c++)l=i[c],u[c]=l.before(e,f,o)
|
||
return function(){var t=void 0,r=void 0,n=We()
|
||
for(t=0;t<i.length;t++)"function"==typeof(r=i[t]).after&&r.after(e,n,o,u[t])
|
||
a&&console.timeEnd(s)}}function Qe(e){return null===e||void 0===e}function Xe(e){var t,r,n=Qe(e)
|
||
if(n)return n
|
||
if("number"==typeof e.size)return!e.size
|
||
var i=typeof e
|
||
return"object"===i&&"number"==typeof(t=ke(e,"size"))?!t:"number"==typeof e.length&&"function"!==i?!e.length:"object"===i&&"number"==typeof(r=ke(e,"length"))&&!r}function $e(e){return Xe(e)||"string"==typeof e&&!1===/\S/.test(e)}e.flaggedInstrument=void 0,e.flaggedInstrument=function(e,t,r){return r()}
|
||
var Je=function(){function e(){this._registry=[],this._coreLibIndex=0}return e.prototype._getLibraryByName=function(e){var t,r=this._registry,n=r.length
|
||
for(t=0;t<n;t++)if(r[t].name===e)return r[t]},e.prototype.register=function(e,t,r){var n=this._registry.length
|
||
this._getLibraryByName(e)||(r&&(n=this._coreLibIndex++),this._registry.splice(n,0,{name:e,version:t}))},e.prototype.registerCoreLibrary=function(e,t){this.register(e,t,!0)},e.prototype.deRegister=function(e){var t=this._getLibraryByName(e),r=void 0
|
||
t&&(r=this._registry.indexOf(t),this._registry.splice(r,1))},e}(),Ze=new Je
|
||
function et(e){var t=Object.create(null)
|
||
for(var r in e)t[r]=e[r]
|
||
return t}function tt(e,t){var r=e._keys.copy(),n=et(e._values)
|
||
return t._keys=r,t._values=n,t.size=e.size,t}var rt=function(){function e(){this.clear()}return e.create=function(){return new this},e.prototype.clear=function(){this.presenceSet=Object.create(null),this.list=[],this.size=0},e.prototype.add=function(e,t){var n=t||r.guidFor(e),i=this.presenceSet,o=this.list
|
||
return!0!==i[n]&&(i[n]=!0,this.size=o.push(e)),this},e.prototype.delete=function(e,t){var n,i=t||r.guidFor(e),o=this.presenceSet,a=this.list
|
||
return!0===o[i]&&(delete o[i],(n=a.indexOf(e))>-1&&a.splice(n,1),this.size=a.length,!0)},e.prototype.isEmpty=function(){return 0===this.size},e.prototype.has=function(e){if(0===this.size)return!1
|
||
var t=r.guidFor(e)
|
||
return!0===this.presenceSet[t]},e.prototype.forEach=function(e){if(0!==this.size){var t,r,n=this.list
|
||
if(2===arguments.length)for(t=0;t<n.length;t++)e.call(arguments[1],n[t])
|
||
else for(r=0;r<n.length;r++)e(n[r])}},e.prototype.toArray=function(){return this.list.slice()},e.prototype.copy=function(){var e=new(0,this.constructor)
|
||
return e.presenceSet=et(this.presenceSet),e.list=this.toArray(),e.size=this.size,e},e}(),nt=function(){function e(){this._keys=new rt,this._values=Object.create(null),this.size=0}return e.create=function(){return new this},e.prototype.get=function(e){if(0!==this.size)return this._values[r.guidFor(e)]},e.prototype.set=function(e,t){var n=this._keys,i=this._values,o=r.guidFor(e),a=-0===e?0:e
|
||
return n.add(a,o),i[o]=t,this.size=n.size,this},e.prototype.delete=function(e){if(0===this.size)return!1
|
||
var t=this._keys,n=this._values,i=r.guidFor(e)
|
||
return!!t.delete(e,i)&&(delete n[i],this.size=t.size,!0)},e.prototype.has=function(e){return this._keys.has(e)},e.prototype.forEach=function(e){if(0!==this.size){var t=this,r=void 0,n=void 0
|
||
2===arguments.length?(n=arguments[1],r=function(r){return e.call(n,t.get(r),r,t)}):r=function(r){return e(t.get(r),r,t)},this._keys.forEach(r)}},e.prototype.clear=function(){this._keys.clear(),this._values=Object.create(null),this.size=0},e.prototype.copy=function(){return tt(this,new e)},e}(),it=function(e){function t(t){var r=i.possibleConstructorReturn(this,e.call(this))
|
||
return r.defaultValue=t.defaultValue,r}return i.inherits(t,e),t.create=function(e){return e?new t(e):new nt},t.prototype.get=function(t){var r
|
||
return this.has(t)?e.prototype.get.call(this,t):(r=this.defaultValue(t),this.set(t,r),r)},t.prototype.copy=function(){return tt(this,new(0,this.constructor)({defaultValue:this.defaultValue}))},t}(nt),ot=Array.prototype.concat,at=Array.isArray
|
||
function st(e){return"function"==typeof e&&!1!==e.isMethod&&e!==Boolean&&e!==Object&&e!==Number&&e!==Array&&e!==Date&&e!==String}var ut={}
|
||
function ct(e,t,r,n){var i=r[e]||n[e]
|
||
return t[e]&&(i=i?ot.call(i,t[e]):t[e]),i}function lt(e,t,n,i,o){if(void 0!==o[t])return n
|
||
var a=i[t]
|
||
return void 0===a&&void 0===ye(e,t)&&(a=e[t]),"function"==typeof a?r.wrap(n,a):n}function ft(e,n,i,o,a,s,u,c){if(i instanceof V){if(t.ENV._ENABLE_PROPERTY_REQUIRED_SUPPORT&&i===vt&&a[n])return ut
|
||
i._getter&&(i=function(e,t,n,i,o,a){var s=void 0
|
||
return void 0===i[t]&&(s=o[t]),s||(s=ye(a,t,e)),void 0!==s&&s instanceof Re?((n=Object.create(n))._getter=r.wrap(n._getter,s._getter),s._setter&&(n._setter?n._setter=r.wrap(n._setter,s._setter):n._setter=s._setter),n):n}(o,n,i,s,a,e)),a[n]=i,s[n]=void 0}else u&&u.indexOf(n)>=0||"concatenatedProperties"===n||"mergedProperties"===n?i=function(e,t,n,i){var o=i[t]||e[t]
|
||
return null===o||void 0===o?r.makeArray(n):at(o)?null===n||void 0===n?o:ot.call(o,n):ot.call(r.makeArray(o),n)}(e,n,i,s):c&&c.indexOf(n)>-1?i=function(e,t,n,i){var o,a=i[t]||e[t]
|
||
if(!a)return n
|
||
var s=r.assign({},a),u=!1
|
||
for(var c in n)n.hasOwnProperty(c)&&(st(o=n[c])?(u=!0,s[c]=lt(e,c,o,a,{})):s[c]=o)
|
||
return u&&(s._super=r.ROOT),s}(e,n,i,s):st(i)&&(i=lt(e,n,i,s,a)),a[n]=void 0,s[n]=i}function ht(e,t,r,n){var i=t.methodName,o=void 0,a=void 0
|
||
return r[i]||n[i]?(o=n[i],t=r[i]):void 0!==(a=ye(e,i))?(t=a,o=void 0):(t=void 0,o=e[i]),{desc:t,value:o}}function dt(e,t,r,n){var i
|
||
if(r)for(i=0;i<r.length;i++)n(e,r[i],null,t)}function pt(e,t,r,n){"function"==typeof r&&(dt(e,t,r.__ember_observes__,O),dt(e,t,r.__ember_listens__,h)),"function"==typeof n&&(dt(e,t,n.__ember_observes__,R),dt(e,t,n.__ember_listens__,f))}function mt(e,n,i){var o,a,s={},u={},c=me(e),l=[],f=void 0,h=void 0,d=void 0
|
||
for(e._super=r.ROOT,function e(t,n,i,o,a,s){var u,c,l,f,h=void 0,d=void 0,p=void 0,m=void 0,y=void 0
|
||
function g(e){delete i[e],delete o[e]}for(u=0;u<t.length;u++)if(h=t[u],c=n,f=void 0,f=void 0,(d=(l=h)instanceof yt?(f=r.guidFor(l),c.peekMixins(f)?ut:(c.writeMixins(f,l),l.properties)):l)!==ut)if(d){for(p in a.willMergeMixin&&a.willMergeMixin(d),m=ct("concatenatedProperties",d,o,a),y=ct("mergedProperties",d,o,a),d)d.hasOwnProperty(p)&&(s.push(p),ft(a,p,d[p],n,i,o,m,y))
|
||
d.hasOwnProperty("toString")&&(a.toString=d.toString)}else h.mixins&&(e(h.mixins,n,i,o,a,s),h._without&&h._without.forEach(g))}(n,c,s,u,e,l),o=0;o<l.length;o++)if("constructor"!==(f=l[o])&&u.hasOwnProperty(f)&&(d=s[f],h=u[f],!t.ENV._ENABLE_PROPERTY_REQUIRED_SUPPORT||d!==vt)){for(;d&&d instanceof _t;)d=(a=ht(e,d,s,u)).desc,h=a.value
|
||
void 0===d&&void 0===h||(void 0!==ye(e,f)?pt(e,f,null,h):pt(e,f,e[f],h),t.ENV._ENABLE_BINDING_SUPPORT&&"function"==typeof yt.detectBinding&&yt.detectBinding(f)&&c.writeBindings(f,h),K(e,f,d,h,c))}return t.ENV._ENABLE_BINDING_SUPPORT&&!i&&"function"==typeof yt.finishProtype&&yt.finishPartial(e,c),e}var yt=function(){function e(t,i){this.properties=i
|
||
var o,a,s,u=t&&t.length
|
||
if(u>0){for(o=new Array(u),a=0;a<u;a++)s=t[a],o[a]=s instanceof e?s:new e(void 0,s)
|
||
this.mixins=o}else this.mixins=void 0
|
||
this.ownerConstructor=void 0,this._without=void 0,this[r.GUID_KEY]=null,this[r.NAME_KEY]=null,n.debugSeal(this)}return e.applyPartial=function(e){var t,r,n
|
||
for(t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n]
|
||
return mt(e,r,!0)},e.create=function(){bt=!0
|
||
var e,t,r
|
||
for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
return new this(t,void 0)},e.mixins=function(e){var t=pe(e),r=[]
|
||
return void 0===t?r:(t.forEachMixins(function(e,t){t.properties||r.push(t)}),r)},e.prototype.reopen=function(){var t=void 0
|
||
this.properties?(t=new e(void 0,this.properties),this.properties=void 0,this.mixins=[t]):this.mixins||(this.mixins=[])
|
||
var r=this.mixins,n=void 0
|
||
for(n=0;n<arguments.length;n++)(t=arguments[n])instanceof e?r.push(t):r.push(new e(void 0,t))
|
||
return this},e.prototype.apply=function(e){return mt(e,[this],!1)},e.prototype.applyPartial=function(e){return mt(e,[this],!0)},e.prototype.detect=function(t){if("object"!=typeof t||null===t)return!1
|
||
if(t instanceof e)return function e(t,n,i){var o=r.guidFor(t)
|
||
if(i[o])return!1
|
||
i[o]=!0
|
||
if(t===n)return!0
|
||
var a=t.mixins
|
||
var s=a?a.length:0
|
||
for(;--s>=0;)if(e(a[s],n,i))return!0
|
||
return!1}(t,this,{})
|
||
var n=pe(t)
|
||
return void 0!==n&&!!n.peekMixins(r.guidFor(this))},e.prototype.without=function(){var t,r,n,i=new e([this])
|
||
for(t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n]
|
||
return i._without=r,i},e.prototype.keys=function(){var e={}
|
||
return function e(t,n,i){var o,a,s
|
||
if(i[r.guidFor(n)])return
|
||
i[r.guidFor(n)]=!0
|
||
if(n.properties)for(o=Object.keys(n.properties),a=0;a<o.length;a++)s=o[a],t[s]=!0
|
||
else n.mixins&&n.mixins.forEach(function(r){return e(t,r,i)})}(e,this,{}),Object.keys(e)},e}()
|
||
yt._apply=mt,t.ENV._ENABLE_BINDING_SUPPORT&&(yt.finishPartial=null,yt.detectBinding=null)
|
||
var gt=yt.prototype
|
||
gt.toString=function(){return"(unknown mixin)"},n.debugSeal(gt)
|
||
var bt=!1
|
||
var vt=new V
|
||
function _t(e){this.isDescriptor=!0,this.methodName=e}function wt(e,t){this.type=e,this.name=t,this._super$Constructor(St),xt.oneWay.call(this)}function St(e){var t=ye(this,e)
|
||
return(r.getOwner(this)||this.container).lookup(t.type+":"+(t.name||e))}vt.toString=function(){return"(Required Property)"},_t.prototype=new V,wt.prototype=Object.create(V.prototype)
|
||
var Et=wt.prototype,kt=Re.prototype,xt=Ue.prototype
|
||
Et._super$Constructor=Re,Et.get=kt.get,Et.readOnly=kt.readOnly,Et.teardown=kt.teardown
|
||
var Ct=Array.prototype.splice,At=function(e){function t(t){var r=i.possibleConstructorReturn(this,e.call(this))
|
||
return r.desc=t,r}return i.inherits(t,e),t.prototype.setup=function(e,t){Object.defineProperty(e,t,this.desc)},t.prototype.get=function(e,t){return e[t]},t.prototype.set=function(e,t,r){return e[t]=r},t.prototype.teardown=function(){},t}(V)
|
||
e.default=u,e.computed=function(){for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
var e,t,r,n=new Re(t.pop())
|
||
return t.length>0&&n.property.apply(n,t),n},e.getCacheFor=Ne,e.getCachedValueFor=je,e.peekCacheFor=Le,e.ComputedProperty=Re,e.alias=function(e){return new Ue(e)},e.merge=function(e,t){if(null===t||"object"!=typeof t)return e
|
||
var r,n=Object.keys(t),i=void 0
|
||
for(r=0;r<n.length;r++)e[i=n[r]]=t[i]
|
||
return e},e.deprecateProperty=function(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,set:function(e){Ae(this,r,e)},get:function(){return ke(this,r)}})},e.instrument=function(e,t,r,n){if(arguments.length<=3&&"function"==typeof t&&(n=r,r=t,t=void 0),0===qe.length)return r.call(n)
|
||
var i=t||{},o=Ye(e,function(){return i})
|
||
return o?function(e,t,r,n){var i=void 0
|
||
try{i=e.call(n)}catch(e){r.exception=e,i=r}finally{t()}return i}(r,o,i,n):r.call(n)},e._instrumentStart=Ye,e.instrumentationReset=function(){qe.length=0,Ve={}},e.instrumentationSubscribe=function(e,t){var r,n=e.split("."),i=void 0,o=[]
|
||
for(r=0;r<n.length;r++)"*"===(i=n[r])?o.push("[^\\.]*"):o.push(i)
|
||
o=o.join("\\."),o+="(\\..*)?"
|
||
var a={pattern:e,regex:new RegExp("^"+o+"$"),object:t}
|
||
return qe.push(a),Ve={},a},e.instrumentationUnsubscribe=function(e){var t,r=void 0
|
||
for(t=0;t<qe.length;t++)qe[t]===e&&(r=t)
|
||
qe.splice(r,1),Ve={}},e.getOnerror=function(){return p},e.setOnerror=function(e){p=e},e.setDispatchOverride=function(e){y=e},e.getDispatchOverride=function(){return y},e.descriptorFor=ye,e.meta=me,e.peekMeta=pe,e.deleteMeta=function(e){var t=pe(e)
|
||
void 0!==t&&t.destroy()},e.Cache=be,e.PROXY_CONTENT=Se,e._getPath=xe,e.get=ke,e.getWithDefault=function(e,t,r){var n=ke(e,t)
|
||
return void 0===n?r:n},e.set=Ae,e.trySet=function(e,t,r){return Ae(e,t,r,!0)},e.objectAt=Q
|
||
e.eachProxyFor=$,e.eachProxyArrayWillChange=function(e,t,r,n){var i=X.get(e)
|
||
void 0!==i&&i.arrayWillChange(e,t,r,n)},e.eachProxyArrayDidChange=function(e,t,r,n){var i=X.get(e)
|
||
void 0!==i&&i.arrayDidChange(e,t,r,n)},e.addListener=f,e.hasListeners=function(e,t){var r=pe(e)
|
||
if(void 0===r)return!1
|
||
var n=r.matchingListeners(t)
|
||
return void 0!==n&&n.length>0},e.on=function(){for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
var e,t,r,n=t.pop()
|
||
return n.__ember_listens__=t,n},e.removeListener=h,e.sendEvent=d,e.isNone=Qe,e.isEmpty=Xe,e.isBlank=$e,e.isPresent=function(e){return!$e(e)},e.run=v,e.beginPropertyChanges=F,e.changeProperties=q,e.endPropertyChanges=z,e.notifyPropertyChange=L,e.overrideChains=U,e.propertyDidChange=function(e,t,r){L(e,t,r)},e.propertyWillChange=function(){},e.PROPERTY_DID_CHANGE=B,e.defineProperty=K,e.Descriptor=V,e._hasCachedComputedProperties=function(){W=!0},e.watchKey=G,e.unwatchKey=Y,e.ChainNode=se,e.finishChains=function(e){var t=e.readableChainWatchers()
|
||
void 0!==t&&t.revalidateAll(),void 0!==e.readableChains()&&e.writableChains(ie)},e.removeChainWatcher=ae,e.watchPath=C
|
||
e.unwatchPath=A,e.isWatching=function(e,t){return I(e,t)>0},e.unwatch=P,e.watch=T,e.watcherCount=I,e.libraries=Ze,e.Libraries=Je,e.Map=nt,e.MapWithDefault=it,e.OrderedSet=rt,e.getProperties=function(e){var t={},r=arguments,n=1
|
||
for(2===arguments.length&&Array.isArray(arguments[1])&&(n=0,r=arguments[1]);n<r.length;n++)t[r[n]]=ke(e,r[n])
|
||
return t},e.setProperties=function(e,t){return null===t||"object"!=typeof t?t:(q(function(){var r,n=Object.keys(t),i=void 0
|
||
for(r=0;r<n.length;r++)i=n[r],Ae(e,i,t[i])}),t)},e.expandProperties=Ie,e.addObserver=R,e.removeObserver=O,e.Mixin=yt,e.aliasMethod=function(e){return new _t(e)},e.mixin=function(e){var t,r,n
|
||
for(t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n]
|
||
return mt(e,r,!1),e},e.observer=function(){for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
var e,t,r,n,i=t.pop(),o=t,a=[],s=function(e){return a.push(e)}
|
||
for(n=0;n<o.length;++n)Ie(o[n],s)
|
||
return i.__ember_observes__=a,i},e.required=function(){return vt},e.REQUIRED=vt,e.hasUnprocessedMixins=function(){return bt},e.clearUnprocessedMixins=function(){bt=!1},e.InjectedProperty=wt,e.setHasViews=function(e){_=e},e.tagForProperty=function(e,t,r){if("object"!=typeof e||null===e)return o.CONSTANT_TAG
|
||
var n=void 0===r?me(e):r
|
||
if(n.isProxy())return S(e,n)
|
||
var i=n.writableTags(),a=i[t]
|
||
return a||(i[t]=w())},e.tagFor=S,e.markObjectAsDirty=E,e.replace=function(e,t,r,n){for(var i=[].concat(n),o=[],a=t,s=r,u=void 0,c=void 0;i.length;)(u=s>6e4?6e4:s)<=0&&(u=0),c=i.splice(0,6e4),c=[a,u].concat(c),a+=6e4,s-=u,o=o.concat(Ct.apply(e,c))
|
||
return o},e.didRender=void 0
|
||
e.assertNotRendered=void 0,e.isProxy=function(e){var t
|
||
return"object"==typeof e&&null!==e&&(void 0!==(t=pe(e))&&t.isProxy())},e.descriptor=function(e){return new At(e)},Object.defineProperty(e,"__esModule",{value:!0})}),e("ember-routing/ext/controller",["exports","ember-metal","ember-runtime","ember-routing/utils"],function(e,t,r,n){"use strict"
|
||
r.ControllerMixin.reopen({concatenatedProperties:["queryParams"],queryParams:null,_qpDelegate:null,_qpChanged:function(e,r){var n=r.substr(0,r.length-3);(0,e._qpDelegate)(n,(0,t.get)(e,n))},transitionToRoute:function(){var e,r,i,o=(0,t.get)(this,"target"),a=o.transitionToRoute||o.transitionTo
|
||
for(e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i]
|
||
return a.apply(o,(0,n.prefixRouteNameArg)(this,r))},replaceRoute:function(){var e,r,i,o=(0,t.get)(this,"target"),a=o.replaceRoute||o.replaceWith
|
||
for(e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i]
|
||
return a.apply(o,(0,n.prefixRouteNameArg)(this,r))}}),e.default=r.ControllerMixin}),e("ember-routing/index",["exports","ember-routing/location/api","ember-routing/location/none_location","ember-routing/location/hash_location","ember-routing/location/history_location","ember-routing/location/auto_location","ember-routing/system/generate_controller","ember-routing/system/controller_for","ember-routing/system/dsl","ember-routing/system/router","ember-routing/system/route","ember-routing/system/query_params","ember-routing/services/routing","ember-routing/services/router","ember-routing/system/cache","ember-routing/ext/controller"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p){"use strict"
|
||
e.BucketCache=e.RouterService=e.RoutingService=e.QueryParams=e.Route=e.Router=e.RouterDSL=e.controllerFor=e.generateControllerFactory=e.generateController=e.AutoLocation=e.HistoryLocation=e.HashLocation=e.NoneLocation=e.Location=void 0,Object.defineProperty(e,"Location",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"NoneLocation",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"HashLocation",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"HistoryLocation",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"AutoLocation",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"generateController",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"generateControllerFactory",{enumerable:!0,get:function(){return a.generateControllerFactory}}),Object.defineProperty(e,"controllerFor",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"RouterDSL",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"QueryParams",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"RoutingService",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"RouterService",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"BucketCache",{enumerable:!0,get:function(){return p.default}})}),e("ember-routing/location/api",["exports","ember-debug","ember-environment","ember-routing/location/util"],function(e,t,r,n){"use strict"
|
||
e.default={create:function(e){var t=e&&e.implementation,r=this.implementations[t]
|
||
return r.create.apply(r,arguments)},implementations:{},_location:r.environment.location,_getHash:function(){return(0,n.getHash)(this.location)}}}),e("ember-routing/location/auto_location",["exports","ember-utils","ember-metal","ember-debug","ember-runtime","ember-environment","ember-routing/location/util"],function(e,t,r,n,i,o,a){"use strict"
|
||
function s(e){return function(){var n,i,o,a=(0,r.get)(this,"concreteImplementation")
|
||
for(n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o]
|
||
return(0,t.tryInvoke)(a,e,i)}}function u(e,t){var r=(0,a.getPath)(t),n=(0,a.getHash)(t),i=(0,a.getQuery)(t),o=(r.indexOf(e),void 0),s=void 0
|
||
return"#/"===n.substr(0,2)?(o=(s=n.substr(1).split("#")).shift(),"/"===r.charAt(r.length-1)&&(o=o.substr(1)),r+=o+i,s.length&&(r+="#"+s.join("#"))):r+=i+n,r}function c(e,t){var r=e,n=u(e,t).substr(e.length)
|
||
return""!==n&&("/"!==n[0]&&(n="/"+n),r+="#"+n),r}e.getHistoryPath=u,e.getHashPath=c,e.default=i.Object.extend({location:o.environment.location,history:o.environment.history,global:o.environment.window,userAgent:o.environment.userAgent,cancelRouterSetup:!1,rootURL:"/",detect:function(){var e=this.rootURL,n=function(e){var t,r,n=e.location,i=e.userAgent,o=e.history,s=e.documentMode,l=e.global,f=e.rootURL,h="none",d=!1,p=(0,a.getFullPath)(n);(0,a.supportsHistory)(i,o)?(t=u(f,n),p===t?h="history":"/#"===p.substr(0,2)?(o.replaceState({path:t},null,t),h="history"):(d=!0,(0,a.replacePath)(n,t))):(0,a.supportsHashChange)(s,l)&&(r=c(f,n),p===r||"/"===p&&"/#/"===r?h="hash":(d=!0,(0,a.replacePath)(n,r)))
|
||
if(d)return!1
|
||
return h}({location:this.location,history:this.history,userAgent:this.userAgent,rootURL:e,documentMode:this.documentMode,global:this.global})
|
||
!1===n&&((0,r.set)(this,"cancelRouterSetup",!0),n="none")
|
||
var i=(0,t.getOwner)(this).lookup("location:"+n);(0,r.set)(i,"rootURL",e),(0,r.set)(this,"concreteImplementation",i)},initState:s("initState"),getURL:s("getURL"),setURL:s("setURL"),replaceURL:s("replaceURL"),onUpdateURL:s("onUpdateURL"),formatURL:s("formatURL"),willDestroy:function(){var e=(0,r.get)(this,"concreteImplementation")
|
||
e&&e.destroy()}})}),e("ember-routing/location/hash_location",["exports","ember-metal","ember-runtime","ember-routing/location/api"],function(e,t,r,n){"use strict"
|
||
e.default=r.Object.extend({implementation:"hash",init:function(){(0,t.set)(this,"location",(0,t.get)(this,"_location")||window.location),this._hashchangeHandler=void 0},getHash:n.default._getHash,getURL:function(){var e=this.getHash().substr(1),t=e
|
||
return"/"!==t[0]&&(t="/",e&&(t+="#"+e)),t},setURL:function(e){(0,t.get)(this,"location").hash=e,(0,t.set)(this,"lastSetURL",e)},replaceURL:function(e){(0,t.get)(this,"location").replace("#"+e),(0,t.set)(this,"lastSetURL",e)},onUpdateURL:function(e){this._removeEventListener(),this._hashchangeHandler=t.run.bind(this,function(){var r=this.getURL();(0,t.get)(this,"lastSetURL")!==r&&((0,t.set)(this,"lastSetURL",null),e(r))}),window.addEventListener("hashchange",this._hashchangeHandler)},formatURL:function(e){return"#"+e},willDestroy:function(){this._removeEventListener()},_removeEventListener:function(){this._hashchangeHandler&&window.removeEventListener("hashchange",this._hashchangeHandler)}})}),e("ember-routing/location/history_location",["exports","ember-metal","ember-runtime","ember-routing/location/api"],function(e,t,r,n){"use strict"
|
||
var i=!1
|
||
function o(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t
|
||
return t=16*Math.random()|0,("x"===e?t:3&t|8).toString(16)})}e.default=r.Object.extend({implementation:"history",init:function(){this._super.apply(this,arguments)
|
||
var e=document.querySelector("base"),r=""
|
||
e&&(r=e.getAttribute("href")),(0,t.set)(this,"baseURL",r),(0,t.set)(this,"location",(0,t.get)(this,"location")||window.location),this._popstateHandler=void 0},initState:function(){var e=(0,t.get)(this,"history")||window.history;(0,t.set)(this,"history",e),e&&"state"in e&&(this.supportsHistory=!0)
|
||
var r=this.getState(),n=this.formatURL(this.getURL())
|
||
r&&r.path===n?this._previousURL=this.getURL():this.replaceState(n)},rootURL:"/",getURL:function(){var e=(0,t.get)(this,"location"),r=e.pathname,n=(0,t.get)(this,"rootURL"),i=(0,t.get)(this,"baseURL")
|
||
n=n.replace(/\/$/,""),i=i.replace(/\/$/,"")
|
||
var o=r.replace(new RegExp("^"+i+"(?=/|$)"),"").replace(new RegExp("^"+n+"(?=/|$)"),"").replace(/\/\/$/g,"/")
|
||
return o+=(e.search||"")+this.getHash()},setURL:function(e){var t=this.getState()
|
||
e=this.formatURL(e),t&&t.path===e||this.pushState(e)},replaceURL:function(e){var t=this.getState()
|
||
e=this.formatURL(e),t&&t.path===e||this.replaceState(e)},getState:function(){return this.supportsHistory?(0,t.get)(this,"history").state:this._historyState},pushState:function(e){var r={path:e,uuid:o()};(0,t.get)(this,"history").pushState(r,null,e),this._historyState=r,this._previousURL=this.getURL()},replaceState:function(e){var r={path:e,uuid:o()};(0,t.get)(this,"history").replaceState(r,null,e),this._historyState=r,this._previousURL=this.getURL()},onUpdateURL:function(e){var t=this
|
||
this._removeEventListener(),this._popstateHandler=function(){(i||(i=!0,t.getURL()!==t._previousURL))&&e(t.getURL())},window.addEventListener("popstate",this._popstateHandler)},formatURL:function(e){var r=(0,t.get)(this,"rootURL"),n=(0,t.get)(this,"baseURL")
|
||
return""!==e?(r=r.replace(/\/$/,""),n=n.replace(/\/$/,"")):"/"===n[0]&&"/"===r[0]&&(n=n.replace(/\/$/,"")),n+r+e},willDestroy:function(){this._removeEventListener()},getHash:n.default._getHash,_removeEventListener:function(){this._popstateHandler&&window.removeEventListener("popstate",this._popstateHandler)}})}),e("ember-routing/location/none_location",["exports","ember-metal","ember-debug","ember-runtime"],function(e,t,r,n){"use strict"
|
||
e.default=n.Object.extend({implementation:"none",path:"",detect:function(){this.rootURL},rootURL:"/",getURL:function(){var e=(0,t.get)(this,"path"),r=(0,t.get)(this,"rootURL")
|
||
return r=r.replace(/\/$/,""),e.replace(new RegExp("^"+r+"(?=/|$)"),"")},setURL:function(e){(0,t.set)(this,"path",e)},onUpdateURL:function(e){this.updateCallback=e},handleURL:function(e){(0,t.set)(this,"path",e),this.updateCallback(e)},formatURL:function(e){var r=(0,t.get)(this,"rootURL")
|
||
return""!==e&&(r=r.replace(/\/$/,"")),r+e}})}),e("ember-routing/location/util",["exports"],function(e){"use strict"
|
||
function t(e){var t=e.pathname
|
||
return"/"!==t[0]&&(t="/"+t),t}function r(e){return e.search}function n(e){var t=e.href,r=t.indexOf("#")
|
||
return-1===r?"":t.substr(r)}function i(e){var t=e.origin
|
||
return t||(t=e.protocol+"//"+e.hostname,e.port&&(t+=":"+e.port)),t}e.getPath=t,e.getQuery=r,e.getHash=n,e.getFullPath=function(e){return t(e)+r(e)+n(e)},e.getOrigin=i,e.supportsHashChange=function(e,t){return"onhashchange"in t&&(void 0===e||e>7)},e.supportsHistory=function(e,t){return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&!!(t&&"pushState"in t)},e.replacePath=function(e,t){e.replace(i(e)+t)}}),e("ember-routing/services/router",["exports","ember-runtime","ember-routing/utils"],function(e,t,r){"use strict"
|
||
var n=t.Service.extend({currentRouteName:(0,t.readOnly)("_router.currentRouteName"),currentURL:(0,t.readOnly)("_router.currentURL"),location:(0,t.readOnly)("_router.location"),rootURL:(0,t.readOnly)("_router.rootURL"),_router:null,transitionTo:function(){for(e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
if((0,r.resemblesURL)(t[0]))return this._router._doURLTransition("transitionTo",t[0])
|
||
var e,t,n,i=(0,r.extractRouteArgs)(t),o=i.routeName,a=i.models,s=i.queryParams,u=this._router._doTransition(o,a,s,!0)
|
||
return u._keepDefaultQueryParamValues=!0,u},replaceWith:function(){return this.transitionTo.apply(this,arguments).method("replace")},urlFor:function(){var e
|
||
return(e=this._router).generate.apply(e,arguments)},isActive:function(){for(e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
var e,t,n,i=(0,r.extractRouteArgs)(t),o=i.routeName,a=i.models,s=i.queryParams,u=this._router._routerMicrolib
|
||
return!!u.isActiveIntent(o,a,null)&&(!(Object.keys(s).length>0)||(this._router._prepareQueryParams(o,a,s,!0),(0,r.shallowEqual)(s,u.state.queryParams)))}})
|
||
e.default=n}),e("ember-routing/services/routing",["exports","ember-utils","ember-runtime","ember-metal"],function(e,t,r,n){"use strict"
|
||
e.default=r.Service.extend({router:null,targetState:(0,r.readOnly)("router.targetState"),currentState:(0,r.readOnly)("router.currentState"),currentRouteName:(0,r.readOnly)("router.currentRouteName"),currentPath:(0,r.readOnly)("router.currentPath"),hasRoute:function(e){return(0,n.get)(this,"router").hasRoute(e)},transitionTo:function(e,t,r,i){var o=(0,n.get)(this,"router")._doTransition(e,t,r)
|
||
return i&&o.method("replace"),o},normalizeQueryParams:function(e,t,r){(0,n.get)(this,"router")._prepareQueryParams(e,t,r)},generateURL:function(e,r,i){var o=(0,n.get)(this,"router")
|
||
if(o._routerMicrolib){var a={}
|
||
return i&&((0,t.assign)(a,i),this.normalizeQueryParams(e,r,a)),o.generate.apply(o,[e].concat(r,[{queryParams:a}]))}},isActiveForRoute:function(e,t,r,i,o){var a=(0,n.get)(this,"router")._routerMicrolib.recognizer.handlersFor(r),s=a[a.length-1].handler,u=function(e,t){var r,n=0
|
||
for(r=0;r<t.length&&(n+=t[r].names.length,t[r].handler!==e);r++);return n}(r,a)
|
||
return e.length>u&&(r=s),i.isActiveIntent(r,e,t,!o)}})}),e("ember-routing/system/cache",["exports","ember-runtime"],function(e,t){"use strict"
|
||
e.default=t.Object.extend({init:function(){this.cache=Object.create(null)},has:function(e){return!!this.cache[e]},stash:function(e,t,r){var n=this.cache[e]
|
||
n||(n=this.cache[e]=Object.create(null)),n[t]=r},lookup:function(e,t,r){var n=this.cache
|
||
if(!this.has(e))return r
|
||
var i=n[e]
|
||
return t in i&&void 0!==i[t]?i[t]:r}})}),e("ember-routing/system/controller_for",["exports"],function(e){"use strict"
|
||
e.default=function(e,t,r){return e.lookup("controller:"+t,r)}}),e("ember-routing/system/dsl",["exports","ember-utils","ember-debug"],function(e,t,r){"use strict"
|
||
var n=0,i=function(){function e(e,t){this.parent=e,this.enableLoadingSubstates=t&&t.enableLoadingSubstates,this.matches=[],this.explicitIndex=void 0,this.options=t}return e.prototype.route=function(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[2],s="/_unused_dummy_error_path_route_"+t+"/:error"
|
||
2===arguments.length&&"function"==typeof n&&(i=n,n={}),this.enableLoadingSubstates&&(a(this,t+"_loading",{resetNamespace:n.resetNamespace}),a(this,t+"_error",{resetNamespace:n.resetNamespace,path:s})),i?(a(r=new e(o(this,t,n.resetNamespace),this.options),"loading"),a(r,"error",{path:s}),i.call(r),a(this,t,n,r.generate())):a(this,t,n)},e.prototype.push=function(e,r,n,i){var o,a,s=r.split(".")
|
||
if(this.options.engineInfo)o=r.slice(this.options.engineInfo.fullName.length+1),a=(0,t.assign)({localFullName:o},this.options.engineInfo),i&&(a.serializeMethod=i),this.options.addRouteForEngine(r,a)
|
||
else if(i)throw new Error("Defining a route serializer on route '"+r+"' outside an Engine is not allowed.")
|
||
""!==e&&"/"!==e&&"index"!==s[s.length-1]||(this.explicitIndex=!0),this.matches.push(e,r,n)},e.prototype.generate=function(){var e=this.matches
|
||
return this.explicitIndex||this.route("index",{path:"/"}),function(t){var r
|
||
for(r=0;r<e.length;r+=3)t(e[r]).to(e[r+1],e[r+2])}},e.prototype.mount=function(r){var i,s,u,c,l,f,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=this.options.resolveRouteMap(r),p=r
|
||
h.as&&(p=h.as)
|
||
var m=o(this,p,h.resetNamespace),y={name:r,instanceId:n++,mountPoint:m,fullName:m},g=h.path
|
||
"string"!=typeof g&&(g="/"+p)
|
||
var b=void 0,v="/_unused_dummy_error_path_route_"+p+"/:error"
|
||
d&&(i=!1,(s=this.options.engineInfo)&&(i=!0,this.options.engineInfo=y),a(u=new e(m,(0,t.assign)({engineInfo:y},this.options)),"loading"),a(u,"error",{path:v}),d.class.call(u),b=u.generate(),i&&(this.options.engineInfo=s))
|
||
var _=(0,t.assign)({localFullName:"application"},y)
|
||
this.enableLoadingSubstates&&(c=p+"_loading",l="application_loading",f=(0,t.assign)({localFullName:l},y),a(this,c,{resetNamespace:h.resetNamespace}),this.options.addRouteForEngine(c,f),c=p+"_error",l="application_error",f=(0,t.assign)({localFullName:l},y),a(this,c,{resetNamespace:h.resetNamespace,path:v}),this.options.addRouteForEngine(c,f)),this.options.addRouteForEngine(m,_),this.push(g,m,b)},e}()
|
||
function o(e,t,r){return function(e){return"application"!==e.parent}(e)&&!0!==r?e.parent+"."+t:t}function a(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],i=o(e,t,r.resetNamespace)
|
||
"string"!=typeof r.path&&(r.path="/"+t),e.push(r.path,i,n,r.serialize)}e.default=i,i.map=function(e){var t=new i
|
||
return e.call(t),t}}),e("ember-routing/system/generate_controller",["exports","ember-metal","ember-debug"],function(e){"use strict"
|
||
function t(e,t){var r=e.factoryFor("controller:basic").class
|
||
return r=r.extend({toString:function(){return"(generated "+t+" controller)"}}),e.register("controller:"+t,r),r}e.generateControllerFactory=t,e.default=function(e,r){return t(e,r),e.lookup("controller:"+r)}}),e("ember-routing/system/query_params",["exports","ember-runtime"],function(e,t){"use strict"
|
||
e.default=t.Object.extend({isQueryParams:!0,values:null})}),e("ember-routing/system/route",["exports","ember-utils","ember-metal","ember-debug","ember-runtime","ember-routing/system/generate_controller","ember-routing/utils"],function(e,t,r,n,i,o,a){"use strict"
|
||
function s(){return this}function u(e,t){if(!(t.length<1)&&e){var n,i={}
|
||
return 1===t.length?(n=t[0])in e?i[n]=(0,r.get)(e,n):/_id$/.test(n)&&(i[n]=(0,r.get)(e,"id")):i=(0,r.getProperties)(e,t),i}}e.defaultSerialize=u,e.hasDefaultSerialize=function(e){return!!e.serialize[c]}
|
||
var c=(0,t.symbol)("DEFAULT_SERIALIZE")
|
||
u[c]=!0
|
||
var l=i.Object.extend(i.ActionHandler,i.Evented,{queryParams:{},router:(0,r.computed)("_router",function(){return this._router}),_setRouteName:function(e){this.routeName=e,this.fullRouteName=p((0,t.getOwner)(this),e)},_qp:(0,r.computed)(function(){var e,n,s,u,c,l,f,h,d,p,m=this,y=void 0,g=this.controllerName||this.routeName,b=(0,t.getOwner)(this),v=b.lookup("controller:"+g),_=(0,r.get)(this,"queryParams"),w=Object.keys(_).length>0
|
||
v?(e=(0,r.get)(v,"queryParams")||{},y=function(e,r){var n,i,o={},a={defaultValue:!0,type:!0,scope:!0,as:!0}
|
||
for(var s in e)e.hasOwnProperty(s)&&(n={},(0,t.assign)(n,e[s],r[s]),o[s]=n,a[s]=!0)
|
||
for(var u in r)r.hasOwnProperty(u)&&!a[u]&&(i={},(0,t.assign)(i,r[u],e[u]),o[u]=i)
|
||
return o}((0,a.normalizeControllerQueryParams)(e),_)):w&&(v=(0,o.default)(b,g),y=_)
|
||
var S=[],E={},k=[]
|
||
for(var x in y)y.hasOwnProperty(x)&&"unknownProperty"!==x&&"_super"!==x&&(u=void 0,"controller"===(s=(n=y[x]).scope||"model")&&(u=[]),c=n.as||this.serializeQueryParamKey(x),l=(0,r.get)(v,x),Array.isArray(l)&&(l=(0,i.A)(l.slice())),f=n.type||(0,i.typeOf)(l),h=this.serializeQueryParam(l,c,f),d=g+":"+x,p={undecoratedDefaultValue:(0,r.get)(v,x),defaultValue:l,serializedDefaultValue:h,serializedValue:h,type:f,urlKey:c,prop:x,scopedPropertyName:d,controllerName:g,route:this,parts:u,values:null,scope:s},E[x]=E[c]=E[d]=p,S.push(p),k.push(x))
|
||
return{qps:S,map:E,propertyNames:k,states:{inactive:function(e,t){var r=E[e]
|
||
m._qpChanged(e,t,r)},active:function(e,t){var r=E[e]
|
||
return m._qpChanged(e,t,r),m._activeQPChanged(r,t)},allowOverrides:function(e,t){var r=E[e]
|
||
return m._qpChanged(e,t,r),m._updatingQPChanged(r)}}}}),_names:null,_stashNames:function(e,t){if(!this._names){var n,i,o,a=this._names=e._names
|
||
a.length||(a=(e=t)&&e._names||[])
|
||
var s=(0,r.get)(this,"_qp.qps"),u=new Array(a.length)
|
||
for(n=0;n<a.length;++n)u[n]=e.name+"."+a[n]
|
||
for(i=0;i<s.length;++i)"model"===(o=s[i]).scope&&(o.parts=u)}},_activeQPChanged:function(e,t){this._router._activeQPChanged(e.scopedPropertyName,t)},_updatingQPChanged:function(e){this._router._updatingQPChanged(e.urlKey)},mergedProperties:["queryParams"],paramsFor:function(e){var r=(0,t.getOwner)(this).lookup("route:"+e)
|
||
if(!r)return{}
|
||
var n=this._router._routerMicrolib.activeTransition,i=n?n.state:this._router._routerMicrolib.state,o=r.fullRouteName,a=(0,t.assign)({},i.params[o]),s=h(r,i)
|
||
return Object.keys(s).reduce(function(e,t){return e[t]=s[t],e},a)},serializeQueryParamKey:function(e){return e},serializeQueryParam:function(e,t,r){return this._router._serializeQueryParam(e,r)},deserializeQueryParam:function(e,t,r){return this._router._deserializeQueryParam(e,r)},_optionsForQueryParam:function(e){return(0,r.get)(this,"queryParams."+e.urlKey)||(0,r.get)(this,"queryParams."+e.prop)||{}},resetController:s,exit:function(){this.deactivate(),this.trigger("deactivate"),this.teardownViews()},_reset:function(e,t){var n=this.controller
|
||
n._qpDelegate=(0,r.get)(this,"_qp.states.inactive"),this.resetController(n,e,t)},enter:function(){this.connections=[],this.activate(),this.trigger("activate")},templateName:null,controllerName:null,actions:{queryParamsDidChange:function(e,t,n){var i,o,a=(0,r.get)(this,"_qp").map,s=Object.keys(e).concat(Object.keys(n))
|
||
for(i=0;i<s.length;++i)if((o=a[s[i]])&&(0,r.get)(this._optionsForQueryParam(o),"refreshModel")&&this._router.currentState){this.refresh()
|
||
break}return!0},finalizeQueryParamChange:function(e,t,n){if("application"!==this.fullRouteName)return!0
|
||
if(n){var i,o,s,u,c,l,f,h,p,m=n.state.handlerInfos,y=this._router,g=y._queryParamsFor(m),b=y._qpUpdates,v=void 0
|
||
for((0,a.stashParamNames)(y,m),i=0;i<g.qps.length;++i)u=(s=(o=g.qps[i]).route).controller,c=o.urlKey in e&&o.urlKey,l=void 0,f=void 0,b&&o.urlKey in b?(l=(0,r.get)(u,o.prop),f=s.serializeQueryParam(l,o.urlKey,o.type)):c?void 0!==(f=e[c])&&(l=s.deserializeQueryParam(f,o.urlKey,o.type)):(f=o.serializedDefaultValue,l=d(o.defaultValue)),u._qpDelegate=(0,r.get)(s,"_qp.states.inactive"),f!==o.serializedValue&&(n.queryParamsOnly&&!1!==v&&(h=s._optionsForQueryParam(o),(p=(0,r.get)(h,"replace"))?v=!0:!1===p&&(v=!1)),(0,r.set)(u,o.prop,l)),o.serializedValue=f,o.serializedDefaultValue===f&&!n._keepDefaultQueryParamValues||t.push({value:f,visible:!0,key:c||o.urlKey})
|
||
v&&n.method("replace"),g.qps.forEach(function(e){var t=(0,r.get)(e.route,"_qp")
|
||
e.route.controller._qpDelegate=(0,r.get)(t,"states.active")}),y._qpUpdates=null}}},deactivate:s,activate:s,transitionTo:function(){var e
|
||
return(e=this._router).transitionTo.apply(e,(0,a.prefixRouteNameArg)(this,arguments))},intermediateTransitionTo:function(){var e;(e=this._router).intermediateTransitionTo.apply(e,(0,a.prefixRouteNameArg)(this,arguments))},refresh:function(){return this._router._routerMicrolib.refresh(this)},replaceWith:function(){var e
|
||
return(e=this._router).replaceWith.apply(e,(0,a.prefixRouteNameArg)(this,arguments))},send:function(){var e,t,r,i,o,a
|
||
for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
if(this._router&&this._router._routerMicrolib||!(0,n.isTesting)())(i=this._router).send.apply(i,t)
|
||
else if(o=t.shift(),a=this.actions[o])return a.apply(this,t)},setup:function(e,t){var n,i,o,s,u=void 0,c=this.controllerName||this.routeName,l=this.controllerFor(c,!0)
|
||
u=l||this.generateController(c),this.controller||(n=(0,r.get)(this,"_qp.propertyNames"),function(e,t){t.forEach(function(t){e.addObserver(t+".[]",e,e._qpChanged)})}(u,n),this.controller=u)
|
||
var f=(0,r.get)(this,"_qp"),d=f.states
|
||
u._qpDelegate=d.allowOverrides,t&&((0,a.stashParamNames)(this._router,t.state.handlerInfos),i=this._bucketCache,o=t.params,f.propertyNames.forEach(function(e){var t=f.map[e]
|
||
t.values=o
|
||
var n=(0,a.calculateCacheKey)(t.route.fullRouteName,t.parts,t.values),s=i.lookup(n,e,t.undecoratedDefaultValue);(0,r.set)(u,e,s)}),s=h(this,t.state),(0,r.setProperties)(u,s)),this.setupController(u,e,t),this._environment.options.shouldRender&&this.renderTemplate(u,e)},_qpChanged:function(e,t,r){if(r){var n=this._bucketCache,i=(0,a.calculateCacheKey)(r.route.fullRouteName,r.parts,r.values)
|
||
n.stash(i,e,t)}},beforeModel:s,afterModel:s,redirect:s,contextDidChange:function(){this.currentModel=this.context},model:function(e,t){var n,o=void 0,a=void 0,s=void 0,u=(0,r.get)(this,"_qp.map")
|
||
for(var c in e)"queryParams"===c||u&&c in u||(null!==(n=c.match(/^(.*)_id$/))&&(o=n[1],s=e[c]),a=!0)
|
||
if(!o){if(a)return(0,i.copy)(e)
|
||
if(t.resolveIndex<1)return
|
||
return t.state.handlerInfos[t.resolveIndex-1].context}return this.findModel(o,s)},deserialize:function(e,t){return this.model(this.paramsFor(this.routeName),t)},findModel:function(){var e
|
||
return(e=(0,r.get)(this,"store")).find.apply(e,arguments)},store:(0,r.computed)(function(){var e=(0,t.getOwner)(this)
|
||
this.routeName,(0,r.get)(this,"_router.namespace")
|
||
return{find:function(t,r){var n=e.factoryFor("model:"+t)
|
||
if(n)return(n=n.class).find(r)}}}),serialize:u,setupController:function(e,t){e&&void 0!==t&&(0,r.set)(e,"model",t)},controllerFor:function(e,r){var n=(0,t.getOwner)(this),i=n.lookup("route:"+e)
|
||
return i&&i.controllerName&&(e=i.controllerName),n.lookup("controller:"+e)},generateController:function(e){var r=(0,t.getOwner)(this)
|
||
return(0,o.default)(r,e)},modelFor:function(e){var r,n=void 0,i=(0,t.getOwner)(this),o=this._router?this._router._routerMicrolib.activeTransition:null
|
||
n=i.routable&&null!==o?p(i,e):e
|
||
var a=i.lookup("route:"+n)
|
||
return null!==o&&(r=a&&a.routeName||n,o.resolvedModels.hasOwnProperty(r))?o.resolvedModels[r]:a&&a.currentModel},renderTemplate:function(){this.render()},render:function(e,n){var i=void 0,o=0===arguments.length
|
||
o||("object"!=typeof e||n?i=e:(i=this.templateName||this.routeName,n=e))
|
||
var a=function(e,r,n,i){var o,a=(0,t.getOwner)(e),s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,d=void 0
|
||
i&&(c=i.into&&i.into.replace(/\//g,"."),l=i.outlet,h=i.controller,d=i.model)
|
||
l=l||"main",r?(s=e.routeName,u=e.templateName||s):(s=n.replace(/\//g,"."),u=s)
|
||
h||(h=r?e.controllerName||a.lookup("controller:"+s):a.lookup("controller:"+s)||e.controllerName||e.routeName)
|
||
"string"==typeof h&&(o=h,h=a.lookup("controller:"+o))
|
||
d&&h.set("model",d)
|
||
var p=a.lookup("template:"+u)
|
||
var m=void 0
|
||
c&&(m=f(e))&&c===m.routeName&&(c=void 0)
|
||
return{owner:a,into:c,outlet:l,name:s,controller:h,template:p||e._topLevelViewTemplate}}(this,o,i,n)
|
||
this.connections.push(a),r.run.once(this._router,"_setOutlets")},disconnectOutlet:function(e){var t,r=void 0,n=void 0
|
||
e&&("string"==typeof e?r=e:(r=e.outlet,n=e.parentView?e.parentView.replace(/\//g,"."):void 0)),r=r||"main",this._disconnectOutlet(r,n)
|
||
var i=this._router._routerMicrolib.currentHandlerInfos
|
||
for(t=0;t<i.length;t++)i[t].handler._disconnectOutlet(r,n)},_disconnectOutlet:function(e,t){var n,i,o=f(this)
|
||
for(o&&t===o.routeName&&(t=void 0),n=0;n<this.connections.length;n++)(i=this.connections[n]).outlet===e&&i.into===t&&(this.connections[n]={owner:i.owner,into:i.into,outlet:i.outlet,name:i.name,controller:void 0,template:void 0},r.run.once(this._router,"_setOutlets"))},willDestroy:function(){this.teardownViews()},teardownViews:function(){this.connections&&this.connections.length>0&&(this.connections=[],r.run.once(this._router,"_setOutlets"))}})
|
||
function f(e){var t=function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0
|
||
if(!t)return
|
||
for(r=0;r<t.length;r++)if(t[r].handler===e)return t[r+n]}(e,e._router._routerMicrolib.state.handlerInfos,-1)
|
||
return t&&t.handler}function h(e,n){n.queryParamsFor=n.queryParamsFor||{}
|
||
var i,o,a,s=e.fullRouteName
|
||
if(n.queryParamsFor[s])return n.queryParamsFor[s]
|
||
var u=function(e,r){return r.fullQueryParams?r.fullQueryParams:(r.fullQueryParams={},(0,t.assign)(r.fullQueryParams,r.queryParams),e._deserializeQueryParams(r.handlerInfos,r.fullQueryParams),r.fullQueryParams)}(e._router,n),c=n.queryParamsFor[s]={},l=(0,r.get)(e,"_qp").qps
|
||
for(i=0;i<l.length;++i)a=(o=l[i]).prop in u,c[o.prop]=a?u[o.prop]:d(o.defaultValue)
|
||
return c}function d(e){return Array.isArray(e)?(0,i.A)(e.slice()):e}function p(e,t){var r
|
||
return e.routable?(r=e.mountPoint,"application"===t?r:r+"."+t):t}l.reopenClass({isRouteFactory:!0}),e.default=l}),e("ember-routing/system/router",["exports","ember-utils","ember-console","ember-metal","ember-debug","ember-runtime","ember-routing/system/route","ember-routing/system/dsl","ember-routing/location/api","ember-routing/utils","ember-routing/system/router_state","router"],function(e,t,r,n,i,o,a,s,u,c,l,f){"use strict"
|
||
function h(){return this}e.triggerEvent=_
|
||
var d=Array.prototype.slice,p=o.Object.extend(o.Evented,{location:"hash",rootURL:"/",_initRouterJs:function(){var e=this._routerMicrolib=new f.default
|
||
e.triggerEvent=_.bind(this),e._triggerWillChangeContext=h,e._triggerWillLeave=h
|
||
var t=this.constructor.dslCallbacks||[h],r=this._buildDSL()
|
||
r.route("application",{path:"/",resetNamespace:!0,overrideNameAssertion:!0},function(){var e
|
||
for(e=0;e<t.length;e++)t[e].call(this)}),e.map(r.generate())},_buildDSL:function(){var e={enableLoadingSubstates:this._hasModuleBasedResolver()},r=(0,t.getOwner)(this),n=this
|
||
return e.resolveRouteMap=function(e){return r.factoryFor("route-map:"+e)},e.addRouteForEngine=function(e,t){n._engineInfoByRoute[e]||(n._engineInfoByRoute[e]=t)},new s.default(null,e)},init:function(){this._super.apply(this,arguments),this.currentURL=null,this.currentRouteName=null,this.currentPath=null,this._qpCache=Object.create(null),this._resetQueuedQueryParameterChanges(),this._handledErrors=new Set,this._engineInstances=Object.create(null),this._engineInfoByRoute=Object.create(null)},_resetQueuedQueryParameterChanges:function(){this._queuedQPChanges={}},url:(0,n.computed)(function(){return(0,n.get)(this,"location").getURL()}),_hasModuleBasedResolver:function(){var e=(0,t.getOwner)(this)
|
||
return!!e&&!!(0,n.get)(e,"application.__registry__.resolver.moduleBasedResolver")},startRouting:function(){var e,t=(0,n.get)(this,"initialURL")
|
||
if(this.setupRouter()&&(void 0===t&&(t=(0,n.get)(this,"location").getURL()),(e=this.handleURL(t))&&e.error))throw e.error},setupRouter:function(){var e=this
|
||
this._initRouterJs(),this._setupLocation()
|
||
var t=(0,n.get)(this,"location")
|
||
return!(0,n.get)(t,"cancelRouterSetup")&&(this._setupRouter(t),t.onUpdateURL(function(t){e.handleURL(t)}),!0)},didTransition:function(){S(this),this._cancelSlowTransitionTimer(),this.notifyPropertyChange("url"),this.set("currentState",this.targetState),n.run.once(this,this.trigger,"didTransition")},_setOutlets:function(){if(!this.isDestroying&&!this.isDestroyed){var e,r,n,i,o,a,s,u=this._routerMicrolib.currentHandlerInfos,c=void 0,l=void 0,f=null
|
||
if(u){for(e=0;e<u.length;e++){for(r=(c=u[e].handler).connections,n=void 0,i=0;i<r.length;i++)f=(o=C(f,l,r[i])).liveRoutes,o.ownState.render.name!==c.routeName&&"main"!==o.ownState.render.outlet||(n=o.ownState)
|
||
0===r.length&&(n=A(f,l,c)),l=n}f&&(this._toplevelView?this._toplevelView.setOutletState(f):(s=(a=(0,t.getOwner)(this)).factoryFor("view:-outlet"),this._toplevelView=s.create(),this._toplevelView.setOutletState(f),a.lookup("-application-instance:main").didCreateRootView(this._toplevelView)))}}},willTransition:function(e,t,r){n.run.once(this,this.trigger,"willTransition",r)},handleURL:function(e){var t=e.split(/#(.+)?/)[0]
|
||
return this._doURLTransition("handleURL",t)},_doURLTransition:function(e,t){var r=this._routerMicrolib[e](t||"/")
|
||
return E(r,this),r},transitionTo:function(){for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
if((0,c.resemblesURL)(t[0]))return this._doURLTransition("transitionTo",t[0])
|
||
var e,t,r,n=(0,c.extractRouteArgs)(t),i=n.routeName,o=n.models,a=n.queryParams
|
||
return this._doTransition(i,o,a)},intermediateTransitionTo:function(){var e;(e=this._routerMicrolib).intermediateTransitionTo.apply(e,arguments),S(this)},replaceWith:function(){return this.transitionTo.apply(this,arguments).method("replace")},generate:function(){var e,t=(e=this._routerMicrolib).generate.apply(e,arguments)
|
||
return this.location.formatURL(t)},isActive:function(){var e
|
||
return(e=this._routerMicrolib).isActive.apply(e,arguments)},isActiveIntent:function(e,t,r){return this.currentState.isActiveIntent(e,t,r)},send:function(){var e;(e=this._routerMicrolib).trigger.apply(e,arguments)},hasRoute:function(e){return this._routerMicrolib.hasRoute(e)},reset:function(){this._routerMicrolib&&this._routerMicrolib.reset()},willDestroy:function(){this._toplevelView&&(this._toplevelView.destroy(),this._toplevelView=null),this._super.apply(this,arguments),this.reset()
|
||
var e=this._engineInstances
|
||
for(var t in e)for(var r in e[t])(0,n.run)(e[t][r],"destroy")},_activeQPChanged:function(e,t){this._queuedQPChanges[e]=t,n.run.once(this,this._fireQueryParamTransition)},_updatingQPChanged:function(e){this._qpUpdates||(this._qpUpdates={}),this._qpUpdates[e]=!0},_fireQueryParamTransition:function(){this.transitionTo({queryParams:this._queuedQPChanges}),this._resetQueuedQueryParameterChanges()},_setupLocation:function(){var e,r,i=(0,n.get)(this,"location"),o=(0,n.get)(this,"rootURL"),a=(0,t.getOwner)(this)
|
||
"string"==typeof i&&a&&(void 0!==(e=a.lookup("location:"+i))?i=(0,n.set)(this,"location",e):(r={implementation:i},i=(0,n.set)(this,"location",u.default.create(r)))),null!==i&&"object"==typeof i&&(o&&(0,n.set)(i,"rootURL",o),"function"==typeof i.detect&&i.detect(),"function"==typeof i.initState&&i.initState())},_getHandlerFunction:function(){var e=this,r=Object.create(null),n=(0,t.getOwner)(this)
|
||
return function(t){var i,o=t,s=n,u=e._engineInfoByRoute[o]
|
||
u&&(s=e._getEngineInstance(u),o=u.localFullName)
|
||
var c="route:"+o,l=s.lookup(c)
|
||
if(r[t])return l
|
||
if(r[t]=!0,l||(i=s.factoryFor("route:basic").class,s.register(c,i.extend()),l=s.lookup(c)),l._setRouteName(o),u&&!(0,a.hasDefaultSerialize)(l))throw new Error("Defining a custom serialize method on an Engine route is not supported.")
|
||
return l}},_getSerializerFunction:function(){var e=this
|
||
return function(t){var r=e._engineInfoByRoute[t]
|
||
if(r)return r.serializeMethod||a.defaultSerialize}},_setupRouter:function(e){var t,r=this,i=void 0,o=this._routerMicrolib
|
||
o.getHandler=this._getHandlerFunction(),o.getSerializer=this._getSerializerFunction()
|
||
var a=function(){e.setURL(i),(0,n.set)(r,"currentURL",i)}
|
||
o.updateURL=function(e){i=e,n.run.once(a)},e.replaceURL&&(t=function(){e.replaceURL(i),(0,n.set)(r,"currentURL",i)},o.replaceURL=function(e){i=e,n.run.once(t)}),o.didTransition=function(e){r.didTransition(e)},o.willTransition=function(e,t,n){r.willTransition(e,t,n)}},_serializeQueryParams:function(e,t){var r=this
|
||
k(this,e,t,function(e,n,i){i?(delete t[e],t[i.urlKey]=i.route.serializeQueryParam(n,i.urlKey,i.type)):void 0===n||(t[e]=r._serializeQueryParam(n,(0,o.typeOf)(n)))})},_serializeQueryParam:function(e,t){return null===e||void 0===e?e:"array"===t?JSON.stringify(e):""+e},_deserializeQueryParams:function(e,t){k(this,e,t,function(e,r,n){n&&(delete t[e],t[n.prop]=n.route.deserializeQueryParam(r,n.urlKey,n.type))})},_deserializeQueryParam:function(e,t){return null===e||void 0===e?e:"boolean"===t?"true"===e:"number"===t?Number(e).valueOf():"array"===t?(0,o.A)(JSON.parse(e)):e},_pruneDefaultQueryParamValues:function(e,t){var r,n=this._queryParamsFor(e)
|
||
for(var i in t)(r=n.map[i])&&r.serializedDefaultValue===t[i]&&delete t[i]},_doTransition:function(e,r,n,i){var o,a=e||(0,c.getActiveTargetName)(this._routerMicrolib),s={}
|
||
this._processActiveTransitionQueryParams(a,r,s,n),(0,t.assign)(s,n),this._prepareQueryParams(a,r,s,i)
|
||
var u=(o=this._routerMicrolib).transitionTo.apply(o,[a].concat(r,[{queryParams:s}]))
|
||
return E(u,this),u},_processActiveTransitionQueryParams:function(e,r,n,i){if(this._routerMicrolib.activeTransition){var o={},a=this._qpUpdates||{},s=this._routerMicrolib.activeTransition.queryParams
|
||
for(var u in s)a[u]||(o[u]=s[u])
|
||
this._fullyScopeQueryParams(e,r,i),this._fullyScopeQueryParams(e,r,o),(0,t.assign)(n,o)}},_prepareQueryParams:function(e,t,r,n){var i=w(this,e,t)
|
||
this._hydrateUnsuppliedQueryParams(i,r,n),this._serializeQueryParams(i.handlerInfos,r),n||this._pruneDefaultQueryParamValues(i.handlerInfos,r)},_getQPMeta:function(e){var t=e.handler
|
||
return t&&(0,n.get)(t,"_qp")},_queryParamsFor:function(e){var r,n,i,o,a,s,u=e.length,c=e[u-1].name,l=this._qpCache[c]
|
||
if(l)return l
|
||
var f=!0,h={},d={},p=[]
|
||
for(r=0;r<u;++r)if(n=this._getQPMeta(e[r])){for(i=0;i<n.qps.length;i++)(s=h[a=(o=n.qps[i]).urlKey])&&s.controllerName!==o.controllerName&&h[a],h[a]=o,p.push(o);(0,t.assign)(d,n.map)}else f=!1
|
||
var m={qps:p,map:d}
|
||
return f&&(this._qpCache[c]=m),m},_fullyScopeQueryParams:function(e,t,r){var n,i,o,a,s,u,c,l=w(this,e,t).handlerInfos
|
||
for(n=0,i=l.length;n<i;++n)if(o=this._getQPMeta(l[n]))for(a=0,s=o.qps.length;a<s;++a)(c=(u=o.qps[a]).prop in r&&u.prop||u.scopedPropertyName in r&&u.scopedPropertyName||u.urlKey in r&&u.urlKey)&&c!==u.scopedPropertyName&&(r[u.scopedPropertyName]=r[c],delete r[c])},_hydrateUnsuppliedQueryParams:function(e,t,r){var n,i,o,a,s,u,l,f=e.handlerInfos,h=this._bucketCache
|
||
for(n=0;n<f.length;++n)if(i=this._getQPMeta(f[n]))for(o=0,a=i.qps.length;o<a;++o)s=i.qps[o],(u=s.prop in t&&s.prop||s.scopedPropertyName in t&&s.scopedPropertyName||s.urlKey in t&&s.urlKey)?u!==s.scopedPropertyName&&(t[s.scopedPropertyName]=t[u],delete t[u]):(l=(0,c.calculateCacheKey)(s.route.fullRouteName,s.parts,e.params),t[s.scopedPropertyName]=h.lookup(l,s.prop,s.defaultValue))},_scheduleLoadingEvent:function(e,t){this._cancelSlowTransitionTimer(),this._slowTransitionTimer=n.run.scheduleOnce("routerTransitions",this,"_handleSlowTransition",e,t)},currentState:null,targetState:null,_handleSlowTransition:function(e,t){this._routerMicrolib.activeTransition&&(this.set("targetState",l.default.create({emberRouter:this,routerJs:this._routerMicrolib,routerJsState:this._routerMicrolib.activeTransition.state})),e.trigger(!0,"loading",e,t))},_cancelSlowTransitionTimer:function(){this._slowTransitionTimer&&n.run.cancel(this._slowTransitionTimer),this._slowTransitionTimer=null},_markErrorAsHandled:function(e){this._handledErrors.add(e)},_isErrorHandled:function(e){return this._handledErrors.has(e)},_clearHandledError:function(e){this._handledErrors.delete(e)},_getEngineInstance:function(e){var r=e.name,n=e.instanceId,i=e.mountPoint,o=this._engineInstances
|
||
o[r]||(o[r]=Object.create(null))
|
||
var a=o[r][n]
|
||
return a||((a=(0,t.getOwner)(this).buildChildEngineInstance(r,{routable:!0,mountPoint:i})).boot(),o[r][n]=a),a}})
|
||
function m(e,t){var r,n,i
|
||
for(r=e.length-1;r>=0;--r)if(void 0!==(i=(n=e[r]).handler)&&!0!==t(i,n))return}var y={willResolveModel:function(e,t,r){this._scheduleLoadingEvent(t,r)},error:function(e,t,n){var i=this,o=e[e.length-1]
|
||
m(e,function(e,r){if(r!==o&&(n=b(e,"error")))return i._markErrorAsHandled(t),i.intermediateTransitionTo(n,t),!1
|
||
var n,a=g(e,"error")
|
||
return!a||(i._markErrorAsHandled(t),i.intermediateTransitionTo(a,t),!1)}),function(e,t){var n=[],i=void 0
|
||
i=e&&"object"==typeof e&&"object"==typeof e.errorThrown?e.errorThrown:e
|
||
t&&n.push(t)
|
||
i&&(i.message&&n.push(i.message),i.stack&&n.push(i.stack),"string"==typeof i&&n.push(i))
|
||
r.default.error.apply(this,n)}(t,"Error while processing route: "+n.targetName)},loading:function(e,t){var r=this,n=e[e.length-1]
|
||
m(e,function(e,i){if(i!==n&&(o=b(e,"loading")))return r.intermediateTransitionTo(o),!1
|
||
var o,a=g(e,"loading")
|
||
return a?(r.intermediateTransitionTo(a),!1):t.pivotHandler!==e})}}
|
||
function g(e,r){var n=(0,t.getOwner)(e),i=e.routeName,o=e.fullRouteName+"_"+r
|
||
return v(n,e._router,i+"_"+r,o)?o:""}function b(e,r){var n=(0,t.getOwner)(e),i=e.routeName,o=e.fullRouteName,a=e._router,s="application"===o?r:o+"."+r
|
||
return v(n,a,"application"===i?r:i+"."+r,s)?s:""}function v(e,t,r,n){var i=t.hasRoute(n),o=e.hasRegistration("template:"+r)||e.hasRegistration("route:"+r)
|
||
return i&&o}function _(e,t,r){var n,o=r.shift()
|
||
if(!e){if(t)return
|
||
throw new i.Error("Can't trigger action '"+o+"' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.")}var a=!1,s=void 0,u=void 0
|
||
for(n=e.length-1;n>=0;n--)if(u=(s=e[n].handler)&&s.actions&&s.actions[o]){if(!0!==u.apply(s,r))return void("error"===o&&s._router._markErrorAsHandled(r[0]))
|
||
a=!0}var c=y[o]
|
||
if(c)c.apply(this,[e].concat(r))
|
||
else if(!a&&!t)throw new i.Error("Nothing handled the action '"+o+"'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.")}function w(e,t,r){var n,i,o=e._routerMicrolib.applyIntent(t,r),a=o.handlerInfos,s=o.params
|
||
for(n=0;n<a.length;++n)(i=a[n]).isResolved?s[i.name]=i.params:s[i.name]=i.serialize(i.context)
|
||
return o}function S(e){var r=e._routerMicrolib.currentHandlerInfos
|
||
if(0!==r.length){var i=p._routePath(r),o=r[r.length-1].name,a=e.get("location").getURL();(0,n.set)(e,"currentPath",i),(0,n.set)(e,"currentRouteName",o),(0,n.set)(e,"currentURL",a)
|
||
var s=(0,t.getOwner)(e).lookup("controller:application")
|
||
s&&("currentPath"in s||(0,n.defineProperty)(s,"currentPath"),(0,n.set)(s,"currentPath",i),"currentRouteName"in s||(0,n.defineProperty)(s,"currentRouteName"),(0,n.set)(s,"currentRouteName",o))}}function E(e,t){var r=l.default.create({emberRouter:t,routerJs:t._routerMicrolib,routerJsState:e.state})
|
||
t.currentState||t.set("currentState",r),t.set("targetState",r),e.promise=e.catch(function(e){if(!t._isErrorHandled(e))throw e
|
||
t._clearHandledError(e)})}function k(e,t,r,n){var i=e._queryParamsFor(t)
|
||
for(var o in r)r.hasOwnProperty(o)&&n(o,r[o],i.map[o])}function x(e,t){if(e)for(var r,n,i=[e];i.length>0;){if((r=i.shift()).render.name===t)return r
|
||
for(var o in n=r.outlets)i.push(n[o])}}function C(e,t,r){var i=void 0,o={render:r,outlets:Object.create(null),wasUsed:!1}
|
||
return(i=r.into?x(e,r.into):t)?(0,n.set)(i.outlets,r.outlet,o):r.into?function(e,t,r){e.outlets.__ember_orphans__||(e.outlets.__ember_orphans__={render:{name:"__ember_orphans__"},outlets:Object.create(null)})
|
||
e.outlets.__ember_orphans__.outlets[t]=r,n.run.schedule("afterRender",function(){})}(e,r.into,o):e=o,{liveRoutes:e,ownState:o}}function A(e,t,r){var n=x(e,r.routeName)
|
||
return n||(t.outlets.main={render:{name:r.routeName,outlet:"main"},outlets:{}},t)}p.reopenClass({map:function(e){return this.dslCallbacks||(this.dslCallbacks=[],this.reopenClass({dslCallbacks:this.dslCallbacks})),this.dslCallbacks.push(e),this},_routePath:function(e){var t,r=[]
|
||
function n(e,t){var r
|
||
for(r=0;r<e.length;++r)if(e[r]!==t[r])return!1
|
||
return!0}var i=void 0,o=void 0
|
||
for(t=1;t<e.length;t++){for(i=e[t].name.split("."),o=d.call(r);o.length&&!n(o,i);)o.shift()
|
||
r.push.apply(r,i.slice(o.length))}return r.join(".")}}),e.default=p}),e("ember-routing/system/router_state",["exports","ember-utils","ember-routing/utils","ember-runtime"],function(e,t,r,n){"use strict"
|
||
e.default=n.Object.extend({emberRouter:null,routerJs:null,routerJsState:null,isActiveIntent:function(e,n,i,o){var a,s=this.routerJsState
|
||
return!!this.routerJs.isActiveIntent(e,n,null,s)&&(!(o&&Object.keys(i).length>0)||(a=(0,t.assign)({},i),this.emberRouter._prepareQueryParams(e,n,a),(0,r.shallowEqual)(a,s.queryParams)))}})}),e("ember-routing/utils",["exports","ember-utils","ember-metal","ember-debug"],function(e,t,r,n){"use strict"
|
||
e.extractRouteArgs=function(e){var t=(e=e.slice())[e.length-1],r=void 0
|
||
return r=t&&t.hasOwnProperty("queryParams")?e.pop().queryParams:{},{routeName:e.shift(),models:e,queryParams:r}},e.getActiveTargetName=function(e){var t=e.activeTransition?e.activeTransition.state.handlerInfos:e.state.handlerInfos
|
||
return t[t.length-1].name},e.stashParamNames=function(e,t){if(!t._namesStashed){var r,n,i,o=t[t.length-1].name,a=e._routerMicrolib.recognizer.handlersFor(o),s=null
|
||
for(r=0;r<t.length;++r)n=t[r],(i=a[r].names).length&&(s=n),n._names=i,n.handler._stashNames(n,s)
|
||
t._namesStashed=!0}},e.calculateCacheKey=function(e){var t,n,a,s,u,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],l=arguments[2],f=""
|
||
for(t=0;t<c.length;++t)a=o(e,n=c[t]),s=void 0,l&&(a&&a in l?(u=0===n.indexOf(a)?n.substr(a.length+1):n,s=(0,r.get)(l[a],u)):s=(0,r.get)(l,n)),f+="::"+n+":"+s
|
||
return e+f.replace(i,"-")},e.normalizeControllerQueryParams=function(e){var t,r={}
|
||
for(t=0;t<e.length;++t)a(e[t],r)
|
||
return r},e.resemblesURL=s,e.prefixRouteNameArg=function(e,r){var i=r[0],o=(0,t.getOwner)(e),a=o.mountPoint
|
||
if(o.routable&&"string"==typeof i){if(s(i))throw new n.Error("Programmatic transitions by URL cannot be used within an Engine. Please use the route name instead.")
|
||
i=a+"."+i,r[0]=i}return r},e.shallowEqual=function(e,t){var r=void 0,n=0,i=0
|
||
for(r in e)if(e.hasOwnProperty(r)){if(e[r]!==t[r])return!1
|
||
n++}for(r in t)t.hasOwnProperty(r)&&i++
|
||
return n===i}
|
||
var i=/\./g
|
||
function o(e,t){var r,n,i=e.split("."),o=""
|
||
for(r=0;r<i.length&&(n=i.slice(0,r+1).join("."),0===t.indexOf(n));r++)o=n
|
||
return o}function a(e,r){var n,i=e,o=void 0
|
||
for(var a in"string"==typeof i&&((o={})[i]={as:null},i=o),i){if(!i.hasOwnProperty(a))return
|
||
"string"==typeof(n=i[a])&&(n={as:n}),o=r[a]||{as:null,scope:"model"},(0,t.assign)(o,n),r[a]=o}}function s(e){return"string"==typeof e&&(""===e||"/"===e[0])}}),e("ember-runtime/compare",["exports","ember-runtime/utils","ember-runtime/mixins/comparable"],function(e,t,r){"use strict"
|
||
e.default=function e(o,a){if(o===a)return 0
|
||
var s,u,c,l,f,h=(0,t.typeOf)(o)
|
||
var d=(0,t.typeOf)(a)
|
||
if(r.default){if("instance"===h&&r.default.detect(o)&&o.constructor.compare)return o.constructor.compare(o,a)
|
||
if("instance"===d&&r.default.detect(a)&&a.constructor.compare)return-1*a.constructor.compare(a,o)}var p=i(n[h],n[d])
|
||
if(0!==p)return p
|
||
switch(h){case"boolean":case"number":return i(o,a)
|
||
case"string":return i(o.localeCompare(a),0)
|
||
case"array":for(s=o.length,u=a.length,c=Math.min(s,u),l=0;l<c;l++)if(0!==(f=e(o[l],a[l])))return f
|
||
return i(s,u)
|
||
case"instance":return r.default&&r.default.detect(o)?o.compare(o,a):0
|
||
case"date":return i(o.getTime(),a.getTime())
|
||
default:return 0}}
|
||
var n={undefined:0,null:1,boolean:2,number:3,string:4,array:5,object:6,instance:7,function:8,class:9,date:10}
|
||
function i(e,t){var r=e-t
|
||
return(r>0)-(r<0)}}),e("ember-runtime/computed/computed_macros",["exports","ember-metal","ember-debug"],function(e,t,r){"use strict"
|
||
function n(e,r){return function(){for(e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i]
|
||
var e,n,i,o=function(e,r){var n,i,o=[]
|
||
function a(e){o.push(e)}for(n=0;n<r.length;n++)i=r[n],(0,t.expandProperties)(i,a)
|
||
return o}(0,n)
|
||
return new t.ComputedProperty(function(){var e,n,i=o.length-1
|
||
for(e=0;e<i;e++)if(n=(0,t.get)(this,o[e]),!r(n))return n
|
||
return(0,t.get)(this,o[i])},{dependentKeys:o})}}e.or=e.and=void 0,e.empty=function(e){return(0,t.computed)(e+".length",function(){return(0,t.isEmpty)((0,t.get)(this,e))})},e.notEmpty=function(e){return(0,t.computed)(e+".length",function(){return!(0,t.isEmpty)((0,t.get)(this,e))})},e.none=function(e){return(0,t.computed)(e,function(){return(0,t.isNone)((0,t.get)(this,e))})},e.not=function(e){return(0,t.computed)(e,function(){return!(0,t.get)(this,e)})},e.bool=function(e){return(0,t.computed)(e,function(){return!!(0,t.get)(this,e)})},e.match=function(e,r){return(0,t.computed)(e,function(){var n=(0,t.get)(this,e)
|
||
return r.test(n)})},e.equal=function(e,r){return(0,t.computed)(e,function(){return(0,t.get)(this,e)===r})},e.gt=function(e,r){return(0,t.computed)(e,function(){return(0,t.get)(this,e)>r})},e.gte=function(e,r){return(0,t.computed)(e,function(){return(0,t.get)(this,e)>=r})},e.lt=function(e,r){return(0,t.computed)(e,function(){return(0,t.get)(this,e)<r})},e.lte=function(e,r){return(0,t.computed)(e,function(){return(0,t.get)(this,e)<=r})},e.oneWay=function(e){return(0,t.alias)(e).oneWay()},e.readOnly=function(e){return(0,t.alias)(e).readOnly()},e.deprecatingAlias=function(e,r){return(0,t.computed)(e,{get:function(r){return(0,t.get)(this,e)},set:function(r,n){return(0,t.set)(this,e,n),n}})},e.and=n(0,function(e){return e}),e.or=n(0,function(e){return!e})})
|
||
e("ember-runtime/computed/reduce_computed_macros",["exports","ember-debug","ember-metal","ember-runtime/compare","ember-runtime/utils","ember-runtime/mixins/array"],function(e,t,r,n,i,o){"use strict"
|
||
function a(e,t,n,i){return new r.ComputedProperty(function(){var i=(0,r.get)(this,e)
|
||
return null===i||"object"!=typeof i?n:i.reduce(t,n,this)},{dependentKeys:[e+".[]"],readOnly:!0})}function s(e,t){var n=void 0;/@each/.test(e)?n=e.replace(/\.@each.*$/,""):(n=e,e+=".[]")
|
||
var a=new r.ComputedProperty(function(){var e=(0,r.get)(this,n)
|
||
return(0,i.isArray)(e)?(0,o.A)(t.call(this,e)):(0,o.A)()},{readOnly:!0})
|
||
return a.property(e),a}function u(e,t,n){var i=e.map(function(e){return e+".[]"})
|
||
return new r.ComputedProperty(function(){return(0,o.A)(t.call(this,e))},{dependentKeys:i,readOnly:!0})}function c(e,t){return s(e,function(e){return e.map(t,this)})}function l(e,t){return s(e,function(e){return e.filter(t,this)})}function f(){var e,t,n
|
||
for(e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
return u(t,function(e){var t=this,n=(0,o.A)(),a=new Set
|
||
return e.forEach(function(e){var o=(0,r.get)(t,e);(0,i.isArray)(o)&&o.forEach(function(e){a.has(e)||(a.add(e),n.push(e))})}),n})}e.union=void 0,e.sum=function(e){return a(e,function(e,t){return e+t},0,"sum")},e.max=function(e){return a(e,function(e,t){return Math.max(e,t)},-1/0,"max")},e.min=function(e){return a(e,function(e,t){return Math.min(e,t)},1/0,"min")},e.map=c,e.mapBy=function(e,t){return c(e+".@each."+t,function(e){return(0,r.get)(e,t)})},e.filter=l,e.filterBy=function(e,t,n){var i=void 0
|
||
return i=2===arguments.length?function(e){return(0,r.get)(e,t)}:function(e){return(0,r.get)(e,t)===n},l(e+".@each."+t,i)},e.uniq=f,e.uniqBy=function(e,t){return new r.ComputedProperty(function(){var n,a=(0,o.A)(),s=(0,r.get)(this,e)
|
||
return(0,i.isArray)(s)&&(n=new Set,s.forEach(function(e){var i=(0,r.get)(e,t)
|
||
n.has(i)||(n.add(i),a.push(e))})),a},{dependentKeys:[e+".[]"],readOnly:!0})},e.intersect=function(){var e,t,n
|
||
for(e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
return u(t,function(e){var t=this,n=e.map(function(e){var n=(0,r.get)(t,e)
|
||
return(0,i.isArray)(n)?n:[]}),a=n.pop().filter(function(e){var t,r,i,o
|
||
for(t=0;t<n.length;t++){for(r=!1,i=n[t],o=0;o<i.length;o++)if(i[o]===e){r=!0
|
||
break}if(!1===r)return!1}return!0},"intersect")
|
||
return(0,o.A)(a)})},e.setDiff=function(e,t){return new r.ComputedProperty(function(){var r=this.get(e),n=this.get(t)
|
||
return(0,i.isArray)(r)?(0,i.isArray)(n)?r.filter(function(e){return-1===n.indexOf(e)}):(0,o.A)(r):(0,o.A)()},{dependentKeys:[e+".[]",t+".[]"],readOnly:!0})},e.collect=function(){var e,t,n
|
||
for(e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
return u(t,function(){var e=(0,r.getProperties)(this,t),n=(0,o.A)()
|
||
for(var i in e)e.hasOwnProperty(i)&&(void 0===e[i]?n.push(null):n.push(e[i]))
|
||
return n},"collect")},e.sort=function(e,t){return"function"==typeof t?function(e,t){return s(e,function(e){var r=this
|
||
return e.slice().sort(function(e,n){return t.call(r,e,n)})})}(e,t):function(e,t){var a=new r.ComputedProperty(function(s){var u=this,c=(0,r.get)(this,t),l=a._activeObserverMap||(a._activeObserverMap=new WeakMap),f=l.get(this)
|
||
function h(){this.notifyPropertyChange(s)}void 0!==f&&f.forEach(function(e){return r.removeObserver.apply(void 0,e)})
|
||
var d="@this"===e,p=function(e){return e.map(function(e){var t=e.split(":"),r=t[0],n=t[1]
|
||
return[r,n=n||"asc"]})}(c)
|
||
f=p.map(function(t){var n=t[0],i=d?"@each."+n:e+".@each."+n
|
||
return(0,r.addObserver)(u,i,h),[u,i,h]}),l.set(this,f)
|
||
var m=d?this:(0,r.get)(this,e)
|
||
return(0,i.isArray)(m)?0===p.length?(0,o.A)(m.slice()):function(e,t){return(0,o.A)(e.slice().sort(function(e,i){var o,a,s,u,c
|
||
for(o=0;o<t.length;o++)if(a=t[o],s=a[0],u=a[1],0!==(c=(0,n.default)((0,r.get)(e,s),(0,r.get)(i,s))))return"desc"===u?-1*c:c
|
||
return 0}))}(m,p):(0,o.A)()},{dependentKeys:[t+".[]"],readOnly:!0})
|
||
return a._activeObserverMap=void 0,a}(e,t)},e.union=f}),e("ember-runtime/controllers/controller",["exports","ember-debug","ember-runtime/system/object","ember-runtime/mixins/controller","ember-runtime/inject"],function(e,t,r,n,i){"use strict"
|
||
var o=r.default.extend(n.default);(0,i.createInjectionHelper)("controller",function(e){}),e.default=o}),e("ember-runtime/copy",["exports","ember-debug","ember-runtime/system/object","ember-runtime/mixins/copyable"],function(e,t,r,n){"use strict"
|
||
e.default=function(e,t){return"object"!=typeof e||null===e?e:n.default.detect(e)?e.copy(t):function e(t,r,i,o){if("object"!=typeof t||null===t)return t
|
||
var a,s=void 0,u=void 0
|
||
if(r&&(u=i.indexOf(t))>=0)return o[u]
|
||
if(Array.isArray(t)){if(s=t.slice(),r)for(u=s.length;--u>=0;)s[u]=e(s[u],r,i,o)}else if(n.default.detect(t))s=t.copy(r,i,o)
|
||
else if(t instanceof Date)s=new Date(t.getTime())
|
||
else for(a in s={},a=void 0,t)Object.prototype.hasOwnProperty.call(t,a)&&"__"!==a.substring(0,2)&&(s[a]=r?e(t[a],r,i,o):t[a])
|
||
r&&(i.push(t),o.push(s))
|
||
return s}(e,t,t?[]:null,t?[]:null)}}),e("ember-runtime/ext/function",["ember-environment","ember-metal","ember-debug"],function(e,t,r){"use strict"
|
||
var n=Function.prototype
|
||
e.ENV.EXTEND_PROTOTYPES.Function&&(Object.defineProperty(n,"property",{configurable:!0,enumerable:!1,writable:!0,value:function(){return t.computed.apply(void 0,Array.prototype.slice.call(arguments).concat([this]))}}),Object.defineProperty(n,"observes",{configurable:!0,enumerable:!1,writable:!0,value:function(){return t.observer.apply(void 0,Array.prototype.slice.call(arguments).concat([this]))}}),Object.defineProperty(n,"_observesImmediately",{configurable:!0,enumerable:!1,writable:!0,value:function(){return this.observes.apply(this,arguments)}}),Object.defineProperty(n,"on",{configurable:!0,enumerable:!1,writable:!0,value:function(){return t.on.apply(void 0,Array.prototype.slice.call(arguments).concat([this]))}}))}),e("ember-runtime/ext/rsvp",["exports","ember-babel","rsvp","ember-metal","ember-debug","container"],function(e,t,r,n,i,o){"use strict"
|
||
e.onerrorDefault=u
|
||
var a=(0,t.taggedTemplateLiteralLoose)(["rsvpAfter"],["rsvpAfter"]),s=n.run.backburner
|
||
function u(e){var t,r=function(e){if(!e)return
|
||
if(e.errorThrown)return function(e){var t=e.errorThrown
|
||
"string"==typeof t&&(t=new Error(t))
|
||
return Object.defineProperty(t,"__reason_with_error_thrown__",{value:e,enumerable:!1}),t}(e)
|
||
if("UnrecognizedURLError"===e.name)return
|
||
if("TransitionAborted"===e.name)return
|
||
return e}(e)
|
||
if(r){if(!(t=(0,n.getDispatchOverride)()))throw r
|
||
t(r)}}r.configure("async",function(e,t){s.schedule("actions",null,e,t)}),r.configure("after",function(e){s.schedule((0,o.privatize)(a),null,e)}),r.on("error",u),e.default=r}),e("ember-runtime/ext/string",["ember-environment","ember-runtime/system/string"],function(e,t){"use strict"
|
||
var r=String.prototype
|
||
e.ENV.EXTEND_PROTOTYPES.String&&(Object.defineProperty(r,"w",{configurable:!0,enumerable:!1,writeable:!0,value:function(){return(0,t.w)(this)}}),Object.defineProperty(r,"loc",{configurable:!0,enumerable:!1,writeable:!0,value:function(){var e,r,n
|
||
for(e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n]
|
||
return(0,t.loc)(this,r)}}),Object.defineProperty(r,"camelize",{configurable:!0,enumerable:!1,writeable:!0,value:function(){return(0,t.camelize)(this)}}),Object.defineProperty(r,"decamelize",{configurable:!0,enumerable:!1,writeable:!0,value:function(){return(0,t.decamelize)(this)}}),Object.defineProperty(r,"dasherize",{configurable:!0,enumerable:!1,writeable:!0,value:function(){return(0,t.dasherize)(this)}}),Object.defineProperty(r,"underscore",{configurable:!0,enumerable:!1,writeable:!0,value:function(){return(0,t.underscore)(this)}}),Object.defineProperty(r,"classify",{configurable:!0,enumerable:!1,writeable:!0,value:function(){return(0,t.classify)(this)}}),Object.defineProperty(r,"capitalize",{configurable:!0,enumerable:!1,writeable:!0,value:function(){return(0,t.capitalize)(this)}}))}),e("ember-runtime/index",["exports","ember-runtime/system/object","ember-runtime/system/string","ember-runtime/mixins/registry_proxy","ember-runtime/mixins/container_proxy","ember-runtime/copy","ember-runtime/inject","ember-runtime/compare","ember-runtime/is-equal","ember-runtime/mixins/array","ember-runtime/mixins/comparable","ember-runtime/system/namespace","ember-runtime/system/array_proxy","ember-runtime/system/object_proxy","ember-runtime/system/core_object","ember-runtime/mixins/action_handler","ember-runtime/mixins/copyable","ember-runtime/mixins/enumerable","ember-runtime/mixins/-proxy","ember-runtime/system/lazy_load","ember-runtime/mixins/observable","ember-runtime/mixins/mutable_enumerable","ember-runtime/mixins/target_action_support","ember-runtime/mixins/evented","ember-runtime/mixins/promise_proxy","ember-runtime/computed/computed_macros","ember-runtime/computed/reduce_computed_macros","ember-runtime/controllers/controller","ember-runtime/mixins/controller","ember-runtime/system/service","ember-runtime/ext/rsvp","ember-runtime/utils","ember-runtime/string_registry","ember-runtime/ext/string","ember-runtime/ext/function"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P,M,R){"use strict"
|
||
e.setStrings=e.getStrings=e.typeOf=e.isArray=e.onerrorDefault=e.RSVP=e.Service=e.ControllerMixin=e.Controller=e.collect=e.intersect=e.union=e.uniqBy=e.uniq=e.filterBy=e.filter=e.mapBy=e.setDiff=e.sort=e.map=e.max=e.min=e.sum=e.or=e.and=e.deprecatingAlias=e.readOnly=e.oneWay=e.lte=e.lt=e.gte=e.gt=e.equal=e.match=e.bool=e.not=e.none=e.notEmpty=e.empty=e.PromiseProxyMixin=e.Evented=e.TargetActionSupport=e.MutableEnumerable=e.Observable=e._loaded=e.runLoadHooks=e.onLoad=e._contentFor=e._ProxyMixin=e.Enumerable=e.Copyable=e.ActionHandler=e.CoreObject=e.ObjectProxy=e.ArrayProxy=e.setNamespaceSearchDisabled=e.isNamespaceSearchDisabled=e.Namespace=e.Comparable=e.removeAt=e.MutableArray=e.A=e.NativeArray=e.removeArrayObserver=e.addArrayObserver=e.isEmberArray=e.Array=e.isEqual=e.compare=e.inject=e.copy=e.ContainerProxyMixin=e.RegistryProxyMixin=e.String=e.FrameworkObject=e.Object=void 0,Object.defineProperty(e,"Object",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"FrameworkObject",{enumerable:!0,get:function(){return t.FrameworkObject}}),Object.defineProperty(e,"String",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"RegistryProxyMixin",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"ContainerProxyMixin",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"copy",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"inject",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"compare",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"isEqual",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"Array",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"isEmberArray",{enumerable:!0,get:function(){return c.isEmberArray}}),Object.defineProperty(e,"addArrayObserver",{enumerable:!0,get:function(){return c.addArrayObserver}}),Object.defineProperty(e,"removeArrayObserver",{enumerable:!0,get:function(){return c.removeArrayObserver}}),Object.defineProperty(e,"NativeArray",{enumerable:!0,get:function(){return c.NativeArray}}),Object.defineProperty(e,"A",{enumerable:!0,get:function(){return c.A}}),Object.defineProperty(e,"MutableArray",{enumerable:!0,get:function(){return c.MutableArray}}),Object.defineProperty(e,"removeAt",{enumerable:!0,get:function(){return c.removeAt}}),Object.defineProperty(e,"Comparable",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"Namespace",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"isNamespaceSearchDisabled",{enumerable:!0,get:function(){return f.isSearchDisabled}}),Object.defineProperty(e,"setNamespaceSearchDisabled",{enumerable:!0,get:function(){return f.setSearchDisabled}}),Object.defineProperty(e,"ArrayProxy",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"ObjectProxy",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"CoreObject",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"ActionHandler",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"Copyable",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"Enumerable",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"_ProxyMixin",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"_contentFor",{enumerable:!0,get:function(){return b.contentFor}})
|
||
Object.defineProperty(e,"onLoad",{enumerable:!0,get:function(){return v.onLoad}}),Object.defineProperty(e,"runLoadHooks",{enumerable:!0,get:function(){return v.runLoadHooks}}),Object.defineProperty(e,"_loaded",{enumerable:!0,get:function(){return v._loaded}}),Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"MutableEnumerable",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"TargetActionSupport",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"Evented",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"PromiseProxyMixin",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return x.empty}}),Object.defineProperty(e,"notEmpty",{enumerable:!0,get:function(){return x.notEmpty}}),Object.defineProperty(e,"none",{enumerable:!0,get:function(){return x.none}}),Object.defineProperty(e,"not",{enumerable:!0,get:function(){return x.not}}),Object.defineProperty(e,"bool",{enumerable:!0,get:function(){return x.bool}}),Object.defineProperty(e,"match",{enumerable:!0,get:function(){return x.match}}),Object.defineProperty(e,"equal",{enumerable:!0,get:function(){return x.equal}}),Object.defineProperty(e,"gt",{enumerable:!0,get:function(){return x.gt}}),Object.defineProperty(e,"gte",{enumerable:!0,get:function(){return x.gte}}),Object.defineProperty(e,"lt",{enumerable:!0,get:function(){return x.lt}}),Object.defineProperty(e,"lte",{enumerable:!0,get:function(){return x.lte}}),Object.defineProperty(e,"oneWay",{enumerable:!0,get:function(){return x.oneWay}}),Object.defineProperty(e,"readOnly",{enumerable:!0,get:function(){return x.readOnly}}),Object.defineProperty(e,"deprecatingAlias",{enumerable:!0,get:function(){return x.deprecatingAlias}}),Object.defineProperty(e,"and",{enumerable:!0,get:function(){return x.and}}),Object.defineProperty(e,"or",{enumerable:!0,get:function(){return x.or}}),Object.defineProperty(e,"sum",{enumerable:!0,get:function(){return C.sum}}),Object.defineProperty(e,"min",{enumerable:!0,get:function(){return C.min}}),Object.defineProperty(e,"max",{enumerable:!0,get:function(){return C.max}}),Object.defineProperty(e,"map",{enumerable:!0,get:function(){return C.map}}),Object.defineProperty(e,"sort",{enumerable:!0,get:function(){return C.sort}}),Object.defineProperty(e,"setDiff",{enumerable:!0,get:function(){return C.setDiff}})
|
||
Object.defineProperty(e,"mapBy",{enumerable:!0,get:function(){return C.mapBy}}),Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return C.filter}}),Object.defineProperty(e,"filterBy",{enumerable:!0,get:function(){return C.filterBy}}),Object.defineProperty(e,"uniq",{enumerable:!0,get:function(){return C.uniq}}),Object.defineProperty(e,"uniqBy",{enumerable:!0,get:function(){return C.uniqBy}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return C.union}}),Object.defineProperty(e,"intersect",{enumerable:!0,get:function(){return C.intersect}}),Object.defineProperty(e,"collect",{enumerable:!0,get:function(){return C.collect}}),Object.defineProperty(e,"Controller",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"ControllerMixin",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"Service",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"RSVP",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"onerrorDefault",{enumerable:!0,get:function(){return P.onerrorDefault}}),Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return M.isArray}}),Object.defineProperty(e,"typeOf",{enumerable:!0,get:function(){return M.typeOf}}),Object.defineProperty(e,"getStrings",{enumerable:!0,get:function(){return R.getStrings}}),Object.defineProperty(e,"setStrings",{enumerable:!0,get:function(){return R.setStrings}})}),e("ember-runtime/inject",["exports","ember-metal","ember-debug"],function(e,t,r){"use strict"
|
||
function n(){}e.default=n,e.createInjectionHelper=function(e,r){i[e]=r,n[e]=function(r){return new t.InjectedProperty(e,r)}},e.validatePropertyInjections=function(e){var r,n,o,a=e.proto(),s=[]
|
||
for(var u in a)(r=(0,t.descriptorFor)(a,u))instanceof t.InjectedProperty&&-1===s.indexOf(r.type)&&s.push(r.type)
|
||
if(s.length)for(n=0;n<s.length;n++)"function"==typeof(o=i[s[n]])&&o(e)
|
||
return!0}
|
||
var i={}}),e("ember-runtime/is-equal",["exports"],function(e){"use strict"
|
||
e.default=function(e,t){return e&&"function"==typeof e.isEqual?e.isEqual(t):e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():e===t}}),e("ember-runtime/mixins/-proxy",["exports","@glimmer/reference","ember-metal","ember-debug","ember-runtime/computed/computed_macros"],function(e,t,r,n,i){"use strict"
|
||
function o(e,t){var n=t.slice(8)
|
||
n in this||(0,r.notifyPropertyChange)(this,n)}function a(e,t){var n=(0,r.get)(e,"content"),i=(void 0===t?(0,r.meta)(e):t).readableTag()
|
||
return void 0!==i&&i.inner.second.inner.update((0,r.tagFor)(n)),n}e.contentFor=a,e.default=r.Mixin.create({content:null,init:function(){this._super.apply(this,arguments)
|
||
var e=(0,r.meta)(this)
|
||
e.setProxy(),e.writableTag(function(){return(0,t.combine)([t.DirtyableTag.create(),t.UpdatableTag.create(t.CONSTANT_TAG)])})},isTruthy:(0,i.bool)("content"),willWatchProperty:function(e){(0,r.addObserver)(this,"content."+e,null,o)},didUnwatchProperty:function(e){(0,r.removeObserver)(this,"content."+e,null,o)},unknownProperty:function(e){var t=a(this)
|
||
if(t)return(0,r.get)(t,e)},setUnknownProperty:function(e,t){var n=(0,r.meta)(this)
|
||
if(n.proto===this)return(0,r.defineProperty)(this,e,null,t),t
|
||
var i=a(this,n)
|
||
return(0,r.set)(i,e,t)}})}),e("ember-runtime/mixins/action_handler",["exports","ember-metal","ember-debug"],function(e,t,r){"use strict"
|
||
var n=t.Mixin.create({mergedProperties:["actions"],send:function(e){for(r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i]
|
||
if(!this.actions||!this.actions[e]||!0===this.actions[e].apply(this,n)){var r,n,i,o=(0,t.get)(this,"target")
|
||
o&&o.send.apply(o,arguments)}}})
|
||
e.default=n}),e("ember-runtime/mixins/array",["exports","ember-utils","ember-metal","ember-debug","ember-runtime/mixins/enumerable","ember-runtime/compare","ember-environment","ember-runtime/mixins/observable","ember-runtime/mixins/copyable","ember-runtime/copy","ember-runtime/mixins/mutable_enumerable"],function(e,t,r,n,i,o,a,s,u,c,l){"use strict"
|
||
var f,h
|
||
function d(e,t,n,i,o){var a=n&&n.willChange||"arrayWillChange",s=n&&n.didChange||"arrayDidChange",u=(0,r.get)(e,"hasArrayObservers")
|
||
return i(e,"@array:before",t,a),i(e,"@array:change",t,s),u===o&&(0,r.notifyPropertyChange)(e,"hasArrayObservers"),e}function p(e,t,n){return d(e,t,n,r.addListener,!1)}function m(e,t,n){return d(e,t,n,r.removeListener,!0)}function y(e,t,n,i){return void 0===t?(t=0,n=i=-1):(void 0===n&&(n=-1),void 0===i&&(i=-1)),(0,r.eachProxyArrayWillChange)(e,t,n,i),(0,r.sendEvent)(e,"@array:before",[e,t,n,i]),e}function g(e,t,n,i){void 0===t?(t=0,n=i=-1):(void 0===n&&(n=-1),void 0===i&&(i=-1)),(i<0||n<0||i-n!=0)&&(0,r.notifyPropertyChange)(e,"length"),(0,r.notifyPropertyChange)(e,"[]"),(0,r.eachProxyArrayDidChange)(e,t,n,i),(0,r.sendEvent)(e,"@array:change",[e,t,n,i])
|
||
var o,a,s,u=(0,r.peekMeta)(e),c=(0,r.peekCacheFor)(e)
|
||
return void 0!==c&&(a=(0,r.get)(e,"length")-((-1===i?0:i)-(o=-1===n?0:n)),s=t<0?a+t:t,c.has("firstObject")&&0===s&&(0,r.notifyPropertyChange)(e,"firstObject",u),c.has("lastObject")&&a-1<s+o&&(0,r.notifyPropertyChange)(e,"lastObject",u)),e}e.MutableArray=e.NativeArray=e.A=void 0,e.addArrayObserver=p,e.removeArrayObserver=m,e.arrayContentWillChange=y,e.arrayContentDidChange=g,e.isEmberArray=function(e){return e&&e[b]},e.removeAt=E
|
||
var b=(0,t.symbol)("EMBER_ARRAY")
|
||
function v(e,t){return 2===arguments.length?function(n){return t===(0,r.get)(n,e)}:function(t){return!!(0,r.get)(t,e)}}var _=r.Mixin.create(i.default,((f={})[b]=!0,f.length=null,f.objectAt=function(e){if(!(e<0||e>=(0,r.get)(this,"length")))return(0,r.get)(this,e)},f.objectsAt=function(e){var t=this
|
||
return e.map(function(e){return(0,r.objectAt)(t,e)})},f["[]"]=(0,r.computed)({get:function(){return this},set:function(e,t){return this.replace(0,(0,r.get)(this,"length"),t),this}}),f.firstObject=(0,r.computed)(function(){return(0,r.objectAt)(this,0)}).readOnly(),f.lastObject=(0,r.computed)(function(){return(0,r.objectAt)(this,(0,r.get)(this,"length")-1)}).readOnly(),f.slice=function(e,t){var n=A(),i=(0,r.get)(this,"length")
|
||
for((0,r.isNone)(e)?e=0:e<0&&(e=i+e),(0,r.isNone)(t)||t>i?t=i:t<0&&(t=i+t);e<t;)n[n.length]=(0,r.objectAt)(this,e++)
|
||
return n},f.indexOf=function(e,t){var n,i=(0,r.get)(this,"length")
|
||
for(void 0===t&&(t=0),t<0&&(t+=i),n=t;n<i;n++)if((0,r.objectAt)(this,n)===e)return n
|
||
return-1},f.lastIndexOf=function(e,t){var n,i=(0,r.get)(this,"length")
|
||
for((void 0===t||t>=i)&&(t=i-1),t<0&&(t+=i),n=t;n>=0;n--)if((0,r.objectAt)(this,n)===e)return n
|
||
return-1},f.addArrayObserver=function(e,t){return p(this,e,t)},f.removeArrayObserver=function(e,t){return m(this,e,t)},f.hasArrayObservers=(0,r.computed)(function(){return(0,r.hasListeners)(this,"@array:change")||(0,r.hasListeners)(this,"@array:before")}),f.arrayContentWillChange=function(e,t,r){return y(this,e,t,r)},f.arrayContentDidChange=function(e,t,r){return g(this,e,t,r)},f.forEach=function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=(0,r.get)(this,"length")
|
||
for(t=0;t<o;t++)n=this.objectAt(t),e.call(i,n,t,this)
|
||
return this},f.getEach=(0,r.aliasMethod)("mapBy"),f.setEach=function(e,t){return this.forEach(function(n){return(0,r.set)(n,e,t)})},f.map=function(e,t){var r=A()
|
||
return this.forEach(function(n,i,o){return r[i]=e.call(t,n,i,o)}),r},f.mapBy=function(e){return this.map(function(t){return(0,r.get)(t,e)})},f.filter=function(e,t){var r=A()
|
||
return this.forEach(function(n,i,o){e.call(t,n,i,o)&&r.push(n)}),r},f.reject=function(e,t){return this.filter(function(){return!e.apply(t,arguments)})},f.filterBy=function(){return this.filter(v.apply(this,arguments))},f.rejectBy=function(e,t){var n=2===arguments.length?function(n){return(0,r.get)(n,e)===t}:function(t){return!!(0,r.get)(t,e)}
|
||
return this.reject(n)},f.find=function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=(0,r.get)(this,"length")
|
||
for(t=0;t<o;t++)if(n=this.objectAt(t),e.call(i,n,t,this))return n},f.findBy=function(){return this.find(v.apply(this,arguments))},f.every=function(e,t){return!this.find(function(r,n,i){return!e.call(t,r,n,i)})},f.isEvery=function(){return this.every(v.apply(this,arguments))},f.any=function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=(0,r.get)(this,"length")
|
||
for(t=0;t<o;t++)if(n=this.objectAt(t),e.call(i,n,t,this))return!0
|
||
return!1},f.isAny=function(){return this.any(v.apply(this,arguments))},f.reduce=function(e,t,r){var n=t
|
||
return this.forEach(function(t,i){n=e(n,t,i,this,r)},this),n},f.invoke=function(e){for(t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n]
|
||
var t,r,n,i=A()
|
||
return this.forEach(function(t,n){var o=t&&t[e]
|
||
"function"==typeof o&&(i[n]=r.length?o.apply(t,r):t[e]())},this),i},f.toArray=function(){var e=A()
|
||
return this.forEach(function(t,r){return e[r]=t}),e},f.compact=function(){return this.filter(function(e){return null!=e})},f.includes=function(e,t){var n,i,o=(0,r.get)(this,"length")
|
||
for(void 0===t&&(t=0),t<0&&(t+=o),n=t;n<o;n++)if(e===(i=(0,r.objectAt)(this,n))||e!=e&&i!=i)return!0
|
||
return!1},f.sortBy=function(){var e=arguments
|
||
return this.toArray().sort(function(t,n){var i,a,s,u,c
|
||
for(i=0;i<e.length;i++)if(a=e[i],s=(0,r.get)(t,a),u=(0,r.get)(n,a),c=(0,o.default)(s,u))return c
|
||
return 0})},f.uniq=function(){var e=A(),t=new Set
|
||
return this.forEach(function(r){t.has(r)||(t.add(r),e.push(r))}),e},f.uniqBy=function(e){var t=A(),n=new Set
|
||
return this.forEach(function(i){var o=(0,r.get)(i,e)
|
||
n.has(o)||(n.add(o),t.push(i))}),t},f.without=function(e){if(!this.includes(e))return this
|
||
var t=A()
|
||
return this.forEach(function(r){r===e||r!=r&&e!=e||(t[t.length]=r)}),t},f["@each"]=(0,r.computed)(function(){return(0,r.eachProxyFor)(this)}).readOnly(),f)),w="Index out of range",S=[]
|
||
function E(e,t,i){if("number"==typeof t){if(t<0||t>=(0,r.get)(e,"length"))throw new n.Error(w)
|
||
void 0===i&&(i=1),e.replace(t,i,S)}return e}var k=r.Mixin.create(_,l.default,{replace:null,clear:function(){var e=(0,r.get)(this,"length")
|
||
return 0===e?this:(this.replace(0,e,S),this)},insertAt:function(e,t){if(e>(0,r.get)(this,"length"))throw new n.Error(w)
|
||
return this.replace(e,0,[t]),this},removeAt:function(e,t){return E(this,e,t)},pushObject:function(e){return this.insertAt((0,r.get)(this,"length"),e),e},pushObjects:function(e){if(!Array.isArray(e))throw new TypeError("Must pass Enumerable to MutableArray#pushObjects")
|
||
return this.replace((0,r.get)(this,"length"),0,e),this},popObject:function(){var e=(0,r.get)(this,"length")
|
||
if(0===e)return null
|
||
var t=(0,r.objectAt)(this,e-1)
|
||
return this.removeAt(e-1,1),t},shiftObject:function(){if(0===(0,r.get)(this,"length"))return null
|
||
var e=(0,r.objectAt)(this,0)
|
||
return this.removeAt(0),e},unshiftObject:function(e){return this.insertAt(0,e),e},unshiftObjects:function(e){return this.replace(0,0,e),this},reverseObjects:function(){var e=(0,r.get)(this,"length")
|
||
if(0===e)return this
|
||
var t=this.toArray().reverse()
|
||
return this.replace(0,e,t),this},setObjects:function(e){if(0===e.length)return this.clear()
|
||
var t=(0,r.get)(this,"length")
|
||
return this.replace(0,t,e),this},removeObject:function(e){for(var t=(0,r.get)(this,"length")||0;--t>=0;)(0,r.objectAt)(this,t)===e&&this.removeAt(t)
|
||
return this},removeObjects:function(e){var t
|
||
for((0,r.beginPropertyChanges)(this),t=e.length-1;t>=0;t--)this.removeObject(e[t])
|
||
return(0,r.endPropertyChanges)(this),this},addObject:function(e){return this.includes(e)||this.pushObject(e),this},addObjects:function(e){var t=this
|
||
return(0,r.beginPropertyChanges)(this),e.forEach(function(e){return t.addObject(e)}),(0,r.endPropertyChanges)(this),this}}),x=r.Mixin.create(k,s.default,u.default,{get:function(e){return"number"==typeof e?this[e]:this._super(e)},objectAt:function(e){return this[e]},replace:function(e,t,n){var i=n?(0,r.get)(n,"length"):0
|
||
return y(this,e,t,i),0===i?this.splice(e,t):(0,r.replace)(this,e,t,n),g(this,e,t,i),this},unknownProperty:function(e,t){var r=void 0
|
||
return void 0!==t&&void 0===r&&(r=this[e]=t),r},indexOf:Array.prototype.indexOf,lastIndexOf:Array.prototype.lastIndexOf,copy:function(e){return e?this.map(function(e){return(0,c.default)(e,!0)}):this.slice()}}),C=["length"]
|
||
x.keys().forEach(function(e){Array.prototype[e]&&C.push(e)}),e.NativeArray=x=(h=x).without.apply(h,C)
|
||
var A=void 0
|
||
a.ENV.EXTEND_PROTOTYPES.Array?(x.apply(Array.prototype),e.A=A=function(e){return e||[]}):e.A=A=function(e){return e||(e=[]),_.detect(e)?e:x.apply(e)},e.A=A,e.NativeArray=x,e.MutableArray=k,e.default=_}),e("ember-runtime/mixins/comparable",["exports","ember-metal"],function(e,t){"use strict"
|
||
e.default=t.Mixin.create({compare:null})}),e("ember-runtime/mixins/container_proxy",["exports","ember-metal"],function(e,t){"use strict"
|
||
e.default=t.Mixin.create({__container__:null,ownerInjection:function(){return this.__container__.ownerInjection()},lookup:function(e,t){return this.__container__.lookup(e,t)},_resolveLocalLookupName:function(e,t){return this.__container__.registry.expandLocalLookup("component:"+e,{source:t})},willDestroy:function(){this._super.apply(this,arguments),this.__container__&&(0,t.run)(this.__container__,"destroy")},factoryFor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
return this.__container__.factoryFor(e,t)}})}),e("ember-runtime/mixins/controller",["exports","ember-metal","ember-runtime/computed/computed_macros","ember-runtime/mixins/action_handler"],function(e,t,r,n){"use strict"
|
||
e.default=t.Mixin.create(n.default,{isController:!0,target:null,store:null,model:null,content:(0,r.deprecatingAlias)("model",{id:"ember-runtime.controller.content-alias",until:"2.17.0",url:"https://emberjs.com/deprecations/v2.x/#toc_controller-content-alias"})})}),e("ember-runtime/mixins/copyable",["exports","ember-metal"],function(e,t){"use strict"
|
||
e.default=t.Mixin.create({copy:null})}),e("ember-runtime/mixins/enumerable",["exports","ember-metal"],function(e,t){"use strict"
|
||
e.default=t.Mixin.create()}),e("ember-runtime/mixins/evented",["exports","ember-metal"],function(e,t){"use strict"
|
||
e.default=t.Mixin.create({on:function(e,r,n){return(0,t.addListener)(this,e,r,n),this},one:function(e,r,n){return n||(n=r,r=null),(0,t.addListener)(this,e,r,n,!0),this},trigger:function(e){var r,n,i
|
||
for(r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(0,t.sendEvent)(this,e,n)},off:function(e,r,n){return(0,t.removeListener)(this,e,r,n),this},has:function(e){return(0,t.hasListeners)(this,e)}})}),e("ember-runtime/mixins/mutable_enumerable",["exports","ember-runtime/mixins/enumerable","ember-metal"],function(e,t,r){"use strict"
|
||
e.default=r.Mixin.create(t.default)}),e("ember-runtime/mixins/observable",["exports","ember-metal","ember-debug"],function(e,t,r){"use strict"
|
||
e.default=t.Mixin.create({get:function(e){return(0,t.get)(this,e)},getProperties:function(){var e,r,n
|
||
for(e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n]
|
||
return t.getProperties.apply(void 0,[this].concat(r))},set:function(e,r){return(0,t.set)(this,e,r)},setProperties:function(e){return(0,t.setProperties)(this,e)},beginPropertyChanges:function(){return(0,t.beginPropertyChanges)(),this},endPropertyChanges:function(){return(0,t.endPropertyChanges)(),this},propertyWillChange:function(e){return(0,t.propertyWillChange)(this,e),this},propertyDidChange:function(e){return(0,t.propertyDidChange)(this,e),this},notifyPropertyChange:function(e){return(0,t.notifyPropertyChange)(this,e),this},addObserver:function(e,r,n){return(0,t.addObserver)(this,e,r,n),this},removeObserver:function(e,r,n){return(0,t.removeObserver)(this,e,r,n),this},hasObserverFor:function(e){return(0,t.hasListeners)(this,e+":change")},getWithDefault:function(e,r){return(0,t.getWithDefault)(this,e,r)},incrementProperty:function(e,r){return(0,t.isNone)(r)&&(r=1),(0,t.set)(this,e,(parseFloat((0,t.get)(this,e))||0)+r)},decrementProperty:function(e,r){return(0,t.isNone)(r)&&(r=1),(0,t.set)(this,e,((0,t.get)(this,e)||0)-r)},toggleProperty:function(e){return(0,t.set)(this,e,!(0,t.get)(this,e))},cacheFor:function(e){return(0,t.getCachedValueFor)(this,e)}})}),e("ember-runtime/mixins/promise_proxy",["exports","ember-metal","ember-debug","ember-runtime/computed/computed_macros"],function(e,t,r,n){"use strict"
|
||
function i(e){return function(){var r=(0,t.get)(this,"promise")
|
||
return r[e].apply(r,arguments)}}e.default=t.Mixin.create({reason:null,isPending:(0,n.not)("isSettled").readOnly(),isSettled:(0,n.or)("isRejected","isFulfilled").readOnly(),isRejected:!1,isFulfilled:!1,promise:(0,t.computed)({get:function(){throw new r.Error("PromiseProxy's promise must be set")},set:function(e,r){return function(e,r){return(0,t.setProperties)(e,{isFulfilled:!1,isRejected:!1}),r.then(function(r){return e.isDestroyed||e.isDestroying||(0,t.setProperties)(e,{content:r,isFulfilled:!0}),r},function(r){throw e.isDestroyed||e.isDestroying||(0,t.setProperties)(e,{reason:r,isRejected:!0}),r},"Ember: PromiseProxy")}(this,r)}}),then:i("then"),catch:i("catch"),finally:i("finally")})}),e("ember-runtime/mixins/registry_proxy",["exports","ember-metal"],function(e,t){"use strict"
|
||
function r(e){return function(){var t
|
||
return(t=this.__registry__)[e].apply(t,arguments)}}e.default=t.Mixin.create({__registry__:null,resolveRegistration:r("resolve"),register:r("register"),unregister:r("unregister"),hasRegistration:r("has"),registeredOption:r("getOption"),registerOptions:r("options"),registeredOptions:r("getOptions"),registerOptionsForType:r("optionsForType"),registeredOptionsForType:r("getOptionsForType"),inject:r("injection")})}),e("ember-runtime/mixins/target_action_support",["exports","ember-environment","ember-metal","ember-debug"],function(e,t,r,n){"use strict"
|
||
e.default=r.Mixin.create({target:null,targetObject:(0,r.descriptor)({configurable:!0,enumerable:!1,get:function(){return this._targetObject},set:function(e){this._targetObject=e}}),action:null,actionContext:null,actionContextObject:(0,r.computed)("actionContext",function(){var e,n=(0,r.get)(this,"actionContext")
|
||
return"string"==typeof n?(void 0===(e=(0,r.get)(this,n))&&(e=(0,r.get)(t.context.lookup,n)),e):n}),triggerAction:function(){var e,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=i.action,a=i.target,s=i.actionContext
|
||
return o=o||(0,r.get)(this,"action"),a=a||function(e){var n,i=(0,r.get)(e,"target")
|
||
if(i)return"string"==typeof i?(void 0===(n=(0,r.get)(e,i))&&(n=(0,r.get)(t.context.lookup,i)),n):i
|
||
if(i)return i
|
||
if(e._targetObject)return e._targetObject
|
||
return null}(this),void 0===s&&(s=(0,r.get)(this,"actionContextObject")||this),!(!a||!o||(void 0,!1===(a.send?(e=a).send.apply(e,[o].concat(s)):(n=a)[o].apply(n,[].concat(s)))))}})}),e("ember-runtime/string_registry",["exports"],function(e){"use strict"
|
||
e.setStrings=function(e){t=e},e.getStrings=function(){return t},e.get=function(e){return t[e]}
|
||
var t={}}),e("ember-runtime/system/application",["exports","ember-runtime/system/namespace"],function(e,t){"use strict"
|
||
e.default=t.default.extend()}),e("ember-runtime/system/array_proxy",["exports","ember-metal","ember-runtime/utils","ember-runtime/system/object","ember-runtime/mixins/array","ember-debug"],function(e,t,r,n,i,o){"use strict"
|
||
var a,s={willChange:"_arrangedContentArrayWillChange",didChange:"_arrangedContentArrayDidChange"}
|
||
e.default=n.default.extend(i.MutableArray,((a={init:function(){this._super.apply(this,arguments),this._objectsDirtyIndex=0,this._objects=null,this._lengthDirty=!0,this._length=0,this._arrangedContent=null,this._addArrangedContentArrayObsever()},willDestroy:function(){this._removeArrangedContentArrayObsever()},content:null,arrangedContent:(0,t.alias)("content"),objectAtContent:function(e){return(0,t.objectAt)((0,t.get)(this,"arrangedContent"),e)},replace:function(e,t,r){this.replaceContent(e,t,r)},replaceContent:function(e,r,n){(0,t.get)(this,"content").replace(e,r,n)},objectAt:function(e){var r,n,i
|
||
if(null===this._objects&&(this._objects=[]),-1!==this._objectsDirtyIndex&&e>=this._objectsDirtyIndex){if(r=(0,t.get)(this,"arrangedContent"))for(n=this._objects.length=(0,t.get)(r,"length"),i=this._objectsDirtyIndex;i<n;i++)this._objects[i]=this.objectAtContent(i)
|
||
else this._objects.length=0
|
||
this._objectsDirtyIndex=-1}return this._objects[e]},length:(0,t.computed)(function(){var e
|
||
return this._lengthDirty&&(e=(0,t.get)(this,"arrangedContent"),this._length=e?(0,t.get)(e,"length"):0,this._lengthDirty=!1),this._length}).volatile()})[t.PROPERTY_DID_CHANGE]=function(e){var r,n,i
|
||
"arrangedContent"===e&&(r=null===this._objects?0:this._objects.length,i=(n=(0,t.get)(this,"arrangedContent"))?(0,t.get)(n,"length"):0,this._removeArrangedContentArrayObsever(),this.arrayContentWillChange(0,r,i),this._objectsDirtyIndex=0,this._lengthDirty=!0,this.arrayContentDidChange(0,r,i),this._addArrangedContentArrayObsever())},a._addArrangedContentArrayObsever=function(){var e=(0,t.get)(this,"arrangedContent")
|
||
e&&((0,i.addArrayObserver)(e,this,s),this._arrangedContent=e)},a._removeArrangedContentArrayObsever=function(){this._arrangedContent&&(0,i.removeArrayObserver)(this._arrangedContent,this,s)},a._arrangedContentArrayWillChange=function(){},a._arrangedContentArrayDidChange=function(e,r,n,i){this.arrayContentWillChange(r,n,i)
|
||
var o=r
|
||
o<0&&(o+=(0,t.get)(this._arrangedContent,"length")+n-i),-1===this._objectsDirtyIndex?this._objectsDirtyIndex=o:this._objectsDirtyIndex>o&&(this._objectsDirtyIndex=o),this._lengthDirty=!0,this.arrayContentDidChange(r,n,i)},a))}),e("ember-runtime/system/core_object",["exports","container","ember-utils","ember-metal","ember-runtime/mixins/action_handler","ember-runtime/inject","ember-debug","ember-environment"],function(e,t,r,n,i,o,a,s){"use strict"
|
||
var u,c
|
||
e.POST_INIT=void 0
|
||
var l=n.run.schedule,f=n.Mixin._apply,h=n.Mixin.prototype.reopen,d=e.POST_INIT=(0,r.symbol)("POST_INIT")
|
||
function p(){var e=!1,i=void 0,o=function(){function o(a){var u,c,l,f,h,p,m,y,g,b,v,_
|
||
e||o.proto(),this.__defineNonEnumerable(r.GUID_KEY_PROPERTY)
|
||
var w=(0,n.meta)(this),S=w.proto
|
||
if(w.proto=this,i&&(t.FACTORY_FOR.set(this,i),i=null),void 0!==a)for(c=this.concatenatedProperties,l=this.mergedProperties,f=void 0!==c&&c.length>0,h=void 0!==l&&l.length>0,p=Object.keys(a),m=0;m<p.length;m++)g=a[y=p[m]],s.ENV._ENABLE_BINDING_SUPPORT&&n.Mixin.detectBinding(y)&&w.writeBindings(y,g),(v=void 0!==(b=(0,n.descriptorFor)(this,y,w)))||(_=this[y],f&&c.indexOf(y)>-1&&(g=_?(0,r.makeArray)(_).concat(g):(0,r.makeArray)(g)),h&&l.indexOf(y)>-1&&(g=(0,r.assign)({},_,g))),v?b.set(this,y,g):"function"!=typeof this.setUnknownProperty||y in this?this[y]=g:this.setUnknownProperty(y,g)
|
||
s.ENV._ENABLE_BINDING_SUPPORT&&n.Mixin.finishPartial(this,w),(u=this).init.apply(u,arguments),this[d](),w.proto=S,(0,n.finishChains)(w),(0,n.sendEvent)(this,"init",void 0,void 0,void 0,w)}return o.willReopen=function(){e&&(o.PrototypeMixin=n.Mixin.create(o.PrototypeMixin)),e=!1},o._initFactory=function(e){i=e},o.proto=function(){var t=o.superclass
|
||
return t&&t.proto(),e||(e=!0,o.PrototypeMixin.applyPartial(o.prototype)),this.prototype},o}()
|
||
return o.toString=n.Mixin.prototype.toString,o}var m=(0,n.descriptor)({configurable:!0,enumerable:!1,get:function(){return(0,n.peekMeta)(this).isSourceDestroyed()},set:function(e){}}),y=(0,n.descriptor)({configurable:!0,enumerable:!1,get:function(){return(0,n.peekMeta)(this).isSourceDestroying()},set:function(e){}}),g=p()
|
||
g.toString=function(){return"Ember.CoreObject"},g.PrototypeMixin=n.Mixin.create(((u={reopen:function(){var e,t,r
|
||
for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
return f(this,t,!0),this},init:function(){}})[d]=function(){},u.__defineNonEnumerable=function(e){Object.defineProperty(this,e.name,e.descriptor)},u.concatenatedProperties=null,u.mergedProperties=null,u.isDestroyed=m,u.isDestroying=y,u.destroy=function(){var e=(0,n.peekMeta)(this)
|
||
if(!e.isSourceDestroying())return e.setSourceDestroying(),l("actions",this,this.willDestroy),l("destroy",this,this._scheduledDestroy,e),this},u.willDestroy=function(){},u._scheduledDestroy=function(e){e.isSourceDestroyed()||((0,n.deleteMeta)(this),e.setSourceDestroyed())},u.toString=function(){var e="function"==typeof this.toStringExtension?":"+this.toStringExtension():""
|
||
return"<"+(this[r.NAME_KEY]||t.FACTORY_FOR.get(this)||this.constructor.toString())+":"+(0,r.guidFor)(this)+e+">"},u)),g.PrototypeMixin.ownerConstructor=g,g.__super__=null
|
||
var b=((c={isClass:!0,isMethod:!1})[r.NAME_KEY]=null,c[r.GUID_KEY]=null,c.extend=function(){var e=p(),t=void 0
|
||
return e.ClassMixin=n.Mixin.create(this.ClassMixin),e.PrototypeMixin=n.Mixin.create(this.PrototypeMixin),e.ClassMixin.ownerConstructor=e,e.PrototypeMixin.ownerConstructor=e,h.apply(e.PrototypeMixin,arguments),e.superclass=this,e.__super__=this.prototype,(t=e.prototype=Object.create(this.prototype)).constructor=e,(0,r.generateGuid)(t),(0,n.meta)(t).proto=t,e.ClassMixin.apply(e),e},c.create=function(e,t){return new this(void 0===t?e:function(){var e,t,n,i,o,a,s,u,c,l,f,h,d=this.concatenatedProperties,p=this.mergedProperties,m=void 0!==d&&d.length>0,y=void 0!==p&&p.length>0,g={}
|
||
for(e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
for(i=0;i<t.length;i++)for(o=t[i],a=Object.keys(o),s=0,u=a.length;s<u;s++)c=a[s],l=o[c],m&&d.indexOf(c)>-1&&(f=g[c],l=f?(0,r.makeArray)(f).concat(l):(0,r.makeArray)(l)),y&&p.indexOf(c)>-1&&(h=g[c],l=(0,r.assign)({},h,l)),g[c]=l
|
||
return g}.apply(this,arguments))},c.reopen=function(){return this.willReopen(),h.apply(this.PrototypeMixin,arguments),this},c.reopenClass=function(){return h.apply(this.ClassMixin,arguments),f(this,arguments,!1),this},c.detect=function(e){if("function"!=typeof e)return!1
|
||
for(;e;){if(e===this)return!0
|
||
e=e.superclass}return!1},c.detectInstance=function(e){return e instanceof this},c.metaForProperty=function(e){var t=this.proto(),r=(0,n.descriptorFor)(t,e)
|
||
return r._meta||{}},c._computedProperties=(0,n.computed)(function(){(0,n._hasCachedComputedProperties)()
|
||
var e=this.proto(),t=void 0,r=[]
|
||
for(var i in e)void 0!==(t=(0,n.descriptorFor)(e,i))&&r.push({name:i,meta:t._meta})
|
||
return r}).readOnly(),c.eachComputedProperty=function(e,t){var r,i=void 0,o={},a=(0,n.get)(this,"_computedProperties")
|
||
for(r=0;r<a.length;r++)i=a[r],e.call(t||this,i.name,i.meta||o)},c)
|
||
s.ENV._ENABLE_PROPERTY_REQUIRED_SUPPORT&&(b.ClassMixin=n.REQUIRED,b.PrototypeMixin=n.REQUIRED)
|
||
var v=n.Mixin.create(b)
|
||
v.ownerConstructor=g,g.ClassMixin=v,v.apply(g),e.default=g}),e("ember-runtime/system/lazy_load",["exports","ember-environment"],function(e,t){"use strict"
|
||
e._loaded=void 0,e.onLoad=function(e,t){var i=n[e]
|
||
r[e]=r[e]||[],r[e].push(t),i&&t(i)},e.runLoadHooks=function(e,i){n[e]=i
|
||
var o,a=t.environment.window
|
||
a&&"function"==typeof CustomEvent&&(o=new CustomEvent(e,{detail:i,name:e}),a.dispatchEvent(o)),r[e]&&r[e].forEach(function(e){return e(i)})}
|
||
var r=t.ENV.EMBER_LOAD_HOOKS||{},n={}
|
||
e._loaded=n}),e("ember-runtime/system/namespace",["exports","ember-utils","ember-metal","ember-environment","ember-runtime/system/object"],function(e,t,r,n,i){"use strict"
|
||
e.isSearchDisabled=function(){return o},e.setSearchDisabled=function(e){o=!!e}
|
||
var o=!1,a=i.default.extend({isNamespace:!0,init:function(){a.NAMESPACES.push(this),a.PROCESSED=!1},toString:function(){var e=(0,r.get)(this,"name")||(0,r.get)(this,"modulePrefix")
|
||
return e||(f(),this[t.NAME_KEY])},nameClasses:function(){c([this.toString()],this,{})},destroy:function(){var e=a.NAMESPACES,t=this.toString()
|
||
t&&(n.context.lookup[t]=void 0,delete a.NAMESPACES_BY_ID[t]),e.splice(e.indexOf(this),1),this._super.apply(this,arguments)}})
|
||
a.reopenClass({NAMESPACES:[],NAMESPACES_BY_ID:{},PROCESSED:!1,processAll:p,byName:function(e){return o||p(),s[e]}})
|
||
var s=a.NAMESPACES_BY_ID,u={}.hasOwnProperty
|
||
function c(e,r,n){var i,o=e.length
|
||
for(var a in s[e.join(".")]=r,r)if(u.call(r,a))if(i=r[a],e[o]=a,i&&i.toString===d&&!i[t.NAME_KEY])i[t.NAME_KEY]=e.join(".")
|
||
else if(i&&i.isNamespace){if(n[(0,t.guidFor)(i)])continue
|
||
n[(0,t.guidFor)(i)]=!0,c(e,i,n)}e.length=o}function l(e,t){var r
|
||
try{return(r=e[t])&&r.isNamespace&&r}catch(e){}}function f(){if(!a.PROCESSED){var e,r,i,o,s=n.context.lookup,u=Object.keys(s)
|
||
for(e=0;e<u.length;e++)r=u[e],(o=r.charCodeAt(0))>=65&&o<=90&&(i=l(s,r))&&(i[t.NAME_KEY]=r)}}function h(e){var r=void 0
|
||
if(!o){if(p(),r=e[t.NAME_KEY])return r
|
||
r=(r=function e(r){var n=r.superclass
|
||
if(n)return n[t.NAME_KEY]?n[t.NAME_KEY]:e(n)}(e))?"(subclass of "+r+")":r}return r||"(unknown mixin)"}function d(){var e=this[t.NAME_KEY]
|
||
return e||(this[t.NAME_KEY]=h(this))}function p(){var e,t,n,i=!a.PROCESSED,o=(0,r.hasUnprocessedMixins)()
|
||
if(i&&(f(),a.PROCESSED=!0),i||o){for(e=a.NAMESPACES,t=void 0,n=0;n<e.length;n++)c([(t=e[n]).toString()],t,{});(0,r.clearUnprocessedMixins)()}}r.Mixin.prototype.toString=d,e.default=a}),e("ember-runtime/system/object",["exports","container","ember-utils","ember-metal","ember-runtime/system/core_object","ember-runtime/mixins/observable","ember-debug"],function(e,t,r,n,i,o){"use strict"
|
||
var a
|
||
e.FrameworkObject=void 0
|
||
var s=(0,r.symbol)("OVERRIDE_OWNER"),u=i.default.extend(o.default,((a={_debugContainerKey:(0,n.descriptor)({enumerable:!1,get:function(){var e=t.FACTORY_FOR.get(this)
|
||
return void 0!==e&&e.fullName}})})[r.OWNER]=(0,n.descriptor)({enumerable:!1,get:function(){if(this[s])return this[s]
|
||
var e=t.FACTORY_FOR.get(this)
|
||
return void 0!==e&&e.owner},set:function(e){this[s]=e}}),a))
|
||
u.toString=function(){return"Ember.Object"},e.FrameworkObject=u,e.default=u})
|
||
e("ember-runtime/system/object_proxy",["exports","ember-runtime/system/object","ember-runtime/mixins/-proxy"],function(e,t,r){"use strict"
|
||
e.default=t.default.extend(r.default)}),e("ember-runtime/system/service",["exports","ember-runtime/system/object","ember-runtime/inject"],function(e,t,r){"use strict";(0,r.createInjectionHelper)("service")
|
||
var n=t.default.extend()
|
||
n.reopenClass({isServiceFactory:!0}),e.default=n}),e("ember-runtime/system/string",["exports","ember-metal","ember-utils","ember-runtime/utils","ember-runtime/string_registry"],function(e,t,r,n,i){"use strict"
|
||
e.capitalize=e.underscore=e.classify=e.camelize=e.dasherize=e.decamelize=e.w=e.loc=void 0
|
||
var o=/[ _]/g,a=new t.Cache(1e3,function(e){return E(e).replace(o,"-")}),s=/(\-|\_|\.|\s)+(.)?/g,u=/(^|\/)([A-Z])/g,c=new t.Cache(1e3,function(e){return e.replace(s,function(e,t,r){return r?r.toUpperCase():""}).replace(u,function(e){return e.toLowerCase()})}),l=/^(\-|_)+(.)?/,f=/(.)(\-|\_|\.|\s)+(.)?/g,h=/(^|\/|\.)([a-z])/g,d=new t.Cache(1e3,function(e){var t,r=function(e,t,r){return r?"_"+r.toUpperCase():""},n=function(e,t,r,n){return t+(n?n.toUpperCase():"")},i=e.split("/")
|
||
for(t=0;t<i.length;t++)i[t]=i[t].replace(l,r).replace(f,n)
|
||
return i.join("/").replace(h,function(e){return e.toUpperCase()})}),p=/([a-z\d])([A-Z]+)/g,m=/\-|\s+/g,y=new t.Cache(1e3,function(e){return e.replace(p,"$1_$2").replace(m,"_").toLowerCase()}),g=/(^|\/)([a-z\u00C0-\u024F])/g,b=new t.Cache(1e3,function(e){return e.replace(g,function(e){return e.toUpperCase()})}),v=/([a-z\d])([A-Z])/g,_=new t.Cache(1e3,function(e){return e.replace(v,"$1_$2").toLowerCase()})
|
||
function w(e,t){return(!(0,n.isArray)(t)||arguments.length>2)&&(t=Array.prototype.slice.call(arguments,1)),function(e,t){var i,o=t
|
||
if(!(0,n.isArray)(o)||arguments.length>2)for(o=new Array(arguments.length-1),i=1;i<arguments.length;i++)o[i-1]=arguments[i]
|
||
var a=0
|
||
return e.replace(/%@([0-9]+)?/g,function(e,t){return t=t?parseInt(t,10)-1:a++,null===(e=o[t])?"(null)":void 0===e?"":(0,r.inspect)(e)})}(e=(0,i.get)(e)||e,t)}function S(e){return e.split(/\s+/)}function E(e){return _.get(e)}function k(e){return a.get(e)}function x(e){return c.get(e)}function C(e){return d.get(e)}function A(e){return y.get(e)}function T(e){return b.get(e)}e.default={loc:w,w:S,decamelize:E,dasherize:k,camelize:x,classify:C,underscore:A,capitalize:T},e.loc=w,e.w=S,e.decamelize=E,e.dasherize=k,e.camelize=x,e.classify=C,e.underscore=A,e.capitalize=T}),e("ember-runtime/utils",["exports","ember-runtime/mixins/array","ember-runtime/system/object"],function(e,t,r){"use strict"
|
||
e.isArray=function(e){if(!e||e.setInterval)return!1
|
||
if(Array.isArray(e))return!0
|
||
if(t.default.detect(e))return!0
|
||
var r=o(e)
|
||
if("array"===r)return!0
|
||
var n=e.length
|
||
return"number"==typeof n&&n==n&&"object"===r},e.typeOf=o
|
||
var n={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object","[object FileList]":"filelist"},i=Object.prototype.toString
|
||
function o(e){if(null===e)return"null"
|
||
if(void 0===e)return"undefined"
|
||
var t=n[i.call(e)]||"object"
|
||
return"function"===t?r.default.detect(e)&&(t="class"):"object"===t&&(e instanceof Error?t="error":e instanceof r.default?t="instance":e instanceof Date&&(t="date")),t}}),e("ember-utils",["exports"],function(e){"use strict"
|
||
function t(e){var t={}
|
||
for(var r in t[e]=1,t)if(r===e)return r
|
||
return e}var r=0
|
||
function n(){return++r}var i=[],o={},a=t("__ember"+ +new Date),s={writable:!0,configurable:!0,enumerable:!1,value:null},u={name:a,descriptor:{configurable:!0,writable:!0,enumerable:!1,value:null}}
|
||
function c(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ember")+n()
|
||
return void 0!==e&&null!==e&&(null===e[a]?e[a]=t:(s.value=t,e.__defineNonEnumerable?e.__defineNonEnumerable(u):Object.defineProperty(e,a,s))),t}var l=[]
|
||
function f(e){var r=t("__"+e+(a+Math.floor(Math.random()*new Date))+"__")
|
||
return l.push(r),r}var h=f("OWNER")
|
||
function d(e){var t,r,n,i,o
|
||
for(t=1;t<arguments.length;t++)if(r=arguments[t])for(n=Object.keys(r),i=0;i<n.length;i++)e[o=n[i]]=r[o]
|
||
return e}var p=Object.assign||d,m=/\.(_super|call\(this|apply\(this)/,y=Function.prototype.toString,g=y.call(function(){return this}).indexOf("return this")>-1?function(e){return m.test(y.call(e))}:function(){return!0}
|
||
function b(){}function v(e){return void 0===e.__hasSuper&&(e.__hasSuper=g(e)),e.__hasSuper}function _(e,t){function r(){var r=this._super
|
||
this._super=t
|
||
var n=e.apply(this,arguments)
|
||
return this._super=r,n}return r.wrappedFunction=e,r.__ember_observes__=e.__ember_observes__,r.__ember_observesBefore__=e.__ember_observesBefore__,r.__ember_listens__=e.__ember_listens__,r}b.__hasSuper=!1
|
||
var w=Object.prototype.toString
|
||
function S(e,t){return null!==e&&void 0!==e&&"function"==typeof e[t]}var E=Array.isArray,k=f("NAME_KEY"),x=Object.prototype.toString
|
||
function C(e){return null===e||void 0===e}var A="function"==typeof Proxy
|
||
e.symbol=f,e.isInternalSymbol=function(e){return l.indexOf(e)>-1},e.getOwner=function(e){return e[h]},e.setOwner=function(e,t){e[h]=t},e.OWNER=h,e.assign=p,e.assignPolyfill=d,e.dictionary=function(e){var t=Object.create(e)
|
||
return t._dict=null,delete t._dict,t},e.uuid=n,e.GUID_KEY=a,e.GUID_DESC=s,e.GUID_KEY_PROPERTY=u,e.generateGuid=c,e.guidFor=function(e){if(void 0===e)return"(undefined)"
|
||
if(null===e)return"(null)"
|
||
var t=typeof e
|
||
if(("object"===t||"function"===t)&&e[a])return e[a]
|
||
var r=void 0
|
||
switch(t){case"number":return(r=i[e])||(r=i[e]="nu"+e),r
|
||
case"string":return(r=o[e])||(r=o[e]="st"+n()),r
|
||
case"boolean":return e?"(true)":"(false)"
|
||
default:return e===Object?"(Object)":e===Array?"(Array)":c(e)}},e.intern=t,e.checkHasSuper=g,e.ROOT=b,e.wrap=function(e,t){return v(e)?!t.wrappedFunction&&v(t)?_(e,_(t,b)):_(e,t):e},e.inspect=function(e){if(null===e)return"null"
|
||
if(void 0===e)return"undefined"
|
||
if(Array.isArray(e))return"["+e+"]"
|
||
var t=typeof e
|
||
if("object"!==t&&"symbol"!==t)return""+e
|
||
if("function"==typeof e.toString&&e.toString!==w)return e.toString()
|
||
var r=void 0,n=[]
|
||
for(var i in e)if(e.hasOwnProperty(i)){if("toString"===(r=e[i]))continue
|
||
"function"==typeof r&&(r="function() { ... }"),r&&"function"!=typeof r.toString?n.push(i+": "+w.call(r)):n.push(i+": "+r)}return"{"+n.join(", ")+"}"},e.lookupDescriptor=function(e,t){for(var r,n=e;n;){if(r=Object.getOwnPropertyDescriptor(n,t))return r
|
||
n=Object.getPrototypeOf(n)}return null},e.canInvoke=S,e.tryInvoke=function(e,t,r){if(S(e,t))return e[t].apply(e,r)},e.makeArray=function(e){return null===e||void 0===e?[]:E(e)?e:[e]},e.NAME_KEY=k,e.toString=function e(t){var r,n,i
|
||
if("string"==typeof t)return t
|
||
if(Array.isArray(t)){for(r=t.length,n="",i=0;i<r;i++)i>0&&(n+=","),C(t[i])||(n+=e(t[i]))
|
||
return n}return null!=t&&"function"==typeof t.toString?t.toString():x.call(t)},e.HAS_NATIVE_PROXY=A}),e("ember-views/compat/attrs",["exports","ember-utils"],function(e,t){"use strict"
|
||
e.MUTABLE_CELL=void 0,e.MUTABLE_CELL=(0,t.symbol)("MUTABLE_CELL")}),e("ember-views/compat/fallback-view-registry",["exports","ember-utils"],function(e,t){"use strict"
|
||
e.default=(0,t.dictionary)(null)}),e("ember-views/component_lookup",["exports","ember-debug","ember-runtime"],function(e,t,r){"use strict"
|
||
e.default=r.Object.extend({componentFor:function(e,t,r){return t.factoryFor("component:"+e,r)},layoutFor:function(e,t,r){return t.lookup("template:components/"+e,r)}})}),e("ember-views/index",["exports","ember-views/system/jquery","ember-views/system/utils","ember-views/system/event_dispatcher","ember-views/component_lookup","ember-views/mixins/text_support","ember-views/views/core_view","ember-views/mixins/class_names_support","ember-views/mixins/child_views_support","ember-views/mixins/view_state_support","ember-views/mixins/view_support","ember-views/mixins/action_support","ember-views/compat/attrs","ember-views/system/lookup_partial","ember-views/utils/lookup-component","ember-views/system/action_manager","ember-views/compat/fallback-view-registry"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y){"use strict"
|
||
Object.defineProperty(e,"jQuery",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"jQueryDisabled",{enumerable:!0,get:function(){return t.jQueryDisabled}}),Object.defineProperty(e,"isSimpleClick",{enumerable:!0,get:function(){return r.isSimpleClick}}),Object.defineProperty(e,"getViewBounds",{enumerable:!0,get:function(){return r.getViewBounds}}),Object.defineProperty(e,"getViewClientRects",{enumerable:!0,get:function(){return r.getViewClientRects}}),Object.defineProperty(e,"getViewBoundingClientRect",{enumerable:!0,get:function(){return r.getViewBoundingClientRect}}),Object.defineProperty(e,"getRootViews",{enumerable:!0,get:function(){return r.getRootViews}}),Object.defineProperty(e,"getChildViews",{enumerable:!0,get:function(){return r.getChildViews}}),Object.defineProperty(e,"getViewId",{enumerable:!0,get:function(){return r.getViewId}}),Object.defineProperty(e,"getViewElement",{enumerable:!0,get:function(){return r.getViewElement}}),Object.defineProperty(e,"setViewElement",{enumerable:!0,get:function(){return r.setViewElement}}),Object.defineProperty(e,"constructStyleDeprecationMessage",{enumerable:!0,get:function(){return r.constructStyleDeprecationMessage}}),Object.defineProperty(e,"EventDispatcher",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"ComponentLookup",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"TextSupport",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"CoreView",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"ClassNamesSupport",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ChildViewsSupport",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"ViewStateSupport",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"ViewMixin",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"ActionSupport",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"MUTABLE_CELL",{enumerable:!0,get:function(){return h.MUTABLE_CELL}}),Object.defineProperty(e,"lookupPartial",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"hasPartial",{enumerable:!0,get:function(){return d.hasPartial}}),Object.defineProperty(e,"lookupComponent",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"ActionManager",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"fallbackViewRegistry",{enumerable:!0,get:function(){return y.default}})}),e("ember-views/mixins/action_support",["exports","ember-utils","ember-metal","ember-debug","ember-views/compat/attrs"],function(e,t,r,n,i){"use strict"
|
||
e.default=r.Mixin.create({sendAction:function(e){for(t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o]
|
||
var t,n,o,a=void 0
|
||
void 0===e&&(e="action"),void 0!==(a=function(e,t){return t&&t[i.MUTABLE_CELL]&&(t=t.value),t}(0,a=(0,r.get)(this,"attrs."+e)||(0,r.get)(this,e)))&&("function"==typeof a?a.apply(void 0,n):this.triggerAction({action:a,actionContext:n}))},send:function(e){for(t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i]
|
||
var t,n,i,o=this.actions&&this.actions[e]
|
||
if(!o||!0===o.apply(this,n)){var a=(0,r.get)(this,"target")
|
||
a&&a.send.apply(a,arguments)}}})}),e("ember-views/mixins/child_views_support",["exports","ember-utils","ember-metal","ember-views/system/utils"],function(e,t,r,n){"use strict"
|
||
e.default=r.Mixin.create({init:function(){this._super.apply(this,arguments),(0,n.initChildViews)(this)},childViews:(0,r.descriptor)({configurable:!1,enumerable:!1,get:function(){return(0,n.getChildViews)(this)}}),appendChild:function(e){this.linkChild(e),(0,n.addChildView)(this,e)},linkChild:function(e){(0,t.getOwner)(e)||(0,t.setOwner)(e,(0,t.getOwner)(this))}})}),e("ember-views/mixins/class_names_support",["exports","ember-metal","ember-debug"],function(e,t,r){"use strict"
|
||
var n=Object.freeze([])
|
||
e.default=t.Mixin.create({concatenatedProperties:["classNames","classNameBindings"],init:function(){this._super.apply(this,arguments)},classNames:n,classNameBindings:n})}),e("ember-views/mixins/text_support",["exports","ember-metal","ember-runtime"],function(e,t,r){"use strict"
|
||
var n={13:"insertNewline",27:"cancel"}
|
||
function i(e,r,n){var i=(0,t.get)(r,"attrs."+e)||(0,t.get)(r,e),o=(0,t.get)(r,"value")
|
||
r.sendAction(e,o),i&&!(0,t.get)(r,"bubbles")&&n.stopPropagation()}e.default=t.Mixin.create(r.TargetActionSupport,{value:"",attributeBindings:["autocapitalize","autocorrect","autofocus","disabled","form","maxlength","minlength","placeholder","readonly","required","selectionDirection","spellcheck","tabindex","title"],placeholder:null,disabled:!1,maxlength:null,init:function(){this._super.apply(this,arguments),this.on("paste",this,this._elementValueDidChange),this.on("cut",this,this._elementValueDidChange),this.on("input",this,this._elementValueDidChange)},bubbles:!1,interpretKeyEvents:function(e){var t=n[e.keyCode]
|
||
if(this._elementValueDidChange(),t)return this[t](e)},_elementValueDidChange:function(){(0,t.set)(this,"value",this.element.value)},change:function(e){this._elementValueDidChange(e)},insertNewline:function(e){i("enter",this,e),i("insert-newline",this,e)},cancel:function(e){i("escape-press",this,e)},focusIn:function(e){i("focus-in",this,e)},focusOut:function(e){this._elementValueDidChange(e),i("focus-out",this,e)},keyPress:function(e){i("key-press",this,e)},keyUp:function(e){this.interpretKeyEvents(e),this.sendAction("key-up",(0,t.get)(this,"value"),e)},keyDown:function(e){this.sendAction("key-down",(0,t.get)(this,"value"),e)}})}),e("ember-views/mixins/view_state_support",["exports","ember-metal"],function(e,t){"use strict"
|
||
e.default=t.Mixin.create({_transitionTo:function(e){var t=this._currentState,r=this._currentState=this._states[e]
|
||
this._state=e,t&&t.exit&&t.exit(this),r.enter&&r.enter(this)}})}),e("ember-views/mixins/view_support",["exports","ember-utils","ember-metal","ember-debug","ember-environment","ember-views/system/utils","ember-runtime/system/core_object","ember-views/system/jquery"],function(e,t,r,n,i,o,a,s){"use strict"
|
||
var u
|
||
function c(){return this}e.default=r.Mixin.create(((u={concatenatedProperties:["attributeBindings"]})[a.POST_INIT]=function(){!0===i.ENV._ENABLE_DID_INIT_ATTRS_SUPPORT&&this.trigger("didInitAttrs"),this.trigger("didReceiveAttrs")},u.nearestOfType=function(e){for(var t=this.parentView,n=e instanceof r.Mixin?function(t){return e.detect(t)}:function(t){return e.detect(t.constructor)};t;){if(n(t))return t
|
||
t=t.parentView}},u.nearestWithProperty=function(e){for(var t=this.parentView;t;){if(e in t)return t
|
||
t=t.parentView}},u.rerender=function(){return this._currentState.rerender(this)},u.element=(0,r.descriptor)({configurable:!1,enumerable:!1,get:function(){return this.renderer.getElement(this)}}),u.$=function(e){if(this.element)return e?(0,s.default)(e,this.element):(0,s.default)(this.element)},u.appendTo=function(e){var t=this._environment||i.environment,r=void 0
|
||
return r=t.hasDOM&&"string"==typeof e?document.querySelector(e):e,this.renderer.appendTo(this,r),this},u.append=function(){return this.appendTo(document.body)},u.elementId=null,u.findElementInParentElement=function(e){var t="#"+this.elementId
|
||
return(0,s.default)(t)[0]||(0,s.default)(t,e)[0]},u.willInsertElement=c,u.didInsertElement=c,u.willClearRender=c,u.destroy=function(){this._super.apply(this,arguments),this._currentState.destroy(this)},u.willDestroyElement=c,u.parentViewDidChange=c,u.tagName=null,u.init=function(){this._super.apply(this,arguments),this.elementId||""===this.tagName||(this.elementId=(0,t.guidFor)(this)),i.environment._ENABLE_DID_INIT_ATTRS_SUPPORT},u.__defineNonEnumerable=function(e){this[e.name]=e.descriptor.value},u.handleEvent=function(e,t){return this._currentState.handleEvent(this,e,t)},u))}),e("ember-views/system/action_manager",["exports"],function(e){"use strict"
|
||
function t(){}e.default=t,t.registeredActions={}}),e("ember-views/system/event_dispatcher",["exports","ember-utils","ember-debug","ember-metal","ember-runtime","ember-views/system/jquery","ember-views/system/action_manager","ember-views/compat/fallback-view-registry"],function(e,t,r,n,i,o,a,s){"use strict"
|
||
var u=void 0!==o.default
|
||
e.default=i.Object.extend({events:{touchstart:"touchStart",touchmove:"touchMove",touchend:"touchEnd",touchcancel:"touchCancel",keydown:"keyDown",keyup:"keyUp",keypress:"keyPress",mousedown:"mouseDown",mouseup:"mouseUp",contextmenu:"contextMenu",click:"click",dblclick:"doubleClick",mousemove:"mouseMove",focusin:"focusIn",focusout:"focusOut",mouseenter:"mouseEnter",mouseleave:"mouseLeave",submit:"submit",input:"input",change:"change",dragstart:"dragStart",drag:"drag",dragenter:"dragEnter",dragleave:"dragLeave",dragover:"dragOver",drop:"drop",dragend:"dragEnd"},rootElement:"body",init:function(){this._super(),this._eventHandlers=Object.create(null)},setup:function(e,r){var i=void 0,a=void 0,s=this._finalEvents=(0,t.assign)({},(0,n.get)(this,"events"),e);(0,n.isNone)(r)||(0,n.set)(this,"rootElement",r)
|
||
var c=(0,n.get)(this,"rootElement")
|
||
if(u){if((a=(0,o.default)(c)).addClass("ember-application"),!a.is(".ember-application"))throw new TypeError("Unable to add 'ember-application' class to root element ("+(a.selector||a[0].tagName)+"). Make sure you set rootElement to the body or an element in the body.")}else(a="string"!=typeof c?c:document.querySelector(c)).classList.add("ember-application")
|
||
var l=this._getViewRegistry()
|
||
for(i in s)s.hasOwnProperty(i)&&this.setupHandler(a,i,s[i],l)},setupHandler:function(e,t,r,n){var i,o,s
|
||
null!==r&&(u?(e.on(t+".ember",".ember-view",function(e){var t=n[this.id],i=!0
|
||
return t&&(i=t.handleEvent(r,e)),i}),e.on(t+".ember","[data-ember-action]",function(e){var t,n,i,o=e.currentTarget.attributes,s=[]
|
||
for(t=0;t<o.length;t++)-1!==(n=o.item(t)).name.lastIndexOf("data-ember-action-",0)&&(i=a.default.registeredActions[n.value])&&i.eventName===r&&-1===s.indexOf(i)&&(i.handler(e),s.push(i))})):(i=function(e,t){var i=n[e.id],o=!0
|
||
return i&&(o=i.handleEvent(r,t)),o},o=function(e,t){var n,i,o,s,u,c,l=e.getAttribute("data-ember-action"),f=a.default.registeredActions[l]
|
||
if(""===l)for(i=(n=e.attributes).length,f=[],o=0;o<i;o++)0===(s=n.item(o)).name.indexOf("data-ember-action-")&&(f=f.concat(a.default.registeredActions[s.value]))
|
||
if(f)for(u=0;u<f.length;u++)if((c=f[u])&&c.eventName===r)return c.handler(t)},s=this._eventHandlers[t]=function(e){var t=e.target
|
||
do{if(n[t.id]){if(!1===i(t,e)){e.preventDefault(),e.stopPropagation()
|
||
break}}else if(t.hasAttribute("data-ember-action")&&!1===o(t,e))break
|
||
t=t.parentNode}while(t&&1===t.nodeType)},e.addEventListener(t,s)))},_getViewRegistry:function(){var e=(0,t.getOwner)(this)
|
||
return e&&e.lookup("-view-registry:main")||s.default},destroy:function(){var e=(0,n.get)(this,"rootElement"),t=void 0
|
||
if(t=e.nodeType?e:document.querySelector(e)){if(u)(0,o.default)(e).off(".ember","**")
|
||
else for(var r in this._eventHandlers)t.removeEventListener(r,this._eventHandlers[r])
|
||
return t.classList.remove("ember-application"),this._super.apply(this,arguments)}},toString:function(){return"(EventDispatcher)"}})}),e("ember-views/system/jquery",["exports","ember-environment"],function(e,t){"use strict"
|
||
e.jQueryDisabled=void 0
|
||
var r=void 0
|
||
e.jQueryDisabled=!1
|
||
t.environment.hasDOM&&((r=t.context.imports.jQuery)?r.event.addProp?r.event.addProp("dataTransfer"):["dragstart","drag","dragenter","dragleave","dragover","drop","dragend"].forEach(function(e){r.event.fixHooks[e]={props:["dataTransfer"]}}):e.jQueryDisabled=!0),e.default=r}),e("ember-views/system/lookup_partial",["exports","ember-debug"],function(e,t){"use strict"
|
||
function r(e){var t=e.split("/"),r=t[t.length-1]
|
||
return t[t.length-1]="_"+r,t.join("/")}e.default=function(e,n){if(null!=e){var i=function(e,r,n){if(!n)return
|
||
if(!e)throw new t.Error("Container was not found when looking up a views template. This is most likely due to manually instantiating an Ember.View. See: http://git.io/EKPpnA")
|
||
return e.lookup("template:"+r)||e.lookup("template:"+n)}(n,r(e),e)
|
||
return i}},e.hasPartial=function(e,n){if(!n)throw new t.Error("Container was not found when looking up a views template. This is most likely due to manually instantiating an Ember.View. See: http://git.io/EKPpnA")
|
||
return n.hasRegistration("template:"+r(e))||n.hasRegistration("template:"+e)}}),e("ember-views/system/utils",["exports","ember-utils"],function(e,t){"use strict"
|
||
function r(e){return""===e.tagName?(0,t.guidFor)(e):e.elementId||(0,t.guidFor)(e)}e.elMatches=void 0,e.isSimpleClick=function(e){var t=e.shiftKey||e.metaKey||e.altKey||e.ctrlKey,r=e.which>1
|
||
return!t&&!r},e.constructStyleDeprecationMessage=function(e){return'Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped. For more information, including how to disable this warning, see https://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes. Style affected: "'+e+'"'},e.getRootViews=function(e){var t=e.lookup("-view-registry:main"),r=[]
|
||
return Object.keys(t).forEach(function(e){var n=t[e]
|
||
null===n.parentView&&r.push(n)}),r},e.getViewId=r,e.getViewElement=function(e){return e[n]},e.initViewElement=function(e){e[n]=null},e.setViewElement=function(e,t){return e[n]=t},e.getChildViews=function(e){return o(e,(0,t.getOwner)(e).lookup("-view-registry:main"))},e.initChildViews=function(e){e[i]=[]},e.addChildView=function(e,t){e[i].push(r(t))},e.collectChildViews=o,e.getViewBounds=a,e.getViewRange=s,e.getViewClientRects=function(e){return s(e).getClientRects()},e.getViewBoundingClientRect=function(e){return s(e).getBoundingClientRect()},e.matches=function(e,t){return u.call(e,t)}
|
||
var n=(0,t.symbol)("VIEW_ELEMENT"),i=(0,t.symbol)("CHILD_VIEW_IDS")
|
||
function o(e,t){var r=[],n=[]
|
||
return e[i].forEach(function(e){var i=t[e]
|
||
!i||i.isDestroying||i.isDestroyed||-1!==r.indexOf(e)||(r.push(e),n.push(i))}),e[i]=r,n}function a(e){return e.renderer.getBounds(e)}function s(e){var t=a(e),r=document.createRange()
|
||
return r.setStartBefore(t.firstNode),r.setEndAfter(t.lastNode),r}var u=e.elMatches="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector)}),e("ember-views/utils/lookup-component",["exports","ember-babel","container","ember-environment"],function(e,t,r,n){"use strict"
|
||
e.default=function(e,t,r){var n,i=e.lookup("component-lookup:main")
|
||
return r&&r.source&&((n=o(i,e,t,r)).component||n.layout)?n:o(i,e,t)}
|
||
var i=(0,t.taggedTemplateLiteralLoose)(["component:-default"],["component:-default"])
|
||
function o(e,t,o,a){var s=e.componentFor(o,t,a),u=e.layoutFor(o,t,a),c={layout:u,component:s}
|
||
return n.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS||!u||s||(c.component=t.factoryFor((0,r.privatize)(i))),c}}),e("ember-views/views/core_view",["exports","ember-runtime","ember-views/system/utils","ember-views/views/states"],function(e,t,r,n){"use strict"
|
||
var i=t.FrameworkObject.extend(t.Evented,t.ActionHandler,{isView:!0,_states:(0,n.cloneStates)(n.states),init:function(){if(this._super.apply(this,arguments),this._state="preRender",this._currentState=this._states.preRender,(0,r.initViewElement)(this),!this.renderer)throw new Error("Cannot instantiate a component without a renderer. Please ensure that you are creating "+this+" with a proper container/registry.")},parentView:null,instrumentDetails:function(e){return e.object=this.toString(),e.containerKey=this._debugContainerKey,e.view=this,e},trigger:function(e){for(t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n]
|
||
this._super.apply(this,arguments)
|
||
var t,r,n,i=this[e]
|
||
if("function"==typeof i)return i.apply(this,r)},has:function(e){return"function"==typeof this[e]||this._super(e)}})
|
||
i.reopenClass({isViewFactory:!0}),e.default=i}),e("ember-views/views/states",["exports","ember-utils","ember-views/views/states/default","ember-views/views/states/pre_render","ember-views/views/states/has_element","ember-views/views/states/in_dom","ember-views/views/states/destroying"],function(e,t,r,n,i,o,a){"use strict"
|
||
e.states=void 0,e.cloneStates=function(e){var r={_default:{}}
|
||
for(var n in r.preRender=Object.create(r._default),r.destroying=Object.create(r._default),r.hasElement=Object.create(r._default),r.inDOM=Object.create(r.hasElement),e)e.hasOwnProperty(n)&&(0,t.assign)(r[n],e[n])
|
||
return r},e.states={_default:r.default,preRender:n.default,inDOM:o.default,hasElement:i.default,destroying:a.default}}),e("ember-views/views/states/default",["exports","ember-debug"],function(e,t){"use strict"
|
||
e.default={appendChild:function(){throw new t.EmberError("You can't use appendChild outside of the rendering process")},handleEvent:function(){return!0},rerender:function(){},destroy:function(){}}}),e("ember-views/views/states/destroying",["exports","ember-utils","ember-debug","ember-views/views/states/default"],function(e,t,r,n){"use strict"
|
||
var i=Object.create(n.default);(0,t.assign)(i,{appendChild:function(){throw new r.Error("You can't call appendChild on a view being destroyed")},rerender:function(){throw new r.Error("You can't call rerender on a view being destroyed")}}),e.default=i}),e("ember-views/views/states/has_element",["exports","ember-utils","ember-views/views/states/default","ember-metal"],function(e,t,r,n){"use strict"
|
||
var i=Object.create(r.default);(0,t.assign)(i,{rerender:function(e){e.renderer.rerender(e)},destroy:function(e){e.renderer.remove(e)},handleEvent:function(e,t,r){return!e.has(t)||(0,n.flaggedInstrument)("interaction."+t,{event:r,view:e},function(){return n.run.join(e,e.trigger,t,r)})}}),e.default=i}),e("ember-views/views/states/in_dom",["exports","ember-utils","ember-metal","ember-debug","ember-views/views/states/has_element"],function(e,t,r,n,i){"use strict"
|
||
var o=Object.create(i.default);(0,t.assign)(o,{enter:function(e){e.renderer.register(e)},exit:function(e){e.renderer.unregister(e)}}),e.default=o}),e("ember-views/views/states/pre_render",["exports","ember-views/views/states/default"],function(e,t){"use strict"
|
||
e.default=Object.create(t.default)}),e("ember/features",["exports","ember-environment","ember-utils"],function(e,t,r){"use strict"
|
||
e.FEATURES=e.DEFAULT_FEATURES=void 0
|
||
var n=e.DEFAULT_FEATURES={"features-stripped-test":!1,"ember-libraries-isregistered":!1,"ember-improved-instrumentation":!1,"ember-glimmer-named-arguments":!0,"ember-metal-es5-getters":!0,"ember-routing-router-service":!0,"ember-engines-mount-params":!0,"ember-module-unification":!1,"glimmer-custom-component-manager":!1,"ember-template-block-let-helper":!1,"descriptor-trap":!1,"mandatory-getter":!1,"mandatory-setter":!1,"ember-glimmer-detect-backtracking-rerender":!1}
|
||
e.FEATURES=(0,r.assign)(n,t.ENV.FEATURES)}),e("ember/index",["exports","require","ember-environment","node-module","ember-utils","container","ember-metal","ember/features","ember-debug","backburner","ember-console","ember-runtime","ember-glimmer","ember/version","ember-views","ember-routing","ember-application","ember-extension-support"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g){"use strict"
|
||
e.VERSION=void 0,a.default.getOwner=i.getOwner,a.default.setOwner=i.setOwner,a.default.generateGuid=i.generateGuid,a.default.GUID_KEY=i.GUID_KEY,a.default.guidFor=i.guidFor,a.default.inspect=i.inspect,a.default.makeArray=i.makeArray,a.default.canInvoke=i.canInvoke,a.default.tryInvoke=i.tryInvoke,a.default.wrap=i.wrap,a.default.uuid=i.uuid,a.default.assign=i.assign,a.default.Container=o.Container,a.default.Registry=o.Registry
|
||
var b,v=a.computed
|
||
v.alias=a.alias,a.default.computed=v,a.default.ComputedProperty=a.ComputedProperty,a.default.cacheFor=a.getCachedValueFor,a.default.assert=u.assert,a.default.warn=u.warn,a.default.debug=u.debug,a.default.deprecate=u.deprecate,a.default.deprecateFunc=u.deprecateFunc,a.default.runInDebug=u.runInDebug,a.default.Debug={registerDeprecationHandler:u.registerDeprecationHandler,registerWarnHandler:u.registerWarnHandler},a.default.merge=a.merge,a.default.instrument=a.instrument,a.default.subscribe=a.instrumentationSubscribe,a.default.Instrumentation={instrument:a.instrument,subscribe:a.instrumentationSubscribe,unsubscribe:a.instrumentationUnsubscribe,reset:a.instrumentationReset},a.default.Error=u.Error,a.default.meta=a.meta,a.default.get=a.get,a.default.getWithDefault=a.getWithDefault,a.default._getPath=a._getPath,a.default.set=a.set,a.default.trySet=a.trySet,a.default.FEATURES=s.FEATURES,a.default.FEATURES.isEnabled=u.isFeatureEnabled,a.default._Cache=a.Cache,a.default.on=a.on,a.default.addListener=a.addListener,a.default.removeListener=a.removeListener,a.default.sendEvent=a.sendEvent,a.default.hasListeners=a.hasListeners
|
||
a.default.isNone=a.isNone,a.default.isEmpty=a.isEmpty,a.default.isBlank=a.isBlank,a.default.isPresent=a.isPresent,a.default.run=a.run,a.default.propertyWillChange=a.propertyWillChange,a.default.propertyDidChange=a.propertyDidChange,a.default.notifyPropertyChange=a.notifyPropertyChange,a.default.overrideChains=a.overrideChains,a.default.beginPropertyChanges=a.beginPropertyChanges,a.default.endPropertyChanges=a.endPropertyChanges,a.default.changeProperties=a.changeProperties,a.default.platform={defineProperty:!0,hasPropertyAccessors:!0},a.default.defineProperty=a.defineProperty,a.default.watchKey=a.watchKey,a.default.unwatchKey=a.unwatchKey,a.default.removeChainWatcher=a.removeChainWatcher,a.default._ChainNode=a.ChainNode,a.default.finishChains=a.finishChains,a.default.watchPath=a.watchPath,a.default.unwatchPath=a.unwatchPath,a.default.watch=a.watch,a.default.isWatching=a.isWatching,a.default.unwatch=a.unwatch,a.default.destroy=a.deleteMeta,a.default.libraries=a.libraries,a.default.OrderedSet=a.OrderedSet,a.default.Map=a.Map,a.default.MapWithDefault=a.MapWithDefault,a.default.getProperties=a.getProperties
|
||
a.default.setProperties=a.setProperties,a.default.expandProperties=a.expandProperties,a.default.NAME_KEY=i.NAME_KEY,a.default.addObserver=a.addObserver,a.default.removeObserver=a.removeObserver,r.ENV._ENABLE_PROPERTY_REQUIRED_SUPPORT&&(a.default.required=a.required),a.default.aliasMethod=a.aliasMethod,a.default.observer=a.observer,a.default.mixin=a.mixin,a.default.Mixin=a.Mixin,a.default.bind=a.bind,a.default.Binding=a.Binding,Object.defineProperty(a.default,"ENV",{get:function(){return r.ENV},enumerable:!1}),Object.defineProperty(a.default,"lookup",{get:function(){return r.context.lookup},set:function(e){r.context.lookup=e},enumerable:!1}),a.default.EXTEND_PROTOTYPES=r.ENV.EXTEND_PROTOTYPES,Object.defineProperty(a.default,"LOG_STACKTRACE_ON_DEPRECATION",{get:function(){return r.ENV.LOG_STACKTRACE_ON_DEPRECATION},set:function(e){r.ENV.LOG_STACKTRACE_ON_DEPRECATION=!!e},enumerable:!1}),Object.defineProperty(a.default,"LOG_VERSION",{get:function(){return r.ENV.LOG_VERSION},set:function(e){r.ENV.LOG_VERSION=!!e},enumerable:!1}),Object.defineProperty(a.default,"LOG_BINDINGS",{get:function(){return r.ENV.LOG_BINDINGS},set:function(e){r.ENV.LOG_BINDINGS=!!e},enumerable:!1}),Object.defineProperty(a.default,"onerror",{get:a.getOnerror,set:a.setOnerror,enumerable:!1}),Object.defineProperty(a.default,"testing",{get:u.isTesting,set:u.setTesting,enumerable:!1}),a.default._Backburner=c.default,a.default.Logger=l.default,a.default.A=f.A,a.default.String=f.String,a.default.Object=f.Object,a.default._RegistryProxyMixin=f.RegistryProxyMixin,a.default._ContainerProxyMixin=f.ContainerProxyMixin,a.default.compare=f.compare,a.default.copy=f.copy,a.default.isEqual=f.isEqual
|
||
a.default.inject=f.inject,a.default.Array=f.Array,a.default.Comparable=f.Comparable,a.default.Enumerable=f.Enumerable,a.default.ArrayProxy=f.ArrayProxy,a.default.ObjectProxy=f.ObjectProxy,a.default.ActionHandler=f.ActionHandler,a.default.CoreObject=f.CoreObject,a.default.NativeArray=f.NativeArray,a.default.Copyable=f.Copyable,a.default.MutableEnumerable=f.MutableEnumerable,a.default.MutableArray=f.MutableArray,a.default.TargetActionSupport=f.TargetActionSupport,a.default.Evented=f.Evented,a.default.PromiseProxyMixin=f.PromiseProxyMixin,a.default.Observable=f.Observable,a.default.typeOf=f.typeOf,a.default.isArray=f.isArray,a.default.Object=f.Object,a.default.onLoad=f.onLoad,a.default.runLoadHooks=f.runLoadHooks,a.default.Controller=f.Controller,a.default.ControllerMixin=f.ControllerMixin,a.default.Service=f.Service,a.default._ProxyMixin=f._ProxyMixin,a.default.RSVP=f.RSVP,a.default.Namespace=f.Namespace,v.empty=f.empty,v.notEmpty=f.notEmpty,v.none=f.none
|
||
v.not=f.not,v.bool=f.bool,v.match=f.match,v.equal=f.equal,v.gt=f.gt,v.gte=f.gte,v.lt=f.lt,v.lte=f.lte,v.oneWay=f.oneWay,v.reads=f.oneWay,v.readOnly=f.readOnly,v.deprecatingAlias=f.deprecatingAlias,v.and=f.and,v.or=f.or,v.any=f.any,v.sum=f.sum,v.min=f.min,v.max=f.max,v.map=f.map,v.sort=f.sort,v.setDiff=f.setDiff,v.mapBy=f.mapBy,v.filter=f.filter,v.filterBy=f.filterBy,v.uniq=f.uniq,v.uniqBy=f.uniqBy,v.union=f.union,v.intersect=f.intersect,v.collect=f.collect,Object.defineProperty(a.default,"STRINGS",{configurable:!1,get:f.getStrings,set:f.setStrings})
|
||
Object.defineProperty(a.default,"BOOTED",{configurable:!1,enumerable:!1,get:f.isNamespaceSearchDisabled,set:f.setNamespaceSearchDisabled}),a.default.Component=h.Component,h.Helper.helper=h.helper,a.default.Helper=h.Helper,a.default.Checkbox=h.Checkbox,a.default.TextField=h.TextField,a.default.TextArea=h.TextArea,a.default.LinkComponent=h.LinkComponent,r.ENV.EXTEND_PROTOTYPES.String&&(String.prototype.htmlSafe=function(){return(0,h.htmlSafe)(this)})
|
||
var _=a.default.Handlebars=a.default.Handlebars||{},w=a.default.HTMLBars=a.default.HTMLBars||{},S=_.Utils=_.Utils||{}
|
||
w.template=_.template=h.template,S.escapeExpression=h.escapeExpression,f.String.htmlSafe=h.htmlSafe,f.String.isHTMLSafe=h.isHTMLSafe,Object.defineProperty(a.default,"TEMPLATES",{get:h.getTemplates,set:h.setTemplates,configurable:!1,enumerable:!1}),e.VERSION=d.default,a.default.VERSION=d.default,a.libraries.registerCoreLibrary("Ember",d.default),a.default.$=p.jQuery,a.default.ViewTargetActionSupport=p.ViewTargetActionSupport,a.default.ViewUtils={isSimpleClick:p.isSimpleClick,getViewElement:p.getViewElement,getViewBounds:p.getViewBounds,getViewClientRects:p.getViewClientRects,getViewBoundingClientRect:p.getViewBoundingClientRect,getRootViews:p.getRootViews,getChildViews:p.getChildViews},a.default.TextSupport=p.TextSupport,a.default.ComponentLookup=p.ComponentLookup,a.default.EventDispatcher=p.EventDispatcher,a.default.Location=m.Location,a.default.AutoLocation=m.AutoLocation,a.default.HashLocation=m.HashLocation,a.default.HistoryLocation=m.HistoryLocation,a.default.NoneLocation=m.NoneLocation,a.default.controllerFor=m.controllerFor,a.default.generateControllerFactory=m.generateControllerFactory,a.default.generateController=m.generateController,a.default.RouterDSL=m.RouterDSL,a.default.Router=m.Router,a.default.Route=m.Route,a.default.Application=y.Application,a.default.ApplicationInstance=y.ApplicationInstance,a.default.Engine=y.Engine,a.default.EngineInstance=y.EngineInstance,a.default.DefaultResolver=a.default.Resolver=y.Resolver;(0,f.runLoadHooks)("Ember.Application",y.Application),a.default.DataAdapter=g.DataAdapter,a.default.ContainerDebugAdapter=g.ContainerDebugAdapter,(0,t.has)("ember-template-compiler")&&(0,t.default)("ember-template-compiler"),(0,t.has)("ember-testing")&&(b=(0,t.default)("ember-testing"),a.default.Test=b.Test,a.default.Test.Adapter=b.Adapter,a.default.Test.QUnitAdapter=b.QUnitAdapter,a.default.setupForTesting=b.setupForTesting),(0,f.runLoadHooks)("Ember"),e.default=a.default,n.IS_NODE?n.module.exports=a.default:r.context.exports.Ember=r.context.exports.Em=a.default})
|
||
e("ember/version",["exports"],function(e){"use strict"
|
||
e.default="3.1.0"}),e("node-module",["exports"],function(e){var t="object"==typeof module&&"function"==typeof module.require
|
||
t?(e.require=module.require,e.module=module,e.IS_NODE=t):(e.require=null,e.module=null,e.IS_NODE=t)}),e("route-recognizer",["exports"],function(e){"use strict"
|
||
var t=Object.create
|
||
function r(){var e=t(null)
|
||
return e.__=void 0,delete e.__,e}var n=function(e,t,r){this.path=e,this.matcher=t,this.delegate=r}
|
||
n.prototype.to=function(e,t){var r=this.delegate
|
||
if(r&&r.willAddRoute&&(e=r.willAddRoute(this.matcher.target,e)),this.matcher.add(this.path,e),t){if(0===t.length)throw new Error("You must have an argument in the function passed to `to`")
|
||
this.matcher.addChild(this.path,e,t,this.delegate)}}
|
||
var i=function(e){this.routes=r(),this.children=r(),this.target=e}
|
||
function o(e,t,r){return function(i,a){var s=e+i
|
||
if(!a)return new n(s,t,r)
|
||
a(o(s,t,r))}}function a(e,t,r){var n,i=0
|
||
for(n=0;n<e.length;n++)i+=e[n].path.length
|
||
var o={path:t=t.substr(i),handler:r}
|
||
e.push(o)}function s(e){return e.split("/").map(c).join("/")}i.prototype.add=function(e,t){this.routes[e]=t},i.prototype.addChild=function(e,t,r,n){var a=new i(t)
|
||
this.children[e]=a
|
||
var s=o(e,a,n)
|
||
n&&n.contextEntered&&n.contextEntered(t,s),r(s)}
|
||
var u=/%|\//g
|
||
function c(e){return e.length<3||-1===e.indexOf("%")?e:decodeURIComponent(e).replace(u,encodeURIComponent)}var l=/%(?:2(?:4|6|B|C)|3(?:B|D|A)|40)/g
|
||
function f(e){return encodeURIComponent(e).replace(l,decodeURIComponent)}var h=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\)/g,d=Array.isArray,p=Object.prototype.hasOwnProperty
|
||
function m(e,t){if("object"!=typeof e||null===e)throw new Error("You must pass an object as the second argument to `generate`.")
|
||
if(!p.call(e,t))throw new Error("You must provide param `"+t+"` to `generate`.")
|
||
var r=e[t],n="string"==typeof r?r:""+r
|
||
if(0===n.length)throw new Error("You must provide a param `"+t+"`.")
|
||
return n}var y=[]
|
||
y[0]=function(e,t){var r,n,i=t,o=e.value
|
||
for(r=0;r<o.length;r++)n=o.charCodeAt(r),i=i.put(n,!1,!1)
|
||
return i},y[1]=function(e,t){return t.put(47,!0,!0)},y[2]=function(e,t){return t.put(-1,!1,!0)},y[4]=function(e,t){return t}
|
||
var g=[]
|
||
g[0]=function(e){return e.value.replace(h,"\\$1")},g[1]=function(){return"([^/]+)"},g[2]=function(){return"(.+)"},g[4]=function(){return""}
|
||
var b=[]
|
||
b[0]=function(e){return e.value},b[1]=function(e,t){var r=m(t,e.value)
|
||
return T.ENCODE_AND_DECODE_PATH_SEGMENTS?f(r):r},b[2]=function(e,t){return m(t,e.value)},b[4]=function(){return""}
|
||
var v=Object.freeze({}),_=Object.freeze([])
|
||
function w(e,t,r){t.length>0&&47===t.charCodeAt(0)&&(t=t.substr(1))
|
||
var n,i,o,a,s=t.split("/"),u=void 0,l=void 0
|
||
for(n=0;n<s.length;n++)o=0,a=0,12&(o=2<<(a=""===(i=s[n])?4:58===i.charCodeAt(0)?1:42===i.charCodeAt(0)?2:0))&&(i=i.slice(1),(u=u||[]).push(i),(l=l||[]).push(0!=(4&o))),14&o&&r[a]++,e.push({type:a,value:c(i)})
|
||
return{names:u||_,shouldDecodes:l||_}}function S(e,t,r){return e.char===t&&e.negate===r}var E=function(e,t,r,n,i){this.states=e,this.id=t,this.char=r,this.negate=n,this.nextStates=i?t:null,this.pattern="",this._regex=void 0,this.handlers=void 0,this.types=void 0}
|
||
function k(e,t){return e.negate?e.char!==t&&-1!==e.char:e.char===t||-1===e.char}function x(e,t){var r,n,i,o=[]
|
||
for(r=0,n=e.length;r<n;r++)i=e[r],o=o.concat(i.match(t))
|
||
return o}E.prototype.regex=function(){return this._regex||(this._regex=new RegExp(this.pattern)),this._regex},E.prototype.get=function(e,t){var r,n,i,o=this.nextStates
|
||
if(null!==o)if(d(o)){for(r=0;r<o.length;r++)if(S(n=this.states[o[r]],e,t))return n}else if(S(i=this.states[o],e,t))return i},E.prototype.put=function(e,t,r){var n
|
||
if(n=this.get(e,t))return n
|
||
var i=this.states
|
||
return n=new E(i,i.length,e,t,r),i[i.length]=n,null==this.nextStates?this.nextStates=n.id:d(this.nextStates)?this.nextStates.push(n.id):this.nextStates=[this.nextStates,n.id],n},E.prototype.match=function(e){var t,r,n,i=this.nextStates
|
||
if(!i)return[]
|
||
var o=[]
|
||
if(d(i))for(t=0;t<i.length;t++)k(r=this.states[i[t]],e)&&o.push(r)
|
||
else k(n=this.states[i],e)&&o.push(n)
|
||
return o}
|
||
var C=function(e){this.length=0,this.queryParams=e||{}}
|
||
function A(e){var t
|
||
e=e.replace(/\+/gm,"%20")
|
||
try{t=decodeURIComponent(e)}catch(e){t=""}return t}C.prototype.splice=Array.prototype.splice,C.prototype.slice=Array.prototype.slice,C.prototype.push=Array.prototype.push
|
||
var T=function(){this.names=r()
|
||
var e=[],t=new E(e,0,-1,!0,!1)
|
||
e[0]=t,this.states=e,this.rootState=t}
|
||
T.prototype.add=function(e,t){var r,n,i,o,a,s,u,c=this.rootState,l="^",f=[0,0,0],h=new Array(e.length),d=[],p=!0,m=0
|
||
for(r=0;r<e.length;r++){for(o=(i=w(d,(n=e[r]).path,f)).names,a=i.shouldDecodes;m<d.length;m++)4!==(s=d[m]).type&&(p=!1,c=c.put(47,!1,!1),l+="/",c=y[s.type](s,c),l+=g[s.type](s))
|
||
h[r]={handler:n.handler,names:o,shouldDecodes:a}}p&&(c=c.put(47,!1,!1),l+="/"),c.handlers=h,c.pattern=l+"$",c.types=f,"object"==typeof t&&null!==t&&t.as&&(u=t.as),u&&(this.names[u]={segments:d,handlers:h})},T.prototype.handlersFor=function(e){var t,r,n=this.names[e]
|
||
if(!n)throw new Error("There is no route named "+e)
|
||
var i=new Array(n.handlers.length)
|
||
for(t=0;t<n.handlers.length;t++)r=n.handlers[t],i[t]=r
|
||
return i},T.prototype.hasRoute=function(e){return!!this.names[e]},T.prototype.generate=function(e,t){var r,n,i=this.names[e],o=""
|
||
if(!i)throw new Error("There is no route named "+e)
|
||
var a=i.segments
|
||
for(r=0;r<a.length;r++)4!==(n=a[r]).type&&(o+="/",o+=b[n.type](n,t))
|
||
return"/"!==o.charAt(0)&&(o="/"+o),t&&t.queryParams&&(o+=this.generateQueryString(t.queryParams)),o},T.prototype.generateQueryString=function(e){var t,r,n,i,o,a,s=[],u=Object.keys(e)
|
||
for(u.sort(),t=0;t<u.length;t++)if(null!=(n=e[r=u[t]]))if(i=encodeURIComponent(r),d(n))for(o=0;o<n.length;o++)a=r+"[]="+encodeURIComponent(n[o]),s.push(a)
|
||
else i+="="+encodeURIComponent(n),s.push(i)
|
||
return 0===s.length?"":"?"+s.join("&")},T.prototype.parseQueryString=function(e){var t,r,n,i,o,a,s=e.split("&"),u={}
|
||
for(t=0;t<s.length;t++)i=(n=A((r=s[t].split("="))[0])).length,o=!1,a=void 0,1===r.length?a="true":(i>2&&"[]"===n.slice(i-2)&&(o=!0,u[n=n.slice(0,i-2)]||(u[n]=[])),a=r[1]?A(r[1]):""),o?u[n].push(a):u[n]=a
|
||
return u},T.prototype.recognize=function(e){var t,r,n,i,o=[this.rootState],a={},u=!1,c=e.indexOf("#");-1!==c&&(e=e.substr(0,c))
|
||
var l=e.indexOf("?");-1!==l&&(r=e.substr(l+1,e.length),e=e.substr(0,l),a=this.parseQueryString(r)),"/"!==e.charAt(0)&&(e="/"+e)
|
||
var f=e
|
||
T.ENCODE_AND_DECODE_PATH_SEGMENTS?e=s(e):(e=decodeURI(e),f=decodeURI(f))
|
||
var h=e.length
|
||
for(h>1&&"/"===e.charAt(h-1)&&(e=e.substr(0,h-1),f=f.substr(0,f.length-1),u=!0),n=0;n<e.length&&(o=x(o,e.charCodeAt(n))).length;n++);var d=[]
|
||
for(i=0;i<o.length;i++)o[i].handlers&&d.push(o[i])
|
||
o=function(e){return e.sort(function(e,t){var r=e.types||[0,0,0],n=r[0],i=r[1],o=r[2],a=t.types||[0,0,0],s=a[0],u=a[1],c=a[2]
|
||
if(o!==c)return o-c
|
||
if(o){if(n!==s)return s-n
|
||
if(i!==u)return u-i}return i!==u?i-u:n!==s?s-n:0})}(d)
|
||
var p=d[0]
|
||
return p&&p.handlers&&(u&&p.pattern&&"(.+)$"===p.pattern.slice(-5)&&(f+="/"),t=function(e,t,r){var n,i,o,a,s,u,c,l,f,h=e.handlers,d=e.regex()
|
||
if(!d||!h)throw new Error("state not initialized")
|
||
var p=t.match(d),m=1,y=new C(r)
|
||
for(y.length=h.length,n=0;n<h.length;n++){if(o=(i=h[n]).names,a=i.shouldDecodes,s=v,u=!1,o!==_&&a!==_)for(c=0;c<o.length;c++)u=!0,l=o[c],f=p&&p[m++],s===v&&(s={}),T.ENCODE_AND_DECODE_PATH_SEGMENTS&&a[c]?s[l]=f&&decodeURIComponent(f):s[l]=f
|
||
y[n]={handler:i.handler,params:s,isDynamic:u}}return y}(p,f,a)),t},T.VERSION="0.3.3",T.ENCODE_AND_DECODE_PATH_SEGMENTS=!0,T.Normalizer={normalizeSegment:c,normalizePath:s,encodePathSegment:f},T.prototype.map=function(e,t){var r=new i
|
||
e(o("",r,this.delegate)),function e(t,r,n,i){var o,s,u,c,l=r.routes,f=Object.keys(l)
|
||
for(o=0;o<f.length;o++)s=f[o],a(u=t.slice(),s,l[s]),(c=r.children[s])?e(u,c,n,i):n.call(i,u)}([],r,function(e){t?t(this,e):this.add(e)},this)},e.default=T}),e("router",["exports","ember-babel","route-recognizer","rsvp"],function(e,t,r,n){"use strict"
|
||
e.Transition=void 0
|
||
var i=Array.prototype.slice,o=Object.prototype.hasOwnProperty
|
||
function a(e,t){for(var r in t)o.call(t,r)&&(e[r]=t[r])}function s(e){var t=e&&e.length,r=void 0
|
||
return t&&t>0&&e[t-1]&&e[t-1].hasOwnProperty("queryParams")?(r=e[t-1].queryParams,[i.call(e,0,t-1),r]):[e,null]}function u(e){var t,r,n
|
||
for(var i in e)if("number"==typeof(t=e[i]))e[i]=""+t
|
||
else if(Array.isArray(t))for(r=0,n=t.length;r<n;r++)t[r]=""+t[r]}function c(e,t,r){e.log&&(3===arguments.length?e.log("Transition #"+t+": "+r):(r=t,e.log(r)))}function l(e){return"string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number}function f(e,t){var r,n
|
||
for(r=0,n=e.length;r<n&&!1!==t(e[r]);r++);}function h(e,t,r,n){if(e.triggerEvent)e.triggerEvent(t,r,n)
|
||
else{var i,o,a,s=n.shift()
|
||
if(!t){if(r)return
|
||
throw new Error("Could not trigger event '"+s+"'. There are no active handlers")}var u=!1
|
||
for(i=t.length-1;i>=0;i--)if(a=(o=t[i]).handler){if(a.events&&a.events[s]){if(!0!==a.events[s].apply(a,n))return
|
||
u=!0}}else o.handlerPromise.then(c.bind(null,s,n))
|
||
if("error"===s&&"UnrecognizedURLError"===n[0].name)throw n[0]
|
||
if(!u&&!r)throw new Error("Nothing handled the event '"+s+"'.")}function c(e,t,r){r.events[e].apply(r,t)}}function d(e,t){var r,n,i=void 0,s={all:{},changed:{},removed:{}}
|
||
a(s.all,t)
|
||
var c=!1
|
||
for(i in u(e),u(t),e)o.call(e,i)&&(o.call(t,i)||(c=!0,s.removed[i]=e[i]))
|
||
for(i in t)if(o.call(t,i))if(Array.isArray(e[i])&&Array.isArray(t[i]))if(e[i].length!==t[i].length)s.changed[i]=t[i],c=!0
|
||
else for(r=0,n=e[i].length;r<n;r++)e[i][r]!==t[i][r]&&(s.changed[i]=t[i],c=!0)
|
||
else e[i]!==t[i]&&(s.changed[i]=t[i],c=!0)
|
||
return c?s:void 0}function p(e){return"Router: "+e}function m(e,t){if(e){var r="_"+t
|
||
return e[r]&&r||e[t]&&t}}function y(e,t,r,n){var i=m(e,t)
|
||
return i&&e[i].call(e,r,n)}var g=function(){function e(){this.handlerInfos=[],this.queryParams={},this.params={}}return e.prototype.promiseLabel=function(e){var t=""
|
||
return f(this.handlerInfos,function(e){""!==t&&(t+="."),t+=e.name}),p("'"+t+"': "+e)},e.prototype.resolve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.params
|
||
f(this.handlerInfos,function(e){r[e.name]=e.params||{}}),t.resolveIndex=0
|
||
var i=this,o=!1
|
||
return n.Promise.resolve(null,this.promiseLabel("Start transition")).then(u,null,this.promiseLabel("Resolve handler")).catch(function(e){var r=i.handlerInfos,a=t.resolveIndex>=r.length?r.length-1:t.resolveIndex
|
||
return n.Promise.reject({error:e,handlerWithError:i.handlerInfos[a].handler,wasAborted:o,state:i})},this.promiseLabel("Handle error"))
|
||
function a(){return n.Promise.resolve(e(),i.promiseLabel("Check if should continue")).catch(function(e){return o=!0,n.Promise.reject(e)},i.promiseLabel("Handle abort"))}function s(e){var r=i.handlerInfos[t.resolveIndex].isResolved
|
||
return i.handlerInfos[t.resolveIndex++]=e,r||y(e.handler,"redirect",e.context,t),a().then(u,null,i.promiseLabel("Resolve handler"))}function u(){return t.resolveIndex===i.handlerInfos.length?{error:null,state:i}:i.handlerInfos[t.resolveIndex].resolve(a,t).then(s,null,i.promiseLabel("Proceed"))}},e}()
|
||
function b(e){if(!(this instanceof b))return new b(e)
|
||
var t=Error.call(this,e)
|
||
Error.captureStackTrace?Error.captureStackTrace(this,b):this.stack=t.stack,this.description=t.description,this.fileName=t.fileName,this.lineNumber=t.lineNumber,this.message=t.message||"TransitionAborted",this.name="TransitionAborted",this.number=t.number,this.code=t.code}b.prototype=Object.create(Error.prototype)
|
||
var v=function(){function e(e,t,r,i,o){var a,s,u,c=this
|
||
if(this.state=r||e.state,this.intent=t,this.router=e,this.data=this.intent&&this.intent.data||{},this.resolvedModels={},this.queryParams={},this.promise=void 0,this.error=void 0,this.params=void 0,this.handlerInfos=void 0,this.targetName=void 0,this.pivotHandler=void 0,this.sequence=void 0,this.isAborted=!1,this.isActive=!0,this.urlMethod="update",this.resolveIndex=0,this.queryParamsOnly=!1,this.isTransition=!0,i)return this.promise=n.Promise.reject(i),void(this.error=i)
|
||
if(this.isCausedByAbortingTransition=!!o,this.isCausedByInitialTransition=o&&(o.isCausedByInitialTransition||0===o.sequence),this.isCausedByAbortingReplaceTransition=o&&"replace"==o.urlMethod&&(!o.isCausedByAbortingTransition||o.isCausedByAbortingReplaceTransition),r){for(this.params=r.params,this.queryParams=r.queryParams,this.handlerInfos=r.handlerInfos,(a=r.handlerInfos.length)&&(this.targetName=r.handlerInfos[a-1].name),s=0;s<a&&(u=r.handlerInfos[s]).isResolved;++s)this.pivotHandler=u.handler
|
||
this.sequence=e.currentSequence++,this.promise=r.resolve(function(){if(c.isAborted)return n.Promise.reject(void 0,p("Transition aborted - reject"))},this).catch(function(e){return e.wasAborted||c.isAborted?n.Promise.reject(_(c)):(c.trigger("error",e.error,c,e.handlerWithError),c.abort(),n.Promise.reject(e.error))},p("Handle Abort"))}else this.promise=n.Promise.resolve(this.state),this.params={}}return e.prototype.isExiting=function(e){var t,r,n,i=this.handlerInfos
|
||
for(t=0,r=i.length;t<r;++t)if((n=i[t]).name===e||n.handler===e)return!1
|
||
return!0},e.prototype.then=function(e,t,r){return this.promise.then(e,t,r)},e.prototype.catch=function(e,t){return this.promise.catch(e,t)},e.prototype.finally=function(e,t){return this.promise.finally(e,t)},e.prototype.abort=function(){return this.isAborted?this:(c(this.router,this.sequence,this.targetName+": transition was aborted"),this.intent.preTransitionState=this.router.state,this.isAborted=!0,this.isActive=!1,this.router.activeTransition=null,this)},e.prototype.retry=function(){this.abort()
|
||
var e=this.router.transitionByIntent(this.intent,!1)
|
||
return null!==this.urlMethod&&e.method(this.urlMethod),e},e.prototype.method=function(e){return this.urlMethod=e,this},e.prototype.trigger=function(e){var t=i.call(arguments)
|
||
"boolean"==typeof e?t.shift():e=!1,h(this.router,this.state.handlerInfos.slice(0,this.resolveIndex+1),e,t)},e.prototype.followRedirects=function(){var e=this.router
|
||
return this.promise.catch(function(t){return e.activeTransition?e.activeTransition.followRedirects():n.Promise.reject(t)})},e.prototype.toString=function(){return"Transition (sequence "+this.sequence+")"},e.prototype.log=function(e){c(this.router,this.sequence,e)},e}()
|
||
function _(e){return c(e.router,e.sequence,"detected abort."),new b}v.prototype.send=v.prototype.trigger
|
||
var w=function(){this.data=this.data||{}},S=Object.freeze({}),E=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
||
for(var t in this._handler=S,this._handlerPromise=null,this.factory=null,this.name=e.name,e)"handler"===t?this._processHandler(e.handler):this[t]=e[t]}return e.prototype.getHandler=function(){},e.prototype.fetchHandler=function(){var e=this.getHandler(this.name)
|
||
return this._processHandler(e)},e.prototype._processHandler=function(e){var t,r=this
|
||
return this.handlerPromise=n.Promise.resolve(e),("object"==typeof(t=e)&&null!==t||"function"==typeof t)&&"function"==typeof t.then?(this.handlerPromise=this.handlerPromise.then(function(e){return r.updateHandler(e)}),this.handler=void 0):e?this.updateHandler(e):void 0},e.prototype.log=function(e,t){e.log&&e.log(this.name+": "+t)},e.prototype.promiseLabel=function(e){return p("'"+this.name+"' "+e)},e.prototype.getUnresolved=function(){return this},e.prototype.serialize=function(){return this.params||{}},e.prototype.updateHandler=function(e){return e._handlerName=this.name,this.handler=e},e.prototype.resolve=function(e,t){var r=this.checkForAbort.bind(this,e),i=this.runBeforeModelHook.bind(this,t),o=this.getModel.bind(this,t),a=this.runAfterModelHook.bind(this,t),s=this.becomeResolved.bind(this,t)
|
||
return n.Promise.resolve(this.handlerPromise,this.promiseLabel("Start handler")).then(r,null,this.promiseLabel("Check for abort")).then(i,null,this.promiseLabel("Before model")).then(r,null,this.promiseLabel("Check if aborted during 'beforeModel' hook")).then(o,null,this.promiseLabel("Model")).then(r,null,this.promiseLabel("Check if aborted in 'model' hook")).then(a,null,this.promiseLabel("After model")).then(r,null,this.promiseLabel("Check if aborted in 'afterModel' hook")).then(s,null,this.promiseLabel("Become resolved"))},e.prototype.runBeforeModelHook=function(e){return e.trigger&&e.trigger(!0,"willResolveModel",e,this.handler),this.runSharedModelHook(e,"beforeModel",[])},e.prototype.runAfterModelHook=function(e,t){var r=this.name
|
||
return this.stashResolvedModel(e,t),this.runSharedModelHook(e,"afterModel",[t]).then(function(){return e.resolvedModels[r]},null,this.promiseLabel("Ignore fulfillment value and return model value"))},e.prototype.runSharedModelHook=function(e,t,r){this.log(e,"calling "+t+" hook"),this.queryParams&&r.push(this.queryParams),r.push(e)
|
||
var i=function(e,t,r){var n=m(e,t)
|
||
if(n)return 0===r.length?e[n].call(e):1===r.length?e[n].call(e,r[0]):2===r.length?e[n].call(e,r[0],r[1]):e[n].apply(e,r)}(this.handler,t,r)
|
||
return i&&i.isTransition&&(i=null),n.Promise.resolve(i,this.promiseLabel("Resolve value returned from one of the model hooks"))},e.prototype.getModel=function(){},e.prototype.checkForAbort=function(e,t){return n.Promise.resolve(e(),this.promiseLabel("Check for abort")).then(function(){return t},null,this.promiseLabel("Ignore fulfillment value and continue"))},e.prototype.stashResolvedModel=function(e,t){e.resolvedModels=e.resolvedModels||{},e.resolvedModels[this.name]=t},e.prototype.becomeResolved=function(e,t){var r=this.serialize(t)
|
||
return e&&(this.stashResolvedModel(e,t),e.params=e.params||{},e.params[this.name]=r),this.factory("resolved",{context:t,name:this.name,handler:this.handler,params:r})},e.prototype.shouldSupercede=function(e){if(!e)return!0
|
||
var t=e.context===this.context
|
||
return e.name!==this.name||this.hasOwnProperty("context")&&!t||this.hasOwnProperty("params")&&!function(e,t){if(!e^!t)return!1
|
||
if(!e)return!0
|
||
for(var r in e)if(e.hasOwnProperty(r)&&e[r]!==t[r])return!1
|
||
return!0}(this.params,e.params)},(0,t.createClass)(e,[{key:"handler",get:function(){return this._handler!==S?this._handler:this.fetchHandler()},set:function(e){return this._handler=e}},{key:"handlerPromise",get:function(){return null!==this._handlerPromise?this._handlerPromise:(this.fetchHandler(),this._handlerPromise)},set:function(e){return this._handlerPromise=e,e}}]),e}()
|
||
E.prototype.context=null
|
||
var k=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this,r))
|
||
return n.isResolved=!0,n}return(0,t.inherits)(r,e),r.prototype.resolve=function(e,t){return t&&t.resolvedModels&&(t.resolvedModels[this.name]=this.context),n.Promise.resolve(this,this.promiseLabel("Resolve"))},r.prototype.getUnresolved=function(){return this.factory("param",{name:this.name,handler:this.handler,params:this.params})},r}(E),x=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this,r))
|
||
return n.names=n.names||[],n}return(0,t.inherits)(r,e),r.prototype.getModel=function(e){return this.log(e,this.name+": resolving provided model"),n.Promise.resolve(this.context)},r.prototype.serialize=function(e){var t=e||this.context,r=this.names,n={}
|
||
if(l(t))return n[r[0]]=t,n
|
||
if(this.serializer)return this.serializer.call(null,t,r)
|
||
if(this.handler&&this.handler.serialize)return this.handler.serialize(t,r)
|
||
if(1===r.length){var i=r[0]
|
||
return/_id$/.test(i)?n[i]=t.id:n[i]=t,n}},r}(E),C=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this,r))
|
||
return n.params=n.params||{},n}return(0,t.inherits)(r,e),r.prototype.getModel=function(e){var t=this.params
|
||
e&&e.queryParams&&(a(t={},this.params),t.queryParams=e.queryParams)
|
||
var r=this.handler,n=m(r,"deserialize")||m(r,"model")
|
||
return this.runSharedModelHook(e,n,[t])},r}(E)
|
||
function A(e,t){var r=new(0,A.klasses[e])(t||{})
|
||
return r.factory=A,r}A.klasses={resolved:k,param:C,object:x}
|
||
var T=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this,r))
|
||
return n.name=r.name,n.pivotHandler=r.pivotHandler,n.contexts=r.contexts||[],n.queryParams=r.queryParams,n}return(0,t.inherits)(r,e),r.prototype.applyToState=function(e,t,r,n,i){var o=s([this.name].concat(this.contexts))[0],a=t.handlersFor(o[0]),u=a[a.length-1].handler
|
||
return this.applyToHandlers(e,a,r,u,n,null,i)},r.prototype.applyToHandlers=function(e,t,r,n,i,o,s){var u,c,l,f,h,d,p,m,y,b=new g,v=this.contexts.slice(0),_=t.length
|
||
if(this.pivotHandler)for(u=0,c=t.length;u<c;++u)if(t[u].handler===this.pivotHandler._handlerName){_=u
|
||
break}for(u=t.length-1;u>=0;--u)f=(l=t[u]).handler,h=e.handlerInfos[u],d=null,l.names.length>0?u>=_?d=this.createParamHandlerInfo(f,r,l.names,v,h):(p=s(f),d=this.getHandlerInfoForDynamicSegment(f,r,l.names,v,h,n,u,p)):d=this.createParamHandlerInfo(f,r,l.names,v,h),o&&(d=d.becomeResolved(null,d.context),m=h&&h.context,l.names.length>0&&d.context===m&&(d.params=h&&h.params),d.context=m),y=h,(u>=_||d.shouldSupercede(h))&&(_=Math.min(u,_),y=d),i&&!o&&(y=y.becomeResolved(null,y.context)),b.handlerInfos.unshift(y)
|
||
if(v.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+n)
|
||
return i||this.invalidateChildren(b.handlerInfos,_),a(b.queryParams,this.queryParams||{}),b},r.prototype.invalidateChildren=function(e,t){var r,n,i
|
||
for(r=t,n=e.length;r<n;++r)i=e[r],e[r]=i.getUnresolved()},r.prototype.getHandlerInfoForDynamicSegment=function(e,t,r,n,i,o,a,s){var u,c
|
||
if(n.length>0){if(l(u=n[n.length-1]))return this.createParamHandlerInfo(e,t,r,n,i)
|
||
n.pop()}else{if(i&&i.name===e)return i
|
||
if(!this.preTransitionState)return i
|
||
u=(c=this.preTransitionState.handlerInfos[a])&&c.context}return A("object",{name:e,getHandler:t,serializer:s,context:u,names:r})},r.prototype.createParamHandlerInfo=function(e,t,r,n,i){for(var o,a,s,u={},c=r.length;c--;)if(o=i&&e===i.name&&i.params||{},a=n[n.length-1],s=r[c],l(a))u[s]=""+n.pop()
|
||
else{if(!o.hasOwnProperty(s))throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route "+e)
|
||
u[s]=o[s]}return A("param",{name:e,getHandler:t,params:u})},r}(w)
|
||
function I(e){if(!(this instanceof I))return new I(e)
|
||
var t=Error.call(this,e)
|
||
Error.captureStackTrace?Error.captureStackTrace(this,I):this.stack=t.stack,this.description=t.description,this.fileName=t.fileName,this.lineNumber=t.lineNumber,this.message=t.message||"UnrecognizedURL",this.name="UnrecognizedURLError",this.number=t.number,this.code=t.code}I.prototype=Object.create(Error.prototype)
|
||
var P=function(e){function r(r){var n=(0,t.possibleConstructorReturn)(this,e.call(this,r))
|
||
return n.url=r.url,n}return(0,t.inherits)(r,e),r.prototype.applyToState=function(e,t,r){var n,i,o,s,u,c,l=new g,f=t.recognize(this.url)
|
||
if(!f)throw new I(this.url)
|
||
var h=!1,d=this.url
|
||
function p(e){if(e&&e.inaccessibleByURL)throw new I(d)
|
||
return e}for(u=0,c=f.length;u<c;++u)(o=(i=A("param",{name:(n=f[u]).handler,getHandler:r,params:n.params})).handler)?p(o):i.handlerPromise=i.handlerPromise.then(p),s=e.handlerInfos[u],h||i.shouldSupercede(s)?(h=!0,l.handlerInfos[u]=i):l.handlerInfos[u]=s
|
||
return a(l.queryParams,f.queryParams),l},r}(w),M=Array.prototype.pop,R=function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
||
this.getHandler=e.getHandler||this.getHandler,this.getSerializer=e.getSerializer||this.getSerializer,this.updateURL=e.updateURL||this.updateURL,this.replaceURL=e.replaceURL||this.replaceURL,this.didTransition=e.didTransition||this.didTransition,this.willTransition=e.willTransition||this.willTransition,this.delegate=e.delegate||this.delegate,this.triggerEvent=e.triggerEvent||this.triggerEvent,this.log=e.log||this.log,this.dslCallBacks=[],this.state=void 0,this.activeTransition=void 0,this._changedQueryParams=void 0,this.oldState=void 0,this.currentHandlerInfos=void 0,this.currentSequence=0,this.recognizer=new r.default,this.reset()}return e.prototype.map=function(e){this.recognizer.delegate=this.delegate,this.recognizer.map(e,function(e,t){var r,n,i
|
||
for(r=t.length-1,n=!0;r>=0&&n;--r)i=t[r],e.add(t,{as:i.handler}),n="/"===i.path||""===i.path||".index"===i.handler.slice(-6)})},e.prototype.hasRoute=function(e){return this.recognizer.hasRoute(e)},e.prototype.getHandler=function(){},e.prototype.getSerializer=function(){},e.prototype.queryParamsTransition=function(e,t,r,n){var i,o=this
|
||
return O(this,n,e),!t&&this.activeTransition?this.activeTransition:((i=new v(this)).queryParamsOnly=!0,r.queryParams=F(this,n.handlerInfos,n.queryParams,i),i.promise=i.promise.then(function(e){return j(i,r),o.didTransition&&o.didTransition(o.currentHandlerInfos),e},null,p("Transition complete")),i)},e.prototype.transitionByIntent=function(e){try{return function(e,t){var r,i=!!this.activeTransition,o=i?this.activeTransition.state:this.state,a=e.applyToState(o,this.recognizer,this.getHandler,t,this.getSerializer),s=d(o.queryParams,a.queryParams)
|
||
if(D(a.handlerInfos,o.handlerInfos))return s&&(r=this.queryParamsTransition(s,i,o,a))?(r.queryParamsOnly=!0,r):this.activeTransition||new v(this)
|
||
if(t)return void B(this,a)
|
||
r=new v(this,e,a,void 0,this.activeTransition),function(e,t){var r,n
|
||
if(e.length!==t.length)return!1
|
||
for(r=0,n=e.length;r<n;++r){if(e[r].name!==t[r].name)return!1
|
||
if(!U(e[r].params,t[r].params))return!1}return!0}(a.handlerInfos,o.handlerInfos)&&(r.queryParamsOnly=!0)
|
||
this.activeTransition&&this.activeTransition.abort()
|
||
this.activeTransition=r,r.promise=r.promise.then(function(e){return function(e,t){var r,i,o
|
||
try{return c(e.router,e.sequence,"Resolved all models on destination route; finalizing transition."),r=e.router,i=t.handlerInfos,B(r,t,e),e.isAborted?(r.state.handlerInfos=r.currentHandlerInfos,n.Promise.reject(_(e))):(j(e,t,e.intent.url),e.isActive=!1,r.activeTransition=null,h(r,r.currentHandlerInfos,!0,["didTransition"]),r.didTransition&&r.didTransition(r.currentHandlerInfos),c(r,e.sequence,"TRANSITION COMPLETE."),i[i.length-1].handler)}catch(t){throw t instanceof b||(o=e.state.handlerInfos,e.trigger(!0,"error",t,e,o[o.length-1].handler),e.abort()),t}}(r,e.state)},null,p("Settle transition promise when transition is finalized")),i||function(e,t,r){var n,i,o,a,s=e.state.handlerInfos,u=[]
|
||
for(i=s.length,n=0;n<i&&(o=s[n],(a=t.handlerInfos[n])&&o.name===a.name);n++)a.isResolved||u.push(o)
|
||
h(e,s,!0,["willTransition",r]),e.willTransition&&e.willTransition(s,t.handlerInfos,r)}(this,a,r)
|
||
return O(this,a,s),r}.apply(this,arguments)}catch(t){return new v(this,e,null,t)}},e.prototype.reset=function(){this.state&&f(this.state.handlerInfos.slice().reverse(),function(e){y(e.handler,"exit")}),this.oldState=void 0,this.state=new g,this.currentHandlerInfos=null},e.prototype.handleURL=function(){for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
var e,t,r,n=t[0]
|
||
return"/"!==n.charAt(0)&&(t[0]="/"+n),L(this,t).method(null)},e.prototype.updateURL=function(){throw new Error("updateURL is not implemented")},e.prototype.replaceURL=function(e){this.updateURL(e)},e.prototype.transitionTo=function(){return L(this,arguments)},e.prototype.intermediateTransitionTo=function(){return L(this,arguments,!0)},e.prototype.refresh=function(e){var t=this.activeTransition,r=t?t.state:this.state,n=r.handlerInfos
|
||
c(this,"Starting a refresh transition")
|
||
var i=new T({name:n[n.length-1].name,pivotHandler:e||n[0].handler,contexts:[],queryParams:this._changedQueryParams||r.queryParams||{}}),o=this.transitionByIntent(i,!1)
|
||
return t&&"replace"===t.urlMethod&&o.method(t.urlMethod),o},e.prototype.replaceWith=function(){return L(this,arguments).method("replace")},e.prototype.generate=function(e){var t,r,n=s(i.call(arguments,1)),o=n[0],u=n[1],c=new T({name:e,contexts:o}).applyToState(this.state,this.recognizer,this.getHandler,null,this.getSerializer),l={}
|
||
for(t=0,r=c.handlerInfos.length;t<r;++t)a(l,c.handlerInfos[t].serialize())
|
||
return l.queryParams=u,this.recognizer.generate(e,l)},e.prototype.applyIntent=function(e,t){var r=new T({name:e,contexts:t}),n=this.activeTransition&&this.activeTransition.state||this.state
|
||
return r.applyToState(n,this.recognizer,this.getHandler,null,this.getSerializer)},e.prototype.isActiveIntent=function(e,t,r,n){var i,o=n||this.state,s=o.handlerInfos
|
||
if(!s.length)return!1
|
||
var u=s[s.length-1].name,c=this.recognizer.handlersFor(u),l=0
|
||
for(i=c.length;l<i&&s[l].name!==e;++l);if(l===c.length)return!1
|
||
var f=new g
|
||
f.handlerInfos=s.slice(0,l+1),c=c.slice(0,l+1)
|
||
var h=D(new T({name:u,contexts:t}).applyToHandlers(f,c,this.getHandler,u,!0,!0,this.getSerializer).handlerInfos,f.handlerInfos)
|
||
if(!r||!h)return h
|
||
var p={}
|
||
a(p,r)
|
||
var m=o.queryParams
|
||
for(var y in m)m.hasOwnProperty(y)&&p.hasOwnProperty(y)&&(p[y]=m[y])
|
||
return h&&!d(p,r)},e.prototype.isActive=function(e){for(t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n]
|
||
var t,r,n,i=s(r)
|
||
return this.isActiveIntent(e,i[0],i[1])},e.prototype.trigger=function(){var e,t,r
|
||
for(e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
h(this,this.currentHandlerInfos,!1,t)},e}()
|
||
function O(e,t,r){r&&(e._changedQueryParams=r.all,h(e,t.handlerInfos,!0,["queryParamsDidChange",r.changed,r.all,r.removed]),e._changedQueryParams=null)}function B(e,t,r){var n,i,o,a=function(e,t){var r,n,i,o,a,s=e.handlerInfos,u=t.handlerInfos,c={updatedContext:[],exited:[],entered:[],unchanged:[],reset:void 0},l=!1
|
||
for(o=0,a=u.length;o<a;o++)r=s[o],n=u[o],r&&r.handler===n.handler||(i=!0),i?(c.entered.push(n),r&&c.exited.unshift(r)):l||r.context!==n.context?(l=!0,c.updatedContext.push(n)):c.unchanged.push(r)
|
||
for(o=u.length,a=s.length;o<a;o++)c.exited.unshift(s[o])
|
||
return c.reset=c.updatedContext.slice(),c.reset.reverse(),c}(e.state,t)
|
||
for(n=0,i=a.exited.length;n<i;n++)delete(o=a.exited[n].handler).context,y(o,"reset",!0,r),y(o,"exit",r)
|
||
var s=e.oldState=e.state
|
||
e.state=t
|
||
var u=e.currentHandlerInfos=a.unchanged.slice()
|
||
try{for(n=0,i=a.reset.length;n<i;n++)y(o=a.reset[n].handler,"reset",!1,r)
|
||
for(n=0,i=a.updatedContext.length;n<i;n++)N(u,a.updatedContext[n],!1,r)
|
||
for(n=0,i=a.entered.length;n<i;n++)N(u,a.entered[n],!0,r)}catch(t){throw e.state=s,e.currentHandlerInfos=s.handlerInfos,t}e.state.queryParams=F(e,u,t.queryParams,r)}function N(e,t,r,n){var i=t.handler,o=t.context
|
||
function a(i){if(r&&y(i,"enter",n),n&&n.isAborted)throw new b
|
||
if(i.context=o,y(i,"contextDidChange"),y(i,"setup",o,n),n&&n.isAborted)throw new b
|
||
e.push(t)}return i?a(i):t.handlerPromise=t.handlerPromise.then(a),!0}function j(e,t){var r,n,i,o,s,u,c,l=e.urlMethod
|
||
if(l){var f=e.router,h=t.handlerInfos,d=h[h.length-1].name,p={}
|
||
for(r=h.length-1;r>=0;--r)a(p,(n=h[r]).params),n.handler.inaccessibleByURL&&(l=null)
|
||
l&&(p.queryParams=e._visibleQueryParams||t.queryParams,i=f.recognizer.generate(d,p),o=e.isCausedByInitialTransition,s="replace"===l&&!e.isCausedByAbortingTransition,u=e.queryParamsOnly&&"replace"===l,c="replace"===l&&e.isCausedByAbortingReplaceTransition,o||s||u||c?f.replaceURL(i):f.updateURL(i))}}function L(e,t,r){var n,o,a=t[0]||"/",s=t[t.length-1],u={}
|
||
return s&&s.hasOwnProperty("queryParams")&&(u=M.call(t).queryParams),0===t.length?(c(e,"Updating query params"),n=e.state.handlerInfos,o=new T({name:n[n.length-1].name,contexts:[],queryParams:u})):"/"===a.charAt(0)?(c(e,"Attempting URL transition to "+a),o=new P({url:a})):(c(e,"Attempting transition to "+a),o=new T({name:t[0],contexts:i.call(t,1),queryParams:u})),e.transitionByIntent(o,r)}function D(e,t){var r,n
|
||
if(e.length!==t.length)return!1
|
||
for(r=0,n=e.length;r<n;++r)if(e[r]!==t[r])return!1
|
||
return!0}function U(e,t){if(!e&&!t)return!0
|
||
if(!e&&t||e&&!t)return!1
|
||
var r,n,i,o=Object.keys(e),a=Object.keys(t)
|
||
if(o.length!==a.length)return!1
|
||
for(r=0,n=o.length;r<n;++r)if(e[i=o[r]]!==t[i])return!1
|
||
return!0}function F(e,t,r,n){for(var i in r)r.hasOwnProperty(i)&&null===r[i]&&delete r[i]
|
||
var o,a,s,u=[]
|
||
h(e,t,!0,["finalizeQueryParamChange",r,u,n]),n&&(n._visibleQueryParams={})
|
||
var c={}
|
||
for(o=0,a=u.length;o<a;++o)c[(s=u[o]).key]=s.value,n&&!1!==s.visible&&(n._visibleQueryParams[s.key]=s.value)
|
||
return c}e.Transition=v,e.default=R}),e("rsvp",["exports","ember-babel","node-module"],function(e,t,r){"use strict"
|
||
function n(e){var t=e._promiseCallbacks
|
||
return t||(t=e._promiseCallbacks={}),t}e.filter=e.async=e.map=e.reject=e.resolve=e.off=e.on=e.configure=e.denodeify=e.defer=e.rethrow=e.hashSettled=e.hash=e.race=e.allSettled=e.all=e.EventTarget=e.Promise=e.cast=e.asap=void 0
|
||
var i,o={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function")
|
||
var r=n(this),i=r[e]
|
||
i||(i=r[e]=[]),-1===i.indexOf(t)&&i.push(t)},off:function(e,t){var r=n(this)
|
||
if(t){var i=r[e],o=i.indexOf(t);-1!==o&&i.splice(o,1)}else r[e]=[]},trigger:function(e,t,r){var i,o=n(this)[e]
|
||
if(o)for(void 0,i=0;i<o.length;i++)(0,o[i])(t,r)}},a={instrument:!1}
|
||
function s(e,t){if(2!==arguments.length)return a[e]
|
||
a[e]=t}o.mixin(a)
|
||
var u=[]
|
||
function c(e,t,r){1===u.push({name:e,payload:{key:t._guidKey,id:t._id,eventName:e,detail:t._result,childId:r&&r._id,label:t._label,timeStamp:Date.now(),error:a["instrument-with-stack"]?new Error(t._label):null}})&&setTimeout(function(){var e,t,r
|
||
for(e=0;e<u.length;e++)(r=(t=u[e]).payload).guid=r.key+r.id,r.childGuid=r.key+r.childId,r.error&&(r.stack=r.error.stack),a.trigger(t.name,t.payload)
|
||
u.length=0},50)}function l(e,t){if(e&&"object"==typeof e&&e.constructor===this)return e
|
||
var r=new this(f,t)
|
||
return w(r,e),r}function f(){}var h=void 0,d=1,p=2,m={error:null}
|
||
function y(e){try{return e.then}catch(e){return m.error=e,m}}var g=void 0
|
||
function b(){var e
|
||
try{return e=g,g=null,e.apply(this,arguments)}catch(e){return m.error=e,m}}function v(e){return g=e,b}function _(e,t,r){var n
|
||
t.constructor===e.constructor&&r===T&&e.constructor.resolve===l?function(e,t){t._state===d?E(e,t._result):t._state===p?(t._onError=null,k(e,t._result)):x(t,void 0,function(r){t===r?E(e,r):w(e,r)},function(t){return k(e,t)})}(e,t):r===m?(n=m.error,m.error=null,k(e,n)):"function"==typeof r?function(e,t,r){a.async(function(e){var n,i=!1,o=v(r).call(t,function(r){i||(i=!0,t===r?E(e,r):w(e,r))},function(t){i||(i=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"))
|
||
i||o!==m||(i=!0,n=m.error,m.error=null,k(e,n))},e)}(e,t,r):E(e,t)}function w(e,t){var r,n
|
||
e===t?E(e,t):(n=typeof(r=t),null===r||"object"!==n&&"function"!==n?E(e,t):_(e,t,y(t)))}function S(e){e._onError&&e._onError(e._result),C(e)}function E(e,t){e._state===h&&(e._result=t,e._state=d,0===e._subscribers.length?a.instrument&&c("fulfilled",e):a.async(C,e))}function k(e,t){e._state===h&&(e._state=p,e._result=t,a.async(S,e))}function x(e,t,r,n){var i=e._subscribers,o=i.length
|
||
e._onError=null,i[o]=t,i[o+d]=r,i[o+p]=n,0===o&&e._state&&a.async(C,e)}function C(e){var t,r=e._subscribers,n=e._state
|
||
if(a.instrument&&c(n===d?"fulfilled":"rejected",e),0!==r.length){var i=void 0,o=void 0,s=e._result
|
||
for(t=0;t<r.length;t+=3)i=r[t],o=r[t+n],i?A(n,i,o,s):o(s)
|
||
e._subscribers.length=0}}function A(e,t,r,n){var i,o="function"==typeof r,a=void 0
|
||
a=o?v(r)(n):n,t._state!==h||(a===t?k(t,new TypeError("A promises callback cannot return that same promise.")):a===m?(i=m.error,m.error=null,k(t,i)):o?w(t,a):e===d?E(t,a):e===p&&k(t,a))}function T(e,t,r){var n,i=this._state
|
||
if(i===d&&!e||i===p&&!t)return a.instrument&&c("chained",this,this),this
|
||
this._onError=null
|
||
var o=new this.constructor(f,r),s=this._result
|
||
return a.instrument&&c("chained",this,o),i===h?x(this,o,e,t):(n=i===d?e:t,a.async(function(){return A(i,o,n,s)})),o}var I=function(){function e(e,t,r,n){this._instanceConstructor=e,this.promise=new e(f,n),this._abortOnReject=r,this._isUsingOwnPromise=e===O,this._isUsingOwnResolve=e.resolve===l,this._init.apply(this,arguments)}return e.prototype._init=function(e,t){var r=t.length||0
|
||
this.length=r,this._remaining=r,this._result=new Array(r),this._enumerate(t)},e.prototype._enumerate=function(e){var t,r=this.length,n=this.promise
|
||
for(t=0;n._state===h&&t<r;t++)this._eachEntry(e[t],t,!0)
|
||
this._checkFullfillment()},e.prototype._checkFullfillment=function(){var e
|
||
0===this._remaining&&(e=this._result,E(this.promise,e),this._result=null)},e.prototype._settleMaybeThenable=function(e,t,r){var n,i,o=this._instanceConstructor
|
||
this._isUsingOwnResolve?(n=y(e))===T&&e._state!==h?(e._onError=null,this._settledAt(e._state,t,e._result,r)):"function"!=typeof n?this._settledAt(d,t,e,r):this._isUsingOwnPromise?(_(i=new o(f),e,n),this._willSettleAt(i,t,r)):this._willSettleAt(new o(function(t){return t(e)}),t,r):this._willSettleAt(o.resolve(e),t,r)},e.prototype._eachEntry=function(e,t,r){null!==e&&"object"==typeof e?this._settleMaybeThenable(e,t,r):this._setResultAt(d,t,e,r)},e.prototype._settledAt=function(e,t,r,n){var i=this.promise
|
||
i._state===h&&(this._abortOnReject&&e===p?k(i,r):(this._setResultAt(e,t,r,n),this._checkFullfillment()))},e.prototype._setResultAt=function(e,t,r){this._remaining--,this._result[t]=r},e.prototype._willSettleAt=function(e,t,r){var n=this
|
||
x(e,void 0,function(e){return n._settledAt(d,t,e,r)},function(e){return n._settledAt(p,t,e,r)})},e}()
|
||
function P(e,t,r){this._remaining--,this._result[t]=e===d?{state:"fulfilled",value:r}:{state:"rejected",reason:r}}var M="rsvp_"+Date.now()+"-",R=0
|
||
var O=function(){function e(t,r){this._id=R++,this._label=r,this._state=void 0,this._result=void 0,this._subscribers=[],a.instrument&&c("created",this),f!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){var r=!1
|
||
try{t(function(t){r||(r=!0,w(e,t))},function(t){r||(r=!0,k(e,t))})}catch(t){k(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype._onError=function(e){var t=this
|
||
a.after(function(){t._onError&&a.trigger("error",e,t._label)})},e.prototype.catch=function(e,t){return this.then(void 0,e,t)},e.prototype.finally=function(e,t){var r=this.constructor
|
||
return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})},t)},e}()
|
||
function B(e,t){return{then:function(r,n){return e.call(t,r,n)}}}function N(e,r){var n=function(){var t,n,i,o,a=arguments.length,s=new Array(a+1),u=!1
|
||
for(t=0;t<a;++t){if(n=arguments[t],!u){if((u=L(n))===m)return i=m.error,m.error=null,k(o=new O(f),i),o
|
||
u&&!0!==u&&(n=B(u,n))}s[t]=n}var c=new O(f)
|
||
return s[a]=function(e,t){e?k(c,e):void 0===r?w(c,t):!0===r?w(c,function(e){var t,r=e.length,n=new Array(r-1)
|
||
for(t=1;t<r;t++)n[t-1]=e[t]
|
||
return n}(arguments)):Array.isArray(r)?w(c,function(e,t){var r,n,i={},o=e.length,a=new Array(o)
|
||
for(r=0;r<o;r++)a[r]=e[r]
|
||
for(n=0;n<t.length;n++)i[t[n]]=a[n+1]
|
||
return i}(arguments,r)):w(c,t)},u?function(e,t,r,n){return O.all(t).then(function(t){return j(e,t,r,n)})}(c,s,e,this):j(c,s,e,this)}
|
||
return(0,t.defaults)(n,e),n}function j(e,t,r,n){var i
|
||
return v(r).apply(n,t)===m&&(i=m.error,m.error=null,k(e,i)),e}function L(e){return null!==e&&"object"==typeof e&&(e.constructor===O||y(e))}function D(e,t){return O.all(e,t)}O.cast=l,O.all=function(e,t){return Array.isArray(e)?new I(this,e,!0,t).promise:this.reject(new TypeError("Promise.all must be called with an array"),t)},O.race=function(e,t){var r,n=new this(f,t)
|
||
if(!Array.isArray(e))return k(n,new TypeError("Promise.race must be called with an array")),n
|
||
for(r=0;n._state===h&&r<e.length;r++)x(this.resolve(e[r]),void 0,function(e){return w(n,e)},function(e){return k(n,e)})
|
||
return n},O.resolve=l,O.reject=function(e,t){var r=new this(f,t)
|
||
return k(r,e),r},O.prototype._guidKey=M,O.prototype.then=T
|
||
var U=function(e){function r(r,n,i){return(0,t.possibleConstructorReturn)(this,e.call(this,r,n,!1,i))}return(0,t.inherits)(r,e),r}(I)
|
||
function F(e,t){return Array.isArray(e)?new U(O,e,t).promise:O.reject(new TypeError("Promise.allSettled must be called with an array"),t)}function z(e,t){return O.race(e,t)}U.prototype._setResultAt=P
|
||
var q=function(e){function r(r,n){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments[3]
|
||
return(0,t.possibleConstructorReturn)(this,e.call(this,r,n,i,o))}return(0,t.inherits)(r,e),r.prototype._init=function(e,t){this._result={},this._enumerate(t)},r.prototype._enumerate=function(e){var t,r=Object.keys(e),n=r.length,i=this.promise
|
||
this._remaining=n
|
||
var o=void 0,a=void 0
|
||
for(t=0;i._state===h&&t<n;t++)a=e[o=r[t]],this._eachEntry(a,o,!0)
|
||
this._checkFullfillment()},r}(I)
|
||
function V(e,t){return null===e||"object"!=typeof e?O.reject(new TypeError("Promise.hash must be called with an object"),t):new q(O,e,t).promise}var H=function(e){function r(r,n,i){return(0,t.possibleConstructorReturn)(this,e.call(this,r,n,!1,i))}return(0,t.inherits)(r,e),r}(q)
|
||
function K(e,t){return null===e||"object"!=typeof e?O.reject(new TypeError("RSVP.hashSettled must be called with an object"),t):new H(O,e,!1,t).promise}function W(e){throw setTimeout(function(){throw e}),e}function G(e){var t={resolve:void 0,reject:void 0}
|
||
return t.promise=new O(function(e,r){t.resolve=e,t.reject=r},e),t}H.prototype._setResultAt=P
|
||
var Y=function(e){function r(r,n,i,o){return(0,t.possibleConstructorReturn)(this,e.call(this,r,n,!0,o,i))}return(0,t.inherits)(r,e),r.prototype._init=function(e,t,r,n,i){var o=t.length||0
|
||
this.length=o,this._remaining=o,this._result=new Array(o),this._mapFn=i,this._enumerate(t)},r.prototype._setResultAt=function(e,t,r,n){var i
|
||
n?(i=v(this._mapFn)(r,t))===m?this._settledAt(p,t,i.error,!1):this._eachEntry(i,t,!1):(this._remaining--,this._result[t]=r)},r}(I)
|
||
function Q(e,t,r){return Array.isArray(e)?"function"!=typeof t?O.reject(new TypeError("RSVP.map expects a function as a second argument"),r):new Y(O,e,t,r).promise:O.reject(new TypeError("RSVP.map must be called with an array"),r)}function X(e,t){return O.resolve(e,t)}function $(e,t){return O.reject(e,t)}var J={},Z=function(e){function r(){return(0,t.possibleConstructorReturn)(this,e.apply(this,arguments))}return(0,t.inherits)(r,e),r.prototype._checkFullfillment=function(){var e
|
||
0===this._remaining&&null!==this._result&&(e=this._result.filter(function(e){return e!==J}),E(this.promise,e),this._result=null)},r.prototype._setResultAt=function(e,t,r,n){var i
|
||
n?(this._result[t]=r,(i=v(this._mapFn)(r,t))===m?this._settledAt(p,t,i.error,!1):this._eachEntry(i,t,!1)):(this._remaining--,r||(this._result[t]=J))},r}(Y)
|
||
function ee(e,t,r){return"function"!=typeof t?O.reject(new TypeError("RSVP.filter expects function as a second argument"),r):O.resolve(e,r).then(function(e){if(!Array.isArray(e))throw new TypeError("RSVP.filter must be called with an array")
|
||
return new Z(O,e,t,r).promise})}var te=0,re=void 0
|
||
function ne(e,t){le[te]=e,le[te+1]=t,2===(te+=2)&&be()}var ie="undefined"!=typeof window?window:void 0,oe=ie||{},ae=oe.MutationObserver||oe.WebKitMutationObserver,se="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),ue="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel
|
||
function ce(){return function(){return setTimeout(fe,1)}}var le=new Array(1e3)
|
||
function fe(){var e
|
||
for(e=0;e<te;e+=2)(0,le[e])(le[e+1]),le[e]=void 0,le[e+1]=void 0
|
||
te=0}var he,de,pe,me,ye,ge,be=void 0
|
||
se?(ye=process.nextTick,ge=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/),Array.isArray(ge)&&"0"===ge[1]&&"10"===ge[2]&&(ye=setImmediate),be=function(){return ye(fe)}):ae?(de=0,pe=new ae(fe),me=document.createTextNode(""),pe.observe(me,{characterData:!0}),be=function(){return me.data=de=++de%2}):ue?((he=new MessageChannel).port1.onmessage=fe,be=function(){return he.port2.postMessage(0)}):be=void 0===ie&&"function"==typeof r.require?function(){var e
|
||
try{return e=Function("return this")().require("vertx"),void 0!==(re=e.runOnLoop||e.runOnContext)?function(){re(fe)}:ce()}catch(e){return ce()}}():ce(),a.async=ne,a.after=function(e){return setTimeout(e,0)}
|
||
var ve=X,_e=function(e,t){return a.async(e,t)}
|
||
function we(){a.on.apply(a,arguments)}function Se(){a.off.apply(a,arguments)}if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__)for(var Ee in i=window.__PROMISE_INSTRUMENTATION__,s("instrument",!0),i)i.hasOwnProperty(Ee)&&we(Ee,i[Ee])
|
||
e.asap=ne,e.cast=ve,e.Promise=O,e.EventTarget=o,e.all=D,e.allSettled=F,e.race=z,e.hash=V,e.hashSettled=K,e.rethrow=W,e.defer=G,e.denodeify=N,e.configure=s,e.on=we,e.off=Se,e.resolve=X,e.reject=$,e.map=Q,e.async=_e,e.filter=ee,e.default={asap:ne,cast:ve,Promise:O,EventTarget:o,all:D,allSettled:F,race:z,hash:V,hashSettled:K,rethrow:W,defer:G,denodeify:N,configure:s,on:we,off:Se,resolve:X,reject:$,map:Q,async:_e,filter:ee}}),t("ember")}(),function(){var e;(e="undefined"!=typeof Ember?Ember:require("ember").default).WeakMap||(e.WeakMap=WeakMap)}(),function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require
|
||
if(!s&&u)return u(a,!0)
|
||
if(o)return o(a,!0)
|
||
var c=new Error("Cannot find module '"+a+"'")
|
||
throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}}
|
||
t[a][0].call(l.exports,function(e){return i(t[a][1][e]||e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a])
|
||
return i}}()({1:[function(e,t,r){"use strict";(function(e){function n(e){return parseInt(e)===e}function i(e){if(!n(e.length))return!1
|
||
for(var t=0;t<e.length;t++)if(!n(e[t])||e[t]<0||e[t]>255)return!1
|
||
return!0}function o(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e
|
||
if(Array.isArray(e)){if(!i(e))throw new Error("Array contains invalid value: "+e)
|
||
return new Uint8Array(e)}if(n(e.length)&&i(e))return new Uint8Array(e)
|
||
throw new Error("unsupported array-like object")}function a(e){return new Uint8Array(e)}function s(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var u=function(){return{toBytes:function(e){var t=[],r=0
|
||
for(e=encodeURI(e);r<e.length;){var n=e.charCodeAt(r++)
|
||
37===n?(t.push(parseInt(e.substr(r,2),16)),r+=2):t.push(n)}return o(t)},fromBytes:function(e){for(var t=[],r=0;r<e.length;){var n=e[r]
|
||
n<128?(t.push(String.fromCharCode(n)),r++):n>191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}}}(),c=function(){var e="0123456789abcdef"
|
||
return{toBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16))
|
||
return t},fromBytes:function(t){for(var r=[],n=0;n<t.length;n++){var i=t[n]
|
||
r.push(e[(240&i)>>4]+e[15&i])}return r.join("")}}}(),l={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],h=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],y=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],b=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],_=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],S=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],E=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],x=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925]
|
||
function C(e){for(var t=[],r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3])
|
||
return t}var A=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`")
|
||
Object.defineProperty(this,"key",{value:o(t,!0)}),this._prepare()}
|
||
A.prototype._prepare=function(){var e=l[this.key.length]
|
||
if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)")
|
||
this._Ke=[],this._Kd=[]
|
||
for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0])
|
||
var r,n=4*(e+1),i=this.key.length/4,o=C(this.key)
|
||
for(t=0;t<i;t++)r=t>>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t]
|
||
for(var a,s=0,u=i;u<n;){if(a=o[i-1],o[0]^=h[a>>16&255]<<24^h[a>>8&255]<<16^h[255&a]<<8^h[a>>24&255]^f[s]<<24,s+=1,8!=i)for(t=1;t<i;t++)o[t]^=o[t-1]
|
||
else{for(t=1;t<i/2;t++)o[t]^=o[t-1]
|
||
a=o[i/2-1],o[i/2]^=h[255&a]^h[a>>8&255]<<8^h[a>>16&255]<<16^h[a>>24&255]<<24
|
||
for(t=i/2+1;t<i;t++)o[t]^=o[t-1]}for(t=0;t<i&&u<n;)c=u>>2,d=u%4,this._Ke[c][d]=o[t],this._Kd[e-c][d]=o[t++],u++}for(var c=1;c<e;c++)for(var d=0;d<4;d++)a=this._Kd[c][d],this._Kd[c][d]=S[a>>24&255]^E[a>>16&255]^k[a>>8&255]^x[255&a]},A.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)")
|
||
for(var t=this._Ke.length-1,r=[0,0,0,0],n=C(e),i=0;i<4;i++)n[i]^=this._Ke[0][i]
|
||
for(var o=1;o<t;o++){for(i=0;i<4;i++)r[i]=p[n[i]>>24&255]^m[n[(i+1)%4]>>16&255]^y[n[(i+2)%4]>>8&255]^g[255&n[(i+3)%4]]^this._Ke[o][i]
|
||
n=r.slice()}var s,u=a(16)
|
||
for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(h[n[i]>>24&255]^s>>24),u[4*i+1]=255&(h[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(h[255&n[(i+3)%4]]^s)
|
||
return u},A.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)")
|
||
for(var t=this._Kd.length-1,r=[0,0,0,0],n=C(e),i=0;i<4;i++)n[i]^=this._Kd[0][i]
|
||
for(var o=1;o<t;o++){for(i=0;i<4;i++)r[i]=b[n[i]>>24&255]^v[n[(i+3)%4]>>16&255]^_[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[o][i]
|
||
n=r.slice()}var s,u=a(16)
|
||
for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(d[n[i]>>24&255]^s>>24),u[4*i+1]=255&(d[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&n[(i+1)%4]]^s)
|
||
return u}
|
||
var T=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`")
|
||
this.description="Electronic Code Block",this.name="ecb",this._aes=new A(t)}
|
||
T.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)")
|
||
for(var t=a(e.length),r=a(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.encrypt(r),t,n)
|
||
return t},T.prototype.decrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)")
|
||
for(var t=a(e.length),r=a(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.decrypt(r),t,n)
|
||
return t}
|
||
var I=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`")
|
||
if(this.description="Cipher Block Chaining",this.name="cbc",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=a(16)
|
||
this._lastCipherblock=o(r,!0),this._aes=new A(t)}
|
||
I.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)")
|
||
for(var t=a(e.length),r=a(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16)
|
||
for(var i=0;i<16;i++)r[i]^=this._lastCipherblock[i]
|
||
this._lastCipherblock=this._aes.encrypt(r),s(this._lastCipherblock,t,n)}return t},I.prototype.decrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)")
|
||
for(var t=a(e.length),r=a(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16),r=this._aes.decrypt(r)
|
||
for(var i=0;i<16;i++)t[n+i]=r[i]^this._lastCipherblock[i]
|
||
s(e,this._lastCipherblock,0,n,n+16)}return t}
|
||
var P=function e(t,r,n){if(!(this instanceof e))throw Error("AES must be instanitated with `new`")
|
||
if(this.description="Cipher Feedback",this.name="cfb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 size)")}else r=a(16)
|
||
n||(n=1),this.segmentSize=n,this._shiftRegister=o(r,!0),this._aes=new A(t)}
|
||
P.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)")
|
||
for(var t,r=o(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister)
|
||
for(var i=0;i<this.segmentSize;i++)r[n+i]^=t[i]
|
||
s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},P.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)")
|
||
for(var t,r=o(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister)
|
||
for(var i=0;i<this.segmentSize;i++)r[n+i]^=t[i]
|
||
s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r}
|
||
var M=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`")
|
||
if(this.description="Output Feedback",this.name="ofb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=a(16)
|
||
this._lastPrecipher=o(r,!0),this._lastPrecipherIndex=16,this._aes=new A(t)}
|
||
M.prototype.encrypt=function(e){for(var t=o(e,!0),r=0;r<t.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[r]^=this._lastPrecipher[this._lastPrecipherIndex++]
|
||
return t},M.prototype.decrypt=M.prototype.encrypt
|
||
var R=function e(t){if(!(this instanceof e))throw Error("Counter must be instanitated with `new`")
|
||
0===t||t||(t=1),"number"==typeof t?(this._counter=a(16),this.setValue(t)):this.setBytes(t)}
|
||
R.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)")
|
||
for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},R.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)")
|
||
this._counter=e},R.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++
|
||
break}this._counter[e]=0}}
|
||
var O=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`")
|
||
this.description="Counter",this.name="ctr",r instanceof R||(r=new R(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new A(t)}
|
||
O.prototype.encrypt=function(e){for(var t=o(e,!0),r=0;r<t.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[r]^=this._remainingCounter[this._remainingCounterIndex++]
|
||
return t},O.prototype.decrypt=O.prototype.encrypt
|
||
var B={AES:A,Counter:R,ModeOfOperation:{ecb:T,cbc:I,cfb:P,ofb:M,ctr:O},utils:{hex:c,utf8:u},padding:{pkcs7:{pad:function(e){var t=16-(e=o(e,!0)).length%16,r=a(e.length+t)
|
||
s(e,r)
|
||
for(var n=e.length;n<r.length;n++)r[n]=t
|
||
return r},strip:function(e){if((e=o(e,!0)).length<16)throw new Error("PKCS#7 invalid length")
|
||
var t=e[e.length-1]
|
||
if(t>16)throw new Error("PKCS#7 padding byte out of range")
|
||
for(var r=e.length-t,n=0;n<t;n++)if(e[r+n]!==t)throw new Error("PKCS#7 invalid padding byte")
|
||
var i=a(r)
|
||
return s(e,i,0,0,r),i}}},_arrayTest:{coerceArray:o,createArray:a,copyArray:s}}
|
||
void 0!==r?t.exports=B:"function"==typeof define&&define.amd?define(B):(e.aesjs&&(B._aesjs=e.aesjs),e.aesjs=B)})(void 0)},{}],2:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":51}],3:[function(e,t,r){"use strict"
|
||
var n=e("../asn1"),i=e("inherits")
|
||
function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(t){var r=void 0
|
||
try{r=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){r=function(e){this._initNamed(e)}}return i(r,t),r.prototype._initNamed=function(e){t.call(this,e)},new r(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"../asn1":2,inherits:220,vm:157}],4:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("inherits"),o=e("../base").Reporter,a=e("buffer").Buffer
|
||
function s(e,t){o.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function u(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof u||(e=new u(e,t)),this.length+=e.length,e},this)
|
||
else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value")
|
||
this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e)
|
||
else{if(!a.isBuffer(e))return t.error("Unsupported type: "+(void 0===e?"undefined":n(e)))
|
||
this.value=e,this.length=e.length}}i(s,o),r.DecoderBuffer=s,s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base)
|
||
return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun")
|
||
var r=new s(this.base)
|
||
return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=u,u.prototype.join=function(e,t){return e||(e=new a(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":5,buffer:110,inherits:220}],5:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":4,"./node":6,"./reporter":7}],6:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../base").Reporter,o=e("../base").EncoderBuffer,a=e("../base").DecoderBuffer,s=e("minimalistic-assert"),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],c=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u)
|
||
function l(e,t){var r={}
|
||
this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=l
|
||
var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"]
|
||
l.prototype.clone=function(){var e=this._baseState,t={}
|
||
f.forEach(function(r){t[r]=e[r]})
|
||
var r=new this.constructor(t.parent)
|
||
return r._baseState=t,r},l.prototype._wrap=function(){var e=this._baseState
|
||
c.forEach(function(t){this[t]=function(){var r=new this.constructor(this)
|
||
return e.children.push(r),r[t].apply(r,arguments)}},this)},l.prototype._init=function(e){var t=this._baseState
|
||
s(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),s.equal(t.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(e){var t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this)
|
||
e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!==(void 0===e?"undefined":n(e))||e.constructor!==Object)return e
|
||
var t={}
|
||
return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0)
|
||
var n=e[r]
|
||
t[n]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){l.prototype[e]=function(){var t=this._baseState
|
||
throw new Error(e+" not implemented for encoding: "+t.enc)}}),u.forEach(function(e){l.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments)
|
||
return s(null===t.tag),t.tag=e,this._useArgs(r),this}}),l.prototype.use=function(e){s(e)
|
||
var t=this._baseState
|
||
return s(null===t.use),t.use=e,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(e){var t=this._baseState
|
||
return s(null===t.default),t.default=e,t.optional=!0,this},l.prototype.explicit=function(e){var t=this._baseState
|
||
return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},l.prototype.implicit=function(e){var t=this._baseState
|
||
return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},l.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments)
|
||
return e.obj=!0,0!==t.length&&this._useArgs(t),this},l.prototype.key=function(e){var t=this._baseState
|
||
return s(null===t.key),t.key=e,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(e){var t=this._baseState
|
||
return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},l.prototype.contains=function(e){var t=this._baseState
|
||
return s(null===t.use),t.contains=e,this},l.prototype._decode=function(e,t){var r=this._baseState
|
||
if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t))
|
||
var n=r.default,i=!0,o=null
|
||
if(null!==r.key&&(o=e.enterKey(r.key)),r.optional){var s=null
|
||
if(null!==r.explicit?s=r.explicit:null!==r.implicit?s=r.implicit:null!==r.tag&&(s=r.tag),null!==s||r.any){if(i=this._peekTag(e,s,r.any),e.isError(i))return i}else{var u=e.save()
|
||
try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),i=!0}catch(e){i=!1}e.restore(u)}}var c=void 0
|
||
if(r.obj&&i&&(c=e.enterObject()),i){if(null!==r.explicit){var l=this._decodeTag(e,r.explicit)
|
||
if(e.isError(l))return l
|
||
e=l}var f=e.offset
|
||
if(null===r.use&&null===r.choice){var h=void 0
|
||
r.any&&(h=e.save())
|
||
var d=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any)
|
||
if(e.isError(d))return d
|
||
r.any?n=e.raw(h):e=d}if(t&&t.track&&null!==r.tag&&t.track(e.path(),f,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(n=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n
|
||
if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(n)
|
||
n=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&i&&(n=e.leaveObject(c)),null===r.key||null===n&&!0!==i?null!==o&&e.exitKey(o):e.leaveKey(o,r.key,n),n},l.prototype._decodeGeneric=function(e,t,r){var n=this._baseState
|
||
return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},l.prototype._getUse=function(e,t){var r=this._baseState
|
||
return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},l.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1
|
||
return Object.keys(r.choice).some(function(o){var a=e.save(),s=r.choice[o]
|
||
try{var u=s._decode(e,t)
|
||
if(e.isError(u))return!1
|
||
n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},l.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},l.prototype._encode=function(e,t,r){var n=this._baseState
|
||
if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r)
|
||
if(void 0!==i&&!this._skipDefault(i,t,r))return i}},l.prototype._encodeValue=function(e,t,r){var o=this._baseState
|
||
if(null===o.parent)return o.children[0]._encode(e,t||new i)
|
||
var a=null
|
||
if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return
|
||
e=o.default}var s=null,u=!1
|
||
if(o.any)a=this._createEncoderBuffer(e)
|
||
else if(o.choice)a=this._encodeChoice(e,t)
|
||
else if(o.contains)s=this._getUse(o.contains,r)._encode(e,t),u=!0
|
||
else if(o.children)s=o.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e)
|
||
if(null===r._baseState.key)return t.error("Child should have a key")
|
||
var i=t.enterKey(r._baseState.key)
|
||
if("object"!==(void 0===e?"undefined":n(e)))return t.error("Child expected, but input is not object")
|
||
var o=r._encode(e[r._baseState.key],t,e)
|
||
return t.leaveKey(i),o},this).filter(function(e){return e}),s=this._createEncoderBuffer(s)
|
||
else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag)
|
||
if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array")
|
||
var c=this.clone()
|
||
c._baseState.implicit=null,s=this._createEncoderBuffer(e.map(function(r){var n=this._baseState
|
||
return this._getUse(n.args[0],e)._encode(r,t)},c))}else null!==o.use?a=this._getUse(o.use,r)._encode(e,t):(s=this._encodePrimitive(o.tag,e),u=!0)
|
||
if(!o.any&&null===o.choice){var l=null!==o.implicit?o.implicit:o.tag,f=null===o.implicit?"universal":"context"
|
||
null===l?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(l,u,f,s))}return null!==o.explicit&&(a=this._encodeComposite(o.explicit,!1,"context",a)),a},l.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type]
|
||
return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},l.prototype._encodePrimitive=function(e,t){var r=this._baseState
|
||
if(/str$/.test(e))return this._encodeStr(t,e)
|
||
if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1])
|
||
if("objid"===e)return this._encodeObjid(t,null,null)
|
||
if("gentime"===e||"utctime"===e)return this._encodeTime(t,e)
|
||
if("null_"===e)return this._encodeNull()
|
||
if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0])
|
||
if("bool"===e)return this._encodeBool(t)
|
||
if("objDesc"===e)return this._encodeStr(t,e)
|
||
throw new Error("Unsupported tag: "+e)},l.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},l.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base":5,"minimalistic-assert":464}],7:[function(e,t,r){"use strict"
|
||
var n=e("inherits")
|
||
function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}r.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState
|
||
return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState
|
||
t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState
|
||
t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState
|
||
this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj
|
||
return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj
|
||
return t.obj=e,r},i.prototype.error=function(e){var t=void 0,r=this._reporterState,n=e instanceof o
|
||
if(t=n?e:new o(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t
|
||
return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState
|
||
return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:220}],8:[function(e,t,r){"use strict"
|
||
var n=e("../constants")
|
||
r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n._reverse(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=n._reverse(r.tag)},{"../constants":9}],9:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n._reverse=function(e){var t={}
|
||
return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0)
|
||
var n=e[r]
|
||
t[n]=r}),t},n.der=e("./der")},{"./der":8}],10:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("../../asn1"),o=i.base,a=i.bignum,s=i.constants.der
|
||
function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function l(e,t){var r=e.readUInt8(t)
|
||
if(e.isError(r))return r
|
||
var n=s.tagClass[r>>6],i=0==(32&r)
|
||
if(31==(31&r)){var o=r
|
||
for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o
|
||
r<<=7,r|=127&o}}else r&=31
|
||
return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function f(e,t,r){var n=e.readUInt8(r)
|
||
if(e.isError(n))return n
|
||
if(!t&&128===n)return null
|
||
if(0==(128&n))return n
|
||
var i=127&n
|
||
if(i>4)return e.error("length octect is too long")
|
||
n=0
|
||
for(var o=0;o<i;o++){n<<=8
|
||
var a=e.readUInt8(r)
|
||
if(e.isError(a))return a
|
||
n|=a}return n}t.exports=u,u.prototype.decode=function(e,t){return e instanceof o.DecoderBuffer||(e=new o.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(c,o.Node),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1
|
||
var n=e.save(),i=l(e,'Failed to peek tag: "'+t+'"')
|
||
return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){var n=l(e,'Failed to decode tag of "'+t+'"')
|
||
if(e.isError(n))return n
|
||
var i=f(e,n.primitive,'Failed to get length of "'+t+'"')
|
||
if(e.isError(i))return i
|
||
if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"')
|
||
if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"')
|
||
var o=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"')
|
||
return e.isError(a)?a:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){var r=l(e,t)
|
||
if(e.isError(r))return r
|
||
var n=f(e,r.primitive,t)
|
||
if(e.isError(n))return n
|
||
var i=void 0
|
||
if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i
|
||
if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end")
|
||
if(e.isError(o))return o
|
||
var a=r.decode(e,"der",n)
|
||
if(e.isError(a)&&o)break
|
||
i.push(a)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8()
|
||
return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw()
|
||
if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch")
|
||
for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o))
|
||
return i}if("numstr"===t){var a=e.raw().toString("ascii")
|
||
return this._isNumstr(a)?a:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw()
|
||
if("objDesc"===t)return e.raw()
|
||
if("printstr"===t){var s=e.raw().toString("ascii")
|
||
return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){for(var n=void 0,i=[],o=0,a=0;!e.isEmpty();)o<<=7,o|=127&(a=e.readUInt8()),0==(128&a)&&(i.push(o),o=0)
|
||
128&a&&i.push(o)
|
||
var s=i[0]/40|0,u=i[0]%40
|
||
if(n=r?i:[s,u].concat(i.slice(1)),t){var c=t[n.join(" ")]
|
||
void 0===c&&(c=t[n.join(".")]),void 0!==c&&(n=c)}return n},c.prototype._decodeTime=function(e,t){var r=e.raw().toString(),n=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=void 0
|
||
if("gentime"===t)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),a=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14)
|
||
else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet")
|
||
n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),a=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,a,s,u,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){var t=e.readUInt8()
|
||
return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){var r=e.raw(),n=new a(r)
|
||
return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../../asn1":2,inherits:220}],11:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n.der=e("./der"),n.pem=e("./pem")},{"./der":10,"./pem":12}],12:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("buffer").Buffer,o=e("./der")
|
||
function a(e){o.call(this,e),this.enc="pem"}n(a,o),t.exports=a,a.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,c=0;c<r.length;c++){var l=r[c].match(a)
|
||
if(null!==l&&l[2]===n){if(-1!==s){if("END"!==l[1])break
|
||
u=c
|
||
break}if("BEGIN"!==l[1])break
|
||
s=c}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+n)
|
||
var f=r.slice(s+1,u).join("")
|
||
f.replace(/[^a-z0-9+/=]+/gi,"")
|
||
var h=new i(f,"base64")
|
||
return o.prototype.decode.call(this,h,t)}},{"./der":10,buffer:110,inherits:220}],13:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("buffer").Buffer,o=e("../../asn1"),a=o.base,s=o.constants.der
|
||
function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.Node.call(this,"der",e)}function l(e){return e<10?"0"+e:e}t.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,a.Node),c.prototype._encodeComposite=function(e,t,r,n){var o=function(e,t,r,n){var i=void 0
|
||
"seqof"===e?e="seq":"setof"===e&&(e="set")
|
||
if(s.tagByName.hasOwnProperty(e))i=s.tagByName[e]
|
||
else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e)
|
||
i=e}if(i>=31)return n.error("Multi-octet tag encoding unsupported")
|
||
t||(i|=32)
|
||
return i|=s.tagClassByName[r||"universal"]<<6}(e,t,r,this.reporter)
|
||
if(n.length<128){var a=new i(2)
|
||
return a[0]=o,a[1]=n.length,this._createEncoderBuffer([a,n])}for(var u=1,c=n.length;c>=256;c>>=8)u++
|
||
var l=new i(2+u)
|
||
l[0]=o,l[1]=128|u
|
||
for(var f=1+u,h=n.length;h>0;f--,h>>=8)l[f]=255&h
|
||
return this._createEncoderBuffer([l,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data])
|
||
if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n)
|
||
return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)?this._createEncoderBuffer(e):"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},c.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found")
|
||
if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map")
|
||
e=t[e].split(/[\s.]+/g)
|
||
for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice()
|
||
for(var o=0;o<e.length;o++)e[o]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e))
|
||
if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB")
|
||
e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s<e.length;s++){var u=e[s]
|
||
for(a++;u>=128;u>>=7)a++}for(var c=new i(a),l=c.length-1,f=e.length-1;f>=0;f--){var h=e[f]
|
||
for(c[l--]=127&h;(h>>=7)>0;)c[l--]=128|127&h}return this._createEncoderBuffer(c)},c.prototype._encodeTime=function(e,t){var r=void 0,n=new Date(e)
|
||
return"gentime"===t?r=[l(n.getFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[l(n.getFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map")
|
||
if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e))
|
||
e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray()
|
||
!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length
|
||
0===e.length&&n++
|
||
var o=new i(n)
|
||
return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e)
|
||
if(e<256)return this._createEncoderBuffer([0,e])
|
||
for(var a=1,s=e;s>=256;s>>=8)a++
|
||
for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&e,e>>=8
|
||
return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(new i(u))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n=this._baseState,i=void 0
|
||
if(null===n.default)return!1
|
||
var o=e.join()
|
||
if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1
|
||
for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1
|
||
return!0}},{"../../asn1":2,buffer:110,inherits:220}],14:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n.der=e("./der"),n.pem=e("./pem")},{"./der":13,"./pem":15}],15:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./der")
|
||
function o(e){i.call(this,e),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64))
|
||
return n.push("-----END "+t.label+"-----"),n.join("\n")}},{"./der":13,inherits:220}],16:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return(0,i.default)(function(t,r){var i
|
||
try{i=e.apply(this,t)}catch(e){return r(e)}(0,n.default)(i)&&"function"==typeof i.then?i.then(function(e){s(r,null,e)},function(e){s(r,e.message?e:new Error(e))}):r(null,i)})}
|
||
var n=a(e("lodash/isObject")),i=a(e("./internal/initialParams")),o=a(e("./internal/setImmediate"))
|
||
function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){try{e(t,r)}catch(e){(0,o.default)(u,e)}}function u(e){throw e}t.exports=r.default},{"./internal/initialParams":23,"./internal/setImmediate":27,"lodash/isObject":451}],17:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r,a){(0,n.default)(t)(e,(0,i.default)((0,o.default)(r)),a)}
|
||
var n=a(e("./internal/eachOfLimit")),i=a(e("./internal/withoutIndex")),o=a(e("./internal/wrapAsync"))
|
||
function a(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./internal/eachOfLimit":21,"./internal/withoutIndex":29,"./internal/wrapAsync":30}],18:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0})
|
||
var n=o(e("./eachLimit")),i=o(e("./internal/doLimit"))
|
||
function o(e){return e&&e.__esModule?e:{default:e}}r.default=(0,i.default)(n.default,1),t.exports=r.default},{"./eachLimit":17,"./internal/doLimit":20}],19:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default={},t.exports=r.default},{}],20:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){return function(r,n,i){return e(r,t,n,i)}},t.exports=r.default},{}],21:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return function(t,r,u){if(u=(0,i.default)(u||n.default),e<=0||!t)return u(null)
|
||
var c=(0,o.default)(t),l=!1,f=0
|
||
function h(e,t){if(f-=1,e)l=!0,u(e)
|
||
else{if(t===s.default||l&&f<=0)return l=!0,u(null)
|
||
d()}}function d(){for(;f<e&&!l;){var t=c()
|
||
if(null===t)return l=!0,void(f<=0&&u(null))
|
||
f+=1,r(t.value,t.key,(0,a.default)(h))}}d()}}
|
||
var n=u(e("lodash/noop")),i=u(e("./once")),o=u(e("./iterator")),a=u(e("./onlyOnce")),s=u(e("./breakLoop"))
|
||
function u(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./breakLoop":19,"./iterator":24,"./once":25,"./onlyOnce":26,"lodash/noop":456}],22:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return n&&e[n]&&e[n]()}
|
||
var n="function"==typeof Symbol&&Symbol.iterator
|
||
t.exports=r.default},{}],23:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return function(){var t=(0,o.default)(arguments),r=t.pop()
|
||
e.call(this,t,r)}}
|
||
var n,i=e("./slice"),o=(n=i)&&n.__esModule?n:{default:n}
|
||
t.exports=r.default},{"./slice":28}],24:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){if((0,n.default)(e))return function(e){var t=-1,r=e.length
|
||
return function(){return++t<r?{value:e[t],key:t}:null}}(e)
|
||
var t=(0,i.default)(e)
|
||
return t?function(e){var t=-1
|
||
return function(){var r=e.next()
|
||
return r.done?null:(t++,{value:r.value,key:t})}}(t):(r=e,a=(0,o.default)(r),s=-1,u=a.length,function(){var e=a[++s]
|
||
return s<u?{value:r[e],key:e}:null})
|
||
var r,a,s,u}
|
||
var n=a(e("lodash/isArrayLike")),i=a(e("./getIterator")),o=a(e("lodash/keys"))
|
||
function a(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./getIterator":22,"lodash/isArrayLike":447,"lodash/keys":454}],25:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return function(){if(null!==e){var t=e
|
||
e=null,t.apply(this,arguments)}}},t.exports=r.default},{}],26:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.")
|
||
var t=e
|
||
e=null,t.apply(this,arguments)}},t.exports=r.default},{}],27:[function(e,t,r){(function(t){"use strict"
|
||
var n="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}
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.hasNextTick=r.hasSetImmediate=void 0,r.fallback=l,r.wrap=f
|
||
var i,o=e("./slice"),a=(i=o)&&i.__esModule?i:{default:i}
|
||
var s,u=r.hasSetImmediate="function"==typeof setImmediate&&setImmediate,c=r.hasNextTick="object"===(void 0===t?"undefined":n(t))&&"function"==typeof t.nextTick
|
||
function l(e){setTimeout(e,0)}function f(e){return function(t){var r=(0,a.default)(arguments,1)
|
||
e(function(){t.apply(null,r)})}}s=u?setImmediate:c?t.nextTick:l,r.default=f(s)}).call(this,e("_process"))},{"./slice":28,_process:124}],28:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){t|=0
|
||
for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i<r;i++)n[i]=e[t+i]
|
||
return n},t.exports=r.default},{}],29:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){return function(t,r,n){return e(t,n)}},t.exports=r.default},{}],30:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.isAsync=void 0
|
||
var n,i=e("../asyncify"),o=(n=i)&&n.__esModule?n:{default:n}
|
||
var a="function"==typeof Symbol
|
||
function s(e){return a&&"AsyncFunction"===e[Symbol.toStringTag]}r.default=function(e){return s(e)?(0,o.default)(e):e},r.isAsync=s},{"../asyncify":16}],31:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0})
|
||
var n,i=e("./internal/setImmediate"),o=(n=i)&&n.__esModule?n:{default:n}
|
||
r.default=o.default,t.exports=r.default},{"./internal/setImmediate":27}],32:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t){if(t=(0,o.default)(t||i.default),!(0,n.default)(e))return t(new Error("First argument to waterfall must be an array of functions"))
|
||
if(!e.length)return t()
|
||
var r=0
|
||
function c(t){var n=(0,u.default)(e[r++])
|
||
t.push((0,s.default)(l)),n.apply(null,t)}function l(n){if(n||r===e.length)return t.apply(null,arguments)
|
||
c((0,a.default)(arguments,1))}c([])}
|
||
var n=c(e("lodash/isArray")),i=c(e("lodash/noop")),o=c(e("./internal/once")),a=c(e("./internal/slice")),s=c(e("./internal/onlyOnce")),u=c(e("./internal/wrapAsync"))
|
||
function c(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./internal/once":25,"./internal/onlyOnce":26,"./internal/slice":28,"./internal/wrapAsync":30,"lodash/isArray":446,"lodash/noop":456}],33:[function(e,t,r){"use strict"
|
||
Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r){r=(0,o.default)(r||n.default)
|
||
var s=(0,a.default)(t)
|
||
if(!e())return r(null)
|
||
s(function t(n){if(n)return r(n)
|
||
if(e())return s(t)
|
||
var o=(0,i.default)(arguments,1)
|
||
r.apply(null,[null].concat(o))})}
|
||
var n=s(e("lodash/noop")),i=s(e("./internal/slice")),o=s(e("./internal/onlyOnce")),a=s(e("./internal/wrapAsync"))
|
||
function s(e){return e&&e.__esModule?e:{default:e}}t.exports=r.default},{"./internal/onlyOnce":26,"./internal/slice":28,"./internal/wrapAsync":30,"lodash/noop":456}],34:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer
|
||
t.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),o=0;o<e.length;o++){var a=e.charAt(o)
|
||
if(void 0!==t[a])throw new TypeError(a+" is ambiguous")
|
||
t[a]=o}function s(e){if("string"!=typeof e)throw new TypeError("Expected String")
|
||
if(0===e.length)return n.allocUnsafe(0)
|
||
for(var o=[0],a=0;a<e.length;a++){var s=t[e[a]]
|
||
if(void 0===s)return
|
||
for(var u=0,c=s;u<o.length;++u)c+=o[u]*r,o[u]=255&c,c>>=8
|
||
for(;c>0;)o.push(255&c),c>>=8}for(var l=0;e[l]===i&&l<e.length-1;++l)o.push(0)
|
||
return n.from(o.reverse())}return{encode:function(t){if(0===t.length)return""
|
||
for(var n=[0],o=0;o<t.length;++o){for(var a=0,s=t[o];a<n.length;++a)s+=n[a]<<8,n[a]=s%r,s=s/r|0
|
||
for(;s>0;)n.push(s%r),s=s/r|0}for(var u="",c=0;0===t[c]&&c<t.length-1;++c)u+=i
|
||
for(var l=n.length-1;l>=0;--l)u+=e[n[l]]
|
||
return u},decodeUnsafe:s,decode:function(e){var t=s(e)
|
||
if(t)return t
|
||
throw new Error("Non-base"+r+" character")}}}},{"safe-buffer":608}],35:[function(e,t,r){"use strict";(function(e){var r,n=20,i=1,o=1e6,a=-7,s=21,u="[big.js] ",c=u+"Invalid ",l=c+"decimal places",f=c+"rounding mode",h={},d=void 0,p=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i
|
||
function m(e,t,r,n){var i=e.c,o=e.e+t+1
|
||
if(o<i.length){if(1===r)n=i[o]>=5
|
||
else if(2===r)n=i[o]>5||5==i[o]&&(n||o<0||i[o+1]!==d||1&i[o-1])
|
||
else if(3===r)n=n||i[o]!==d||o<0
|
||
else if(n=!1,0!==r)throw Error(f)
|
||
if(o<1)i.length=1,n?(e.e=-t,i[0]=1):i[0]=e.e=0
|
||
else{if(i.length=o--,n)for(;++i[o]>9;)i[o]=0,o--||(++e.e,i.unshift(1))
|
||
for(o=i.length;!i[--o];)i.pop()}}else if(r<0||r>3||r!==~~r)throw Error(f)
|
||
return e}function y(e,t,r,n){var i,a,s=e.constructor,u=!e.c[0]
|
||
if(r!==d){if(r!==~~r||r<(3==t)||r>o)throw Error(3==t?c+"precision":l)
|
||
for(r=n-(e=new s(e)).e,e.c.length>++n&&m(e,r,s.RM),2==t&&(n=e.e+r+1);e.c.length<n;)e.c.push(0)}if(i=e.e,r=(a=e.c.join("")).length,2!=t&&(1==t||3==t&&n<=i||i<=s.NE||i>=s.PE))a=a.charAt(0)+(r>1?"."+a.slice(1):"")+(i<0?"e":"e+")+i
|
||
else if(i<0){for(;++i;)a="0"+a
|
||
a="0."+a}else if(i>0)if(++i>r)for(i-=r;i--;)a+="0"
|
||
else i<r&&(a=a.slice(0,i)+"."+a.slice(i))
|
||
else r>1&&(a=a.charAt(0)+"."+a.slice(1))
|
||
return e.s<0&&(!u||4==t)?"-"+a:a}h.abs=function(){var e=new this.constructor(this)
|
||
return e.s=1,e},h.cmp=function(e){var t,r=this,n=r.c,i=(e=new r.constructor(e)).c,o=r.s,a=e.s,s=r.e,u=e.e
|
||
if(!n[0]||!i[0])return n[0]?o:i[0]?-a:0
|
||
if(o!=a)return o
|
||
if(t=o<0,s!=u)return s>u^t?1:-1
|
||
for(a=(s=n.length)<(u=i.length)?s:u,o=-1;++o<a;)if(n[o]!=i[o])return n[o]>i[o]^t?1:-1
|
||
return s==u?0:s>u^t?1:-1},h.div=function(e){var t=this,r=t.constructor,n=t.c,i=(e=new r(e)).c,a=t.s==e.s?1:-1,s=r.DP
|
||
if(s!==~~s||s<0||s>o)throw Error(l)
|
||
if(!i[0])throw Error("[big.js] Division by zero")
|
||
if(!n[0])return new r(0*a)
|
||
var u,c,f,h,p,y=i.slice(),g=u=i.length,b=n.length,v=n.slice(0,u),_=v.length,w=e,S=w.c=[],E=0,k=s+(w.e=t.e-e.e)+1
|
||
for(w.s=a,a=k<0?0:k,y.unshift(0);_++<u;)v.push(0)
|
||
do{for(f=0;f<10;f++){if(u!=(_=v.length))h=u>_?1:-1
|
||
else for(p=-1,h=0;++p<u;)if(i[p]!=v[p]){h=i[p]>v[p]?1:-1
|
||
break}if(!(h<0))break
|
||
for(c=_==u?i:y;_;){if(v[--_]<c[_]){for(p=_;p&&!v[--p];)v[p]=9;--v[p],v[_]+=10}v[_]-=c[_]}for(;!v[0];)v.shift()}S[E++]=h?f:++f,v[0]&&h?v[_]=n[g]||0:v=[n[g]]}while((g++<b||v[0]!==d)&&a--)
|
||
return S[0]||1==E||(S.shift(),w.e--),E>k&&m(w,s,r.RM,v[0]!==d),w},h.eq=function(e){return!this.cmp(e)},h.gt=function(e){return this.cmp(e)>0},h.gte=function(e){return this.cmp(e)>-1},h.lt=function(e){return this.cmp(e)<0},h.lte=function(e){return this.cmp(e)<1},h.minus=h.sub=function(e){var t,r,n,i,o=this,a=o.constructor,s=o.s,u=(e=new a(e)).s
|
||
if(s!=u)return e.s=-u,o.plus(e)
|
||
var c=o.c.slice(),l=o.e,f=e.c,h=e.e
|
||
if(!c[0]||!f[0])return f[0]?(e.s=-u,e):new a(c[0]?o:0)
|
||
if(s=l-h){for((i=s<0)?(s=-s,n=c):(h=l,n=f),n.reverse(),u=s;u--;)n.push(0)
|
||
n.reverse()}else for(r=((i=c.length<f.length)?c:f).length,s=u=0;u<r;u++)if(c[u]!=f[u]){i=c[u]<f[u]
|
||
break}if(i&&(n=c,c=f,f=n,e.s=-e.s),(u=(r=f.length)-(t=c.length))>0)for(;u--;)c[t++]=0
|
||
for(u=t;r>s;){if(c[--r]<f[r]){for(t=r;t&&!c[--t];)c[t]=9;--c[t],c[r]+=10}c[r]-=f[r]}for(;0===c[--u];)c.pop()
|
||
for(;0===c[0];)c.shift(),--h
|
||
return c[0]||(e.s=1,c=[h=0]),e.c=c,e.e=h,e},h.mod=function(e){var t,r=this,n=r.constructor,i=r.s,o=(e=new n(e)).s
|
||
if(!e.c[0])throw Error("[big.js] Division by zero")
|
||
return r.s=e.s=1,t=1==e.cmp(r),r.s=i,e.s=o,t?new n(r):(i=n.DP,o=n.RM,n.DP=n.RM=0,r=r.div(e),n.DP=i,n.RM=o,this.minus(r.times(e)))},h.plus=h.add=function(e){var t,r=this,n=r.constructor,i=r.s,o=(e=new n(e)).s
|
||
if(i!=o)return e.s=-o,r.minus(e)
|
||
var a=r.e,s=r.c,u=e.e,c=e.c
|
||
if(!s[0]||!c[0])return c[0]?e:new n(s[0]?r:0*i)
|
||
if(s=s.slice(),i=a-u){for(i>0?(u=a,t=c):(i=-i,t=s),t.reverse();i--;)t.push(0)
|
||
t.reverse()}for(s.length-c.length<0&&(t=c,c=s,s=t),i=c.length,o=0;i;s[i]%=10)o=(s[--i]=s[i]+c[i]+o)/10|0
|
||
for(o&&(s.unshift(o),++u),i=s.length;0===s[--i];)s.pop()
|
||
return e.c=s,e.e=u,e},h.pow=function(e){var t=this,r=new t.constructor(1),n=r,i=e<0
|
||
if(e!==~~e||e<-1e6||e>1e6)throw Error(c+"exponent")
|
||
for(i&&(e=-e);1&e&&(n=n.times(t)),e>>=1;)t=t.times(t)
|
||
return i?r.div(n):n},h.round=function(e,t){var r=this.constructor
|
||
if(e===d)e=0
|
||
else if(e!==~~e||e<0||e>o)throw Error(l)
|
||
return m(new r(this),e,t===d?r.RM:t)},h.sqrt=function(){var e,t,r,n=this,i=n.constructor,o=n.s,a=n.e,s=new i(.5)
|
||
if(!n.c[0])return new i(n)
|
||
if(o<0)throw Error(u+"No square root")
|
||
0===(o=Math.sqrt(n.toString()))||o===1/0?((t=n.c.join("")).length+a&1||(t+="0"),(e=new i(Math.sqrt(t).toString())).e=((a+1)/2|0)-(a<0||1&a)):e=new i(o.toString()),a=e.e+(i.DP+=4)
|
||
do{r=e,e=s.times(r.plus(n.div(r)))}while(r.c.slice(0,a).join("")!==e.c.slice(0,a).join(""))
|
||
return m(e,i.DP-=4,i.RM)},h.times=h.mul=function(e){var t,r=this,n=r.constructor,i=r.c,o=(e=new n(e)).c,a=i.length,s=o.length,u=r.e,c=e.e
|
||
if(e.s=r.s==e.s?1:-1,!i[0]||!o[0])return new n(0*e.s)
|
||
for(e.e=u+c,a<s&&(t=i,i=o,o=t,c=a,a=s,s=c),t=new Array(c=a+s);c--;)t[c]=0
|
||
for(u=s;u--;){for(s=0,c=a+u;c>u;)s=t[c]+o[u]*i[c-u-1]+s,t[c--]=s%10,s=s/10|0
|
||
t[c]=(t[c]+s)%10}for(s?++e.e:t.shift(),u=t.length;!t[--u];)t.pop()
|
||
return e.c=t,e},h.toExponential=function(e){return y(this,1,e,e)},h.toFixed=function(e){return y(this,2,e,this.e+e)},h.toPrecision=function(e){return y(this,3,e,e-1)},h.toString=function(){return y(this)},h.valueOf=h.toJSON=function(){return y(this,4)},(r=function e(){function t(r){var n=this
|
||
if(!(n instanceof t))return r===d?e():new t(r)
|
||
r instanceof t?(n.s=r.s,n.e=r.e,n.c=r.c.slice()):function(e,t){var r,n,i
|
||
if(0===t&&1/t<0)t="-0"
|
||
else if(!p.test(t+=""))throw Error(c+"number")
|
||
for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),i=t.length,n=0;n<i&&"0"==t.charAt(n);)++n
|
||
if(n==i)e.c=[e.e=0]
|
||
else{for(;i>0&&"0"==t.charAt(--i););for(e.e=r-n-1,e.c=[],r=0;n<=i;)e.c[r++]=+t.charAt(n++)}}(n,r),n.constructor=t}return t.prototype=h,t.DP=n,t.RM=i,t.NE=a,t.PE=s,t.version="5.0.2",t}()).default=r.Big=r,"function"==typeof define&&define.amd?define(function(){return r}):void 0!==t&&t.exports?t.exports=r:e.Big=r})(void 0)},{}],36:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer
|
||
t.exports={check:function(e){if(e.length<8)return!1
|
||
if(e.length>72)return!1
|
||
if(48!==e[0])return!1
|
||
if(e[1]!==e.length-2)return!1
|
||
if(2!==e[2])return!1
|
||
var t=e[3]
|
||
if(0===t)return!1
|
||
if(5+t>=e.length)return!1
|
||
if(2!==e[4+t])return!1
|
||
var r=e[5+t]
|
||
return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short")
|
||
if(e.length>72)throw new Error("DER sequence length is too long")
|
||
if(48!==e[0])throw new Error("Expected DER sequence")
|
||
if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid")
|
||
if(2!==e[2])throw new Error("Expected DER integer")
|
||
var t=e[3]
|
||
if(0===t)throw new Error("R length is zero")
|
||
if(5+t>=e.length)throw new Error("R length is too long")
|
||
if(2!==e[4+t])throw new Error("Expected DER integer (2)")
|
||
var r=e[5+t]
|
||
if(0===r)throw new Error("S length is zero")
|
||
if(6+t+r!==e.length)throw new Error("S length is invalid")
|
||
if(128&e[4])throw new Error("R value is negative")
|
||
if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded")
|
||
if(128&e[t+6])throw new Error("S value is negative")
|
||
if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded")
|
||
return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length
|
||
if(0===r)throw new Error("R length is zero")
|
||
if(0===i)throw new Error("S length is zero")
|
||
if(r>33)throw new Error("R length is too long")
|
||
if(i>33)throw new Error("S length is too long")
|
||
if(128&e[0])throw new Error("R value is negative")
|
||
if(128&t[0])throw new Error("S value is negative")
|
||
if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded")
|
||
if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded")
|
||
var o=n.allocUnsafe(6+r+i)
|
||
return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},{"safe-buffer":608}],37:[function(e,t,r){"use strict"
|
||
var n=e("readable-stream/duplex"),i=e("util"),o=e("safe-buffer").Buffer
|
||
function a(e){if(!(this instanceof a))return new a(e)
|
||
if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e
|
||
var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this)
|
||
this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)})}else this.append(e)
|
||
n.call(this)}i.inherits(a,n),a.prototype._offset=function(e){var t,r=0,n=0
|
||
if(0===e)return[0,0]
|
||
for(;n<this._bufs.length;n++){if(e<(t=r+this._bufs[n].length)||n==this._bufs.length-1)return[n,e-r]
|
||
r=t}},a.prototype.append=function(e){var t=0
|
||
if(o.isBuffer(e))this._appendBuffer(e)
|
||
else if(Array.isArray(e))for(;t<e.length;t++)this.append(e[t])
|
||
else if(e instanceof a)for(;t<e._bufs.length;t++)this.append(e._bufs[t])
|
||
else null!=e&&("number"==typeof e&&(e=e.toString()),this._appendBuffer(o.from(e)))
|
||
return this},a.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},a.prototype._write=function(e,t,r){this._appendBuffer(e),"function"==typeof r&&r()},a.prototype._read=function(e){if(!this.length)return this.push(null)
|
||
e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},a.prototype.end=function(e){n.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},a.prototype.get=function(e){return this.slice(e,e+1)[0]},a.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},a.prototype.copy=function(e,t,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return e||o.alloc(0)
|
||
if(n<=0)return e||o.alloc(0)
|
||
var i,a,s=!!e,u=this._offset(r),c=n-r,l=c,f=s&&t||0,h=u[1]
|
||
if(0===r&&n==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:o.concat(this._bufs,this.length)
|
||
for(a=0;a<this._bufs.length;a++)this._bufs[a].copy(e,f),f+=this._bufs[a].length
|
||
return e}if(l<=this._bufs[u[0]].length-h)return s?this._bufs[u[0]].copy(e,t,h,h+l):this._bufs[u[0]].slice(h,h+l)
|
||
for(s||(e=o.allocUnsafe(c)),a=u[0];a<this._bufs.length;a++){if(!(l>(i=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l)
|
||
break}this._bufs[a].copy(e,f,h),f+=i,l-=i,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length)
|
||
var r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1)
|
||
return 0==n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!=r[1]&&(i[0]=i[0].slice(r[1])),new a(i)},a.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e
|
||
break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e<this._bufs.length;e++)t.append(this._bufs[e])
|
||
return t},a.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1}
|
||
for(var t in e)(function(t){a.prototype[t]=function(r){return this.slice(r,r+e[t])[t](0)}})(t)}(),t.exports=a},{"readable-stream/duplex":39,"safe-buffer":608,util:156}],38:[function(e,t,r){(function(e){"use strict"
|
||
!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function')
|
||
var o,a,s=arguments.length
|
||
switch(s){case 0:case 1:return e.nextTick(t)
|
||
case 2:return e.nextTick(function(){t.call(null,r)})
|
||
case 3:return e.nextTick(function(){t.call(null,r,n)})
|
||
case 4:return e.nextTick(function(){t.call(null,r,n,i)})
|
||
default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a]
|
||
return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,e("_process"))},{_process:124}],39:[function(e,t,r){"use strict"
|
||
t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":40}],40:[function(e,t,r){"use strict"
|
||
var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[]
|
||
for(var r in e)t.push(r)
|
||
return t}
|
||
t.exports=f
|
||
var o=e("core-util-is")
|
||
o.inherits=e("inherits")
|
||
var a=e("./_stream_readable"),s=e("./_stream_writable")
|
||
o.inherits(f,a)
|
||
for(var u=i(s.prototype),c=0;c<u.length;c++){var l=u[c]
|
||
f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e)
|
||
a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},{"./_stream_readable":41,"./_stream_writable":42,"core-util-is":82,inherits:220,"process-nextick-args":38}],41:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
t.exports=v
|
||
var o,a=e("isarray")
|
||
v.ReadableState=b
|
||
e("events").EventEmitter
|
||
var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,l=n.Uint8Array||function(){}
|
||
var f=e("core-util-is")
|
||
f.inherits=e("inherits")
|
||
var h=e("util"),d=void 0
|
||
d=h&&h.debuglog?h.debuglog("stream"):function(){}
|
||
var p,m=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy")
|
||
f.inherits(v,u)
|
||
var g=["error","close","destroy","pause","resume"]
|
||
function b(t,r){o=o||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof o
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode)
|
||
var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384
|
||
this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||e("./_stream_duplex"),!(this instanceof v))return new v(t)
|
||
this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(e,t,r,n,i){var o,a=e._readableState
|
||
null===t?(a.reading=!1,function(e,t){if(t.ended)return
|
||
if(t.decoder){var r=t.decoder.end()
|
||
r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,a)):(i||(o=function(e,t){var r
|
||
n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"))
|
||
var n
|
||
return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):C(e,a)):w(e,a,t,!1))):n||(a.reading=!1))
|
||
return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),C(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState
|
||
return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this}
|
||
var S=8388608
|
||
function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState
|
||
t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(x,e):x(e))}function x(e){d("emit readable"),e.emit("readable"),P(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length
|
||
t.readingMore=!1}function T(e){d("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState
|
||
for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n
|
||
e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data
|
||
e-=i.length
|
||
for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e
|
||
if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a))
|
||
break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1
|
||
n.data.copy(r),e-=n.data.length
|
||
for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e
|
||
if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a))
|
||
break}++i}return t.length-=i,r}(e,t)
|
||
return n}(e,t.buffer,t.decoder),r)
|
||
var r}function R(e){var t=e._readableState
|
||
if(t.length>0)throw new Error('"endReadable()" called on non-empty stream')
|
||
t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r
|
||
return-1}v.prototype.read=function(e){d("read",e),e=parseInt(e,10)
|
||
var t=this._readableState,r=e
|
||
if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):k(this),null
|
||
if(0===(e=E(e,t))&&t.ended)return 0===t.length&&R(this),null
|
||
var n,i=t.needReadable
|
||
return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var n=this,o=this._readableState
|
||
switch(o.pipesCount){case 0:o.pipes=e
|
||
break
|
||
case 1:o.pipes=[o.pipes,e]
|
||
break
|
||
default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t)
|
||
var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:v
|
||
function c(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",c)
|
||
var f=function(e){return function(){var t=e._readableState
|
||
d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(n)
|
||
e.on("drain",f)
|
||
var h=!1
|
||
var p=!1
|
||
function m(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(t){d("onerror",t),v(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),v()}function b(){d("onfinish"),e.removeListener("close",g),v()}function v(){d("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r)
|
||
e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",g),e.once("finish",b),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1}
|
||
if(0===t.pipesCount)return this
|
||
if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this)
|
||
if(!e){var n=t.pipes,i=t.pipesCount
|
||
t.pipes=null,t.pipesCount=0,t.flowing=!1
|
||
for(var o=0;o<i;o++)n[o].emit("unpipe",this,r)
|
||
return this}var a=B(t.pipes,e)
|
||
return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},v.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t)
|
||
if("data"===e)!1!==this._readableState.flowing&&this.resume()
|
||
else if("readable"===e){var n=this._readableState
|
||
n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):i.nextTick(T,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState
|
||
return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(I,e,t))}(this,e)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1
|
||
for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end()
|
||
e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i))
|
||
for(var o=0;o<g.length;o++)e.on(g[o],this.emit.bind(this,g[o]))
|
||
return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=M}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":40,"./internal/streams/BufferList":43,"./internal/streams/destroy":44,"./internal/streams/stream":45,_process:124,"core-util-is":82,events:114,inherits:220,isarray:382,"process-nextick-args":38,"safe-buffer":608,"string_decoder/":46,util:109}],42:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
function o(e){var t=this
|
||
this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry
|
||
e.entry=null
|
||
for(;n;){var i=n.callback
|
||
t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e})(t,e)}}t.exports=g
|
||
var a,s=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i.nextTick
|
||
g.WritableState=y
|
||
var u=e("core-util-is")
|
||
u.inherits=e("inherits")
|
||
var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,h=n.Uint8Array||function(){}
|
||
var d,p=e("./internal/streams/destroy")
|
||
function m(){}function y(t,r){a=a||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof a
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode)
|
||
var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384
|
||
this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1
|
||
var f=!1===t.decodeStrings
|
||
this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,o=r.writecb
|
||
if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)(function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))})(e,r,n,t,o)
|
||
else{var a=w(r)
|
||
a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?s(v,e,r,a,o):v(e,r,a,o)}})(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(t){if(a=a||e("./_stream_duplex"),!(d.call(g,this)||this instanceof a))return new g(t)
|
||
this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function b(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function v(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function _(e,t){t.bufferProcessing=!0
|
||
var r=t.bufferedRequest
|
||
if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree
|
||
a.entry=r
|
||
for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1
|
||
i.allBuffers=u,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback
|
||
if(b(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=w(t)
|
||
return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next
|
||
return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===g&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,f.isBuffer(n)||n instanceof h)
|
||
return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=m),o.ended?function(e,t){var r=new Error("write after end")
|
||
e.emit("error",r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1
|
||
return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r))
|
||
return t}(t,n,i)
|
||
n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length
|
||
t.length+=s
|
||
var u=t.length<t.highWaterMark
|
||
u||(t.needDrain=!0)
|
||
if(t.writing||t.corked){var c=t.lastBufferedRequest
|
||
t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,n,i,o)
|
||
return u}(this,o,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState
|
||
e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e)
|
||
return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState
|
||
"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r))
|
||
t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=p.destroy,g.prototype._undestroy=p.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":40,"./internal/streams/destroy":44,"./internal/streams/stream":45,_process:124,"core-util-is":82,inherits:220,"process-nextick-args":38,"safe-buffer":608,"util-deprecate":659}],43:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("util")
|
||
t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null}
|
||
this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head}
|
||
0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data
|
||
return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return""
|
||
for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data
|
||
return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0)
|
||
if(1===this.length)return this.head.data
|
||
for(var t,r,i,o=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,i=s,t.copy(r,i),s+=a.data.length,a=a.next
|
||
return o},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length})
|
||
return this.constructor.name+" "+e})},{"safe-buffer":608,util:109}],44:[function(e,t,r){"use strict"
|
||
var n=e("process-nextick-args")
|
||
function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed
|
||
return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":38}],45:[function(e,t,r){"use strict"
|
||
t.exports=e("events").EventEmitter},{events:114}],46:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0
|
||
default:return!1}}
|
||
function o(e){var t
|
||
switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8"
|
||
for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8"
|
||
case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le"
|
||
case"latin1":case"binary":return"latin1"
|
||
case"base64":case"ascii":case"hex":return e
|
||
default:if(t)return
|
||
e=(""+e).toLowerCase(),t=!0}}(e)
|
||
if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e)
|
||
return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4
|
||
break
|
||
case"utf8":this.fillLast=s,t=4
|
||
break
|
||
case"base64":this.text=l,this.end=f,t=3
|
||
break
|
||
default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�"
|
||
if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�"
|
||
if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e)
|
||
return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t)
|
||
if(r){var n=r.charCodeAt(r.length-1)
|
||
if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):""
|
||
if(this.lastNeed){var r=this.lastTotal-this.lastNeed
|
||
return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3
|
||
return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):""
|
||
return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return""
|
||
var t,r
|
||
if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return""
|
||
r=this.lastNeed,this.lastNeed=0}else r=0
|
||
return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):""
|
||
return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1
|
||
if(n<r)return 0
|
||
var i=a(t[n])
|
||
if(i>=0)return i>0&&(e.lastNeed=i-1),i
|
||
if(--n<r||-2===i)return 0
|
||
if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i
|
||
if(--n<r||-2===i)return 0
|
||
if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i
|
||
return 0}(this,e,t)
|
||
if(!this.lastNeed)return e.toString("utf8",t)
|
||
this.lastTotal=r
|
||
var n=e.length-(r-this.lastNeed)
|
||
return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)
|
||
e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":608}],47:[function(e,t,r){"use strict"
|
||
var n=e("./util")
|
||
function i(e,t,r){var n=e[t]+e[r],i=e[t+1]+e[r+1]
|
||
n>=4294967296&&i++,e[t]=n,e[t+1]=i}function o(e,t,r,n){var i=e[t]+r
|
||
r<0&&(i+=4294967296)
|
||
var o=e[t+1]+n
|
||
i>=4294967296&&o++,e[t]=i,e[t+1]=o}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,r,n,a,s){var u=f[a],c=f[a+1],h=f[s],d=f[s+1]
|
||
i(l,e,t),o(l,e,u,c)
|
||
var p=l[n]^l[e],m=l[n+1]^l[e+1]
|
||
l[n]=m,l[n+1]=p,i(l,r,n),p=l[t]^l[r],m=l[t+1]^l[r+1],l[t]=p>>>24^m<<8,l[t+1]=m>>>24^p<<8,i(l,e,t),o(l,e,h,d),p=l[n]^l[e],m=l[n+1]^l[e+1],l[n]=p>>>16^m<<16,l[n+1]=m>>>16^p<<16,i(l,r,n),p=l[t]^l[r],m=l[t+1]^l[r+1],l[t]=m>>>31^p<<1,l[t+1]=p>>>31^m<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return 2*e})),l=new Uint32Array(32),f=new Uint32Array(32)
|
||
function h(e,t){var r=0
|
||
for(r=0;r<16;r++)l[r]=e.h[r],l[r+16]=u[r]
|
||
for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),r=0;r<32;r++)f[r]=a(e.b,4*r)
|
||
for(r=0;r<12;r++)s(0,8,16,24,c[16*r+0],c[16*r+1]),s(2,10,18,26,c[16*r+2],c[16*r+3]),s(4,12,20,28,c[16*r+4],c[16*r+5]),s(6,14,22,30,c[16*r+6],c[16*r+7]),s(0,10,20,30,c[16*r+8],c[16*r+9]),s(2,12,22,24,c[16*r+10],c[16*r+11]),s(4,14,16,26,c[16*r+12],c[16*r+13]),s(6,8,18,28,c[16*r+14],c[16*r+15])
|
||
for(r=0;r<16;r++)e.h[r]=e.h[r]^l[r]^l[r+16]}function d(e,t){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64")
|
||
if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64")
|
||
for(var r={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e},n=0;n<16;n++)r.h[n]=u[n]
|
||
var i=t?t.length:0
|
||
return r.h[0]^=16842752^i<<8^e,t&&(p(r,t),r.c=128),r}function p(e,t){for(var r=0;r<t.length;r++)128===e.c&&(e.t+=e.c,h(e,!1),e.c=0),e.b[e.c++]=t[r]}function m(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0
|
||
h(e,!0)
|
||
for(var t=new Uint8Array(e.outlen),r=0;r<e.outlen;r++)t[r]=e.h[r>>2]>>8*(3&r)
|
||
return t}function y(e,t,r){r=r||64,e=n.normalizeInput(e)
|
||
var i=d(r,t)
|
||
return p(i,e),m(i)}t.exports={blake2b:y,blake2bHex:function(e,t,r){var i=y(e,t,r)
|
||
return n.toHex(i)},blake2bInit:d,blake2bUpdate:p,blake2bFinal:m}},{"./util":50}],48:[function(e,t,r){"use strict"
|
||
var n=e("./util")
|
||
function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,r,n,i,o){c[e]=c[e]+c[t]+i,c[n]=a(c[n]^c[e],16),c[r]=c[r]+c[n],c[t]=a(c[t]^c[r],12),c[e]=c[e]+c[t]+o,c[n]=a(c[n]^c[e],8),c[r]=c[r]+c[n],c[t]=a(c[t]^c[r],7)}function a(e,t){return e>>>t^e<<32-t}var s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),c=new Uint32Array(16),l=new Uint32Array(16)
|
||
function f(e,t){var r=0
|
||
for(r=0;r<8;r++)c[r]=e.h[r],c[r+8]=s[r]
|
||
for(c[12]^=e.t,c[13]^=e.t/4294967296,t&&(c[14]=~c[14]),r=0;r<16;r++)l[r]=i(e.b,4*r)
|
||
for(r=0;r<10;r++)o(0,4,8,12,l[u[16*r+0]],l[u[16*r+1]]),o(1,5,9,13,l[u[16*r+2]],l[u[16*r+3]]),o(2,6,10,14,l[u[16*r+4]],l[u[16*r+5]]),o(3,7,11,15,l[u[16*r+6]],l[u[16*r+7]]),o(0,5,10,15,l[u[16*r+8]],l[u[16*r+9]]),o(1,6,11,12,l[u[16*r+10]],l[u[16*r+11]]),o(2,7,8,13,l[u[16*r+12]],l[u[16*r+13]]),o(3,4,9,14,l[u[16*r+14]],l[u[16*r+15]])
|
||
for(r=0;r<8;r++)e.h[r]^=c[r]^c[r+8]}function h(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]")
|
||
var r=t?t.length:0
|
||
if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]")
|
||
var n={h:new Uint32Array(s),b:new Uint32Array(64),c:0,t:0,outlen:e}
|
||
return n.h[0]^=16842752^r<<8^e,r>0&&(d(n,t),n.c=64),n}function d(e,t){for(var r=0;r<t.length;r++)64===e.c&&(e.t+=e.c,f(e,!1),e.c=0),e.b[e.c++]=t[r]}function p(e){for(e.t+=e.c;e.c<64;)e.b[e.c++]=0
|
||
f(e,!0)
|
||
for(var t=new Uint8Array(e.outlen),r=0;r<e.outlen;r++)t[r]=e.h[r>>2]>>8*(3&r)&255
|
||
return t}function m(e,t,r){r=r||32,e=n.normalizeInput(e)
|
||
var i=h(r,t)
|
||
return d(i,e),p(i)}t.exports={blake2s:m,blake2sHex:function(e,t,r){var i=m(e,t,r)
|
||
return n.toHex(i)},blake2sInit:h,blake2sUpdate:d,blake2sFinal:p}},{"./util":50}],49:[function(e,t,r){"use strict"
|
||
var n=e("./blake2b"),i=e("./blake2s")
|
||
t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},{"./blake2b":47,"./blake2s":48}],50:[function(e,t,r){(function(e){"use strict"
|
||
var r="Input must be an string, Buffer or Uint8Array"
|
||
function n(e){return(4294967296+e).toString(16).substring(1)}t.exports={normalizeInput:function(t){var n
|
||
if(t instanceof Uint8Array)n=t
|
||
else if(t instanceof e)n=new Uint8Array(t)
|
||
else{if("string"!=typeof t)throw new Error(r)
|
||
n=new Uint8Array(e.from(t,"utf8"))}return n},toHex:function(e){return Array.prototype.map.call(e,function(e){return(e<16?"0":"")+e.toString(16)}).join("")},debugPrint:function(e,t,r){for(var i="\n"+e+" = ",o=0;o<t.length;o+=2){if(32===r)i+=n(t[o]).toUpperCase(),i+=" ",i+=n(t[o+1]).toUpperCase()
|
||
else{if(64!==r)throw new Error("Invalid size "+r)
|
||
i+=n(t[o+1]).toUpperCase(),i+=n(t[o]).toUpperCase()}o%6==4?i+="\n"+new Array(e.length+4).join(" "):o<t.length-2&&(i+=" ")}console.log(i)},testSpeed:function(e,t,r){for(var n=(new Date).getTime(),i=new Uint8Array(t),o=0;o<t;o++)i[o]=o%256
|
||
var a=(new Date).getTime()
|
||
for(console.log("Generated random input in "+(a-n)+"ms"),n=a,o=0;o<r;o++){var s=e(i),u=(new Date).getTime(),c=u-n
|
||
n=u,console.log("Hashed in "+c+"ms: "+s.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(c/1e3)*100)/100+" MB PER SECOND")}}}}).call(this,e("buffer").Buffer)},{buffer:110}],51:[function(e,t,r){"use strict"
|
||
var n="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};(function(t,r){function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t
|
||
var r=function(){}
|
||
r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e
|
||
this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s
|
||
"object"===(void 0===t?"undefined":n(t))?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26
|
||
try{s=e("buffer").Buffer}catch(e){}function u(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o<i;o++){var a=e.charCodeAt(o)-48
|
||
n<<=4,n|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48
|
||
i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===(void 0===e?"undefined":n(e))&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r)
|
||
if("object"===(void 0===e?"undefined":n(e)))return this._initArray(e,t,r)
|
||
"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36)
|
||
var o=0
|
||
"-"===(e=e.toString().replace(/\s+/g,""))[0]&&o++,16===t?this._parseHex(e,o):this._parseBase(e,t,o),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this
|
||
this.length=Math.ceil(e.length/3),this.words=new Array(this.length)
|
||
for(var n=0;n<this.length;n++)this.words[n]=0
|
||
var o,a,s=0
|
||
if("be"===r)for(n=e.length-1,o=0;n>=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++)
|
||
else if("le"===r)for(n=0,o=0;n<e.length;n+=3)a=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++)
|
||
return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length)
|
||
for(var r=0;r<this.length;r++)this.words[r]=0
|
||
var n,i,o=0
|
||
for(r=e.length-6,n=0;r>=t;r-=6)i=u(e,r,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,n++)
|
||
r+6!==t&&(i=u(e,t,r+6),this.words[n]|=i<<o&67108863,this.words[n+1]|=i>>>26-o&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1
|
||
for(var n=0,i=1;i<=67108863;i*=t)n++
|
||
n--,i=i/t|0
|
||
for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,l=r;l<s;l+=n)u=c(e,l,l+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)
|
||
if(0!==a){var f=1
|
||
for(u=c(e,l,e.length,t),l=0;l<a;l++)f*=t
|
||
this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},a.prototype.copy=function(e){e.words=new Array(this.length)
|
||
for(var t=0;t<this.length;t++)e.words[t]=this.words[t]
|
||
e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null)
|
||
return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0
|
||
return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--
|
||
return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}
|
||
var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176]
|
||
function d(e,t,r){r.negative=t.negative^e.negative
|
||
var n=e.length+t.length|0
|
||
r.length=n,n=n-1|0
|
||
var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0
|
||
r.words[0]=s
|
||
for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0
|
||
l+=(a=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r
|
||
if(e=e||10,t=0|t||1,16===e||"hex"===e){r=""
|
||
for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<n|o)).toString(16)
|
||
r=0!==(o=s>>>24-n&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r
|
||
return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=h[e]
|
||
r=""
|
||
var p=this.clone()
|
||
for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e)
|
||
r=(p=p.idivn(d)).isZero()?m+r:l[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r
|
||
return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0]
|
||
return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n)
|
||
i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip()
|
||
var a,s,u="le"===t,c=new e(o),l=this.clone()
|
||
if(u){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[s]=a
|
||
for(;s<o;s++)c[s]=0}else{for(s=0;s<o-n;s++)c[s]=0
|
||
for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[o-s-1]=a}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0
|
||
return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26
|
||
var t=e,r=0
|
||
return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e)
|
||
return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0
|
||
for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t])
|
||
if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0
|
||
for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t]
|
||
return this.strip()},a.prototype.ior=function(e){return i(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t
|
||
t=this.length>e.length?e:this
|
||
for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r]
|
||
return this.length=t.length,this.strip()},a.prototype.iand=function(e){return i(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r
|
||
this.length>e.length?(t=this,r=e):(t=e,r=this)
|
||
for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n]
|
||
if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n]
|
||
return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return i(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0)
|
||
var t=0|Math.ceil(e/26),r=e%26
|
||
this._expand(t),r>0&&t--
|
||
for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n]
|
||
return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)}
|
||
a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0)
|
||
var r=e/26|0,n=e%26
|
||
return this._expand(r+1),this.words[r]=t?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},a.prototype.iadd=function(e){var t,r,n
|
||
if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign()
|
||
if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign()
|
||
this.length>e.length?(r=this,n=e):(r=e,n=this)
|
||
for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26
|
||
for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26
|
||
if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++
|
||
else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o]
|
||
return this},a.prototype.add=function(e){var t
|
||
return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0
|
||
var t=this.iadd(e)
|
||
return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign()
|
||
var r,n,i=this.cmp(e)
|
||
if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this
|
||
i>0?(r=this,n=e):(r=e,n=this)
|
||
for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t
|
||
for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t
|
||
if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a]
|
||
return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)}
|
||
var p=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,l=0|a[0],f=8191&l,h=l>>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,b=y>>>13,v=0|a[3],_=8191&v,w=v>>>13,S=0|a[4],E=8191&S,k=S>>>13,x=0|a[5],C=8191&x,A=x>>>13,T=0|a[6],I=8191&T,P=T>>>13,M=0|a[7],R=8191&M,O=M>>>13,B=0|a[8],N=8191&B,j=B>>>13,L=0|a[9],D=8191&L,U=L>>>13,F=0|s[0],z=8191&F,q=F>>>13,V=0|s[1],H=8191&V,K=V>>>13,W=0|s[2],G=8191&W,Y=W>>>13,Q=0|s[3],X=8191&Q,$=Q>>>13,J=0|s[4],Z=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,he=le>>>13,de=0|s[9],pe=8191&de,me=de>>>13
|
||
r.negative=e.negative^t.negative,r.length=19
|
||
var ye=(c+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,q))+Math.imul(h,z)|0))<<13)|0
|
||
c=((o=Math.imul(h,q))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,q))+Math.imul(m,z)|0,o=Math.imul(m,q)
|
||
var ge=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,H)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,q))+Math.imul(b,z)|0,o=Math.imul(b,q),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0
|
||
var be=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,G)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,q))+Math.imul(w,z)|0,o=Math.imul(w,q),n=n+Math.imul(g,H)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,K)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,Y)|0
|
||
var ve=(c+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,X)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,q))+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,H)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(g,G)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,Y)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0
|
||
var _e=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,Z)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,q))+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(E,H)|0,i=(i=i+Math.imul(E,K)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,K)|0,n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,Y)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,ee)|0
|
||
var we=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,q))+Math.imul(P,z)|0,o=Math.imul(P,q),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,$)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0
|
||
var Se=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,q))+Math.imul(O,z)|0,o=Math.imul(O,q),n=n+Math.imul(I,H)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,K)|0,n=n+Math.imul(C,G)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0
|
||
var Ee=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(h,ue)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,q))+Math.imul(j,z)|0,o=Math.imul(j,q),n=n+Math.imul(R,H)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0
|
||
var ke=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,q))+Math.imul(U,z)|0,o=Math.imul(U,q),n=n+Math.imul(N,H)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(j,H)|0,o=o+Math.imul(j,K)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0
|
||
var xe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(h,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,K))+Math.imul(U,H)|0,o=Math.imul(U,K),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,he)|0
|
||
var Ce=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,Y))+Math.imul(U,G)|0,o=Math.imul(U,Y),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,he)|0
|
||
var Ae=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,X),i=(i=Math.imul(D,$))+Math.imul(U,X)|0,o=Math.imul(U,$),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,he)|0
|
||
var Te=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(w,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(w,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,Z),i=(i=Math.imul(D,ee))+Math.imul(U,Z)|0,o=Math.imul(U,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,he)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,he)|0
|
||
var Ie=(c+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,he)|0
|
||
var Pe=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(A,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0
|
||
var Me=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(P,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,he)|0
|
||
var Re=(c+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(O,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(D,fe),i=(i=Math.imul(D,he))+Math.imul(U,fe)|0,o=Math.imul(U,he)
|
||
var Oe=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(j,pe)|0))<<13)|0
|
||
c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863
|
||
var Be=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(U,pe)|0))<<13)|0
|
||
return c=((o=Math.imul(U,me))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=ve,u[4]=_e,u[5]=we,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=xe,u[10]=Ce,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Pe,u[15]=Me,u[16]=Re,u[17]=Oe,u[18]=Be,0!==c&&(u[19]=c,r.length++),r}
|
||
function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length
|
||
return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length
|
||
for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i
|
||
i=0
|
||
for(var s=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l=o-c,f=(0|e.words[l])*(0|t.words[c]),h=67108863&f
|
||
s=67108863&(h=h+s|0),i+=(a=(a=a+(f/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e)
|
||
return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e
|
||
for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1
|
||
return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},y.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i)
|
||
for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),l=0;l<i;l+=s)for(var f=u,h=c,d=0;d<a;d++){var p=r[l+d],m=n[l+d],y=r[l+d+a],g=n[l+d+a],b=f*y-h*g
|
||
g=f*g+h*y,y=b,r[l+d]=p+y,n[l+d]=m+g,r[l+d+a]=p-y,n[l+d+a]=m-g,d!==s&&(b=u*f-c*h,h=u*h+c*f,f=b)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0
|
||
for(r=r/2|0;r;r>>>=1)i++
|
||
return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n]
|
||
e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r
|
||
e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,r,n){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13
|
||
for(a=2*t;a<n;++a)r[a]=0
|
||
i(0===o),i(0==(-8192&o))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0
|
||
return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words
|
||
h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,c,n),this.transform(a,o,s,u,n,i),this.transform(c,o,l,f,n,i)
|
||
for(var d=0;d<n;d++){var p=s[d]*l[d]-u[d]*f[d]
|
||
u[d]=s[d]*f[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null)
|
||
return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null)
|
||
return t.words=new Array(this.length+e.length),m(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){i("number"==typeof e),i(e<67108864)
|
||
for(var t=0,r=0;r<this.length;r++){var n=(0|this.words[r])*e,o=(67108863&n)+(67108863&t)
|
||
t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26
|
||
t[r]=(e.words[n]&1<<i)>>>i}return t}(e)
|
||
if(0===t.length)return new a(1)
|
||
for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i))
|
||
return r},a.prototype.iushln=function(e){i("number"==typeof e&&e>=0)
|
||
var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r
|
||
if(0!==r){var a=0
|
||
for(t=0;t<this.length;t++){var s=this.words[t]&o,u=(0|this.words[t])-s<<r
|
||
this.words[t]=u|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t]
|
||
for(t=0;t<n;t++)this.words[t]=0
|
||
this.length+=n}return this.strip()},a.prototype.ishln=function(e){return i(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var n
|
||
i("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0
|
||
var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,u=r
|
||
if(n-=a,n=Math.max(0,n),u){for(var c=0;c<a;c++)u.words[c]=this.words[c]
|
||
u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a]
|
||
else this.words[0]=0,this.length=1
|
||
var l=0
|
||
for(c=this.length-1;c>=0&&(0!==l||c>=n);c--){var f=0|this.words[c]
|
||
this.words[c]=l<<26-o|f>>>o,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0)
|
||
var t=e%26,r=(e-t)/26,n=1<<t
|
||
return!(this.length<=r)&&!!(this.words[r]&n)},a.prototype.imaskn=function(e){i("number"==typeof e&&e>=0)
|
||
var t=e%26,r=(e-t)/26
|
||
if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this
|
||
if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<<t
|
||
this.words[this.length-1]&=n}return this.strip()}
|
||
a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return i("number"==typeof e),i(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e
|
||
for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++
|
||
return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e)
|
||
if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this
|
||
if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1
|
||
else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1
|
||
return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var n,o,a=e.length+r
|
||
this._expand(a)
|
||
var s=0
|
||
for(n=0;n<e.length;n++){o=(0|this.words[n+r])+s
|
||
var u=(0|e.words[n])*t
|
||
s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)s=(o=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&o
|
||
if(0===s)return this.strip()
|
||
for(i(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o
|
||
return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1]
|
||
0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1])
|
||
var s,u=n.length-i.length
|
||
if("mod"!==t){(s=new a(null)).length=u+1,s.words=new Array(s.length)
|
||
for(var c=0;c<s.length;c++)s.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u)
|
||
0===l.negative&&(n=l,s&&(s.words[u]=1))
|
||
for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1])
|
||
for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1)
|
||
s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)
|
||
var n,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e)
|
||
if(t.mod.isZero())return t.div
|
||
var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n)
|
||
return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=67108863)
|
||
for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e
|
||
return r},a.prototype.idivn=function(e){i(e<=67108863)
|
||
for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t
|
||
this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero())
|
||
var t=this,r=e.clone()
|
||
t=0!==t.negative?t.umod(e):t.clone()
|
||
for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c
|
||
for(var l=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(l),o.isub(f)),n.iushrn(1),o.iushrn(1)
|
||
for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1)
|
||
t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(u)):(r.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero())
|
||
var t=this,r=e.clone()
|
||
t=0!==t.negative?t.umod(e):t.clone()
|
||
for(var n,o=new a(1),s=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1)
|
||
for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1)
|
||
t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(n=0===t.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs()
|
||
if(e.isZero())return this.abs()
|
||
var t=this.clone(),r=e.clone()
|
||
t.negative=0,r.negative=0
|
||
for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1)
|
||
for(;;){for(;t.isEven();)t.iushrn(1)
|
||
for(;r.isEven();)r.iushrn(1)
|
||
var i=t.cmp(r)
|
||
if(i<0){var o=t
|
||
t=r,r=o}else if(0===i||0===r.cmpn(1))break
|
||
t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e)
|
||
var t=e%26,r=(e-t)/26,n=1<<t
|
||
if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this
|
||
for(var o=n,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a]
|
||
o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0
|
||
if(0!==this.negative&&!r)return-1
|
||
if(0===this.negative&&r)return 1
|
||
if(this.strip(),this.length>1)t=1
|
||
else{r&&(e=-e),i(e<=67108863,"Number is too big")
|
||
var n=0|this.words[0]
|
||
t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1
|
||
if(0===this.negative&&0!==e.negative)return 1
|
||
var t=this.ucmp(e)
|
||
return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1
|
||
if(this.length<e.length)return-1
|
||
for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r]
|
||
if(n!==i){n<i?t=-1:n>i&&(t=1)
|
||
break}}return t}
|
||
a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new E(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)}
|
||
var g={k256:null,p224:null,p192:null,p25519:null}
|
||
function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e)
|
||
this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new a(null)
|
||
return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e
|
||
do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n)
|
||
var n=t<this.n?-1:r.ucmp(this.p)
|
||
return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},o(v,b),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n]
|
||
if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1)
|
||
var i=e.words[9]
|
||
for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var o=0|e.words[n]
|
||
e.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2
|
||
for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r]
|
||
t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},o(_,b),o(w,b),o(S,b),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n
|
||
n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e]
|
||
var t
|
||
if("k256"===e)t=new v
|
||
else if("p224"===e)t=new _
|
||
else if("p192"===e)t=new w
|
||
else{if("p25519"!==e)throw new Error("Unknown prime "+e)
|
||
t=new S}return g[e]=t,t},E.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t)
|
||
var r=e.add(t)
|
||
return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t)
|
||
var r=e.iadd(t)
|
||
return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t)
|
||
var r=e.sub(t)
|
||
return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t)
|
||
var r=e.isub(t)
|
||
return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone()
|
||
var t=this.m.andln(3)
|
||
if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2)
|
||
return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1)
|
||
i(!n.isZero())
|
||
var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength()
|
||
for(l=new a(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u)
|
||
for(var f=this.pow(l,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),p=o;0!==d.cmp(s);){for(var m=d,y=0;0!==m.cmp(s);y++)m=m.redSqr()
|
||
i(y<p)
|
||
var g=this.pow(f,new a(1).iushln(p-y-1))
|
||
h=h.redMul(g),f=g.redSqr(),d=d.redMul(f),p=y}return h},E.prototype.invm=function(e){var t=e._invmp(this.m)
|
||
return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this)
|
||
if(0===t.cmpn(1))return e.clone()
|
||
var r=new Array(16)
|
||
r[0]=new a(1).toRed(this),r[1]=e
|
||
for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e)
|
||
var i=r[0],o=0,s=0,u=t.bitLength()%26
|
||
for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1
|
||
i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===l)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m)
|
||
return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone()
|
||
return t.red=null,t}
|
||
a.mont=function(e){return new k(e)},o(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv))
|
||
return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e
|
||
var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i
|
||
return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this)
|
||
var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i
|
||
return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}})(void 0===t||t,void 0)},{buffer:109}],52:[function(e,t,r){"use strict"
|
||
var n,i="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}
|
||
function o(e){this.rand=e}if(t.exports=function(e){return n||(n=new o(null)),n.generate(e)},t.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e)
|
||
for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte()
|
||
return t},"object"===("undefined"==typeof self?"undefined":i(self)))self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(e){var t=new Uint8Array(e)
|
||
return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(e){var t=new Uint8Array(e)
|
||
return self.msCrypto.getRandomValues(t),t}:"object"===("undefined"==typeof window?"undefined":i(window))&&(o.prototype._rand=function(){throw new Error("Not implemented yet")})
|
||
else try{var a=e("crypto")
|
||
if("function"!=typeof a.randomBytes)throw new Error("Not supported")
|
||
o.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){}},{crypto:109}],53:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer
|
||
function i(e){n.isBuffer(e)||(e=n.from(e))
|
||
for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i)
|
||
return r}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,n,i){for(var o,a,s,u,c=r[0],l=r[1],f=r[2],h=r[3],d=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],y=e[3]^t[3],g=4,b=1;b<i;b++)o=c[d>>>24]^l[p>>>16&255]^f[m>>>8&255]^h[255&y]^t[g++],a=c[p>>>24]^l[m>>>16&255]^f[y>>>8&255]^h[255&d]^t[g++],s=c[m>>>24]^l[y>>>16&255]^f[d>>>8&255]^h[255&p]^t[g++],u=c[y>>>24]^l[d>>>16&255]^f[p>>>8&255]^h[255&m]^t[g++],d=o,p=a,m=s,y=u
|
||
return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^t[g++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^t[g++],s=(n[m>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[g++],u=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[g++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283
|
||
for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4
|
||
c=c>>>8^255&c^99,r[a]=c,n[c]=a
|
||
var l=e[a],f=e[l],h=e[f],d=257*e[c]^16843008*c
|
||
i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*f^257*l^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=l^e[e[e[h^l]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}()
|
||
function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o]
|
||
for(o=t;o<n;o++){var a=i[o-1]
|
||
o%t==0?(a=a<<8|a>>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],l=0;l<n;l++){var f=n-l,h=i[f-(l%4?0:4)]
|
||
c[l]=l<4||f<=4?h:u.INV_SUB_MIX[0][u.SBOX[h>>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16)
|
||
return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1]
|
||
e[1]=e[3],e[3]=t
|
||
var r=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16)
|
||
return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},{"safe-buffer":608}],54:[function(e,t,r){"use strict"
|
||
var n=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=e("inherits"),s=e("./ghash"),u=e("buffer-xor"),c=e("./incr32")
|
||
function l(e,t,r,a){o.call(this)
|
||
var u=i.alloc(4,0)
|
||
this._cipher=new n.AES(t)
|
||
var l=this._cipher.encryptBlock(u)
|
||
this._ghash=new s(l),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])])
|
||
var n=new s(r),o=t.length,a=o%16
|
||
n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0))
|
||
var u=8*o,l=i.alloc(8)
|
||
l.writeUIntBE(u,0,8),n.update(l),e._finID=n.state
|
||
var f=i.from(e._finID)
|
||
return c(f),f}(this,r,l),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16
|
||
t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0
|
||
var r=this._mode.encrypt(this,e)
|
||
return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data")
|
||
var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID))
|
||
if(this._decrypt&&function(e,t){var r=0
|
||
e.length!==t.length&&r++
|
||
for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i]
|
||
return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data")
|
||
this._authTag=e,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state")
|
||
return this._authTag},l.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state")
|
||
this._authTag=e},l.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state")
|
||
this._ghash.update(e),this._alen+=e.length},t.exports=l},{"./aes":53,"./ghash":58,"./incr32":59,"buffer-xor":76,"cipher-base":80,inherits:220,"safe-buffer":608}],55:[function(e,t,r){"use strict"
|
||
var n=e("./encrypter"),i=e("./decrypter"),o=e("./modes/list.json")
|
||
r.createCipher=r.Cipher=n.createCipher,r.createCipheriv=r.Cipheriv=n.createCipheriv,r.createDecipher=r.Decipher=i.createDecipher,r.createDecipheriv=r.Decipheriv=i.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(o)}},{"./decrypter":56,"./encrypter":57,"./modes/list.json":67}],56:[function(e,t,r){"use strict"
|
||
var n=e("./authCipher"),i=e("safe-buffer").Buffer,o=e("./modes"),a=e("./streamCipher"),s=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey")
|
||
function l(e,t,r){s.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var s=o[e.toLowerCase()]
|
||
if(!s)throw new TypeError("invalid suite type")
|
||
if("string"==typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length)
|
||
if("string"==typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length)
|
||
return"stream"===s.type?new a(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new l(s.module,t,r)}e("inherits")(l,s),l.prototype._update=function(e){var t,r
|
||
this._cache.add(e)
|
||
for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r)
|
||
return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush()
|
||
if(this._autopadding)return function(e){var t=e[15]
|
||
if(t<1||t>16)throw new Error("unable to decrypt data")
|
||
var r=-1
|
||
for(;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data")
|
||
if(16===t)return
|
||
return e.slice(0,16-t)}(this._mode.decrypt(this,e))
|
||
if(e)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=i.concat([this.cache,e])},f.prototype.get=function(e){var t
|
||
if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t
|
||
return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=o[e.toLowerCase()]
|
||
if(!r)throw new TypeError("invalid suite type")
|
||
var n=c(t,!1,r.key,r.iv)
|
||
return h(e,n.key,n.iv)},r.createDecipheriv=h},{"./aes":53,"./authCipher":54,"./modes":66,"./streamCipher":69,"cipher-base":80,evp_bytestokey:205,inherits:220,"safe-buffer":608}],57:[function(e,t,r){"use strict"
|
||
var n=e("./modes"),i=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./streamCipher"),s=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey")
|
||
function l(e,t,r){s.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}e("inherits")(l,s),l.prototype._update=function(e){var t,r
|
||
this._cache.add(e)
|
||
for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r)
|
||
return o.concat(n)}
|
||
var f=o.alloc(16,16)
|
||
function h(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var s=n[e.toLowerCase()]
|
||
if(!s)throw new TypeError("invalid suite type")
|
||
if("string"==typeof t&&(t=o.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length)
|
||
if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length)
|
||
return"stream"===s.type?new a(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new l(s.module,t,r)}l.prototype._final=function(){var e=this._cache.flush()
|
||
if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e
|
||
if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=o.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16)
|
||
return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r)
|
||
return o.concat([this.cache,t])},r.createCipheriv=d,r.createCipher=function(e,t){var r=n[e.toLowerCase()]
|
||
if(!r)throw new TypeError("invalid suite type")
|
||
var i=c(t,!1,r.key,r.iv)
|
||
return d(e,i.key,i.iv)}},{"./aes":53,"./authCipher":54,"./modes":66,"./streamCipher":69,"cipher-base":80,evp_bytestokey:205,inherits:220,"safe-buffer":608}],58:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=n.alloc(16,0)
|
||
function o(e){var t=n.allocUnsafe(16)
|
||
return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t]
|
||
this._multiply()},a.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31
|
||
n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t
|
||
for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":608}],59:[function(e,t,r){"use strict"
|
||
t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r)
|
||
break}e.writeUInt8(0,r)}}},{}],60:[function(e,t,r){"use strict"
|
||
var n=e("buffer-xor")
|
||
r.encrypt=function(e,t){var r=n(t,e._prev)
|
||
return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev
|
||
e._prev=t
|
||
var i=e._cipher.decryptBlock(t)
|
||
return n(i,r)}},{"buffer-xor":76}],61:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("buffer-xor")
|
||
function o(e,t,r){var o=t.length,a=i(t,e._cache)
|
||
return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:a]),a}r.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,o(e,t,r)])
|
||
break}i=e._cache.length,a=n.concat([a,o(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},{"buffer-xor":76,"safe-buffer":608}],62:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer
|
||
function i(e,t,r){for(var n,i,a,s=-1,u=0;++s<8;)n=e._cipher.encryptBlock(e._prev),i=t&1<<7-s?128:0,u+=(128&(a=n[0]^i))>>s%8,e._prev=o(e._prev,r?i:a)
|
||
return u}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length)
|
||
for(e=n.concat([e,n.from([t])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7
|
||
return o}r.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r)
|
||
return a}},{"safe-buffer":608}],63:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer
|
||
function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t
|
||
return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}r.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],r)
|
||
return a}},{"safe-buffer":608}],64:[function(e,t,r){"use strict"
|
||
var n=e("buffer-xor"),i=e("safe-buffer").Buffer,o=e("../incr32")
|
||
function a(e){var t=e._cipher.encryptBlockRaw(e._prev)
|
||
return o(e._prev),t}r.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length
|
||
e._cache=i.concat([e._cache,i.allocUnsafe(16*r)])
|
||
for(var s=0;s<r;s++){var u=a(e),c=o+16*s
|
||
e._cache.writeUInt32BE(u[0],c+0),e._cache.writeUInt32BE(u[1],c+4),e._cache.writeUInt32BE(u[2],c+8),e._cache.writeUInt32BE(u[3],c+12)}var l=e._cache.slice(0,t.length)
|
||
return e._cache=e._cache.slice(t.length),n(t,l)}},{"../incr32":59,"buffer-xor":76,"safe-buffer":608}],65:[function(e,t,r){"use strict"
|
||
r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],66:[function(e,t,r){"use strict"
|
||
var n={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},i=e("./list.json")
|
||
for(var o in i)i[o].module=n[i[o].mode]
|
||
t.exports=i},{"./cbc":60,"./cfb":61,"./cfb1":62,"./cfb8":63,"./ctr":64,"./ecb":65,"./list.json":67,"./ofb":68}],67:[function(e,t,r){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],68:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("buffer-xor")
|
||
function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)])
|
||
var o=e._cache.slice(0,r.length)
|
||
return e._cache=e._cache.slice(r.length),n(r,o)}}).call(this,e("buffer").Buffer)},{buffer:110,"buffer-xor":76}],69:[function(e,t,r){"use strict"
|
||
var n=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base")
|
||
function a(e,t,r,a){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}e("inherits")(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},t.exports=a},{"./aes":53,"cipher-base":80,inherits:220,"safe-buffer":608}],70:[function(e,t,r){"use strict"
|
||
var n=e("base-x")
|
||
t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},{"base-x":34}],71:[function(e,t,r){(function(e){"use strict"
|
||
t.exports=function(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number')
|
||
if(t<0)throw new RangeError('"size" argument must not be negative')
|
||
return e.allocUnsafe?e.allocUnsafe(t):new e(t)}}).call(this,e("buffer").Buffer)},{buffer:110}],72:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("buffer-fill"),i=e("buffer-alloc-unsafe")
|
||
t.exports=function(e,t,o){if("number"!=typeof e)throw new TypeError('"size" argument must be a number')
|
||
if(e<0)throw new RangeError('"size" argument must not be negative')
|
||
if(r.alloc)return r.alloc(e,t,o)
|
||
var a=i(e)
|
||
return 0===e?a:void 0===t?n(a,0):("string"!=typeof o&&(o=void 0),n(a,t,o))}}).call(this,e("buffer").Buffer)},{buffer:110,"buffer-alloc-unsafe":71,"buffer-fill":73}],73:[function(e,t,r){(function(e){"use strict"
|
||
var r=function(){try{if(!e.isEncoding("latin1"))return!1
|
||
var t=e.alloc?e.alloc(4):new e(4)
|
||
return t.fill("ab","ucs2"),"61006200"===t.toString("hex")}catch(e){return!1}}()
|
||
function n(e,t,r,n){if(r<0||n>e.length)throw new RangeError("Out of range index")
|
||
return r>>>=0,(n=void 0===n?e.length:n>>>0)>r&&e.fill(t,r,n),e}t.exports=function(t,i,o,a,s){if(r)return t.fill(i,o,a,s)
|
||
if("number"==typeof i)return n(t,i,o,a)
|
||
if("string"==typeof i){if("string"==typeof o?(s=o,o=0,a=t.length):"string"==typeof a&&(s=a,a=t.length),void 0!==s&&"string"!=typeof s)throw new TypeError("encoding must be a string")
|
||
if("latin1"===s&&(s="binary"),"string"==typeof s&&!e.isEncoding(s))throw new TypeError("Unknown encoding: "+s)
|
||
if(""===i)return n(t,0,o,a)
|
||
if(function(e){return 1===e.length&&e.charCodeAt(0)<256}(i))return n(t,i.charCodeAt(0),o,a)
|
||
i=new e(i,s)}return e.isBuffer(i)?function(e,t,r,n){if(r<0||n>e.length)throw new RangeError("Out of range index")
|
||
if(n<=r)return e
|
||
r>>>=0,n=void 0===n?e.length:n>>>0
|
||
for(var i=r,o=t.length;i<=n-o;)t.copy(e,i),i+=o
|
||
return i!==n&&t.copy(e,i,0,n-i),e}(t,i,o,a):n(t,0,o,a)}}).call(this,e("buffer").Buffer)},{buffer:110}],74:[function(e,t,r){(function(e){"use strict"
|
||
var r=Object.prototype.toString,n="function"==typeof e.alloc&&"function"==typeof e.allocUnsafe&&"function"==typeof e.from
|
||
t.exports=function(t,i,o){if("number"==typeof t)throw new TypeError('"value" argument must not be a number')
|
||
return a=t,"ArrayBuffer"===r.call(a).slice(8,-1)?function(t,r,i){r>>>=0
|
||
var o=t.byteLength-r
|
||
if(o<0)throw new RangeError("'offset' is out of bounds")
|
||
if(void 0===i)i=o
|
||
else if((i>>>=0)>o)throw new RangeError("'length' is out of bounds")
|
||
return n?e.from(t.slice(r,r+i)):new e(new Uint8Array(t.slice(r,r+i)))}(t,i,o):"string"==typeof t?function(t,r){if("string"==typeof r&&""!==r||(r="utf8"),!e.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding')
|
||
return n?e.from(t,r):new e(t,r)}(t,i):n?e.from(t):new e(t)
|
||
var a}}).call(this,e("buffer").Buffer)},{buffer:110}],75:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("buffer"),i=n.Buffer,o=n.SlowBuffer,a=n.kMaxLength||2147483647
|
||
r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r)
|
||
if("number"==typeof r)throw new TypeError("encoding must not be number")
|
||
if("number"!=typeof e)throw new TypeError("size must be a number")
|
||
if(e>a)throw new RangeError("size is too large")
|
||
var n=r,o=t
|
||
void 0===o&&(n=void 0,o=0)
|
||
var s=new i(e)
|
||
if("string"==typeof o)for(var u=new i(o,n),c=u.length,l=-1;++l<e;)s[l]=u[l%c]
|
||
else s.fill(o)
|
||
return s},r.allocUnsafe=function(e){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(e)
|
||
if("number"!=typeof e)throw new TypeError("size must be a number")
|
||
if(e>a)throw new RangeError("size is too large")
|
||
return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n)
|
||
if("number"==typeof e)throw new TypeError('"value" argument must not be a number')
|
||
if("string"==typeof e)return new i(e,r)
|
||
if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var o=r
|
||
if(1===arguments.length)return new i(e)
|
||
void 0===o&&(o=0)
|
||
var a=n
|
||
if(void 0===a&&(a=e.byteLength-o),o>=e.byteLength)throw new RangeError("'offset' is out of bounds")
|
||
if(a>e.byteLength-o)throw new RangeError("'length' is out of bounds")
|
||
return new i(e.slice(o,o+a))}if(i.isBuffer(e)){var s=new i(e.length)
|
||
return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e)
|
||
if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e)
|
||
if("number"!=typeof e)throw new TypeError("size must be a number")
|
||
if(e>=a)throw new RangeError("size is too large")
|
||
return new o(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:110}],76:[function(e,t,r){(function(e){"use strict"
|
||
t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o<n;++o)i[o]=t[o]^r[o]
|
||
return i}}).call(this,e("buffer").Buffer)},{buffer:110}],77:[function(e,t,r){"use strict"
|
||
t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],78:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("multihashes"),i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs"
|
||
if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0"
|
||
if("string"!=typeof e.codec)return"codec must be string"
|
||
if(!r.isBuffer(e.multihash))return"multihash must be a Buffer"
|
||
try{n.validate(e.multihash)}catch(e){var t=e.message
|
||
return t||(t="Multihash validation failed"),t}}}
|
||
t.exports=i}).call(this,{isBuffer:e("../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../ember-browserify/node_modules/is-buffer/index.js":119,multihashes:481}],79:[function(e,t,r){(function(r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("multihashes"),o=e("multibase"),a=e("multicodec"),s=e("multicodec/src/base-table"),u=e("multicodec/src/varint-table"),c=e("multihashes"),l=e("./cid-util"),f=function(){function e(t,n,s){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),e.isCID(t)){var u=t
|
||
return this.version=u.version,this.codec=u.codec,void(this.multihash=r.from(u.multihash))}if("string"==typeof t)if(o.isEncoded(t)){var c=o.decode(t)
|
||
t=parseInt(c.slice(0,1).toString("hex"),16),n=a.getCodec(c.slice(1)),s=a.rmPrefix(c.slice(1))}else n="dag-pb",s=i.fromB58String(t),t=0
|
||
else if(r.isBuffer(t)){var l=t.slice(0,1),f=parseInt(l.toString("hex"),16)
|
||
if(0===f||1===f){var h=t
|
||
t=f,n=a.getCodec(h.slice(1)),s=a.rmPrefix(h.slice(1))}else n="dag-pb",s=t,t=0}this.codec=n,this.version=t,this.multihash=s,e.validateCID(this)}return n(e,[{key:"toV0",value:function(){if("dag-pb"!==this.codec)throw new Error("Cannot convert a non dag-pb CID to CIDv0")
|
||
return new e(0,this.codec,this.multihash)}},{key:"toV1",value:function(){return new e(1,this.codec,this.multihash)}},{key:"toBaseEncodedString",value:function(e){switch(e=e||"base58btc",this.version){case 0:if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()")
|
||
return i.toB58String(this.multihash)
|
||
case 1:return o.encode(e,this.buffer).toString()
|
||
default:throw new Error("Unsupported version")}}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}},{key:"buffer",get:function(){switch(this.version){case 0:return this.multihash
|
||
case 1:return r.concat([r.from("01","hex"),r.from(u[this.codec]),this.multihash])
|
||
default:throw new Error("unsupported version")}}},{key:"prefix",get:function(){return r.concat([r.from("0"+this.version,"hex"),u[this.codec],c.prefix(this.multihash)])}}],[{key:"isCID",value:function(e){return!l.checkCIDComponents(e)}},{key:"validateCID",value:function(e){var t=l.checkCIDComponents(e)
|
||
if(t)throw new Error(t)}}]),e}()
|
||
f.codecs=s,t.exports=f}).call(this,e("buffer").Buffer)},{"./cid-util":78,buffer:110,multibase:474,multicodec:476,"multicodec/src/base-table":475,"multicodec/src/varint-table":479,multihashes:481}],80:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder
|
||
function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t))
|
||
var i=this._update(e)
|
||
return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n
|
||
try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t
|
||
try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0)
|
||
return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings")
|
||
var n=this._decoder.write(e)
|
||
return r&&(n+=this._decoder.end()),n},t.exports=a},{inherits:220,"safe-buffer":608,stream:144,string_decoder:149}],81:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("readable-stream").Writable,i=e("inherits"),o=e("buffer-from")
|
||
if("undefined"==typeof Uint8Array)var a=e("typedarray").Uint8Array
|
||
else a=Uint8Array
|
||
function s(e,t){if(!(this instanceof s))return new s(e,t)
|
||
"function"==typeof e&&(t=e,e={}),e||(e={})
|
||
var r=e.encoding,i=!1
|
||
r?"u8"!==(r=String(r).toLowerCase())&&"uint8"!==r||(r="uint8array"):i=!0,n.call(this,{objectMode:!0}),this.encoding=r,this.shouldInferEncoding=i,t&&this.on("finish",function(){t(this.getBody())}),this.body=[]}t.exports=s,i(s,n),s.prototype._write=function(e,t,r){this.body.push(e),r()},s.prototype.inferEncoding=function(e){var t=void 0===e?this.body[0]:e
|
||
return r.isBuffer(t)?"buffer":"undefined"!=typeof Uint8Array&&t instanceof Uint8Array?"uint8array":Array.isArray(t)?"array":"string"==typeof t?"string":"[object Object]"===Object.prototype.toString.call(t)?"object":"buffer"},s.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function(e){for(var t=[],r=0;r<e.length;r++)t.push.apply(t,e[r])
|
||
return t}(this.body):"string"===this.encoding?function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n]
|
||
"string"==typeof i?t.push(i):r.isBuffer(i)?t.push(i):u(i)?t.push(o(i)):t.push(o(String(i)))}t=r.isBuffer(e[0])?(t=r.concat(t)).toString("utf8"):t.join("")
|
||
return t}(this.body):"buffer"===this.encoding?function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n]
|
||
r.isBuffer(i)?t.push(i):u(i)?t.push(o(i)):t.push(o(String(i)))}return r.concat(t)}(this.body):"uint8array"===this.encoding?function(e){for(var t=0,r=0;r<e.length;r++)"string"==typeof e[r]&&(e[r]=o(e[r])),t+=e[r].length
|
||
for(var n=new a(t),r=0,i=0;r<e.length;r++)for(var s=e[r],u=0;u<s.length;u++)n[i++]=s[u]
|
||
return n}(this.body):this.body):[]}
|
||
Array.isArray
|
||
function u(e){return"string"==typeof e||(t=e,/Array\]$/.test(Object.prototype.toString.call(t)))||e&&"function"==typeof e.subarray
|
||
var t}}).call(this,e("buffer").Buffer)},{buffer:110,"buffer-from":74,inherits:220,"readable-stream":604,typedarray:658}],82:[function(e,t,r){(function(e){"use strict"
|
||
var t="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}
|
||
function n(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"===(void 0===e?"undefined":t(e))},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===n(e)},r.isObject=function(e){return"object"===(void 0===e?"undefined":t(e))&&null!==e},r.isDate=function(e){return"[object Date]"===n(e)},r.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(void 0===e?"undefined":t(e))||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../ember-browserify/node_modules/is-buffer/index.js":119}],83:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("md5.js"),o=e("ripemd160"),a=e("sha.js"),s=e("cipher-base")
|
||
function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},{"cipher-base":80,inherits:220,"md5.js":460,ripemd160:606,"sha.js":623}],84:[function(e,t,r){"use strict"
|
||
var n=e("md5.js")
|
||
t.exports=function(e){return(new n).update(e).digest()}},{"md5.js":460}],85:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./legacy"),o=e("cipher-base"),a=e("safe-buffer").Buffer,s=e("create-hash/md5"),u=e("ripemd160"),c=e("sha.js"),l=a.alloc(128)
|
||
function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t))
|
||
var r="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>r)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<r&&(t=a.concat([t,l],r))
|
||
for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^t[s],i[s]=92^t[s]
|
||
this._hash="rmd160"===e?new u:c(e),this._hash.update(n)}n(f,o),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest()
|
||
return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new f("rmd160",t):"md5"===e?new i(s,t):new f(e,t)}},{"./legacy":86,"cipher-base":80,"create-hash/md5":84,inherits:220,ripemd160:606,"safe-buffer":608,"sha.js":623}],86:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=i.alloc(128),s=64
|
||
function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,a],s))
|
||
for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),u=0;u<s;u++)r[u]=54^t[u],n[u]=92^t[u]
|
||
this._hash=[r]}n(u,o),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(i.concat(this._hash))
|
||
return this._alg(i.concat([this._opad,e]))},t.exports=u},{"cipher-base":80,inherits:220,"safe-buffer":608}],87:[function(e,t,r){(function(e){"use strict"
|
||
t.exports=!1
|
||
try{t.exports="[object process]"===Object.prototype.toString.call(e.process)}catch(e){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],88:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("create-hmac"),i=e("./lib/hash-info.json"),o=new r(0),a=new r([0]),s=new r([1])
|
||
function u(e,t,r,n){var o=i[e]
|
||
if(void 0===o)throw new Error("hash "+e+" is not supported")
|
||
this._algo=e,this._securityStrength=o.securityStrength/8,this._outlen=o.outlen/8,this._reseedInterval=281474976710656,this._init(t,r,n)}u.prototype._update=function(e){var t=n(this._algo,this._K).update(this._V).update(a)
|
||
e&&t.update(e),this._K=t.digest(),this._V=n(this._algo,this._K).update(this._V).digest(),e&&(this._K=n(this._algo,this._K).update(this._V).update(s).update(e).digest(),this._V=n(this._algo,this._K).update(this._V).digest())},u.prototype._init=function(e,t,n){if(e.length<this._securityStrength)throw new Error("Not enough entropy")
|
||
this._K=new r(this._outlen),this._V=new r(this._outlen)
|
||
for(var i=0;i<this._K.length;++i)this._K[i]=0,this._V[i]=1
|
||
this._update(r.concat([e,t,n||o])),this._reseed=1},u.prototype.reseed=function(e,t){if(e.length<this._securityStrength)throw new Error("Not enough entropy")
|
||
this._update(r.concat([e,t||o])),this._reseed=1},u.prototype.generate=function(e,t){if(this._reseed>this._reseedInterval)throw new Error("Reseed is required")
|
||
t&&0===t.length&&(t=void 0),t&&this._update(t)
|
||
for(var i=new r(0);i.length<e;)this._V=n(this._algo,this._K).update(this._V).digest(),i=r.concat([i,this._V])
|
||
return this._update(t),this._reseed+=1,i.slice(0,e)},t.exports=u}).call(this,e("buffer").Buffer)},{"./lib/hash-info.json":89,buffer:110,"create-hmac":85}],89:[function(e,t,r){t.exports={sha1:{securityStrength:128,outlen:160,seedlen:440},sha224:{securityStrength:192,outlen:224,seedlen:440},sha256:{securityStrength:256,outlen:256,seedlen:440},sha384:{securityStrength:256,outlen:384,seedlen:888},sha512:{securityStrength:256,outlen:512,seedlen:888}}},{}],90:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.hmacDRBG=e("./elliptic/hmac-drbg"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":106,"./elliptic/curve":93,"./elliptic/curves":96,"./elliptic/ec":97,"./elliptic/eddsa":100,"./elliptic/hmac-drbg":103,"./elliptic/utils":105,brorand:52}],91:[function(e,t,r){"use strict"
|
||
var n=e("bn.js"),i=e("../../elliptic").utils,o=i.getNAF,a=i.getJSF,s=i.assert
|
||
function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4)
|
||
var r=this.n&&this.p.div(this.n)
|
||
!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed)
|
||
var r=e._getDoubles(),n=o(t,1),i=(1<<r.step+1)-(r.step%2==0?2:1)
|
||
i/=3
|
||
for(var a=[],u=0;u<n.length;u+=r.step){var c=0
|
||
for(t=u+r.step-1;t>=u;t--)c=(c<<1)+n[t]
|
||
a.push(c)}for(var l=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(u=0;u<a.length;u++){(c=a[u])===h?f=f.mixedAdd(r.points[u]):c===-h&&(f=f.mixedAdd(r.points[u].neg()))}l=l.add(f)}return l.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r)
|
||
r=n.wnd
|
||
for(var i=n.points,a=o(t,r),u=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(t=0;c>=0&&0===a[c];c--)t++
|
||
if(c>=0&&t++,u=u.dblp(t),c<0)break
|
||
var l=a[c]
|
||
s(0!==l),u="affine"===e.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,l=0,f=0;f<n;f++){var h=(x=t[f])._getNAFPoints(e)
|
||
s[f]=h.wnd,u[f]=h.points}for(f=n-1;f>=1;f-=2){var d=f-1,p=f
|
||
if(1===s[d]&&1===s[p]){var m=[t[d],null,null,t[p]]
|
||
0===t[d].y.cmp(t[p].y)?(m[1]=t[d].add(t[p]),m[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(m[1]=t[d].toJ().mixedAdd(t[p]),m[2]=t[d].add(t[p].neg())):(m[1]=t[d].toJ().mixedAdd(t[p]),m[2]=t[d].toJ().mixedAdd(t[p].neg()))
|
||
var y=[-3,-1,-5,-7,0,7,5,1,3],g=a(r[d],r[p])
|
||
l=Math.max(g[0].length,l),c[d]=new Array(l),c[p]=new Array(l)
|
||
for(var b=0;b<l;b++){var v=0|g[0][b],_=0|g[1][b]
|
||
c[d][b]=y[3*(v+1)+(_+1)],c[p][b]=0,u[d]=m}}else c[d]=o(r[d],s[d]),c[p]=o(r[p],s[p]),l=Math.max(c[d].length,l),l=Math.max(c[p].length,l)}var w=this.jpoint(null,null,null),S=this._wnafT4
|
||
for(f=l;f>=0;f--){for(var E=0;f>=0;){var k=!0
|
||
for(b=0;b<n;b++)S[b]=0|c[b][f],0!==S[b]&&(k=!1)
|
||
if(!k)break
|
||
E++,f--}if(f>=0&&E++,w=w.dblp(E),f<0)break
|
||
for(b=0;b<n;b++){var x,C=S[b]
|
||
0!==C&&(C>0?x=u[b][C-1>>1]:C<0&&(x=u[b][-C-1>>1].neg()),w="affine"===x.type?w.mixedAdd(x):w.add(x))}}for(f=0;f<n;f++)u[f]=null
|
||
return i?w:w.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t)
|
||
var r=this.p.byteLength()
|
||
if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r))
|
||
if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0])
|
||
throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t)
|
||
return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this
|
||
var t={doubles:null,naf:null,beta:null}
|
||
return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1
|
||
var t=this.precomputed.doubles
|
||
return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles
|
||
for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl()
|
||
r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf
|
||
for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n)
|
||
return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl()
|
||
return t}},{"../../elliptic":90,"bn.js":51}],92:[function(e,t,r){"use strict"
|
||
var n=e("../curve"),i=e("../../elliptic"),o=e("bn.js"),a=e("inherits"),s=n.base,u=i.utils.assert
|
||
function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function l(e,t,r,n,i){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(r,16),this.z=n?new o(n,16):this.curve.one,this.t=i&&new o(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(c,s),t.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red))
|
||
var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(i.redInvm()),s=a.redSqrt()
|
||
if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point")
|
||
var u=s.fromRed().isOdd()
|
||
return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red))
|
||
var r=e.redSqr(),n=r.redSub(this.one),i=r.redMul(this.d).redAdd(this.one),a=n.redMul(i.redInvm())
|
||
if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point")
|
||
return this.point(this.zero,e)}var s=a.redSqrt()
|
||
if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point")
|
||
return s.isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0
|
||
e.normalize()
|
||
var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)))
|
||
return 0===n.cmp(i)},a(l,s.BasePoint),c.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new l(this,e,t,r,n)},l.fromJSON=function(e,t){return new l(e,t[0],t[1],t[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},l.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr()
|
||
r=r.redIAdd(r)
|
||
var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),u=i.redMul(a),c=o.redMul(s),l=i.redMul(s),f=a.redMul(o)
|
||
return this.curve.point(u,c,f,l)},l.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr()
|
||
if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o)
|
||
if(this.zOne)e=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a)
|
||
else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s)
|
||
e=n.redSub(i).redISub(o).redMul(u),t=a.redMul(c.redSub(o)),r=a.redMul(u)}}else{var c=i.redAdd(o)
|
||
s=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=c.redSub(s).redSub(s)
|
||
e=this.curve._mulC(n.redISub(c)).redMul(u),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(u)}return this.curve.point(e,t,r)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=o.redMul(a),l=s.redMul(u),f=o.redMul(u),h=a.redMul(s)
|
||
return this.curve.point(c,l,h,f)},l.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),f=n.redMul(u).redMul(l)
|
||
return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},l.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},l.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},l.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this
|
||
var e=this.z.redInvm()
|
||
return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},l.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z)
|
||
if(0===this.x.cmp(t))return!0
|
||
for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1
|
||
if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},l.prototype.toP=l.prototype.normalize
|
||
l.prototype.mixedAdd=l.prototype.add},{"../../elliptic":90,"../curve":93,"bn.js":51,inherits:220}],93:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":91,"./edwards":92,"./mont":94,"./short":95}],94:[function(e,t,r){"use strict"
|
||
var n=e("../curve"),i=e("bn.js"),o=e("inherits"),a=n.base,s=e("../../elliptic").utils
|
||
function u(e){a.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(u,a),t.exports=u,u.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t)
|
||
return 0===n.redSqrt().redSqr().cmp(n)},o(c,a.BasePoint),u.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},u.prototype.point=function(e,t){return new c(this,e,t)},u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)))
|
||
return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),u=t.x.redMul(o.redISub(a).redSqr())
|
||
return this.curve.point(s,u)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1))
|
||
for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl())
|
||
return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":90,"../curve":93,"bn.js":51,inherits:220}],95:[function(e,t,r){"use strict"
|
||
var n=e("../curve"),i=e("../../elliptic"),o=e("bn.js"),a=e("inherits"),s=n.base,u=i.utils.assert
|
||
function c(e){s.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(r,16),this.z=new o(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(c,s),t.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r
|
||
if(e.beta)t=new o(e.beta,16).toRed(this.red)
|
||
else{var n=this._getEndoRoots(this.p)
|
||
t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new o(e.lambda,16)
|
||
else{var i=this._getEndoRoots(this.n)
|
||
0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],u(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)}}):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),r=new o(2).toRed(t).redInvm(),n=r.redNeg(),i=new o(3).toRed(t).redNeg().redSqrt().redMul(r)
|
||
return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,s,u,c,l,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new o(1),m=new o(0),y=new o(0),g=new o(1),b=0;0!==h.cmpn(0);){var v=d.div(h)
|
||
c=d.sub(v.mul(h)),l=y.sub(v.mul(p))
|
||
var _=g.sub(v.mul(m))
|
||
if(!n&&c.cmp(f)<0)t=u.neg(),r=p,n=c.neg(),i=l
|
||
else if(n&&2==++b)break
|
||
u=c,d=h,h=c,y=p,p=l,g=m,m=_}a=c.neg(),s=l
|
||
var w=n.sqr().add(i.sqr())
|
||
return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b)
|
||
return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},c.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red))
|
||
var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt()
|
||
if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point")
|
||
var i=n.fromRed().isOdd()
|
||
return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0
|
||
var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b)
|
||
return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta()
|
||
a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),n[2*o]=s,n[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),l=0;l<2*o;l++)n[l]=null,i[l]=null
|
||
return c},a(l,s.BasePoint),c.prototype.point=function(e,t,r){return new l(this,e,t,r)},c.prototype.pointFromJSON=function(e,t){return l.fromJSON(this,e,t)},l.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed
|
||
if(e&&e.beta)return e.beta
|
||
var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y)
|
||
if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)}
|
||
e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},l.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},l.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t))
|
||
var n=e.point(t[0],t[1],r)
|
||
if(!t[2])return n
|
||
function i(t){return e.point(t[0],t[1],r)}var o=t[2]
|
||
return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(e){if(this.inf)return e
|
||
if(e.inf)return this
|
||
if(this.eq(e))return this.dbl()
|
||
if(this.neg().eq(e))return this.curve.point(null,null)
|
||
if(0===this.x.cmp(e.x))return this.curve.point(null,null)
|
||
var t=this.y.redSub(e.y)
|
||
0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()))
|
||
var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y)
|
||
return this.curve.point(r,n)},l.prototype.dbl=function(){if(this.inf)return this
|
||
var e=this.y.redAdd(this.y)
|
||
if(0===e.cmpn(0))return this.curve.point(null,null)
|
||
var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y)
|
||
return this.curve.point(o,a)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(e){return e=new o(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r]
|
||
return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},l.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r]
|
||
return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},l.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},l.prototype.neg=function(e){if(this.inf)return this
|
||
var t=this.curve.point(this.x,this.y.redNeg())
|
||
if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()}
|
||
t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(f,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null)
|
||
var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e)
|
||
return this.curve.point(r,n)}
|
||
f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e
|
||
if(e.isInfinity())return this
|
||
var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a)
|
||
if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl()
|
||
var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),h=u.redSqr().redIAdd(l).redISub(f).redISub(f),d=u.redMul(f.redISub(h)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s)
|
||
return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ()
|
||
if(e.isInfinity())return this
|
||
var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o)
|
||
if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl()
|
||
var u=a.redSqr(),c=u.redMul(a),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),h=s.redMul(l.redISub(f)).redISub(i.redMul(c)),d=this.z.redMul(a)
|
||
return this.curve.jpoint(f,h,d)},f.prototype.dblp=function(e){if(0===e)return this
|
||
if(this.isInfinity())return this
|
||
if(!e)return this.dbl()
|
||
if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl()
|
||
return t}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a)
|
||
for(r=0;r<e;r++){var l=o.redSqr(),f=c.redSqr(),h=f.redSqr(),d=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=o.redMul(f),m=d.redSqr().redISub(p.redAdd(p)),y=p.redISub(m),g=d.redMul(y)
|
||
g=g.redIAdd(g).redISub(h)
|
||
var b=c.redMul(s)
|
||
r+1<e&&(u=u.redMul(h)),o=m,s=b,c=g}return this.curve.jpoint(o,c.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,r
|
||
if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o)
|
||
a=a.redIAdd(a)
|
||
var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(a).redISub(a),c=o.redIAdd(o)
|
||
c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),h=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(l).redISub(h)
|
||
d=d.redIAdd(d)
|
||
var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),y=h.redIAdd(h)
|
||
y=(y=y.redIAdd(y)).redIAdd(y),e=m.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},f.prototype._threeDbl=function(){var e,t,r
|
||
if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o)
|
||
a=a.redIAdd(a)
|
||
var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(a).redISub(a)
|
||
e=u
|
||
var c=o.redIAdd(o)
|
||
c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),h=this.x.redMul(f),d=this.x.redSub(l).redMul(this.x.redAdd(l))
|
||
d=d.redAdd(d).redIAdd(d)
|
||
var p=h.redIAdd(h),m=(p=p.redIAdd(p)).redAdd(p)
|
||
e=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l)
|
||
var y=f.redSqr()
|
||
y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=d.redMul(p.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,r)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(a),l=s.redSqr().redISub(c.redAdd(c)),f=c.redISub(l),h=a.redSqr()
|
||
h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h)
|
||
var d=s.redMul(f).redISub(h),p=r.redAdd(r).redMul(n)
|
||
return this.curve.jpoint(l,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this)
|
||
var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),u=n.redIAdd(n)
|
||
u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u)
|
||
var c=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u),l=t.redMul(c)
|
||
l=(l=l.redIAdd(l)).redIAdd(l)
|
||
var f=this.x.redMul(s).redISub(l)
|
||
f=(f=f.redIAdd(f)).redIAdd(f)
|
||
var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(a.redMul(s)))
|
||
h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h)
|
||
var d=this.z.redAdd(a).redSqr().redISub(r).redISub(s)
|
||
return this.curve.jpoint(f,h,d)},f.prototype.mul=function(e,t){return e=new o(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ())
|
||
if(this===e)return!0
|
||
var t=this.z.redSqr(),r=e.z.redSqr()
|
||
if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1
|
||
var n=t.redMul(this.z),i=r.redMul(e.z)
|
||
return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t)
|
||
if(0===this.x.cmp(r))return!0
|
||
for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1
|
||
if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":90,"../curve":93,"bn.js":51,inherits:220}],96:[function(e,t,r){"use strict"
|
||
var n,i=r,o=e("hash.js"),a=e("../elliptic"),s=a.utils.assert
|
||
function u(e){"short"===e.type?this.curve=new a.curve.short(e):"edwards"===e.type?this.curve=new a.curve.edwards(e):this.curve=new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t)
|
||
return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]})
|
||
try{n=e("./precomputed/secp256k1")}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"../elliptic":90,"./precomputed/secp256k1":104,"hash.js":208}],97:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("bn.js"),o=e("../../elliptic"),a=o.utils.assert,s=e("./key"),u=e("./signature")
|
||
function c(e){if(!(this instanceof c))return new c(e)
|
||
"string"==typeof e&&(a(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=c,c.prototype.keyPair=function(e){return new s(this,e)},c.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},c.prototype.genKeyPair=function(e){e||(e={})
|
||
for(var t=new o.hmacDRBG({hash:this.hash,pers:e.pers,entropy:e.entropy||o.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var a=new i(t.generate(r))
|
||
if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},c.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength()
|
||
return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},c.prototype.sign=function(e,t,r,a){"object"===(void 0===r?"undefined":n(r))&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16))
|
||
for(var s=this.n.byteLength(),c=t.getPrivate().toArray("be",s),l=e.toArray("be",s),f=new o.hmacDRBG({hash:this.hash,entropy:c,nonce:l,pers:a.pers,persEnc:a.persEnc}),h=this.n.sub(new i(1)),d=0;;d++){var p=a.k?a.k(d):new i(f.generate(this.n.byteLength()))
|
||
if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(h)>=0)){var m=this.g.mul(p)
|
||
if(!m.isInfinity()){var y=m.getX(),g=y.umod(this.n)
|
||
if(0!==g.cmpn(0)){var b=p.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e))
|
||
if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(m.getY().isOdd()?1:0)|(0!==y.cmp(g)?2:0)
|
||
return a.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:g,s:b,recoveryParam:v})}}}}}},c.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n)
|
||
var o=(t=new u(t,"hex")).r,a=t.s
|
||
if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1
|
||
if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1
|
||
var s,c=a.invm(this.n),l=c.mul(e).umod(this.n),f=c.mul(o).umod(this.n)
|
||
return this.curve._maxwellTrick?!(s=this.g.jmulAdd(l,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(l,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(e,t,r,n){a((3&r)===r,"The recovery param is more than two bits"),t=new u(t,n)
|
||
var o=this.n,s=new i(e),c=t.r,l=t.s,f=1&r,h=r>>1
|
||
if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate")
|
||
c=h?this.curve.pointFromX(c.add(this.curve.n),f):this.curve.pointFromX(c,f)
|
||
var d=t.r.invm(o),p=o.sub(s).mul(d).umod(o),m=l.mul(d).umod(o)
|
||
return this.g.mulAdd(p,c,m)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam
|
||
for(var i=0;i<4;i++){var o
|
||
try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":90,"./key":98,"./signature":99,"bn.js":51}],98:[function(e,t,r){"use strict"
|
||
var n=e("bn.js"),i=e("../../elliptic").utils.assert
|
||
function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic()
|
||
return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y))
|
||
this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../../elliptic":90,"bn.js":51}],99:[function(e,t,r){"use strict"
|
||
var n=e("bn.js"),i=e("../../elliptic").utils,o=i.assert
|
||
function a(e,t){if(e instanceof a)return e
|
||
this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(e,t){var r=e[t.place++]
|
||
if(!(128&r))return r
|
||
for(var n=15&r,i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a]
|
||
return t.place=a,i}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++
|
||
return 0===t?e:e.slice(t)}function c(e,t){if(t<128)e.push(t)
|
||
else{var r=1+(Math.log(t)/Math.LN2>>>3)
|
||
for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255)
|
||
e.push(t)}}t.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t)
|
||
var r=new function(){this.place=0}
|
||
if(48!==e[r.place++])return!1
|
||
if(s(e,r)+r.place!==e.length)return!1
|
||
if(2!==e[r.place++])return!1
|
||
var o=s(e,r),a=e.slice(r.place,o+r.place)
|
||
if(r.place+=o,2!==e[r.place++])return!1
|
||
var u=s(e,r)
|
||
if(e.length!==u+r.place)return!1
|
||
var c=e.slice(r.place,u+r.place)
|
||
return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(a),this.s=new n(c),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray()
|
||
for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1)
|
||
var n=[2]
|
||
c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length)
|
||
var o=n.concat(r),a=[48]
|
||
return c(a,o.length),a=a.concat(o),i.encode(a,e)}},{"../../elliptic":90,"bn.js":51}],100:[function(e,t,r){"use strict"
|
||
var n=e("hash.js"),i=e("../../elliptic"),o=i.utils,a=o.assert,s=o.parseBytes,u=e("./key"),c=e("./signature")
|
||
function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e)
|
||
e=i.curves[e].curve
|
||
this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=l,l.prototype.sign=function(e,t){e=s(e)
|
||
var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(a).umod(this.curve.n)
|
||
return this.makeSignature({R:i,S:u,Rencoded:o})},l.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t)
|
||
var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S())
|
||
return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t])
|
||
return o.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength)
|
||
return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},l.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r)
|
||
return this.curve.pointFromY(i,n)},l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(e){return o.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../../elliptic":90,"./key":101,"./signature":102,"hash.js":208}],101:[function(e,t,r){"use strict"
|
||
var n=e("../../elliptic").utils,i=n.assert,o=n.parseBytes,a=n.cachedProperty
|
||
function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(s,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength)
|
||
return n[0]&=248,n[r]&=127,n[r]|=64,n}),a(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},t.exports=s},{"../../elliptic":90}],102:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("bn.js"),o=e("../../elliptic").utils,a=o.assert,s=o.cachedProperty,u=o.parseBytes
|
||
function c(e,t){this.eddsa=e,"object"!==(void 0===t?"undefined":n(t))&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(c,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),s(c,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),s(c,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),s(c,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},t.exports=c},{"../../elliptic":90,"bn.js":51}],103:[function(e,t,r){"use strict"
|
||
var n=e("hash.js"),i=e("../elliptic").utils,o=i.assert
|
||
function a(e){if(!(this instanceof a))return new a(e)
|
||
this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null
|
||
var t=i.toArray(e.entropy,e.entropyEnc),r=i.toArray(e.nonce,e.nonceEnc),n=i.toArray(e.pers,e.persEnc)
|
||
o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}t.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r)
|
||
this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8)
|
||
for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1
|
||
this._update(n),this.reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0])
|
||
e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toBuffer(e,t),r=i.toBuffer(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this.reseed=1},a.prototype.generate=function(e,t,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required")
|
||
"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n),this._update(r))
|
||
for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V)
|
||
var a=o.slice(0,e)
|
||
return this._update(r),this.reseed++,i.encode(a,t)}},{"../elliptic":90,"hash.js":208}],104:[function(e,t,r){"use strict"
|
||
t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],105:[function(e,t,r){"use strict"
|
||
var n=r,i=e("bn.js")
|
||
function o(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r<e.length;r++)t+=o(e[r].toString(16))
|
||
return t}n.assert=function(e,t){if(!e)throw new Error(t||"Assertion failed")},n.toArray=function(e,t){if(Array.isArray(e))return e.slice()
|
||
if(!e)return[]
|
||
var r=[]
|
||
if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n]
|
||
return r}if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i
|
||
o?r.push(o,a):r.push(a)}return r},n.zero2=o,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e},n.getNAF=function(e,t){for(var r=[],n=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o
|
||
if(i.isOdd()){var a=i.andln(n-1)
|
||
o=a>(n>>1)-1?(n>>1)-a:a,i.isubn(o)}else o=0
|
||
r.push(o)
|
||
for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u<s;u++)r.push(0)
|
||
i.iushrn(s)}return r},n.getJSF=function(e,t){var r=[[],[]]
|
||
e=e.clone(),t=t.clone()
|
||
for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,a,s,u=e.andln(3)+n&3,c=t.andln(3)+i&3
|
||
3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==c?u:-u,r[0].push(o),a=0==(1&c)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==u?c:-c,r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t
|
||
e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":51}],106:[function(e,t,r){t.exports={_args:[["elliptic@6.3.3","/home/basti/src/kosmos/kredits/kredits-web"]],_development:!0,_from:"elliptic@6.3.3",_id:"elliptic@6.3.3",_inBundle:!1,_integrity:"sha1-VILZZG1UvLif19mU/J4ulWiHbj8=",_location:"/elliptic",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"elliptic@6.3.3",name:"elliptic",escapedName:"elliptic",rawSpec:"6.3.3",saveSpec:null,fetchSpec:"6.3.3"},_requiredBy:["/ethers","/secp256k1"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz",_spec:"6.3.3",_where:"/home/basti/src/kosmos/kredits/kredits-web",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.3.3"}},{}],107:[function(e,t,r){(function(r){"use strict"
|
||
var n="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}
|
||
function i(e,t){if(e===t)return 0
|
||
for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i]
|
||
break}return r<n?-1:n<r?1:0}function o(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=e("util/"),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name
|
||
function l(e){return Object.prototype.toString.call(e)}function f(e){return!o(e)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=t.exports=b,d=/\s*function\s+([^\(\s]*)\s*/
|
||
function p(e){if(a.isFunction(e)){if(c)return e.name
|
||
var t=e.toString().match(d)
|
||
return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function y(e){if(c||!a.isFunction(e))return a.inspect(e)
|
||
var t=p(e)
|
||
return"[Function"+(t?": "+t:"")+"]"}function g(e,t,r,n,i){throw new h.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function b(e,t){e||g(e,!0,t,"==",h.ok)}function v(e,t,r,s){if(e===t)return!0
|
||
if(o(e)&&o(t))return 0===i(e,t)
|
||
if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime()
|
||
if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase
|
||
if(null!==e&&"object"===(void 0===e?"undefined":n(e))||null!==t&&"object"===(void 0===t?"undefined":n(t))){if(f(e)&&f(t)&&l(e)===l(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer))
|
||
if(o(e)!==o(t))return!1
|
||
var c=(s=s||{actual:[],expected:[]}).actual.indexOf(e)
|
||
return-1!==c&&c===s.expected.indexOf(t)||(s.actual.push(e),s.expected.push(t),function(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1
|
||
if(a.isPrimitive(e)||a.isPrimitive(t))return e===t
|
||
if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1
|
||
var i=_(e),o=_(t)
|
||
if(i&&!o||!i&&o)return!1
|
||
if(i)return e=u.call(e),t=u.call(t),v(e,t,r)
|
||
var s,c,l=E(e),f=E(t)
|
||
if(l.length!==f.length)return!1
|
||
for(l.sort(),f.sort(),c=l.length-1;c>=0;c--)if(l[c]!==f[c])return!1
|
||
for(c=l.length-1;c>=0;c--)if(s=l[c],!v(e[s],t[s],r,n))return!1
|
||
return!0}(e,t,r,s))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1
|
||
if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e)
|
||
try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function S(e,t,r,n){var i
|
||
if("function"!=typeof t)throw new TypeError('"block" argument must be a function')
|
||
"string"==typeof r&&(n=r,r=null),i=function(e){var t
|
||
try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&g(i,r,"Missing expected exception"+n)
|
||
var o="string"==typeof n,s=!e&&a.isError(i),u=!e&&i&&!r
|
||
if((s&&o&&w(i,r)||u)&&g(i,r,"Got unwanted exception"+n),e&&i&&r&&!w(i,r)||!e&&i)throw i}h.AssertionError=function(e){var t
|
||
this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=m(y((t=this).actual),128)+" "+t.operator+" "+m(y(t.expected),128),this.generatedMessage=!0)
|
||
var r=e.stackStartFunction||g
|
||
if(Error.captureStackTrace)Error.captureStackTrace(this,r)
|
||
else{var n=new Error
|
||
if(n.stack){var i=n.stack,o=p(r),a=i.indexOf("\n"+o)
|
||
if(a>=0){var s=i.indexOf("\n",a+1)
|
||
i=i.substring(s+1)}this.stack=i}}},a.inherits(h.AssertionError,Error),h.fail=g,h.ok=b,h.equal=function(e,t,r){e!=t&&g(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){v(e,t,!1)||g(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){v(e,t,!0)||g(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){v(e,t,!1)&&g(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){v(t,r,!0)&&g(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){S(!0,e,t,r)},h.doesNotThrow=function(e,t,r){S(!1,e,t,r)},h.ifError=function(e){if(e)throw e}
|
||
var E=Object.keys||function(e){var t=[]
|
||
for(var r in e)s.call(e,r)&&t.push(r)
|
||
return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":156}],108:[function(e,t,r){"use strict"
|
||
r.byteLength=function(e){return 3*e.length/4-c(e)},r.toByteArray=function(e){var t,r,n,a,s,u=e.length
|
||
a=c(e),s=new o(3*u/4-a),r=a>0?u-4:u
|
||
var l=0
|
||
for(t=0;t<r;t+=4)n=i[e.charCodeAt(t)]<<18|i[e.charCodeAt(t+1)]<<12|i[e.charCodeAt(t+2)]<<6|i[e.charCodeAt(t+3)],s[l++]=n>>16&255,s[l++]=n>>8&255,s[l++]=255&n
|
||
2===a?(n=i[e.charCodeAt(t)]<<2|i[e.charCodeAt(t+1)]>>4,s[l++]=255&n):1===a&&(n=i[e.charCodeAt(t)]<<10|i[e.charCodeAt(t+1)]<<4|i[e.charCodeAt(t+2)]>>2,s[l++]=n>>8&255,s[l++]=255&n)
|
||
return s},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o="",a=[],s=0,u=r-i;s<u;s+=16383)a.push(l(e,s,s+16383>u?u:s+16383))
|
||
1===i?(t=e[r-1],o+=n[t>>2],o+=n[t<<4&63],o+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],o+=n[t>>10],o+=n[t>>4&63],o+=n[t<<2&63],o+="=")
|
||
return a.push(o),a.join("")}
|
||
for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s
|
||
function c(e){var t=e.length
|
||
if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4")
|
||
return"="===e[t-2]?2:"="===e[t-1]?1:0}function l(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o])
|
||
return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],109:[function(e,t,r){"use strict"},{}],110:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("base64-js"),i=e("ieee754"),o=e("isarray")
|
||
function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length")
|
||
return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r)
|
||
if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string")
|
||
return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number')
|
||
return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds")
|
||
if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds")
|
||
t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n)
|
||
u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t)
|
||
return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8")
|
||
if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding')
|
||
var n=0|p(t,r),i=(e=s(e,n)).write(t,r)
|
||
i!==n&&(e=e.slice(0,i))
|
||
return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|d(t.length)
|
||
return 0===(e=s(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):h(e,t)
|
||
if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var n
|
||
throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number')
|
||
if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0
|
||
return e}function h(e,t){var r=t.length<0?0:0|d(t.length)
|
||
e=s(e,r)
|
||
for(var n=0;n<r;n+=1)e[n]=255&t[n]
|
||
return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes")
|
||
return 0|e}function p(e,t){if(u.isBuffer(e))return e.length
|
||
if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength
|
||
"string"!=typeof e&&(e=""+e)
|
||
var r=e.length
|
||
if(0===r)return 0
|
||
for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r
|
||
case"utf8":case"utf-8":case void 0:return F(e).length
|
||
case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r
|
||
case"hex":return r>>>1
|
||
case"base64":return z(e).length
|
||
default:if(n)return F(e).length
|
||
t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=e[t]
|
||
e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1
|
||
if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1
|
||
r=e.length-1}else if(r<0){if(!i)return-1
|
||
r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i)
|
||
if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i)
|
||
throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,a=1,s=e.length,u=t.length
|
||
if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1
|
||
a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1
|
||
for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){f=!1
|
||
break}if(f)return o}return-1}function b(e,t,r,n){r=Number(r)||0
|
||
var i=e.length-r
|
||
n?(n=Number(n))>i&&(n=i):n=i
|
||
var o=t.length
|
||
if(o%2!=0)throw new TypeError("Invalid hex string")
|
||
n>o/2&&(n=o/2)
|
||
for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16)
|
||
if(isNaN(s))return a
|
||
e[r+a]=s}return a}function v(e,t,r,n){return q(F(t,e.length-r),e,r,n)}function _(e,t,r,n){return q(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r))
|
||
return t}(t),e,r,n)}function w(e,t,r,n){return _(e,t,r,n)}function S(e,t,r,n){return q(z(t),e,r,n)}function E(e,t,r,n){return q(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n)
|
||
return o}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r)
|
||
for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1
|
||
if(i+f<=r)switch(f){case 1:c<128&&(l=c)
|
||
break
|
||
case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u)
|
||
break
|
||
case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u)
|
||
break
|
||
case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length
|
||
if(t<=C)return String.fromCharCode.apply(String,e)
|
||
var r="",n=0
|
||
for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=C))
|
||
return r}(n)}r.Buffer=u,r.SlowBuffer=function(e){+e!=e&&(e=0)
|
||
return u.alloc(+e)},r.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1)
|
||
return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers")
|
||
if(e===t)return 0
|
||
for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i]
|
||
break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0
|
||
default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers')
|
||
if(0===e.length)return u.alloc(0)
|
||
var r
|
||
if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length
|
||
var n=u.allocUnsafe(t),i=0
|
||
for(r=0;r<e.length;++r){var a=e[r]
|
||
if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers')
|
||
a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length
|
||
if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits")
|
||
for(var t=0;t<e;t+=2)m(this,t,t+1)
|
||
return this},u.prototype.swap32=function(){var e=this.length
|
||
if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits")
|
||
for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2)
|
||
return this},u.prototype.swap64=function(){var e=this.length
|
||
if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits")
|
||
for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4)
|
||
return this},u.prototype.toString=function(){var e=0|this.length
|
||
return 0===e?"":0===arguments.length?x(this,0,e):function(e,t,r){var n=!1
|
||
if((void 0===t||t<0)&&(t=0),t>this.length)return""
|
||
if((void 0===r||r>this.length)&&(r=this.length),r<=0)return""
|
||
if((r>>>=0)<=(t>>>=0))return""
|
||
for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r)
|
||
case"utf8":case"utf-8":return x(this,t,r)
|
||
case"ascii":return A(this,t,r)
|
||
case"latin1":case"binary":return T(this,t,r)
|
||
case"base64":return k(this,t,r)
|
||
case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r)
|
||
default:if(n)throw new TypeError("Unknown encoding: "+e)
|
||
e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer")
|
||
return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES
|
||
return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer")
|
||
if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index")
|
||
if(n>=i&&t>=r)return 0
|
||
if(n>=i)return-1
|
||
if(t>=r)return 1
|
||
if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0
|
||
for(var o=i-n,a=r-t,s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<s;++f)if(c[f]!==l[f]){o=c[f],a=l[f]
|
||
break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0
|
||
else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0
|
||
else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported")
|
||
t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t
|
||
if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds")
|
||
n||(n="utf8")
|
||
for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r)
|
||
case"utf8":case"utf-8":return v(this,e,t,r)
|
||
case"ascii":return _(this,e,t,r)
|
||
case"latin1":case"binary":return w(this,e,t,r)
|
||
case"base64":return S(this,e,t,r)
|
||
case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r)
|
||
default:if(o)throw new TypeError("Unknown encoding: "+n)
|
||
n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}}
|
||
var C=4096
|
||
function A(e,t,r){var n=""
|
||
r=Math.min(e.length,r)
|
||
for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i])
|
||
return n}function T(e,t,r){var n=""
|
||
r=Math.min(e.length,r)
|
||
for(var i=t;i<r;++i)n+=String.fromCharCode(e[i])
|
||
return n}function I(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n)
|
||
for(var i="",o=t;o<r;++o)i+=U(e[o])
|
||
return i}function P(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1])
|
||
return i}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint")
|
||
if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance')
|
||
if(t>i||t<o)throw new RangeError('"value" argument is out of bounds')
|
||
if(r+n>e.length)throw new RangeError("Index out of range")}function O(e,t,r,n){t<0&&(t=65535+t+1)
|
||
for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function B(e,t,r,n){t<0&&(t=4294967295+t+1)
|
||
for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range")
|
||
if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length
|
||
if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype
|
||
else{var i=t-e
|
||
r=new u(i,void 0)
|
||
for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length)
|
||
for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i
|
||
return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length)
|
||
for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i
|
||
return n},u.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length)
|
||
for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i
|
||
return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||M(e,t,this.length)
|
||
for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i
|
||
return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||M(e,2,this.length)
|
||
var r=this[e]|this[e+1]<<8
|
||
return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||M(e,2,this.length)
|
||
var r=this[e+1]|this[e]<<8
|
||
return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0)
|
||
var i=1,o=0
|
||
for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255
|
||
return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||R(this,e,t,r,Math.pow(2,8*r)-1,0)
|
||
var i=r-1,o=1
|
||
for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255
|
||
return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1)
|
||
R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0
|
||
for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255
|
||
return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1)
|
||
R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0
|
||
for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255
|
||
return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2}
|
||
u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0
|
||
if(0===e.length||0===this.length)return 0
|
||
if(t<0)throw new RangeError("targetStart out of bounds")
|
||
if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds")
|
||
if(n<0)throw new RangeError("sourceEnd out of bounds")
|
||
n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r)
|
||
var i,o=n-r
|
||
if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r]
|
||
else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r]
|
||
else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t)
|
||
return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0)
|
||
i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string")
|
||
if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255)
|
||
if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index")
|
||
if(r<=t)return this
|
||
var o
|
||
if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e
|
||
else{var a=u.isBuffer(e)?e:F(new u(e,n).toString()),s=a.length
|
||
for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this}
|
||
var D=/[^+\/0-9A-Za-z-_]/g
|
||
function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var r
|
||
t=t||1/0
|
||
for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189)
|
||
continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189)
|
||
continue}i=r
|
||
continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r
|
||
continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189)
|
||
if(i=null,r<128){if((t-=1)<0)break
|
||
o.push(r)}else if(r<2048){if((t-=2)<0)break
|
||
o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break
|
||
o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point")
|
||
if((t-=4)<0)break
|
||
o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(D,"")).length<2)return""
|
||
for(;e.length%4!=0;)e+="="
|
||
return e}(e))}function q(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i]
|
||
return i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":108,ieee754:116,isarray:120}],111:[function(e,t,r){arguments[4][77][0].apply(r,arguments)},{dup:77}],112:[function(e,t,r){t.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],113:[function(e,t,r){(function(e){"use strict"
|
||
var t="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}
|
||
function n(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"===(void 0===e?"undefined":t(e))},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===n(e)},r.isObject=function(e){return"object"===(void 0===e?"undefined":t(e))&&null!==e},r.isDate=function(e){return"[object Date]"===n(e)},r.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(void 0===e?"undefined":t(e))||void 0===e},r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":119}],114:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function a(e){return"object"===(void 0===e?"undefined":n(e))&&null!==e}function s(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number")
|
||
return this._maxListeners=e,this},i.prototype.emit=function(e){var t,r,n,i,u,c
|
||
if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t
|
||
var l=new Error('Uncaught, unspecified "error" event. ('+t+")")
|
||
throw l.context=t,l}if(s(r=this._events[e]))return!1
|
||
if(o(r))switch(arguments.length){case 1:r.call(this)
|
||
break
|
||
case 2:r.call(this,arguments[1])
|
||
break
|
||
case 3:r.call(this,arguments[1],arguments[2])
|
||
break
|
||
default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(a(r))for(i=Array.prototype.slice.call(arguments,1),n=(c=r.slice()).length,u=0;u<n;u++)c[u].apply(this,i)
|
||
return!0},i.prototype.addListener=function(e,t){var r
|
||
if(!o(t))throw TypeError("listener must be a function")
|
||
return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(r=s(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){if(!o(t))throw TypeError("listener must be a function")
|
||
var r=!1
|
||
function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},i.prototype.removeListener=function(e,t){var r,n,i,s
|
||
if(!o(t))throw TypeError("listener must be a function")
|
||
if(!this._events||!this._events[e])return this
|
||
if(i=(r=this._events[e]).length,n=-1,r===t||o(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t)
|
||
else if(a(r)){for(s=i;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s
|
||
break}if(n<0)return this
|
||
1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,r
|
||
if(!this._events)return this
|
||
if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this
|
||
if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t)
|
||
return this.removeAllListeners("removeListener"),this._events={},this}if(o(r=this._events[e]))this.removeListener(e,r)
|
||
else if(r)for(;r.length;)this.removeListener(e,r[r.length-1])
|
||
return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e]
|
||
if(o(t))return 1
|
||
if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],115:[function(e,t,r){"use strict"
|
||
var n=e("http"),i=t.exports
|
||
for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o])
|
||
i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",n.request.call(this,e,t)}},{http:145}],116:[function(e,t,r){"use strict"
|
||
r.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f]
|
||
for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===o)o=1-c
|
||
else{if(o===u)return a?NaN:1/0*(d?-1:1)
|
||
a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0
|
||
for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*m}},{}],117:[function(e,t,r){"use strict"
|
||
var n=[].indexOf
|
||
t.exports=function(e,t){if(n)return e.indexOf(t)
|
||
for(var r=0;r<e.length;++r)if(e[r]===t)return r
|
||
return-1}},{}],118:[function(e,t,r){"use strict"
|
||
"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t
|
||
var r=function(){}
|
||
r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],119:[function(e,t,r){"use strict"
|
||
function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],120:[function(e,t,r){"use strict"
|
||
var n={}.toString
|
||
t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],121:[function(e,t,r){"use strict"
|
||
r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n"},{}],122:[function(e,t,r){(function(e){"use strict"
|
||
function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n]
|
||
"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..")
|
||
return e}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return n.exec(e).slice(1)}
|
||
function o(e,t){if(e.filter)return e.filter(t)
|
||
for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n])
|
||
return r}r.resolve=function(){for(var r="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var a=i>=0?arguments[i]:e.cwd()
|
||
if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings")
|
||
a&&(r=a+"/"+r,n="/"===a.charAt(0))}return r=t(o(r.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+r||"."},r.normalize=function(e){var n=r.isAbsolute(e),i="/"===a(e,-1)
|
||
return(e=t(o(e.split("/"),function(e){return!!e}),!n).join("/"))||n||(e="."),e&&i&&(e+="/"),(n?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0)
|
||
return r.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings")
|
||
return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1)
|
||
for(var i=n(e.split("/")),o=n(t.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u
|
||
break}var c=[]
|
||
for(u=s;u<i.length;u++)c.push("..")
|
||
return(c=c.concat(o.slice(s))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=i(e),r=t[0],n=t[1]
|
||
return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=i(e)[2]
|
||
return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return i(e)[3]}
|
||
var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:124}],123:[function(e,t,r){(function(e){"use strict"
|
||
!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function')
|
||
var o,a,s=arguments.length
|
||
switch(s){case 0:case 1:return e.nextTick(t)
|
||
case 2:return e.nextTick(function(){t.call(null,r)})
|
||
case 3:return e.nextTick(function(){t.call(null,r,n)})
|
||
case 4:return e.nextTick(function(){t.call(null,r,n,i)})
|
||
default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a]
|
||
return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,e("_process"))},{_process:124}],124:[function(e,t,r){"use strict"
|
||
var n,i,o=t.exports={}
|
||
function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0)
|
||
if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0)
|
||
try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}(function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}})()
|
||
var c,l=[],f=!1,h=-1
|
||
function d(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&p())}function p(){if(!f){var e=u(d)
|
||
f=!0
|
||
for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run()
|
||
h=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e)
|
||
if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e)
|
||
try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function y(){}o.nextTick=function(e){var t=new Array(arguments.length-1)
|
||
if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r]
|
||
l.push(new m(e,t)),1!==l.length||f||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],125:[function(e,t,r){(function(e){"use strict"
|
||
var n="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};(function(i){var o="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,a="object"==(void 0===t?"undefined":n(t))&&t&&!t.nodeType&&t,s="object"==(void 0===e?"undefined":n(e))&&e
|
||
s.global!==s&&s.window!==s&&s.self!==s||(i=s)
|
||
var u,c,l=2147483647,f=36,h=1,d=26,p=38,m=700,y=72,g=128,b="-",v=/^xn--/,_=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},E=f-h,k=Math.floor,x=String.fromCharCode
|
||
function C(e){throw new RangeError(S[e])}function A(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r])
|
||
return n}function T(e,t){var r=e.split("@"),n=""
|
||
return r.length>1&&(n=r[0]+"@",e=r[1]),n+A((e=e.replace(w,".")).split("."),t).join(".")}function I(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t)
|
||
return n}function P(e){return A(e,function(e){var t=""
|
||
return e>65535&&(t+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=x(e)}).join("")}function M(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function R(e,t,r){var n=0
|
||
for(e=r?k(e/m):e>>1,e+=k(e/t);e>E*d>>1;n+=f)e=k(e/E)
|
||
return k(n+(E+1)*e/(e+p))}function O(e){var t,r,n,i,o,a,s,u,c,p,m,v=[],_=e.length,w=0,S=g,E=y
|
||
for((r=e.lastIndexOf(b))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&C("not-basic"),v.push(e.charCodeAt(n))
|
||
for(i=r>0?r+1:0;i<_;){for(o=w,a=1,s=f;i>=_&&C("invalid-input"),((u=(m=e.charCodeAt(i++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:f)>=f||u>k((l-w)/a))&&C("overflow"),w+=u*a,!(u<(c=s<=E?h:s>=E+d?d:s-E));s+=f)a>k(l/(p=f-c))&&C("overflow"),a*=p
|
||
E=R(w-o,t=v.length+1,0==o),k(w/t)>l-S&&C("overflow"),S+=k(w/t),w%=t,v.splice(w++,0,S)}return P(v)}function B(e){var t,r,n,i,o,a,s,u,c,p,m,v,_,w,S,E=[]
|
||
for(v=(e=I(e)).length,t=g,r=0,o=y,a=0;a<v;++a)(m=e[a])<128&&E.push(x(m))
|
||
for(n=i=E.length,i&&E.push(b);n<v;){for(s=l,a=0;a<v;++a)(m=e[a])>=t&&m<s&&(s=m)
|
||
for(s-t>k((l-r)/(_=n+1))&&C("overflow"),r+=(s-t)*_,t=s,a=0;a<v;++a)if((m=e[a])<t&&++r>l&&C("overflow"),m==t){for(u=r,c=f;!(u<(p=c<=o?h:c>=o+d?d:c-o));c+=f)S=u-p,w=f-p,E.push(x(M(p+S%w,0))),u=k(S/w)
|
||
E.push(x(M(u,0))),o=R(r,_,n==i),r=0,++n}++r,++t}return E.join("")}if(u={version:"1.4.1",ucs2:{decode:I,encode:P},decode:O,encode:B,toASCII:function(e){return T(e,function(e){return _.test(e)?"xn--"+B(e):e})},toUnicode:function(e){return T(e,function(e){return v.test(e)?O(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==n(define.amd)&&define.amd)define("punycode",function(){return u})
|
||
else if(o&&a)if(t.exports==o)a.exports=u
|
||
else for(c in u)u.hasOwnProperty(c)&&(o[c]=u[c])
|
||
else i.punycode=u})(void 0)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],126:[function(e,t,r){"use strict"
|
||
function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,o){t=t||"&",r=r||"="
|
||
var a={}
|
||
if("string"!=typeof e||0===e.length)return a
|
||
var s=/\+/g
|
||
e=e.split(t)
|
||
var u=1e3
|
||
o&&"number"==typeof o.maxKeys&&(u=o.maxKeys)
|
||
var c=e.length
|
||
u>0&&c>u&&(c=u)
|
||
for(var l=0;l<c;++l){var f,h,d,p,m=e[l].replace(s,"%20"),y=m.indexOf(r)
|
||
y>=0?(f=m.substr(0,y),h=m.substr(y+1)):(f=m,h=""),d=decodeURIComponent(f),p=decodeURIComponent(h),n(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a}
|
||
var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],127:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e){switch(void 0===e?"undefined":n(e)){case"string":return e
|
||
case"boolean":return e?"true":"false"
|
||
case"number":return isFinite(e)?e:""
|
||
default:return""}}
|
||
t.exports=function(e,t,r,u){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(void 0===e?"undefined":n(e))?a(s(e),function(n){var s=encodeURIComponent(i(n))+r
|
||
return o(e[n])?a(e[n],function(e){return s+encodeURIComponent(i(e))}).join(t):s+encodeURIComponent(i(e[n]))}).join(t):u?encodeURIComponent(i(u))+r+encodeURIComponent(i(e)):""}
|
||
var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}
|
||
function a(e,t){if(e.map)return e.map(t)
|
||
for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n))
|
||
return r}var s=Object.keys||function(e){var t=[]
|
||
for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r)
|
||
return t}},{}],128:[function(e,t,r){"use strict"
|
||
r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":126,"./encode":127}],129:[function(e,t,r){arguments[4][39][0].apply(r,arguments)},{"./lib/_stream_duplex.js":130,dup:39}],130:[function(e,t,r){"use strict"
|
||
var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[]
|
||
for(var r in e)t.push(r)
|
||
return t}
|
||
t.exports=f
|
||
var o=e("core-util-is")
|
||
o.inherits=e("inherits")
|
||
var a=e("./_stream_readable"),s=e("./_stream_writable")
|
||
o.inherits(f,a)
|
||
for(var u=i(s.prototype),c=0;c<u.length;c++){var l=u[c]
|
||
f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e)
|
||
a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},{"./_stream_readable":132,"./_stream_writable":134,"core-util-is":113,inherits:118,"process-nextick-args":123}],131:[function(e,t,r){"use strict"
|
||
t.exports=o
|
||
var n=e("./_stream_transform"),i=e("core-util-is")
|
||
function o(e){if(!(this instanceof o))return new o(e)
|
||
n.call(this,e)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":133,"core-util-is":113,inherits:118}],132:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
t.exports=v
|
||
var o,a=e("isarray")
|
||
v.ReadableState=b
|
||
e("events").EventEmitter
|
||
var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,l=n.Uint8Array||function(){}
|
||
var f=e("core-util-is")
|
||
f.inherits=e("inherits")
|
||
var h=e("util"),d=void 0
|
||
d=h&&h.debuglog?h.debuglog("stream"):function(){}
|
||
var p,m=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy")
|
||
f.inherits(v,u)
|
||
var g=["error","close","destroy","pause","resume"]
|
||
function b(t,r){o=o||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof o
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode)
|
||
var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384
|
||
this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||e("./_stream_duplex"),!(this instanceof v))return new v(t)
|
||
this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(e,t,r,n,i){var o,a=e._readableState
|
||
null===t?(a.reading=!1,function(e,t){if(t.ended)return
|
||
if(t.decoder){var r=t.decoder.end()
|
||
r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,a)):(i||(o=function(e,t){var r
|
||
n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"))
|
||
var n
|
||
return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):C(e,a)):w(e,a,t,!1))):n||(a.reading=!1))
|
||
return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),C(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState
|
||
return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this}
|
||
var S=8388608
|
||
function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState
|
||
t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(x,e):x(e))}function x(e){d("emit readable"),e.emit("readable"),P(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length
|
||
t.readingMore=!1}function T(e){d("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState
|
||
for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n
|
||
e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data
|
||
e-=i.length
|
||
for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e
|
||
if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a))
|
||
break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1
|
||
n.data.copy(r),e-=n.data.length
|
||
for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e
|
||
if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a))
|
||
break}++i}return t.length-=i,r}(e,t)
|
||
return n}(e,t.buffer,t.decoder),r)
|
||
var r}function R(e){var t=e._readableState
|
||
if(t.length>0)throw new Error('"endReadable()" called on non-empty stream')
|
||
t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r
|
||
return-1}v.prototype.read=function(e){d("read",e),e=parseInt(e,10)
|
||
var t=this._readableState,r=e
|
||
if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):k(this),null
|
||
if(0===(e=E(e,t))&&t.ended)return 0===t.length&&R(this),null
|
||
var n,i=t.needReadable
|
||
return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var n=this,o=this._readableState
|
||
switch(o.pipesCount){case 0:o.pipes=e
|
||
break
|
||
case 1:o.pipes=[o.pipes,e]
|
||
break
|
||
default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t)
|
||
var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:v
|
||
function c(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",c)
|
||
var f=function(e){return function(){var t=e._readableState
|
||
d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(n)
|
||
e.on("drain",f)
|
||
var h=!1
|
||
var p=!1
|
||
function m(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(t){d("onerror",t),v(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),v()}function b(){d("onfinish"),e.removeListener("close",g),v()}function v(){d("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r)
|
||
e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",g),e.once("finish",b),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1}
|
||
if(0===t.pipesCount)return this
|
||
if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this)
|
||
if(!e){var n=t.pipes,i=t.pipesCount
|
||
t.pipes=null,t.pipesCount=0,t.flowing=!1
|
||
for(var o=0;o<i;o++)n[o].emit("unpipe",this,r)
|
||
return this}var a=B(t.pipes,e)
|
||
return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},v.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t)
|
||
if("data"===e)!1!==this._readableState.flowing&&this.resume()
|
||
else if("readable"===e){var n=this._readableState
|
||
n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):i.nextTick(T,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState
|
||
return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(I,e,t))}(this,e)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1
|
||
for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end()
|
||
e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i))
|
||
for(var o=0;o<g.length;o++)e.on(g[o],this.emit.bind(this,g[o]))
|
||
return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},v._fromList=M}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":130,"./internal/streams/BufferList":135,"./internal/streams/destroy":136,"./internal/streams/stream":137,_process:124,"core-util-is":113,events:114,inherits:118,isarray:120,"process-nextick-args":123,"safe-buffer":143,"string_decoder/":138,util:109}],133:[function(e,t,r){"use strict"
|
||
t.exports=o
|
||
var n=e("./_stream_duplex"),i=e("core-util-is")
|
||
function o(e){if(!(this instanceof o))return new o(e)
|
||
n.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState
|
||
r.transforming=!1
|
||
var n=r.writecb
|
||
if(!n)return this.emit("error",new Error("write callback called multiple times"))
|
||
r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e)
|
||
var i=this._readableState
|
||
i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this
|
||
"function"==typeof this._flush?this._flush(function(t,r){s(e,t,r)}):s(this,null,null)}function s(e,t,r){if(t)return e.emit("error",t)
|
||
if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0")
|
||
if(e._transformState.transforming)throw new Error("Calling transform done when still transforming")
|
||
return e.push(null)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState
|
||
if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState
|
||
null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this
|
||
n.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}},{"./_stream_duplex":130,"core-util-is":113,inherits:118}],134:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
function o(e){var t=this
|
||
this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry
|
||
e.entry=null
|
||
for(;n;){var i=n.callback
|
||
t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e})(t,e)}}t.exports=g
|
||
var a,s=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i.nextTick
|
||
g.WritableState=y
|
||
var u=e("core-util-is")
|
||
u.inherits=e("inherits")
|
||
var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,h=n.Uint8Array||function(){}
|
||
var d,p=e("./internal/streams/destroy")
|
||
function m(){}function y(t,r){a=a||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof a
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode)
|
||
var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384
|
||
this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1
|
||
var f=!1===t.decodeStrings
|
||
this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,o=r.writecb
|
||
if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)(function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))})(e,r,n,t,o)
|
||
else{var a=w(r)
|
||
a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?s(v,e,r,a,o):v(e,r,a,o)}})(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(t){if(a=a||e("./_stream_duplex"),!(d.call(g,this)||this instanceof a))return new g(t)
|
||
this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function b(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function v(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function _(e,t){t.bufferProcessing=!0
|
||
var r=t.bufferedRequest
|
||
if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree
|
||
a.entry=r
|
||
for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1
|
||
i.allBuffers=u,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback
|
||
if(b(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=w(t)
|
||
return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next
|
||
return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===g&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,f.isBuffer(n)||n instanceof h)
|
||
return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=m),o.ended?function(e,t){var r=new Error("write after end")
|
||
e.emit("error",r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1
|
||
return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r))
|
||
return t}(t,n,i)
|
||
n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length
|
||
t.length+=s
|
||
var u=t.length<t.highWaterMark
|
||
u||(t.needDrain=!0)
|
||
if(t.writing||t.corked){var c=t.lastBufferedRequest
|
||
t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,n,i,o)
|
||
return u}(this,o,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState
|
||
e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e)
|
||
return this._writableState.defaultEncoding=e,this},g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState
|
||
"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r))
|
||
t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=p.destroy,g.prototype._undestroy=p.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":130,"./internal/streams/destroy":136,"./internal/streams/stream":137,_process:124,"core-util-is":113,inherits:118,"process-nextick-args":123,"safe-buffer":143,"util-deprecate":153}],135:[function(e,t,r){arguments[4][43][0].apply(r,arguments)},{dup:43,"safe-buffer":143,util:109}],136:[function(e,t,r){arguments[4][44][0].apply(r,arguments)},{dup:44,"process-nextick-args":123}],137:[function(e,t,r){arguments[4][45][0].apply(r,arguments)},{dup:45,events:114}],138:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0
|
||
default:return!1}}
|
||
function o(e){var t
|
||
switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8"
|
||
for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8"
|
||
case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le"
|
||
case"latin1":case"binary":return"latin1"
|
||
case"base64":case"ascii":case"hex":return e
|
||
default:if(t)return
|
||
e=(""+e).toLowerCase(),t=!0}}(e)
|
||
if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e)
|
||
return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4
|
||
break
|
||
case"utf8":this.fillLast=s,t=4
|
||
break
|
||
case"base64":this.text=l,this.end=f,t=3
|
||
break
|
||
default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:-1}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�".repeat(r)
|
||
if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�".repeat(r+1)
|
||
if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�".repeat(r+2)}}(this,e,t)
|
||
return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t)
|
||
if(r){var n=r.charCodeAt(r.length-1)
|
||
if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):""
|
||
if(this.lastNeed){var r=this.lastTotal-this.lastNeed
|
||
return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3
|
||
return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):""
|
||
return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return""
|
||
var t,r
|
||
if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return""
|
||
r=this.lastNeed,this.lastNeed=0}else r=0
|
||
return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):""
|
||
return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1
|
||
if(n<r)return 0
|
||
var i=a(t[n])
|
||
if(i>=0)return i>0&&(e.lastNeed=i-1),i
|
||
if(--n<r)return 0
|
||
if((i=a(t[n]))>=0)return i>0&&(e.lastNeed=i-2),i
|
||
if(--n<r)return 0
|
||
if((i=a(t[n]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i
|
||
return 0}(this,e,t)
|
||
if(!this.lastNeed)return e.toString("utf8",t)
|
||
this.lastTotal=r
|
||
var n=e.length-(r-this.lastNeed)
|
||
return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)
|
||
e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":143}],139:[function(e,t,r){"use strict"
|
||
t.exports=e("./readable").PassThrough},{"./readable":140}],140:[function(e,t,r){"use strict";(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":130,"./lib/_stream_passthrough.js":131,"./lib/_stream_readable.js":132,"./lib/_stream_transform.js":133,"./lib/_stream_writable.js":134}],141:[function(e,t,r){"use strict"
|
||
t.exports=e("./readable").Transform},{"./readable":140}],142:[function(e,t,r){"use strict"
|
||
t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":134}],143:[function(e,t,r){"use strict"
|
||
var n=e("buffer"),i=n.Buffer
|
||
function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number")
|
||
return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number")
|
||
var n=i(e)
|
||
return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number")
|
||
return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number")
|
||
return n.SlowBuffer(e)}},{buffer:110}],144:[function(e,t,r){"use strict"
|
||
t.exports=i
|
||
var n=e("events").EventEmitter
|
||
function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this
|
||
function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u))
|
||
var a=!1
|
||
function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},{events:114,inherits:118,"readable-stream/duplex.js":129,"readable-stream/passthrough.js":139,"readable-stream/readable.js":140,"readable-stream/transform.js":141,"readable-stream/writable.js":142}],145:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("./lib/request"),i=e("./lib/response"),o=e("xtend"),a=e("builtin-status-codes"),s=e("url"),u=r
|
||
u.request=function(e,r){e="string"==typeof e?s.parse(e):o(e)
|
||
var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/"
|
||
u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{}
|
||
var f=new n(e)
|
||
return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t)
|
||
return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":147,"./lib/response":148,"builtin-status-codes":111,url:151,xtend:158}],146:[function(e,t,r){(function(e){"use strict"
|
||
r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.blobConstructor=!1
|
||
try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var t
|
||
function n(){if(void 0!==t)return t
|
||
if(e.XMLHttpRequest){t=new e.XMLHttpRequest
|
||
try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null
|
||
return t}function i(e){var t=n()
|
||
if(!t)return!1
|
||
try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,a=o&&s(e.ArrayBuffer.prototype.slice)
|
||
function s(e){return"function"==typeof e}r.arraybuffer=r.fetch||o&&i("arraybuffer"),r.msstream=!r.fetch&&a&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&s(n().overrideMimeType),r.vbArray=s(e.VBArray),t=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],147:[function(e,t,r){(function(r,n,i){"use strict"
|
||
var o=e("./capability"),a=e("inherits"),s=e("./response"),u=e("readable-stream"),c=e("to-arraybuffer"),l=s.IncomingMessage,f=s.readyStates
|
||
var h=t.exports=function(e){var t,r=this
|
||
u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])})
|
||
var n=!0
|
||
if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)n=!1,t=!0
|
||
else if("prefer-streaming"===e.mode)t=!1
|
||
else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType
|
||
else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode")
|
||
t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}(t,n),r.on("finish",function(){r._onFinish()})}
|
||
a(h,u.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()]
|
||
return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this
|
||
if(!e._destroyed){var t=e._opts,a=e._headers,s=null
|
||
"GET"!==t.method&&"HEAD"!==t.method&&(s=o.arraybuffer?c(i.concat(e._body)):o.blobConstructor?new n.Blob(e._body.map(function(e){return c(e)}),{type:(a["content-type"]||{}).value||""}):i.concat(e._body).toString())
|
||
var u=[]
|
||
if(Object.keys(a).forEach(function(e){var t=a[e].name,r=a[e].value
|
||
Array.isArray(r)?r.forEach(function(e){u.push([t,e])}):u.push([t,r])}),"fetch"===e._mode){var l=null
|
||
if(o.abortController){var h=new AbortController
|
||
l=h.signal,e._fetchAbortController=h,"requestTimeout"in t&&0!==t.requestTimeout&&n.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout)}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)})}else{var d=e._xhr=new n.XMLHttpRequest
|
||
try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in d&&(d.responseType=e._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),u.forEach(function(e){d.setRequestHeader(e[0],e[1])}),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))}
|
||
try{d.send(s)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status
|
||
return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this
|
||
e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){}
|
||
var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":146,"./response":148,_process:124,buffer:110,inherits:118,"readable-stream":140,"to-arraybuffer":150}],148:[function(e,t,r){(function(t,n,i){"use strict"
|
||
var o=e("./capability"),a=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,n){var a=this
|
||
if(s.Readable.call(a),a._mode=n,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",function(){t.nextTick(function(){a.emit("close")})}),"fetch"===n){if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach(function(e,t){a.headers[t.toLowerCase()]=e,a.rawHeaders.push(t,e)}),o.writableStream){var u=new WritableStream({write:function(e){return new Promise(function(t,r){a._destroyed||(a.push(new i(e))?t():a._resumeFetch=t)})},close:function(){a._destroyed||a.push(null)},abort:function(e){a._destroyed||a.emit("error",e)}})
|
||
try{return void r.body.pipeTo(u)}catch(e){}}var c=r.body.getReader();(function e(){c.read().then(function(t){a._destroyed||(t.done?a.push(null):(a.push(new i(t.value)),e()))}).catch(function(e){a._destroyed||a.emit("error",e)})})()}else{if(a._xhr=e,a._pos=0,a.url=e.responseURL,a.statusCode=e.status,a.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/)
|
||
if(t){var r=t[1].toLowerCase()
|
||
"set-cookie"===r?(void 0===a.headers[r]&&(a.headers[r]=[]),a.headers[r].push(t[2])):void 0!==a.headers[r]?a.headers[r]+=", "+t[2]:a.headers[r]=t[2],a.rawHeaders.push(t[1],t[2])}}),a._charset="x-user-defined",!o.overrideMimeType){var l=a.rawHeaders["mime-type"]
|
||
if(l){var f=l.match(/;\s*charset=([^;])(;|$)/)
|
||
f&&(a._charset=f[1].toLowerCase())}a._charset||(a._charset="utf-8")}}}
|
||
a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch
|
||
e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null
|
||
switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break
|
||
try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r))
|
||
break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray"
|
||
break}if(r.length>e._pos){var o=r.substr(e._pos)
|
||
if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s)
|
||
e.push(a)}else e.push(o,e._charset)
|
||
e._pos=r.length}break
|
||
case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break
|
||
r=t.response,e.push(new i(new Uint8Array(r)))
|
||
break
|
||
case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==u.LOADING||!r)break
|
||
e.push(new i(new Uint8Array(r)))
|
||
break
|
||
case"ms-stream":if(r=t.response,t.readyState!==u.LOADING)break
|
||
var c=new n.MSStreamReader
|
||
c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new i(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":146,_process:124,buffer:110,inherits:118,"readable-stream":140}],149:[function(e,t,r){"use strict"
|
||
var n=e("buffer").Buffer,i=n.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0
|
||
default:return!1}}
|
||
var o=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!i(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3
|
||
break
|
||
case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s
|
||
break
|
||
case"base64":this.surrogateSize=3,this.detectIncompleteChar=u
|
||
break
|
||
default:return void(this.write=a)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0}
|
||
function a(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function u(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length
|
||
if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return""
|
||
if(e=e.slice(r,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t
|
||
break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e)
|
||
var n=e.length
|
||
this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived)
|
||
var i
|
||
n=(t+=e.toString(this.encoding,0,n)).length-1
|
||
if((i=t.charCodeAt(n))>=55296&&i<=56319){var o=this.surrogateSize
|
||
return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,n)}return t},o.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t]
|
||
if(1==t&&r>>5==6){this.charLength=2
|
||
break}if(t<=2&&r>>4==14){this.charLength=3
|
||
break}if(t<=3&&r>>3==30){this.charLength=4
|
||
break}}this.charReceived=t},o.prototype.end=function(e){var t=""
|
||
if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding
|
||
t+=n.slice(0,r).toString(i)}return t}},{buffer:110}],150:[function(e,t,r){"use strict"
|
||
var n=e("buffer").Buffer
|
||
t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer
|
||
if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i<r;i++)t[i]=e[i]
|
||
return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:110}],151:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("punycode"),o=e("./util")
|
||
function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=_,r.resolve=function(e,t){return _(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?_(e,!1,!0).resolveObject(t):t},r.format=function(e){o.isString(e)&&(e=_(e))
|
||
return e instanceof a?e.format():a.prototype.format.call(e)},r.Url=a
|
||
var s=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(l),h=["%","/","?",";","#"].concat(f),d=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=e("querystring")
|
||
function _(e,t,r){if(e&&o.isObject(e)&&e instanceof a)return e
|
||
var n=new a
|
||
return n.parse(e,t,r),n}a.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(void 0===e?"undefined":n(e)))
|
||
var a=e.indexOf("?"),u=-1!==a&&a<e.indexOf("#")?"?":"#",l=e.split(u)
|
||
l[0]=l[0].replace(/\\/g,"/")
|
||
var _=e=l.join(u)
|
||
if(_=_.trim(),!r&&1===e.split("#").length){var w=c.exec(_)
|
||
if(w)return this.path=_,this.href=_,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var S=s.exec(_)
|
||
if(S){var E=(S=S[0]).toLowerCase()
|
||
this.protocol=E,_=_.substr(S.length)}if(r||S||_.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===_.substr(0,2)
|
||
!k||S&&g[S]||(_=_.substr(2),this.slashes=!0)}if(!g[S]&&(k||S&&!b[S])){for(var x,C,A=-1,T=0;T<d.length;T++){-1!==(I=_.indexOf(d[T]))&&(-1===A||I<A)&&(A=I)}-1!==(C=-1===A?_.lastIndexOf("@"):_.lastIndexOf("@",A))&&(x=_.slice(0,C),_=_.slice(C+1),this.auth=decodeURIComponent(x)),A=-1
|
||
for(T=0;T<h.length;T++){var I;-1!==(I=_.indexOf(h[T]))&&(-1===A||I<A)&&(A=I)}-1===A&&(A=_.length),this.host=_.slice(0,A),_=_.slice(A),this.parseHost(),this.hostname=this.hostname||""
|
||
var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1]
|
||
if(!P)for(var M=this.hostname.split(/\./),R=(T=0,M.length);T<R;T++){var O=M[T]
|
||
if(O&&!O.match(p)){for(var B="",N=0,j=O.length;N<j;N++)O.charCodeAt(N)>127?B+="x":B+=O[N]
|
||
if(!B.match(p)){var L=M.slice(0,T),D=M.slice(T+1),U=O.match(m)
|
||
U&&(L.push(U[1]),D.unshift(U[2])),D.length&&(_="/"+D.join(".")+_),this.hostname=L.join(".")
|
||
break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname))
|
||
var F=this.port?":"+this.port:"",z=this.hostname||""
|
||
this.host=z+F,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!y[E])for(T=0,R=f.length;T<R;T++){var q=f[T]
|
||
if(-1!==_.indexOf(q)){var V=encodeURIComponent(q)
|
||
V===q&&(V=escape(q)),_=_.split(q).join(V)}}var H=_.indexOf("#");-1!==H&&(this.hash=_.substr(H),_=_.slice(0,H))
|
||
var K=_.indexOf("?")
|
||
if(-1!==K?(this.search=_.substr(K),this.query=_.substr(K+1),t&&(this.query=v.parse(this.query)),_=_.slice(0,K)):t&&(this.search="",this.query={}),_&&(this.pathname=_),b[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||""
|
||
var W=this.search||""
|
||
this.path=F+W}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||""
|
||
e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@")
|
||
var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a=""
|
||
this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=v.stringify(this.query))
|
||
var s=this.search||a&&"?"+a||""
|
||
return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||b[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(s=s.replace("#","%23"))+n},a.prototype.resolve=function(e){return this.resolveObject(_(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(o.isString(e)){var t=new a
|
||
t.parse(e,!1,!0),e=t}for(var r=new a,n=Object.keys(this),i=0;i<n.length;i++){var s=n[i]
|
||
r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r
|
||
if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c]
|
||
"protocol"!==l&&(r[l]=e[l])}return b[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!b[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var d=f[h]
|
||
r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname
|
||
else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",y=r.search||""
|
||
r.path=m+y}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=_||v||r.host&&e.pathname,S=w,E=r.pathname&&r.pathname.split("/")||[],k=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!b[r.protocol])
|
||
if(k&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===E[0])),_)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,E=p
|
||
else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),r.search=e.search,r.query=e.query
|
||
else if(!o.isNullOrUndefined(e.search)){if(k)r.hostname=r.host=E.shift(),(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())
|
||
return r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r
|
||
for(var x=E.slice(-1)[0],C=(r.host||e.host||E.length>1)&&("."===x||".."===x)||""===x,A=0,T=E.length;T>=0;T--)"."===(x=E[T])?E.splice(T,1):".."===x?(E.splice(T,1),A++):A&&(E.splice(T,1),A--)
|
||
if(!w&&!S)for(;A--;A)E.unshift("..")
|
||
!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),C&&"/"!==E.join("/").substr(-1)&&E.push("")
|
||
var I,P=""===E[0]||E[0]&&"/"===E[0].charAt(0)
|
||
k&&(r.hostname=r.host=P?"":E.length?E.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift()))
|
||
return(w=w||r.host&&E.length)&&!P&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=u.exec(e)
|
||
t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":152,punycode:125,querystring:128}],152:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"===(void 0===e?"undefined":n(e))&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],153:[function(e,t,r){(function(e){"use strict"
|
||
function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t]
|
||
return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e
|
||
var n=!1
|
||
return function(){if(!n){if(r("throwDeprecation"))throw new Error(t)
|
||
r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],154:[function(e,t,r){arguments[4][118][0].apply(r,arguments)},{dup:118}],155:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
t.exports=function(e){return e&&"object"===(void 0===e?"undefined":n(e))&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],156:[function(e,t,r){(function(t,n){"use strict"
|
||
var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=/%[sdj%]/g
|
||
r.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]))
|
||
return t.join(" ")}r=1
|
||
for(var n=arguments,i=n.length,a=String(e).replace(o,function(e){if("%%"===e)return"%"
|
||
if(r>=i)return e
|
||
switch(e){case"%s":return String(n[r++])
|
||
case"%d":return Number(n[r++])
|
||
case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<i;s=n[++r])y(s)||!w(s)?a+=" "+s:a+=" "+u(s)
|
||
return a},r.deprecate=function(e,i){if(v(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)}
|
||
if(!0===t.noDeprecation)return e
|
||
var o=!1
|
||
return function(){if(!o){if(t.throwDeprecation)throw new Error(i)
|
||
t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}}
|
||
var a,s={}
|
||
function u(e,t){var n={seen:[],stylize:l}
|
||
return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),f(n,e,n.depth)}function c(e,t){var r=u.styles[t]
|
||
return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function l(e,t){return e}function f(e,t,n){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e)
|
||
return b(i)||(i=f(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined")
|
||
if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'"
|
||
return e.stylize(r,"string")}if(g(t))return e.stylize(""+t,"number")
|
||
if(m(t))return e.stylize(""+t,"boolean")
|
||
if(y(t))return e.stylize("null","null")}(e,t)
|
||
if(o)return o
|
||
var a=Object.keys(t),s=function(e){var t={}
|
||
return e.forEach(function(e,r){t[e]=!0}),t}(a)
|
||
if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),E(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(t)
|
||
if(0===a.length){if(k(t)){var u=t.name?": "+t.name:""
|
||
return e.stylize("[Function"+u+"]","special")}if(_(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp")
|
||
if(S(t))return e.stylize(Date.prototype.toString.call(t),"date")
|
||
if(E(t))return h(t)}var c,l="",w=!1,x=["{","}"];(p(t)&&(w=!0,x=["[","]"]),k(t))&&(l=" [Function"+(t.name?": "+t.name:"")+"]")
|
||
return _(t)&&(l=" "+RegExp.prototype.toString.call(t)),S(t)&&(l=" "+Date.prototype.toUTCString.call(t)),E(t)&&(l=" "+h(t)),0!==a.length||w&&0!=t.length?n<0?_(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=w?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)T(t,String(a))?o.push(d(e,t,r,n,String(a),!0)):o.push("")
|
||
return i.forEach(function(i){i.match(/^\d+$/)||o.push(d(e,t,r,n,i,!0))}),o}(e,t,n,s,a):a.map(function(r){return d(e,t,n,s,r,w)}),e.seen.pop(),function(e,t,r){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]
|
||
return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,x)):x[0]+l+x[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,o){var a,s,u
|
||
if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function v(e){return void 0===e}function _(e){return w(e)&&"[object RegExp]"===x(e)}function w(e){return"object"===(void 0===e?"undefined":i(e))&&null!==e}function S(e){return w(e)&&"[object Date]"===x(e)}function E(e){return w(e)&&("[object Error]"===x(e)||e instanceof Error)}function k(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(v(a)&&(a=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=t.pid
|
||
s[e]=function(){var t=r.format.apply(r,arguments)
|
||
console.error("%s %d: %s",e,n,t)}}else s[e]=function(){}
|
||
return s[e]},r.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=m,r.isNull=y,r.isNullOrUndefined=function(e){return null==e},r.isNumber=g,r.isString=b,r.isSymbol=function(e){return"symbol"===(void 0===e?"undefined":i(e))},r.isUndefined=v,r.isRegExp=_,r.isObject=w,r.isDate=S,r.isError=E,r.isFunction=k,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(void 0===e?"undefined":i(e))||void 0===e},r.isBuffer=e("./support/isBuffer")
|
||
var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]
|
||
function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t
|
||
console.log("%s - %s",(e=new Date,t=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),A[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!w(t))return e
|
||
for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]]
|
||
return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":155,_process:124,inherits:154}],157:[function(require,module,exports){"use strict"
|
||
var _typeof="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},indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e)
|
||
var t=[]
|
||
for(var r in e)t.push(r)
|
||
return t},forEach=function(e,t){if(e.forEach)return e.forEach(t)
|
||
for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"]
|
||
function Context(){}Context.prototype={}
|
||
var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e)
|
||
this.code=e}
|
||
Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.")
|
||
var t=document.createElement("iframe")
|
||
t.style||(t.style={}),t.style.display="none",document.body.appendChild(t)
|
||
var r=t.contentWindow,n=r.eval,i=r.execScript
|
||
!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(e),function(t){r[t]=e[t]}),forEach(globals,function(t){e[t]&&(r[t]=e[t])})
|
||
var o=Object_keys(r),a=n.call(r,this.code)
|
||
return forEach(Object_keys(r),function(t){(t in e||-1===indexOf(o,t))&&(e[t]=r[t])}),forEach(globals,function(t){t in e||defineProp(e,t,r[t])}),document.body.removeChild(t),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t)
|
||
return forEach(Object_keys(t),function(r){e[r]=t[r]}),r},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var r=Script(t)
|
||
return r[e].apply(r,[].slice.call(arguments,1))}}),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context
|
||
return"object"===(void 0===e?"undefined":_typeof(e))&&forEach(Object_keys(e),function(r){t[r]=e[r]}),t}},{indexof:117}],158:[function(e,t,r){"use strict"
|
||
t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t]
|
||
for(var i in r)n.call(r,i)&&(e[i]=r[i])}return e}
|
||
var n=Object.prototype.hasOwnProperty},{}],159:[function(e,t,r){"use strict"
|
||
var n=e("once"),i=function(){}
|
||
t.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r)
|
||
r||(r={}),o=n(o||i)
|
||
var a=t._writableState,s=t._readableState,u=r.readable||!1!==r.readable&&t.readable,c=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||f()},f=function(){c=!1,u||o.call(t)},h=function(){u=!1,c||o.call(t)},d=function(e){o.call(t,e?new Error("exited with error code: "+e):null)},p=function(e){o.call(t,e)},m=function(){return(!u||s&&s.ended)&&(!c||a&&a.ended)?void 0:o.call(t,new Error("premature close"))},y=function(){t.req.on("finish",f)}
|
||
return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",f),t.on("abort",m),t.req?y():t.on("request",y)):c&&!a&&(t.on("end",l),t.on("close",l)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(t)&&t.on("exit",d),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",p),t.on("close",m),function(){t.removeListener("complete",f),t.removeListener("abort",m),t.removeListener("request",y),t.req&&t.req.removeListener("finish",f),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",f),t.removeListener("exit",d),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",m)}}},{once:535}],160:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./interface.js"),o={defineProperty:e("../utils/properties.js").defineProperty,getAddress:e("../utils/address.js").getAddress,bigNumberify:e("../utils/bignumber.js").bigNumberify,hexlify:e("../utils/convert.js").hexlify},a=e("../utils/errors"),s={data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0}
|
||
function u(e,t,r){if(!(this instanceof u))throw new Error("missing new")
|
||
if(t instanceof i||(t=new i(t)),!r)throw new Error("missing signer or provider")
|
||
var c=r,l=null
|
||
r.provider?l=r.provider:(l=r,c=null),o.defineProperty(this,"address",e),o.defineProperty(this,"interface",t),o.defineProperty(this,"signer",c),o.defineProperty(this,"provider",l)
|
||
var f=l.resolveName(e)
|
||
function h(r,i){return function(){var u={},f=Array.prototype.slice.call(arguments)
|
||
if(f.length===r.inputs.types.length+1&&"object"===n(f[f.length-1]))for(var h in u=function(e){var t={}
|
||
for(var r in e)t[r]=e[r]
|
||
return t}(f.pop()))if(!s[h])throw new Error("unknown transaction override "+h);["data","to"].forEach(function(e){if(null!=u[e])throw new Error("cannot override "+e)})
|
||
var d=r.apply(t,f)
|
||
switch(u.to=e,u.data=d.data,d.type){case"call":if(i)return Promise.resolve(new o.bigNumberify(0));["gasLimit","gasPrice","value"].forEach(function(e){if(null!=u[e])throw new Error("call cannot override "+e)})
|
||
var p=null
|
||
return null==u.from&&c&&c.getAddress?(p=c.getAddress())instanceof Promise||(p=Promise.resolve(p)):p=Promise.resolve(null),p.then(function(e){return e&&(u.from=o.getAddress(e)),l.call(u)}).then(function(t){try{var n=d.parse(t)}catch(n){throw"0x"===t&&r.inputs.types.length>0&&a.throwError("call exception",a.CALL_EXCEPTION,{address:e,method:d.signature,value:f}),n}return 1===r.outputs.types.length&&(n=n[0]),n})
|
||
case"transaction":if(!c)return Promise.reject(new Error("missing signer"))
|
||
if(null!=u.from)throw new Error("transaction cannot override from")
|
||
if(i)return c&&c.estimateGas?c.estimateGas(u):l.estimateGas(u)
|
||
if(c.sendTransaction)return c.sendTransaction(u)
|
||
if(!c.sign)return Promise.reject(new Error("custom signer does not support signing"))
|
||
null==u.gasLimit&&(u.gasLimit=c.defaultGasLimit||2e6)
|
||
var m=null
|
||
if(u.nonce)m=Promise.resolve(u.nonce)
|
||
else if(c.getTransactionCount)(m=c.getTransactionCount())instanceof Promise||(m=Promise.resolve(m))
|
||
else{var y=c.getAddress()
|
||
y instanceof Promise||(y=Promise.resolve(y)),m=y.then(function(e){return l.getTransactionCount(e,"pending")})}var g=null
|
||
return g=u.gasPrice?Promise.resolve(u.gasPrice):l.getGasPrice(),Promise.all([m,g]).then(function(e){return u.nonce=e[0],u.gasPrice=e[1],c.sign(u)}).then(function(e){return l.sendTransaction(e)})}}}var d={}
|
||
o.defineProperty(this,"estimate",d)
|
||
var p={}
|
||
o.defineProperty(this,"functions",p)
|
||
var m={}
|
||
o.defineProperty(this,"events",m),Object.keys(t.functions).forEach(function(e){var r=t.functions[e],n=h(r,!1)
|
||
null==this[e]?o.defineProperty(this,e,n):console.log("WARNING: Multiple definitions for "+r),null==p[r]&&(o.defineProperty(p,e,n),o.defineProperty(d,e,h(r,!0)))},this),Object.keys(t.events).forEach(function(e){var r=t.events[e],n=null
|
||
function i(t){f.then(function(o){if(o==t.address)try{var a=r.parse(t.topics,t.data)
|
||
t.args=a,t.event=e,t.parse=r.parse,t.removeListener=function(){l.removeListener(r.topics,i)},t.getBlock=function(){return l.getBlock(t.blockHash)},t.getTransaction=function(){return l.getTransaction(t.transactionHash)},t.getTransactionReceipt=function(){return l.getTransactionReceipt(t.transactionHash)},t.eventSignature=r.signature,n.apply(t,Array.prototype.slice.call(a))}catch(e){console.log(e)}})}var o={enumerable:!0,get:function(){return n},set:function(e){e||(e=null),!e&&n?l.removeListener(r.topics,i):e&&!n&&l.on(r.topics,i),n=e}},a="on"+e.toLowerCase()
|
||
null==this[a]&&Object.defineProperty(this,a,o),Object.defineProperty(m,e,o)},this)}o.defineProperty(u.prototype,"connect",function(e){return new u(this.address,this.interface,e)}),o.defineProperty(u,"getDeployTransaction",function(e,t){t instanceof i||(t=new i(t))
|
||
var r=Array.prototype.slice.call(arguments)
|
||
return r.splice(1,1),{data:t.deployFunction.apply(t,r).bytecode}}),t.exports=u},{"../utils/address.js":178,"../utils/bignumber.js":179,"../utils/convert.js":183,"../utils/errors":185,"../utils/properties.js":192,"./interface.js":162}],161:[function(e,t,r){"use strict"
|
||
var n=e("./contract.js"),i=e("./interface.js")
|
||
t.exports={Contract:n,Interface:i}},{"./contract.js":160,"./interface.js":162}],162:[function(e,t,r){"use strict"
|
||
var n,i,o,a="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},s=(n=e("../utils/convert"),i=e("../utils/properties"),o=e("../utils/utf8"),{defineFrozen:i.defineFrozen,defineProperty:i.defineProperty,coder:e("../utils/abi-coder").defaultCoder,arrayify:n.arrayify,concat:n.concat,isHexString:n.isHexString,toUtf8Bytes:o.toUtf8Bytes,keccak256:e("../utils/keccak256")}),u=e("../utils/errors")
|
||
function c(e){var t=[],r=[]
|
||
return e.forEach(function(e){if(null!=e.components){if("tuple"!==e.type.substring(0,5))throw new Error("internal error; report on GitHub")
|
||
var n="",i=e.type.indexOf("[")
|
||
i>=0&&(n=e.type.substring(i))
|
||
var o=c(e.components)
|
||
t.push({name:e.name||null,names:o.names}),r.push("tuple("+o.types.join(",")+")"+n)}else t.push(e.name||null),r.push(e.type)}),{names:t,types:r}}function l(e,t){for(var r in t)s.defineProperty(e,r,t[r])
|
||
return e}function f(e){s.defineProperty(this,"indexed",!0),s.defineProperty(this,"hash",e)}t.exports=function e(t){if(!(this instanceof e))throw new Error("missing new")
|
||
if("string"==typeof t)try{t=JSON.parse(t)}catch(e){u.throwError("could not parse ABI JSON",u.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:t})}s.defineFrozen(this,"abi",t)
|
||
var r={},n={},i=null
|
||
function o(e){switch(e.type){case"constructor":var t=function(){var t=c(e.inputs),r=function(e){s.isHexString(e)||u.throwError("invalid contract bytecode",u.INVALID_ARGUMENT,{arg:"bytecode",type:void 0===e?"undefined":a(e),value:e})
|
||
var r=Array.prototype.slice.call(arguments,1)
|
||
r.length<t.types.length?u.throwError("missing constructor argument",u.MISSING_ARGUMENT,{arg:t.names[r.length]||"unknown",count:r.length,expectedCount:t.types.length}):r.length>t.types.length&&u.throwError("too many constructor arguments",u.UNEXPECTED_ARGUMENT,{count:r.length,expectedCount:t.types.length})
|
||
try{var n=s.coder.encode(t.names,t.types,r)}catch(e){u.throwError("invalid constructor argument",u.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}var i={bytecode:e+n.substring(2),type:"deploy"}
|
||
return l(new function(){},i)}
|
||
return s.defineFrozen(r,"inputs",t),s.defineProperty(r,"payable",null==e.payable||!!e.payable),r}()
|
||
i||(i=t)
|
||
break
|
||
case"function":t=function(){var t=c(e.inputs),r=c(e.outputs),n="("+t.types.join(",")+")"
|
||
n=n.replace(/tuple/g,""),n=e.name+n
|
||
var i=function(e){try{return s.coder.decode(r.names,r.types,s.arrayify(e))}catch(t){u.throwError("invalid data for function output",u.INVALID_ARGUMENT,{arg:"data",errorArg:t.arg,errorValue:t.value,value:e,reason:t.reason})}},o=s.keccak256(s.toUtf8Bytes(n)).substring(0,10),a=function(){var r={name:e.name,signature:n,sighash:o,type:e.constant?"call":"transaction"},a=Array.prototype.slice.call(arguments,0)
|
||
a.length<t.types.length?u.throwError("missing input argument",u.MISSING_ARGUMENT,{arg:t.names[a.length]||"unknown",count:a.length,expectedCount:t.types.length,name:e.name}):a.length>t.types.length&&u.throwError("too many input arguments",u.UNEXPECTED_ARGUMENT,{count:a.length,expectedCount:t.types.length})
|
||
try{var c=s.coder.encode(t.names,t.types,a)}catch(e){u.throwError("invalid input argument",u.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return r.data=o+c.substring(2),r.parse=i,l(new function(){},r)}
|
||
return s.defineFrozen(a,"inputs",t),s.defineFrozen(a,"outputs",r),s.defineProperty(a,"payable",null==e.payable||!!e.payable),s.defineProperty(a,"parseResult",i),s.defineProperty(a,"signature",n),s.defineProperty(a,"sighash",o),a}(),e.name&&null==r[e.name]&&s.defineProperty(r,e.name,t),null==r[t.signature]&&s.defineProperty(r,t.signature,t)
|
||
break
|
||
case"event":t=function(){var t=c(e.inputs),r="("+t.types.join(",")+")"
|
||
r=r.replace(/tuple/g,""),r=e.name+r
|
||
var n={anonymous:!!e.anonymous,name:e.name,signature:r,type:"event",parse:function(r,n){null==n&&(n=r,r=null),null==r||e.anonymous||(r=r.slice(1))
|
||
var i=[],o=[],a=[],u=[],c=[]
|
||
if(e.inputs.forEach(function(e,r){var n=t.types[r],s=t.names[r]
|
||
e.indexed?("string"===n||"bytes"===n||n.indexOf("[")>=0||"tuple"===n.substring(0,5)?(a.push("bytes32"),c.push(!0)):(a.push(n),c.push(!1)),i.push(s)):(o.push(s),u.push(n),c.push(!1))}),null!=r)var l=s.coder.decode(i,a,s.concat(r))
|
||
var h=s.coder.decode(o,u,s.arrayify(n)),d=new function(){},p=0,m=0
|
||
return e.inputs.forEach(function(e,t){e.indexed?null==r?d[t]=new f(null):c[t]?d[t]=new f(l[m++]):d[t]=l[m++]:d[t]=h[p++],e.name&&(d[e.name]=d[t])}),d.length=e.inputs.length,d}},i=l(new function(){},n)
|
||
return s.defineFrozen(i,"topics",[s.keccak256(s.toUtf8Bytes(r))]),s.defineFrozen(i,"inputs",t),i}(),e.name&&null==n[e.name]&&s.defineProperty(n,e.name,t),null==r[t.signature]&&s.defineProperty(r,t.signature,t)
|
||
break
|
||
case"fallback":break
|
||
default:console.log("WARNING: unsupported ABI type - "+e.type)}}s.defineProperty(this,"functions",r),s.defineProperty(this,"events",n),this.abi.forEach(o,this),i||o({type:"constructor",inputs:[]}),s.defineProperty(this,"deployFunction",i)}},{"../utils/abi-coder":177,"../utils/convert":183,"../utils/errors":185,"../utils/keccak256":189,"../utils/properties":192,"../utils/utf8":198}],163:[function(e,t,r){"use strict"
|
||
var n=e("./package.json").version,i=e("./contracts"),o=e("./providers"),a=e("./utils/errors"),s=e("./utils"),u=e("./wallet")
|
||
t.exports={Wallet:u.Wallet,HDNode:u.HDNode,SigningKey:u.SigningKey,Contract:i.Contract,Interface:i.Interface,networks:o.networks,providers:o,errors:a,utils:s,version:n}},{"./contracts":161,"./package.json":167,"./providers":171,"./utils":188,"./utils/errors":185,"./wallet":200}],164:[function(e,t,r){arguments[4][118][0].apply(r,arguments)},{dup:118}],165:[function(e,t,r){(function(e){"use strict"
|
||
var r
|
||
if(e.crypto&&crypto.getRandomValues){var n=new Uint8Array(16)
|
||
r=function(){return crypto.getRandomValues(n),n}}if(!r){var i=new Array(16)
|
||
r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255
|
||
return i}}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],166:[function(e,t,r){"use strict"
|
||
for(var n=e("./rng"),i=[],o={},a=0;a<256;a++)i[a]=(a+256).toString(16).substr(1),o[i[a]]=a
|
||
function s(e,t){var r=t||0,n=i
|
||
return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}var u=n(),c=[1|u[0],u[1],u[2],u[3],u[4],u[5]],l=16383&(u[6]<<8|u[7]),f=0,h=0
|
||
function d(e,t,r){var i=t&&r||0
|
||
"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null)
|
||
var o=(e=e||{}).random||(e.rng||n)()
|
||
if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;a++)t[i+a]=o[a]
|
||
return t||s(o)}var p=d
|
||
p.v1=function(e,t,r){var n=t&&r||0,i=t||[],o=void 0!==(e=e||{}).clockseq?e.clockseq:l,a=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:h+1,d=a-f+(u-h)/1e4
|
||
if(d<0&&void 0===e.clockseq&&(o=o+1&16383),(d<0||a>f)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")
|
||
f=a,h=u,l=o
|
||
var p=(1e4*(268435455&(a+=122192928e5))+u)%4294967296
|
||
i[n++]=p>>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p
|
||
var m=a/4294967296*1e4&268435455
|
||
i[n++]=m>>>8&255,i[n++]=255&m,i[n++]=m>>>24&15|16,i[n++]=m>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o
|
||
for(var y=e.node||c,g=0;g<6;g++)i[n+g]=y[g]
|
||
return t||s(i)},p.v4=d,p.parse=function(e,t,r){var n=t&&r||0,i=0
|
||
for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){i<16&&(t[n+i++]=o[e])});i<16;)t[n+i++]=0
|
||
return t},p.unparse=s,t.exports=p},{"./rng":165}],167:[function(e,t,r){t.exports={_args:[["ethers@3.0.15","/home/basti/src/kosmos/kredits/kredits-web"]],_development:!0,_from:"ethers@3.0.15",_id:"ethers@3.0.15",_inBundle:!1,_integrity:"sha512-d/tiMUavaeaY2GFqjpgfPzT46cEc0cilP3hnlTXR3LR/HR5Qrhv4PfdgW3gxBlR5aBTtUeM/lo8z8ph3JdtFhQ==",_location:"/ethers",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"ethers@3.0.15",name:"ethers",escapedName:"ethers",rawSpec:"3.0.15",saveSpec:null,fetchSpec:"3.0.15"},_requiredBy:["#DEV:/","/kredits-contracts"],_resolved:"https://registry.npmjs.org/ethers/-/ethers-3.0.15.tgz",_spec:"3.0.15",_where:"/home/basti/src/kosmos/kredits/kredits-web",author:{name:"Richard Moore",email:"me@ricmoo.com"},browser:{fs:"./tests/browser-fs.js",zlib:"browserify-zlib","./utils/base64.js":"./utils/browser-base64.js","./utils/random-bytes.js":"./utils/browser-random-bytes.js","./providers/ipc-provider.js":"./utils/empty.js",xmlhttprequest:"./providers/browser-xmlhttprequest.js"},bugs:{url:"https://github.com/ethers-io/ethers-wallet/issues"},dependencies:{"aes-js":"3.0.0","bn.js":"^4.4.0",elliptic:"6.3.3","hash.js":"^1.0.0",inherits:"2.0.1","js-sha3":"0.5.7","scrypt-js":"2.0.3",setimmediate:"1.0.4",uuid:"2.0.1",xmlhttprequest:"1.8.0"},description:"Ethereum wallet library.",devDependencies:{"browserify-zlib":"^0.2.0",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"1.2.0","grunt-contrib-uglify":"^1.0.1",mocha:"^3.2.0","mocha-phantomjs-core":"2.1.2",solc:"0.4.20",web3:"0.20.2"},homepage:"https://github.com/ethers-io/ethers-wallet#readme",keywords:["ethereum","wallet"],license:"MIT",main:"index.js",name:"ethers",repository:{type:"git",url:"git://github.com/ethers-io/ethers-wallet.git"},scripts:{test:'if [ "$RUN_PHANTOMJS" = "1" ]; then npm run-script test-phantomjs; else npm run-script test-node; fi',"test-node":"mocha tests/test-*.js","test-phantomjs":"grunt dist && ./node_modules/.bin/grunt --gruntfile Gruntfile-test.js dist && phantomjs --web-security=false ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js ./tests/test.html",version:"grunt dist"},version:"3.0.15"}},{}],168:[function(e,t,r){"use strict"
|
||
try{t.exports.XMLHttpRequest=XMLHttpRequest}catch(e){console.log("Warning: XMLHttpRequest is not defined"),t.exports.XMLHttpRequest=null}},{}],169:[function(e,t,r){"use strict"
|
||
var n,i=e("./provider.js"),o=(n=e("../utils/convert.js"),{defineProperty:e("../utils/properties.js").defineProperty,hexlify:n.hexlify,hexStripZeros:n.hexStripZeros})
|
||
function a(e){var t=[]
|
||
for(var r in e)if(null!=e[r]){var n=o.hexlify(e[r]);({gasLimit:!0,gasPrice:!0,nonce:!0,value:!0})[r]&&(n=o.hexStripZeros(n)),t.push(r+"="+n)}return t.join("&")}function s(e,t){i.call(this,e)
|
||
var r=null
|
||
switch(this.name){case"homestead":r="https://api.etherscan.io"
|
||
break
|
||
case"ropsten":r="https://ropsten.etherscan.io"
|
||
break
|
||
case"rinkeby":r="https://rinkeby.etherscan.io"
|
||
break
|
||
case"kovan":r="https://kovan.etherscan.io"
|
||
break
|
||
default:throw new Error("unsupported network")}o.defineProperty(this,"baseUrl",r),o.defineProperty(this,"apiKey",t||null)}function u(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result
|
||
if(1!=e.status||"OK"!=e.message){var t=new Error("invalid response")
|
||
throw t.result=JSON.stringify(e),t}return e.result}function c(e){if("2.0"!=e.jsonrpc)throw(t=new Error("invalid response")).result=JSON.stringify(e),t
|
||
if(e.error){var t=new Error(e.error.message||"unknown error")
|
||
throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function l(e){if("pending"===e)throw new Error("pending not supported")
|
||
return"latest"===e?e:parseInt(e.substring(2),16)}i.inherits(s),o.defineProperty(s.prototype,"_call",function(){}),o.defineProperty(s.prototype,"_callProxy",function(){}),o.defineProperty(s.prototype,"perform",function(e,t){t||(t={})
|
||
var r=this.baseUrl,n=""
|
||
switch(this.apiKey&&(n+="&apikey="+this.apiKey),e){case"getBlockNumber":return r+="/api?module=proxy&action=eth_blockNumber"+n,i.fetchJSON(r,null,c)
|
||
case"getGasPrice":return r+="/api?module=proxy&action=eth_gasPrice"+n,i.fetchJSON(r,null,c)
|
||
case"getBalance":return r+="/api?module=account&action=balance&address="+t.address,r+="&tag="+t.blockTag+n,i.fetchJSON(r,null,u)
|
||
case"getTransactionCount":return r+="/api?module=proxy&action=eth_getTransactionCount&address="+t.address,r+="&tag="+t.blockTag+n,i.fetchJSON(r,null,c)
|
||
case"getCode":return r+="/api?module=proxy&action=eth_getCode&address="+t.address,r+="&tag="+t.blockTag+n,i.fetchJSON(r,null,c)
|
||
case"getStorageAt":return r+="/api?module=proxy&action=eth_getStorageAt&address="+t.address,r+="&position="+t.position,r+="&tag="+t.blockTag+n,i.fetchJSON(r,null,c)
|
||
case"sendTransaction":return r+="/api?module=proxy&action=eth_sendRawTransaction&hex="+t.signedTransaction,r+=n,i.fetchJSON(r,null,c)
|
||
case"getBlock":if(t.blockTag)return r+="/api?module=proxy&action=eth_getBlockByNumber&tag="+t.blockTag,r+="&boolean=false",r+=n,i.fetchJSON(r,null,c)
|
||
throw new Error("getBlock by blockHash not implmeneted")
|
||
case"getTransaction":return r+="/api?module=proxy&action=eth_getTransactionByHash&txhash="+t.transactionHash,r+=n,i.fetchJSON(r,null,c)
|
||
case"getTransactionReceipt":return r+="/api?module=proxy&action=eth_getTransactionReceipt&txhash="+t.transactionHash,r+=n,i.fetchJSON(r,null,c)
|
||
case"call":return(o=a(t.transaction))&&(o="&"+o),r+="/api?module=proxy&action=eth_call"+o,r+=n,i.fetchJSON(r,null,c)
|
||
case"estimateGas":var o
|
||
return(o=a(t.transaction))&&(o="&"+o),r+="/api?module=proxy&action=eth_estimateGas&"+o,r+=n,i.fetchJSON(r,null,c)
|
||
case"getLogs":r+="/api?module=logs&action=getLogs"
|
||
try{if(t.filter.fromBlock&&(r+="&fromBlock="+l(t.filter.fromBlock)),t.filter.toBlock&&(r+="&toBlock="+l(t.filter.toBlock)),t.filter.address&&(r+="&address="+t.filter.address),t.filter.topics&&t.filter.topics.length>0){if(t.filter.topics.length>1)throw new Error("unsupported topic format")
|
||
var s=t.filter.topics[0]
|
||
if("string"!=typeof s||66!==s.length)throw new Error("unsupported topic0 format")
|
||
r+="&topic0="+s}}catch(e){return Promise.reject(e)}r+=n
|
||
var f=this
|
||
return i.fetchJSON(r,null,u).then(function(e){var t={},r=Promise.resolve()
|
||
return e.forEach(function(e){r=r.then(function(){if(null==e.blockHash)return e.blockHash=t[e.transactionHash],null==e.blockHash?f.getTransaction(e.transactionHash).then(function(r){t[e.transactionHash]=r.blockHash,e.blockHash=r.blockHash}):void 0})}),r.then(function(){return e})})
|
||
case"getEtherPrice":return"homestead"!==this.name?Promise.resolve(0):(r+="/api?module=stats&action=ethprice",r+=n,i.fetchJSON(r,null,u).then(function(e){return parseFloat(e.ethusd)}))}return Promise.reject(new Error("not implemented - "+e))}),o.defineProperty(s.prototype,"getHistory",function(e,t,r){var n=this.baseUrl
|
||
return this.apiKey&&"&apikey="+this.apiKey,null==t&&(t=0),null==r&&(r=99999999),this.resolveName(e).then(function(e){return n+="/api?module=account&action=txlist&address="+e,n+="&startblock="+t,n+="&endblock="+r,n+="&sort=asc",i.fetchJSON(n,null,u).then(function(e){var t=[]
|
||
return e.forEach(function(e){["contractAddress","to"].forEach(function(t){""==e[t]&&delete e[t]}),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress),t.push(i._formatters.checkTransactionResponse(e))}),t})})}),t.exports=s},{"../utils/convert.js":183,"../utils/properties.js":192,"./provider.js":175}],170:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./provider.js"),o={defineProperty:e("../utils/properties.js").defineProperty}
|
||
function a(e){if(0===e.length)throw new Error("no providers")
|
||
var t={}
|
||
if(["chainId","ensAddress","name","testnet"].forEach(function(r){for(var n=1;n<e.length;n++)if(e[0][r]!==e[n][r])throw new Error("incompatible providers - "+r+" mismatch")
|
||
t[r]=e[0][r]}),!(this instanceof a))throw new Error("missing new")
|
||
i.call(this,t),e=e.slice(0),Object.defineProperty(this,"providers",{get:function(){return e.slice(0)}})}n(a,i),o.defineProperty(a.prototype,"perform",function(e,t){var r=this.providers
|
||
return new Promise(function(n,i){var o=null;(function a(){r.length?r.shift().perform(e,t).then(function(e){n(e)},function(e){o||(o=e),a()}):i(o)})()})}),t.exports=a},{"../utils/properties.js":192,"./provider.js":175,inherits:164}],171:[function(e,t,r){"use strict"
|
||
var n=e("./provider"),i=e("./etherscan-provider"),o=e("./fallback-provider"),a=e("./ipc-provider"),s=e("./infura-provider"),u=e("./json-rpc-provider"),c=e("./web3-provider")
|
||
var l={EtherscanProvider:i,FallbackProvider:o,InfuraProvider:s,JsonRpcProvider:u,Web3Provider:c,isProvider:n.isProvider,networks:n.networks,getDefaultProvider:function(e){return new o([new s(e),new i(e)])},Provider:n}
|
||
a&&(l.IpcProvider=a),t.exports=l},{"./etherscan-provider":169,"./fallback-provider":170,"./infura-provider":172,"./ipc-provider":184,"./json-rpc-provider":173,"./provider":175,"./web3-provider":176}],172:[function(e,t,r){"use strict"
|
||
var n=e("./provider"),i=e("./json-rpc-provider"),o={defineProperty:e("../utils/properties").defineProperty},a=e("../utils/errors")
|
||
function s(e,t){a.checkNew(this,s)
|
||
var r=null
|
||
switch((e=n.getNetwork(e)).name){case"homestead":r="mainnet.infura.io"
|
||
break
|
||
case"ropsten":r="ropsten.infura.io"
|
||
break
|
||
case"rinkeby":r="rinkeby.infura.io"
|
||
break
|
||
case"kovan":r="kovan.infura.io"
|
||
break
|
||
default:throw new Error("unsupported network")}var u="https://"+r+"/"+(t||"")
|
||
i.call(this,u,e),o.defineProperty(this,"apiAccessToken",t||null)}i.inherits(s),o.defineProperty(s.prototype,"_startPending",function(){console.log("WARNING: INFURA does not support pending filters")}),o.defineProperty(s.prototype,"_stopPending",function(){}),o.defineProperty(s.prototype,"getSigner",function(e){a.throwError("INFURA does not support signing",a.UNSUPPORTED_OPERATION,{operation:"getSigner"})}),o.defineProperty(s.prototype,"listAccounts",function(){return Promise.resolve([])}),t.exports=s},{"../utils/errors":185,"../utils/properties":192,"./json-rpc-provider":173,"./provider":175}],173:[function(e,t,r){"use strict"
|
||
var n,i=e("./provider.js"),o=(n=e("../utils/convert"),{defineProperty:e("../utils/properties").defineProperty,hexlify:n.hexlify,isHexString:n.isHexString,hexStripZeros:n.hexStripZeros,toUtf8Bytes:e("../utils/utf8").toUtf8Bytes,getAddress:e("../utils/address").getAddress}),a=e("../utils/errors")
|
||
function s(e){if(e.error){var t=new Error(e.error.message)
|
||
throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function u(e){var t={}
|
||
for(var r in e)t[r]=o.hexlify(e[r])
|
||
return["gasLimit","gasPrice","nonce","value"].forEach(function(e){t[e]&&(t[e]=o.hexStripZeros(t[e]))}),null!=t.gasLimit&&null==t.gas&&(t.gas=t.gasLimit,delete t.gasLimit),t}function c(e){return e?e.toLowerCase():e}function l(e,t){a.checkNew(this,l),o.defineProperty(this,"provider",e),t?(o.defineProperty(this,"address",t),o.defineProperty(this,"_syncAddress",!0)):(Object.defineProperty(this,"address",{enumerable:!0,get:function(){a.throwError("no sync sync address available; use getAddress",a.UNSUPPORTED_OPERATION,{operation:"address"})}}),o.defineProperty(this,"_syncAddress",!1))}function f(e,t){if(a.checkNew(this,f),1==arguments.length)if("string"==typeof e)try{t=i.getNetwork(e),e=null}catch(e){}else e&&null==e.url&&(t=e,e=null)
|
||
i.call(this,t),e||(e="http://localhost:8545"),o.defineProperty(this,"url",e)}o.defineProperty(l.prototype,"getAddress",function(){return this._syncAddress?Promise.resolve(this.address):this.provider.send("eth_accounts",[]).then(function(e){return 0===e.length&&a.throwError("no accounts",a.UNSUPPORTED_OPERATION,{operation:"getAddress"}),o.getAddress(e[0])})}),o.defineProperty(l.prototype,"getBalance",function(e){var t=this.provider
|
||
return this.getAddress().then(function(r){return t.getBalance(r,e)})}),o.defineProperty(l.prototype,"getTransactionCount",function(e){var t=this.provider
|
||
return this.getAddress().then(function(r){return t.getTransactionCount(r,e)})}),o.defineProperty(l.prototype,"sendTransaction",function(e){var t=this.provider
|
||
return e=u(e),this.getAddress().then(function(r){return e.from=r.toLowerCase(),t.send("eth_sendTransaction",[e]).then(function(e){return new Promise(function(r,n){(function n(){t.getTransaction(e).then(function(e){e?r(e):setTimeout(n,1e3)})})()})})})}),o.defineProperty(l.prototype,"signMessage",function(e){var t=this.provider,r="string"==typeof e?o.toUtf8Bytes(e):e
|
||
return this.getAddress().then(function(e){return t.send("eth_sign",[e.toLowerCase(),o.hexlify(r)])})}),o.defineProperty(l.prototype,"unlock",function(e){var t=this.provider
|
||
return this.getAddress().then(function(r){return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])})}),i.inherits(f),o.defineProperty(f.prototype,"getSigner",function(e){return new l(this,e)}),o.defineProperty(f.prototype,"listAccounts",function(){return this.send("eth_accounts",[]).then(function(e){return e.forEach(function(t,r){e[r]=o.getAddress(t)}),e})}),o.defineProperty(f.prototype,"send",function(e,t){var r={method:e,params:t,id:42,jsonrpc:"2.0"}
|
||
return i.fetchJSON(this.url,JSON.stringify(r),s)}),o.defineProperty(f.prototype,"perform",function(e,t){switch(e){case"getBlockNumber":return this.send("eth_blockNumber",[])
|
||
case"getGasPrice":return this.send("eth_gasPrice",[])
|
||
case"getBalance":return this.send("eth_getBalance",[c(t.address),t.blockTag])
|
||
case"getTransactionCount":return this.send("eth_getTransactionCount",[c(t.address),t.blockTag])
|
||
case"getCode":return this.send("eth_getCode",[c(t.address),t.blockTag])
|
||
case"getStorageAt":return this.send("eth_getStorageAt",[c(t.address),t.position,t.blockTag])
|
||
case"sendTransaction":return this.send("eth_sendRawTransaction",[t.signedTransaction])
|
||
case"getBlock":return t.blockTag?this.send("eth_getBlockByNumber",[t.blockTag,!1]):t.blockHash?this.send("eth_getBlockByHash",[t.blockHash,!1]):Promise.reject(new Error("invalid block tag or block hash"))
|
||
case"getTransaction":return this.send("eth_getTransactionByHash",[t.transactionHash])
|
||
case"getTransactionReceipt":return this.send("eth_getTransactionReceipt",[t.transactionHash])
|
||
case"call":return this.send("eth_call",[u(t.transaction),"latest"])
|
||
case"estimateGas":return this.send("eth_estimateGas",[u(t.transaction)])
|
||
case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=c(t.filter.address)),this.send("eth_getLogs",[t.filter])}return Promise.reject(new Error("not implemented - "+e))}),o.defineProperty(f.prototype,"_startPending",function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[])
|
||
this._pendingFilter=t,t.then(function(r){return function n(){e.send("eth_getFilterChanges",[r]).then(function(r){if(e._pendingFilter==t){var n=Promise.resolve()
|
||
return r.forEach(function(t){n=n.then(function(){return e.getTransaction(t).then(function(t){e.emit("pending",t)})})}),n.then(function(){return e=1e3,new Promise(function(t){setTimeout(function(){t()},e)})
|
||
var e})}}).then(function(){e._pendingFilter==t?setTimeout(function(){n()},0):e.send("eth_uninstallFilter",[filterIf])})}(),r})}}),o.defineProperty(f.prototype,"_stopPending",function(){this._pendingFilter=null}),o.defineProperty(f,"_hexlifyTransaction",function(e){return u(e)}),t.exports=f},{"../utils/address":178,"../utils/convert":183,"../utils/errors":185,"../utils/properties":192,"../utils/utf8":198,"./provider.js":175}],174:[function(e,t,r){t.exports={unspecified:{chainId:0,name:"unspecified"},homestead:{chainId:1,ensAddress:"0x314159265dd8dbb310642f98f50c066173c1259b",name:"homestead"},mainnet:{chainId:1,ensAddress:"0x314159265dd8dbb310642f98f50c066173c1259b",name:"homestead"},morden:{chainId:2,name:"morden"},ropsten:{chainId:3,ensAddress:"0x112234455c3a32fd11230c42e7bccd4a84e02010",name:"ropsten"},testnet:{chainId:3,ensAddress:"0x112234455c3a32fd11230c42e7bccd4a84e02010",name:"ropsten"},rinkeby:{chainId:4,name:"rinkeby"},kovan:{chainId:42,name:"kovan"},classic:{chainId:61,name:"classic"}}},{}],175:[function(e,t,r){"use strict"
|
||
var n,i,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},a=e("inherits"),s=e("xmlhttprequest").XMLHttpRequest,u=e("./networks.json"),c=(n=e("../utils/convert"),i=e("../utils/utf8"),{defineProperty:e("../utils/properties").defineProperty,getAddress:e("../utils/address").getAddress,getContractAddress:e("../utils/contract-address").getContractAddress,bigNumberify:e("../utils/bignumber").bigNumberify,arrayify:n.arrayify,hexlify:n.hexlify,isHexString:n.isHexString,concat:n.concat,hexStripZeros:n.hexStripZeros,stripZeros:n.stripZeros,base64:e("../utils/base64"),namehash:e("../utils/namehash"),toUtf8String:i.toUtf8String,toUtf8Bytes:i.toUtf8Bytes,RLP:e("../utils/rlp")}),l=e("../utils/errors")
|
||
function f(e,t){var r={}
|
||
for(var n in e)try{var i=e[n](t[n])
|
||
void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}function h(e,t){return function(r){return null==r?t:e(r)}}function d(e){return function(t){if(!Array.isArray(t))throw new Error("not an array")
|
||
var r=[]
|
||
return t.forEach(function(t){r.push(e(t))}),r}}function p(e){if(!c.isHexString(e)||66!==e.length)throw new Error("invalid hash - "+e)
|
||
return e}function m(e){return c.bigNumberify(e).toNumber()}function y(e){if(!c.isHexString(e))throw new Error("invalid uint256")
|
||
for(;e.length<66;)e="0x0"+e.substring(2)
|
||
return e}function g(e){if(null==e)return"latest"
|
||
if("earliest"===e)return"0x0"
|
||
if("latest"===e||"pending"===e)return e
|
||
if("number"==typeof e)return c.hexStripZeros(c.hexlify(e))
|
||
if(c.isHexString(e))return c.hexStripZeros(e)
|
||
throw new Error("invalid blockTag")}var b={hash:p,parentHash:p,number:m,timestamp:m,nonce:h(c.hexlify),difficulty:function(e){var t=c.bigNumberify(e)
|
||
try{t=t.toNumber()}catch(e){t=null}return t},gasLimit:c.bigNumberify,gasUsed:c.bigNumberify,miner:c.getAddress,extraData:c.hexlify,transactions:h(d(p))}
|
||
function v(e){return null!=e.author&&null==e.miner&&(e.miner=e.author),f(b,e)}var _={hash:p,blockHash:h(p,null),blockNumber:h(m,null),transactionIndex:h(m,null),from:c.getAddress,gasPrice:c.bigNumberify,gasLimit:c.bigNumberify,to:h(c.getAddress,null),value:c.bigNumberify,nonce:m,data:c.hexlify,r:h(y),s:h(y),v:h(m),creates:h(c.getAddress,null),raw:h(c.hexlify)}
|
||
function w(e){if(null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&c.bigNumberify(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=c.getContractAddress(e)),!e.raw&&e.v&&e.r&&e.s){var t=[c.stripZeros(c.hexlify(e.nonce)),c.stripZeros(c.hexlify(e.gasPrice)),c.stripZeros(c.hexlify(e.gasLimit)),e.to||"0x",c.stripZeros(c.hexlify(e.value||"0x")),c.hexlify(e.data||"0x"),c.stripZeros(c.hexlify(e.v||"0x")),c.stripZeros(c.hexlify(e.r)),c.stripZeros(c.hexlify(e.s))]
|
||
e.raw=c.RLP.encode(t)}var r=f(_,e),n=e.networkId
|
||
return c.isHexString(n)&&(n=c.bigNumberify(n).toNumber()),"number"!=typeof n&&null!=r.v&&((n=(r.v-35)/2)<0&&(n=0),n=parseInt(n)),"number"!=typeof n&&(n=0),r.networkId=n,r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}var S={from:h(c.getAddress),nonce:h(m),gasLimit:h(c.bigNumberify),gasPrice:h(c.bigNumberify),to:h(c.getAddress),value:h(c.bigNumberify),data:h(c.hexlify)}
|
||
function E(e){return f(S,e)}var k={transactionLogIndex:h(m),transactionIndex:m,blockNumber:m,transactionHash:p,address:c.getAddress,topics:d(p),data:c.hexlify,logIndex:m,blockHash:p}
|
||
var x={contractAddress:h(c.getAddress,null),transactionIndex:m,root:h(p),gasUsed:c.bigNumberify,logsBloom:h(c.hexlify),blockHash:p,transactionHash:p,logs:d(function(e){return f(k,e)}),blockNumber:m,cumulativeGasUsed:c.bigNumberify,status:h(m)}
|
||
var C={fromBlock:h(g,void 0),toBlock:h(g,void 0),address:h(c.getAddress,void 0),topics:h(function e(t){return Array.isArray(t)?t.forEach(function(t){e(t)}):null!=t&&p(t),t},void 0)}
|
||
var A={blockNumber:h(m),blockHash:h(p),transactionIndex:m,removed:h(function(e){if("boolean"==typeof e)return e
|
||
if("string"==typeof e){if("true"===e)return!0
|
||
if("false"===e)return!1}throw new Error("invaid boolean - "+e)}),address:c.getAddress,data:function(e,t){return function(r){return r?e(r):t}}(c.hexlify,"0x"),topics:d(p),transactionHash:p,logIndex:m}
|
||
function T(e){return f(A,e)}function I(e){if(!(this instanceof I))throw new Error("missing new")
|
||
var t=null;(e=I.getNetwork(e)).ensAddress&&(t=c.getAddress(e.ensAddress)),c.defineProperty(this,"chainId",e.chainId),c.defineProperty(this,"ensAddress",t),c.defineProperty(this,"name",e.name)
|
||
var r={}
|
||
c.defineProperty(this,"_events",r),c.defineProperty(this,"_emitted",{block:-1})
|
||
var n=this,i=null,o={}
|
||
function a(){n.getBlockNumber().then(function(e){if(e!==i){null===i&&(i=e-1)
|
||
for(var t=i+1;t<=e;t++)n._emitted.block<t&&(n._emitted.block=t,Object.keys(n._emitted).forEach(function(e){"block"!==e&&n._emitted[e]>t+12&&delete n._emitted[e]})),n.emit("block",t)
|
||
var a={}
|
||
Object.keys(r).forEach(function(t){var r=function(e){if("tx:"===e.substring(0,3))return{type:"transaction",hash:e.substring(3)}
|
||
if("block"===e)return{type:"block"}
|
||
if("pending"===e)return{type:"pending"}
|
||
if("address:"===e.substring(0,8))return{type:"address",address:e.substring(8)}
|
||
if("topic:"===e.substring(0,6))try{var t=c.RLP.decode(e.substring(6))
|
||
return{type:"topic",topic:t=M(t,function(e){return"0x"===e&&(e=null),e})}}catch(e){console.log(e)}throw new Error("invalid event string")}(t)
|
||
"transaction"===r.type?n.getTransaction(r.hash).then(function(e){e&&null!=e.blockNumber&&(n._emitted["t:"+e.hash.toLowerCase()]=e.blockNumber,n.emit(r.hash,e))}):"address"===r.type?(o[r.address]&&(a[r.address]=o[r.address]),n.getBalance(r.address,"latest").then(function(e){var t=o[r.address]
|
||
t&&e.eq(t)||(o[r.address]=e,n.emit(r.address,e))})):"topic"===r.type&&n.getLogs({fromBlock:i+1,toBlock:e,topics:r.topic}).then(function(e){0!==e.length&&e.forEach(function(e){n._emitted["b:"+e.blockHash.toLowerCase()]=e.blockNumber,n._emitted["t:"+e.transactionHash.toLowerCase()]=e.blockNumber,n.emit(r.topic,e)})})}),i=e,o=a}}),n.doPoll()}c.defineProperty(this,"resetEventsBlock",function(e){i=e,n.doPoll()})
|
||
var s=4e3,u=null
|
||
Object.defineProperty(this,"polling",{get:function(){return null!=u},set:function(e){setTimeout(function(){e&&!u?u=setInterval(a,s):!e&&u&&(clearInterval(u),u=null)},0)}}),Object.defineProperty(this,"pollingInterval",{get:function(){return s},set:function(e){if("number"!=typeof e||e<=0||parseInt(e)!=e)throw new Error("invalid polling interval")
|
||
s=e,u&&(clearInterval(u),u=setInterval(a,s))}})}function P(e,t){return new Promise(function(r,n){var i=0;(function o(){t().then(function(t){if(t||e())r(t)
|
||
else{i++
|
||
var n=500+250*parseInt(Math.random()*(1<<i))
|
||
n>1e4&&(n=1e4),setTimeout(o,n)}},function(e){n(e)})})()})}function M(e,t){if(Array.isArray(e)){var r=[]
|
||
return e.forEach(function(e){r.push(M(e,t))}),r}return t(e)}function R(e){try{return"address:"+c.getAddress(e)}catch(e){}if("block"===e)return"block"
|
||
if("pending"===e)return"pending"
|
||
if(c.isHexString(e)){if(66===e.length)return"tx:"+e}else if(Array.isArray(e)){e=M(e,function(e){return null==e&&(e="0x"),e})
|
||
try{return"topic:"+c.RLP.encode(e)}catch(e){console.log(e)}}throw new Error("invalid event - "+e)}c.defineProperty(I,"inherits",function e(t){return function(r){a(r,t),c.defineProperty(r,"inherits",e(r))}}(I)),c.defineProperty(I,"getNetwork",function(e){if("string"==typeof e){if(!(e=u[e]))throw new Error("unknown network")}else null==e&&(e=u.homestead)
|
||
if("number"!=typeof e.chainId)throw new Error("invalid chainId")
|
||
return e}),c.defineProperty(I,"networks",u),c.defineProperty(I,"fetchJSON",function(e,t,r){var n=[]
|
||
if("object"===(void 0===e?"undefined":o(e))&&null!=e.url&&null!=e.user&&null!=e.password){"https:"!==e.url.substring(0,6)&&!0!==e.forceInsecure&&l.throwError("basic authentication requires a secure https url",l.INVALID_ARGUMENT,{arg:"url",url:e.url,user:e.user,password:"[REDACTED]"})
|
||
var i=e.user+":"+e.password
|
||
n.push({key:"Authorization",value:"Basic "+c.base64.encode(c.toUtf8Bytes(i))}),e=e.url}return new Promise(function(i,o){var a=new s
|
||
t?(a.open("POST",e,!0),n.push({key:"Content-Type",value:"application/json"})):a.open("GET",e,!0),n.forEach(function(e){a.setRequestHeader(e.key,e.value)}),a.onreadystatechange=function(){if(4===a.readyState){try{var n=JSON.parse(a.responseText)}catch(u){var s=new Error("invalid json response")
|
||
return s.orginialError=u,s.responseText=a.responseText,s.url=e,void o(s)}if(r)try{n=r(n)}catch(u){return u.url=e,u.body=t,u.responseText=a.responseText,void o(u)}if(200!=a.status){var u=new Error("invalid response - "+a.status)
|
||
return u.statusCode=a.statusCode,void o(u)}i(n)}},a.onerror=function(e){o(e)}
|
||
try{t?a.send(t):a.send()}catch(e){var u=new Error("connection error")
|
||
u.error=e,o(u)}})}),c.defineProperty(I.prototype,"waitForTransaction",function(e,t){var r=this
|
||
return new Promise(function(n,i){var o=null
|
||
function a(e){o&&clearTimeout(o),n(e)}r.once(e,a),"number"==typeof t&&t>0&&(o=setTimeout(function(){r.removeListener(e,a),i(new Error("timeout"))},t))})}),c.defineProperty(I.prototype,"getBlockNumber",function(){try{return this.perform("getBlockNumber").then(function(e){var t=parseInt(e)
|
||
if(t!=e)throw new Error("invalid response - getBlockNumber")
|
||
return t})}catch(e){return Promise.reject(e)}}),c.defineProperty(I.prototype,"getGasPrice",function(){try{return this.perform("getGasPrice").then(function(e){return c.bigNumberify(e)})}catch(e){return Promise.reject(e)}}),c.defineProperty(I.prototype,"getBalance",function(e,t){var r=this
|
||
return this.resolveName(e).then(function(e){var n={address:e,blockTag:g(t)}
|
||
return r.perform("getBalance",n).then(function(e){return c.bigNumberify(e)})})}),c.defineProperty(I.prototype,"getTransactionCount",function(e,t){var r=this
|
||
return this.resolveName(e).then(function(e){var n={address:e,blockTag:g(t)}
|
||
return r.perform("getTransactionCount",n).then(function(e){var t=parseInt(e)
|
||
if(t!=e)throw new Error("invalid response - getTransactionCount")
|
||
return t})})}),c.defineProperty(I.prototype,"getCode",function(e,t){var r=this
|
||
return this.resolveName(e).then(function(e){var n={address:e,blockTag:g(t)}
|
||
return r.perform("getCode",n).then(function(e){return c.hexlify(e)})})}),c.defineProperty(I.prototype,"getStorageAt",function(e,t,r){var n=this
|
||
return this.resolveName(e).then(function(e){var i={address:e,blockTag:g(r),position:c.hexStripZeros(c.hexlify(t))}
|
||
return n.perform("getStorageAt",i).then(function(e){return c.hexlify(e)})})}),c.defineProperty(I.prototype,"sendTransaction",function(e){try{var t={signedTransaction:c.hexlify(e)}
|
||
return this.perform("sendTransaction",t).then(function(e){if(66!==(e=c.hexlify(e)).length)throw new Error("invalid response - sendTransaction")
|
||
return e})}catch(e){return Promise.reject(e)}}),c.defineProperty(I.prototype,"call",function(e){var t=this
|
||
return this._resolveNames(e,["to","from"]).then(function(e){var r={transaction:E(e)}
|
||
return t.perform("call",r).then(function(e){return c.hexlify(e)})})}),c.defineProperty(I.prototype,"estimateGas",function(e){var t=this
|
||
return this._resolveNames(e,["to","from"]).then(function(e){var r={transaction:E(e)}
|
||
return t.perform("estimateGas",r).then(function(e){return c.bigNumberify(e)})})}),c.defineProperty(I.prototype,"getBlock",function(e){var t=this
|
||
try{var r=c.hexlify(e)
|
||
if(66===r.length)return P(function(){return null==t._emitted["b:"+r.toLowerCase()]},function(){return t.perform("getBlock",{blockHash:r}).then(function(e){return null==e?null:v(e)})})}catch(e){}try{var n=g(e)
|
||
return P(function(){return!c.isHexString(n)||parseInt(n.substring(2),16)>t._emitted.block},function(){return t.perform("getBlock",{blockTag:n}).then(function(e){return null==e?null:v(e)})})}catch(e){}return Promise.reject(new Error("invalid block hash or block tag"))}),c.defineProperty(I.prototype,"getTransaction",function(e){var t=this
|
||
try{var r={transactionHash:p(e)}
|
||
return P(function(){return null==t._emitted["t:"+e.toLowerCase()]},function(){return t.perform("getTransaction",r).then(function(e){return null!=e&&(e=w(e)),e})})}catch(e){return Promise.reject(e)}}),c.defineProperty(I.prototype,"getTransactionReceipt",function(e){var t=this
|
||
try{var r={transactionHash:p(e)}
|
||
return P(function(){return null==t._emitted["t:"+e.toLowerCase()]},function(){return t.perform("getTransactionReceipt",r).then(function(e){return null!=e&&(e=function(e){e.status,e.root
|
||
var t=f(x,e)
|
||
return t.logs.forEach(function(e,t){null==e.transactionLogIndex&&(e.transactionLogIndex=t)}),null!=e.status&&(t.byzantium=!0),t}(e)),e})})}catch(e){return Promise.reject(e)}}),c.defineProperty(I.prototype,"getLogs",function(e){var t=this
|
||
return this._resolveNames(e,["address"]).then(function(e){var r={filter:function(e){return f(C,e)}(e)}
|
||
return t.perform("getLogs",r).then(function(e){return d(T)(e)})})}),c.defineProperty(I.prototype,"getEtherPrice",function(){try{return this.perform("getEtherPrice",{}).then(function(e){return e})}catch(e){return Promise.reject(e)}}),c.defineProperty(I.prototype,"_resolveNames",function(e,t){var r=[],n=function(e){var t={}
|
||
for(var r in e)t[r]=e[r]
|
||
return t}(e)
|
||
return t.forEach(function(e){void 0!==n[e]&&r.push(this.resolveName(n[e]).then(function(t){n[e]=t}))},this),Promise.all(r).then(function(){return n})}),c.defineProperty(I.prototype,"_getResolver",function(e){var t="0x0178b8bf"+c.namehash(e).substring(2),r={to:this.ensAddress,data:t}
|
||
return this.call(r).then(function(e){return 66!=e.length?null:c.getAddress("0x"+e.substring(26))})}),c.defineProperty(I.prototype,"resolveName",function(e){try{return Promise.resolve(c.getAddress(e))}catch(e){}if(!this.ensAddress)throw new Error("network does not have ENS deployed")
|
||
var t=this,r=c.namehash(e)
|
||
return this._getResolver(e).then(function(e){var n={to:e,data:"0x3b3b57de"+r.substring(2)}
|
||
return t.call(n)}).then(function(e){if(66!=e.length)return null
|
||
var t=c.getAddress("0x"+e.substring(26))
|
||
return"0x0000000000000000000000000000000000000000"===t?null:t})}),c.defineProperty(I.prototype,"lookupAddress",function(e){if(!this.ensAddress)throw new Error("network does not have ENS deployed")
|
||
var t=(e=c.getAddress(e)).substring(2)+".addr.reverse",r=c.namehash(t),n=this
|
||
return this._getResolver(t).then(function(e){if(!e)return null
|
||
var t={to:e,data:"0x691f3431"+r.substring(2)}
|
||
return n.call(t)}).then(function(t){if((t=t.substring(2)).length<64)return null
|
||
if((t=t.substring(64)).length<64)return null
|
||
var r=c.bigNumberify("0x"+t.substring(0,64)).toNumber()
|
||
if(2*r>(t=t.substring(64)).length)return null
|
||
var i=c.toUtf8String("0x"+t.substring(0,2*r))
|
||
return n.resolveName(i).then(function(t){return t!=e?null:i})})}),c.defineProperty(I.prototype,"doPoll",function(){}),c.defineProperty(I.prototype,"perform",function(e,t){return Promise.reject(new Error("not implemented - "+e))}),c.defineProperty(I.prototype,"_startPending",function(){console.log("WARNING: this provider does not support pending events")}),c.defineProperty(I.prototype,"_stopPending",function(){}),c.defineProperty(I.prototype,"on",function(e,t){var r=R(e)
|
||
this._events[r]||(this._events[r]=[]),this._events[r].push({eventName:e,listener:t,type:"on"}),"pending"===r&&this._startPending(),this.polling=!0}),c.defineProperty(I.prototype,"once",function(e,t){var r=R(e)
|
||
this._events[r]||(this._events[r]=[]),this._events[r].push({eventName:e,listener:t,type:"once"}),"pending"===r&&this._startPending(),this.polling=!0}),c.defineProperty(I.prototype,"emit",function(e){var t=R(e),r=Array.prototype.slice.call(arguments,1),n=this._events[t]
|
||
if(n){for(var i=0;i<n.length;i++){var o=n[i]
|
||
"once"===o.type&&(n.splice(i,1),i--)
|
||
try{o.listener.apply(this,r)}catch(e){console.log("Event Listener Error: "+e.message)}}0===n.length&&(delete this._events[t],"pending"===t&&this._stopPending()),0===this.listenerCount()&&(this.polling=!1)}})
|
||
c.defineProperty(I.prototype,"listenerCount",function(e){if(!e){var t=0
|
||
for(var r in this._events)t+=this._events[r].length
|
||
return t}var n=this._events[R(e)]
|
||
return n?n.length:0}),c.defineProperty(I.prototype,"listeners",function(e){var t=this._events[R(e)]
|
||
if(!t)return 0
|
||
for(var r=[],n=0;n<t.length;n++)r.push(t[n].listener)
|
||
return r}),c.defineProperty(I.prototype,"removeAllListeners",function(e){delete this._events[R(e)],0===this.listenerCount()&&(this.polling=!1)}),c.defineProperty(I.prototype,"removeListener",function(e,t){var r=R(e),n=this._events[r]
|
||
if(!n)return 0
|
||
for(var i=0;i<n.length;i++)if(n[i].listener===t){n.splice(i,1)
|
||
break}0===n.length&&this.removeAllListeners(e)}),c.defineProperty(I,"_formatters",{checkTransactionResponse:w}),t.exports=I},{"../utils/address":178,"../utils/base64":180,"../utils/bignumber":179,"../utils/contract-address":182,"../utils/convert":183,"../utils/errors":185,"../utils/namehash":190,"../utils/properties":192,"../utils/rlp":193,"../utils/utf8":198,"./networks.json":174,inherits:164,xmlhttprequest:168}],176:[function(e,t,r){"use strict"
|
||
e("./provider")
|
||
var n=e("./json-rpc-provider"),i={defineProperty:e("../utils/properties").defineProperty},o=e("../utils/errors")
|
||
function a(e,t){o.checkNew(this,a)
|
||
var r=e.host||e.path||"unknown"
|
||
null==t&&(t="homestead"),n.call(this,r,t),i.defineProperty(this,"_web3Provider",e)}n.inherits(a),i.defineProperty(a.prototype,"send",function(e,t){"eth_sign"==e&&this._web3Provider.isMetaMask&&(e="personal_sign",t=[t[1],t[0]])
|
||
var r=this._web3Provider
|
||
return new Promise(function(n,i){var o={method:e,params:t,id:42,jsonrpc:"2.0"}
|
||
r.sendAsync(o,function(e,t){if(e)i(e)
|
||
else{if(t.error)return(e=new Error(t.error.message)).code=t.error.code,e.data=t.error.data,void i(e)
|
||
n(t.result)}})})}),t.exports=a},{"../utils/errors":185,"../utils/properties":192,"./json-rpc-provider":173,"./provider":175}],177:[function(e,t,r){"use strict"
|
||
var n,i,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},a=(n=e("../utils/convert.js"),i=e("../utils/utf8.js"),{defineProperty:e("../utils/properties.js").defineProperty,arrayify:n.arrayify,padZeros:n.padZeros,bigNumberify:e("../utils/bignumber.js").bigNumberify,getAddress:e("../utils/address").getAddress,concat:n.concat,toUtf8Bytes:i.toUtf8Bytes,toUtf8String:i.toUtf8String,hexlify:n.hexlify}),s=e("./errors"),u=new RegExp(/^bytes([0-9]*)$/),c=new RegExp(/^(u?int)([0-9]*)$/),l=new RegExp(/^(.*)\[([0-9]*)\]$/),f=function(e,t){var r=e.match(c)
|
||
return r&&parseInt(r[2])<=48?t.toNumber():t},h=function(e){return{name:"null",type:"",encode:function(e){return a.arrayify([])},decode:function(t,r){if(r>t.length)throw new Error("invalid null")
|
||
return{consumed:0,value:e("null",void 0)}},dynamic:!1}},d=function(e,t,r,n){var i=(r?"int":"uint")+8*t
|
||
return{localName:n,name:i,type:i,encode:function(e){try{e=a.bigNumberify(e)}catch(t){s.throwError("invalid number value",s.INVALID_ARGUMENT,{arg:n,type:void 0===e?"undefined":o(e),value:e})}return e=e.toTwos(8*t).maskn(8*t),r&&(e=e.fromTwos(8*t).toTwos(256)),a.padZeros(a.arrayify(e),32)},decode:function(o,u){o.length<u+32&&s.throwError("insufficient data for "+i+" type",s.INVALID_ARGUMENT,{arg:n,coderType:i,value:a.hexlify(o.slice(u,u+32))})
|
||
var c=32-t,l=a.bigNumberify(o.slice(u+c,u+32))
|
||
return l=r?l.fromTwos(8*t):l.maskn(8*t),{consumed:32,value:e(i,l)}}}},p=d(function(e,t){return t},32,!1),m=function(e,t,r){var n="bytes"+t
|
||
return{localName:r,name:n,type:n,encode:function(e){try{e=a.arrayify(e)}catch(t){s.throwError("invalid "+n+" value",s.INVALID_ARGUMENT,{arg:r,type:void 0===e?"undefined":o(e),value:t.value})}if(32===t)return e
|
||
var i=new Uint8Array(32)
|
||
return i.set(e),i},decode:function(i,o){return i.length<o+32&&s.throwError("insufficient data for "+n+" type",s.INVALID_ARGUMENT,{arg:r,coderType:n,value:a.hexlify(i.slice(o,o+32))}),{consumed:32,value:e(n,a.hexlify(i.slice(o,o+t)))}}}}
|
||
function y(e){var t=parseInt(32*Math.ceil(e.length/32)),r=new Uint8Array(t-e.length)
|
||
return a.concat([p.encode(e.length),e,r])}function g(e,t,r){e.length<t+32&&s.throwError("insufficient data for dynamicBytes length",s.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:a.hexlify(e.slice(t,t+32))})
|
||
var n=p.decode(e,t).value
|
||
try{n=n.toNumber()}catch(e){s.throwError("dynamic bytes count too large",s.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:n.toString()})}return e.length<t+32+n&&s.throwError("insufficient data for dynamicBytes type",s.INVALID_ARGUMENT,{arg:r,coderType:"dynamicBytes",value:a.hexlify(e.slice(t,t+32+n))}),{consumed:parseInt(32+32*Math.ceil(n/32)),value:e.slice(t+32,t+32+n)}}function b(e){return parseInt(32*Math.ceil(e/32))}function v(e,t){if(Array.isArray(t));else if(t&&"object"===(void 0===t?"undefined":o(t))){var r=[]
|
||
e.forEach(function(e){r.push(t[e.localName])}),t=r}else s.throwError("invalid tuple value",s.INVALID_ARGUMENT,{coderType:"tuple",type:void 0===t?"undefined":o(t),value:t})
|
||
e.length!==t.length&&s.throwError("types/value length mismatch",s.INVALID_ARGUMENT,{coderType:"tuple",value:t})
|
||
var n=[]
|
||
e.forEach(function(e,r){n.push({dynamic:e.dynamic,value:e.encode(t[r])})})
|
||
var i=0,a=0
|
||
n.forEach(function(e,t){e.dynamic?(i+=32,a+=b(e.value.length)):i+=b(e.value.length)})
|
||
var u=0,c=i,l=new Uint8Array(i+a)
|
||
return n.forEach(function(e,t){e.dynamic?(l.set(p.encode(c),u),u+=32,l.set(e.value,c),c+=b(e.value.length)):(l.set(e.value,u),u+=b(e.value.length))}),l}function _(e,t,r){var n=r,i=0,a=[]
|
||
return e.forEach(function(e){if(e.dynamic){var o=p.decode(t,r);(s=e.decode(t,n+o.value.toNumber())).consumed=o.consumed}else var s=e.decode(t,r)
|
||
void 0!=s.value&&a.push(s.value),r+=s.consumed,i+=s.consumed}),e.forEach(function(e,t){var r=e.localName
|
||
r&&("object"===(void 0===r?"undefined":o(r))&&(r=r.name),r&&("length"===r&&(r="_length"),null==a[r]&&(a[r]=a[t])))}),{value:a,consumed:i}}function w(e,t,r){var n=!1,i=[]
|
||
t.forEach(function(e){e.dynamic&&(n=!0),i.push(e.type)})
|
||
var o="tuple("+i.join(",")+")"
|
||
return{coders:t,localName:r,name:"tuple",type:o,encode:function(e){return v(t,e)},decode:function(r,n){var i=_(t,r,n)
|
||
return i.value=e(o,i.value),i},dynamic:n}}var S={address:function(e,t){return{localName:t,name:"address",type:"address",encode:function(e){try{e=a.arrayify(a.getAddress(e))}catch(r){s.throwError("invalid address",s.INVALID_ARGUMENT,{arg:t,type:void 0===e?"undefined":o(e),value:e})}var r=new Uint8Array(32)
|
||
return r.set(e,12),r},decode:function(r,n){return r.length<n+32&&s.throwError("insufficuent data for address type",s.INVALID_ARGUMENT,{arg:t,coderType:"address",value:a.hexlify(r.slice(n,n+32))}),{consumed:32,value:e("address",a.getAddress(a.hexlify(r.slice(n+12,n+32))))}}}},bool:function(e,t){return{localName:t,name:"boolean",type:"boolean",encode:function(e){return p.encode(e?1:0)},decode:function(r,n){try{var i=p.decode(r,n)}catch(e){throw"insufficient data for uint256 type"===e.reason&&s.throwError("insufficient data for boolean type",s.INVALID_ARGUMENT,{arg:t,coderType:"boolean",value:e.value}),e}return{consumed:i.consumed,value:e("boolean",!i.value.isZero())}}}},string:function(e,t){return{localName:t,name:"string",type:"string",encode:function(e){return"string"!=typeof e&&s.throwError("invalid string value",s.INVALID_ARGUMENT,{arg:t,type:void 0===e?"undefined":o(e),value:e}),y(a.toUtf8Bytes(e))},decode:function(r,n){var i=g(r,n,t)
|
||
return i.value=e("string",a.toUtf8String(i.value)),i},dynamic:!0}},bytes:function(e,t){return{localName:t,name:"bytes",type:"bytes",encode:function(e){try{e=a.arrayify(e)}catch(r){s.throwError("invalid bytes value",s.INVALID_ARGUMENT,{arg:t,type:void 0===e?"undefined":o(e),value:r.value})}return y(e)},decode:function(r,n){var i=g(r,n,t)
|
||
return i.value=e("bytes",a.hexlify(i.value)),i},dynamic:!0}}}
|
||
function E(e,t,r){var n,i=S[t]
|
||
if(i)return i(e,r)
|
||
if(n=t.match(c))return(0===(f=parseInt(n[2]||256))||f>256||f%8!=0)&&s.throwError("invalid "+n[1]+" bit length",s.INVALID_ARGUMENT,{arg:"type",value:t}),d(e,f/8,"int"===n[1],r)
|
||
if(n=t.match(u))return(0===(f=parseInt(n[1]))||f>32)&&s.throwError("invalid bytes length",s.INVALID_ARGUMENT,{arg:"type",value:t}),m(e,f,r)
|
||
if(n=t.match(l)){var f=parseInt(n[2]||-1)
|
||
return function(e,t,r,n){var i=t.type+"["+(r>=0?r:"")+"]"
|
||
return{coder:t,localName:n,length:r,name:"array",type:i,encode:function(e){Array.isArray(e)||s.throwError("expected array value",s.INVALID_ARGUMENT,{arg:n,coderType:"array",type:void 0===e?"undefined":o(e),value:e})
|
||
var i=r,u=new Uint8Array(0);-1===i&&(i=e.length,u=p.encode(i)),i!==e.length&&error.throwError("array value length mismatch",s.INVALID_ARGUMENT,{arg:n,coderType:"array",count:e.length,expectedCount:i,value:e})
|
||
var c=[]
|
||
return e.forEach(function(e){c.push(t)}),a.concat([u,v(c,e)])},decode:function(o,a){var u=0,c=r
|
||
if(-1===c){try{var l=p.decode(o,a)}catch(e){s.throwError("insufficient data for dynamic array length",s.INVALID_ARGUMENT,{arg:n,coderType:"array",value:e.value})}try{c=l.value.toNumber()}catch(e){s.throwError("array count too large",s.INVALID_ARGUMENT,{arg:n,coderType:"array",value:l.value.toString()})}u+=l.consumed,a+=l.consumed}for(var f=[],h=0;h<c;h++)f.push(t)
|
||
var d=_(f,o,a)
|
||
return d.consumed+=u,d.value=e(i,d.value),d},dynamic:-1===r||t.dynamic}}(e,E(e,n[1],r),f,r)}if("tuple("===t.substring(0,6)&&")"===t.substring(t.length-1)){var y=[],g=[]
|
||
return r&&"object"===(void 0===r?"undefined":o(r))&&(Array.isArray(r.names)&&(g=r.names),"string"==typeof r.name&&(r=r.name)),function(e){for(var t=[],r="",n=0,i=0;i<e.length;i++){var o=e[i]
|
||
if(","===o&&0===n)t.push(r),r=""
|
||
else if(r+=o,"("===o)n++
|
||
else if(")"===o&&-1==--n)throw new Error("unbalanced parenthsis")}return t.push(r),t}(t.substring(6,t.length-1)).forEach(function(t,r){y.push(E(e,t,g[r]))}),w(e,y,r)}if(""===t)return h(e)
|
||
s.throwError("invalid type",s.INVALID_ARGUMENT,{arg:"type",value:t})}function k(e){if(!(this instanceof k))throw new Error("missing new")
|
||
e||(e=f),a.defineProperty(this,"coerceFunc",e)}a.defineProperty(k.prototype,"encode",function(e,t,r){arguments.length<3&&(r=t,t=e,e=null),t.length!==r.length&&s.throwError("types/values length mismatch",s.INVALID_ARGUMENT,{count:{types:t.length,values:r.length},value:{types:t,values:r}}),e&&e.length!=t.length&&s.throwError("names/types length mismatch",s.INVALID_ARGUMENT,{count:{names:e.length,types:t.length},value:{names:e,types:t}})
|
||
var n=[]
|
||
return t.forEach(function(t,r){n.push(E(this.coerceFunc,t,e?e[r]:void 0))},this),a.hexlify(w(this.coerceFunc,n).encode(r))}),a.defineProperty(k.prototype,"decode",function(e,t,r){arguments.length<3&&(r=t,t=e,e=null),r=a.arrayify(r)
|
||
var n=[]
|
||
return t.forEach(function(t,r){n.push(E(this.coerceFunc,t,e?e[r]:void 0))},this),w(this.coerceFunc,n).decode(r,0).value}),a.defineProperty(k,"defaultCoder",new k),t.exports=k},{"../utils/address":178,"../utils/bignumber.js":179,"../utils/convert.js":183,"../utils/properties.js":192,"../utils/utf8.js":198,"./errors":185}],178:[function(e,t,r){"use strict"
|
||
var n=e("bn.js"),i=e("./convert"),o=e("./throw-error"),a=e("./keccak256")
|
||
function s(e){"string"==typeof e&&e.match(/^0x[0-9A-Fa-f]{40}$/)||o("invalid address",{input:e})
|
||
for(var t=(e=e.toLowerCase()).substring(2).split(""),r=0;r<t.length;r++)t[r]=t[r].charCodeAt(0)
|
||
t=i.arrayify(a(t)),e=e.substring(2).split("")
|
||
for(r=0;r<40;r+=2)t[r>>1]>>4>=8&&(e[r]=e[r].toUpperCase()),(15&t[r>>1])>=8&&(e[r+1]=e[r+1].toUpperCase())
|
||
return"0x"+e.join("")}var u=function(){for(var e={},t=0;t<10;t++)e[String(t)]=String(t)
|
||
for(t=0;t<26;t++)e[String.fromCharCode(65+t)]=String(10+t)
|
||
var r,n=Math.floor((r=9007199254740991,Math.log10?Math.log10(r):Math.log(r)/Math.LN10))
|
||
return function(t){for(var r=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split(""),i=0;i<r.length;i++)r[i]=e[r[i]]
|
||
for(r=r.join("");r.length>=n;){var o=r.substring(0,n)
|
||
r=parseInt(o,10)%97+r.substring(o.length)}for(var a=String(98-parseInt(r,10)%97);a.length<2;)a="0"+a
|
||
return a}}()
|
||
t.exports={getAddress:function(e,t){var r=null
|
||
if("string"!=typeof e&&o("invalid address",{input:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),r=s(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&r!==e&&o("invalid address checksum",{input:e,expected:r})
|
||
else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==u(e)&&o("invalid address icap checksum",{input:e}),r=new n(e.substring(4),36).toString(16);r.length<40;)r="0"+r
|
||
r=s("0x"+r)}else o("invalid address",{input:e})
|
||
if(t){for(var i=new n(r.substring(2),16).toString(36).toUpperCase();i.length<30;)i="0"+i
|
||
return"XE"+u("XE00"+i)+i}return r}}},{"./convert":183,"./keccak256":189,"./throw-error":196,"bn.js":51}],179:[function(e,t,r){"use strict"
|
||
var n=e("bn.js"),i=e("./properties").defineProperty,o=e("./convert"),a=e("./throw-error")
|
||
function s(e){if(!(this instanceof s))throw new Error("missing new")
|
||
o.isHexString(e)?("0x"==e&&(e="0x0"),e=new n(e.substring(2),16)):"string"==typeof e&&"-"===e[0]&&o.isHexString(e.substring(1))?e=new n(e.substring(3),16).mul(s.constantNegativeOne._bn):"string"==typeof e&&e.match(/^-?[0-9]*$/)?(""==e&&(e="0"),e=new n(e)):"number"==typeof e&&parseInt(e)==e?e=new n(e):n.isBN(e)||(u(e)?e=e._bn:o.isArrayish(e)?e=new n(o.hexlify(e).substring(2),16):a("invalid BigNumber value",{input:e})),i(this,"_bn",e)}function u(e){return e._bn&&e._bn.mod}function c(e){return u(e)?e:new s(e)}i(s,"constantNegativeOne",c(-1)),i(s,"constantZero",c(0)),i(s,"constantOne",c(1)),i(s,"constantTwo",c(2)),i(s,"constantWeiPerEther",c(new n("1000000000000000000"))),i(s.prototype,"fromTwos",function(e){return new s(this._bn.fromTwos(e))}),i(s.prototype,"toTwos",function(e){return new s(this._bn.toTwos(e))}),i(s.prototype,"add",function(e){return new s(this._bn.add(c(e)._bn))}),i(s.prototype,"sub",function(e){return new s(this._bn.sub(c(e)._bn))}),i(s.prototype,"div",function(e){return new s(this._bn.div(c(e)._bn))}),i(s.prototype,"mul",function(e){return new s(this._bn.mul(c(e)._bn))}),i(s.prototype,"mod",function(e){return new s(this._bn.mod(c(e)._bn))}),i(s.prototype,"pow",function(e){return new s(this._bn.pow(c(e)._bn))}),i(s.prototype,"maskn",function(e){return new s(this._bn.maskn(e))}),i(s.prototype,"eq",function(e){return this._bn.eq(c(e)._bn)}),i(s.prototype,"lt",function(e){return this._bn.lt(c(e)._bn)}),i(s.prototype,"lte",function(e){return this._bn.lte(c(e)._bn)}),i(s.prototype,"gt",function(e){return this._bn.gt(c(e)._bn)}),i(s.prototype,"gte",function(e){return this._bn.gte(c(e)._bn)}),i(s.prototype,"isZero",function(){return this._bn.isZero()}),i(s.prototype,"toNumber",function(e){return this._bn.toNumber()}),i(s.prototype,"toString",function(){return this._bn.toString(10)}),i(s.prototype,"toHexString",function(){var e=this._bn.toString(16)
|
||
return e.length%2&&(e="0"+e),"0x"+e}),t.exports={isBigNumber:u,bigNumberify:c,BigNumber:s}},{"./convert":183,"./properties":192,"./throw-error":196,"bn.js":51}],180:[function(e,t,r){"use strict"
|
||
var n=e("./convert")
|
||
t.exports={decode:function(e){e=atob(e)
|
||
for(var t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r))
|
||
return n.arrayify(t)},encode:function(e){e=n.arrayify(e)
|
||
for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r])
|
||
return btoa(t)}}},{"./convert":183}],181:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("./convert"),i=e("./properties").defineProperty,o=r.crypto||r.msCrypto
|
||
function a(e){if(e<=0||e>1024||parseInt(e)!=e)throw new Error("invalid length")
|
||
var t=new Uint8Array(e)
|
||
return o.getRandomValues(t),n.arrayify(t)}o&&o.getRandomValues||(console.log("WARNING: Missing strong random number source; using weak randomBytes"),o={getRandomValues:function(e){for(var t=0;t<20;t++)for(var r=0;r<e.length;r++)t?e[r]^=parseInt(256*Math.random()):e[r]=parseInt(256*Math.random())
|
||
return e},_weakCrypto:!0}),!0===o._weakCrypto&&i(a,"_weakCrypto",!0),t.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./convert":183,"./properties":192}],182:[function(e,t,r){"use strict"
|
||
var n=e("./address").getAddress,i=e("./convert"),o=e("./keccak256"),a=e("./rlp")
|
||
t.exports={getContractAddress:function(e){if(!e.from)throw new Error("missing from address")
|
||
var t=e.nonce
|
||
return n("0x"+o(a.encode([n(e.from),i.stripZeros(i.hexlify(t,"nonce"))])).substring(26))}}},{"./address":178,"./convert":183,"./keccak256":189,"./rlp":193}],183:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=(e("./properties.js").defineProperty,e("./errors"))
|
||
function o(e){return e.slice?e:(e.slice=function(){var t=Array.prototype.slice.call(arguments)
|
||
return new Uint8Array(Array.prototype.slice.apply(e,t))},e)}function a(e){if(!e||parseInt(e.length)!=e.length||"string"==typeof e)return!1
|
||
for(var t=0;t<e.length;t++){var r=e[t]
|
||
if(r<0||r>=256||parseInt(r)!=r)return!1}return!0}function s(e){if(null==e&&i.throwError("cannot convert null value to array",i.INVALID_ARGUMENT,{arg:"value",value:e}),e&&e.toHexString&&(e=e.toHexString()),u(e)){(e=e.substring(2)).length%2&&(e="0"+e)
|
||
for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16))
|
||
return o(new Uint8Array(t))}if("string"==typeof e&&(e.match(/^[0-9a-fA-F]*$/)&&i.throwError("hex string must have 0x prefix",i.INVALID_ARGUMENT,{arg:"value",value:e}),i.throwError("invalid hexidecimal string",i.INVALID_ARGUMENT,{arg:"value",value:e})),a(e))return o(new Uint8Array(e))
|
||
i.throwError("invalid arrayify value",{arg:"value",value:e,type:void 0===e?"undefined":n(e)})}function u(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}var c="0123456789abcdef"
|
||
function l(e){if(e&&e.toHexString)return e.toHexString()
|
||
if("number"==typeof e){e<0&&i.throwError("cannot hexlify negative value",i.INVALID_ARG,{arg:"value",value:e})
|
||
for(var t="";e;)t=c[15&e]+t,e=parseInt(e/16)
|
||
return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if(u(e))return e.length%2&&(e="0x0"+e.substring(2)),e
|
||
if(a(e)){for(var r=[],n=0;n<e.length;n++){var o=e[n]
|
||
r.push(c[(240&o)>>4]+c[15&o])}return"0x"+r.join("")}i.throwError("invalid hexlify value",{arg:"value",value:e})}t.exports={arrayify:s,isArrayish:a,concat:function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=s(e[n])
|
||
t.push(i),r+=i.length}var a=new Uint8Array(r),u=0
|
||
for(n=0;n<t.length;n++)a.set(t[n],u),u+=t[n].length
|
||
return o(a)},padZeros:function(e,t){if(t<(e=s(e)).length)throw new Error("cannot pad")
|
||
var r=new Uint8Array(t)
|
||
return r.set(e,t-e.length),o(r)},stripZeros:function(e){if(0===(e=s(e)).length)return e
|
||
for(var t=0;0===e[t];)t++
|
||
return t&&(e=e.slice(t)),e},splitSignature:function(e){if(65!==(e=s(e)).length)throw new Error("invalid signature")
|
||
var t=e[64]
|
||
return 27!==t&&28!==t&&(t=27+t%2),{r:l(e.slice(0,32)),s:l(e.slice(32,64)),v:t}},hexlify:l,isHexString:u,hexStripZeros:function(e){for(;e.length>3&&"0x0"===e.substring(0,3);)e="0x"+e.substring(3)
|
||
return e},hexZeroPad:function(e,t){for(;e.length<2*t+2;)e="0x0"+e.substring(2)
|
||
return e}}},{"./errors":185,"./properties.js":192}],184:[function(e,t,r){"use strict"
|
||
t.exports=void 0},{}],185:[function(e,t,r){"use strict"
|
||
var n=e("./properties").defineProperty,i={};["UNKNOWN_ERROR","NOT_IMPLEMENTED","MISSING_NEW","CALL_EXCEPTION","INVALID_ARGUMENT","MISSING_ARGUMENT","UNEXPECTED_ARGUMENT","UNSUPPORTED_OPERATION"].forEach(function(e){n(i,e,e)}),n(i,"throwError",function(e,t,r){t||(t=i.UNKNOWN_ERROR),r||(r={})
|
||
var n=[]
|
||
Object.keys(r).forEach(function(e){try{n.push(e+"="+JSON.stringify(r[e]))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})
|
||
var o=e
|
||
n.length&&(e+=" ("+n.join(", ")+")")
|
||
var a=new Error(e)
|
||
throw a.reason=o,a.code=t,Object.keys(r).forEach(function(e){a[e]=r[e]}),a}),n(i,"checkNew",function(e,t){e instanceof t||i.throwError("missing new",i.MISSING_NEW,{name:t.name})}),t.exports=i},{"./properties":192}],186:[function(e,t,r){"use strict"
|
||
var n=e("hash.js"),i=e("./sha2.js"),o=e("./convert.js")
|
||
t.exports={createSha256Hmac:function(e){return e.buffer||(e=o.arrayify(e)),new n.hmac(i.createSha256,e)},createSha512Hmac:function(e){return e.buffer||(e=o.arrayify(e)),new n.hmac(i.createSha512,e)}}},{"./convert.js":183,"./sha2.js":194,"hash.js":208}],187:[function(e,t,r){"use strict"
|
||
var n=e("./keccak256"),i=e("./utf8")
|
||
t.exports=function(e){return n(i.toUtf8Bytes(e))}},{"./keccak256":189,"./utf8":198}],188:[function(e,t,r){"use strict"
|
||
var n=e("./address"),i=e("./abi-coder"),o=e("./base64"),a=e("./bignumber"),s=e("./contract-address"),u=e("./convert"),c=e("./id"),l=e("./keccak256"),f=e("./namehash"),h=e("./sha2").sha256,d=e("./solidity"),p=e("./random-bytes"),m=e("./properties"),y=e("./rlp"),g=e("./utf8"),b=e("./units")
|
||
t.exports={AbiCoder:i,RLP:y,defineProperty:m.defineProperty,etherSymbol:"Ξ",arrayify:u.arrayify,concat:u.concat,padZeros:u.padZeros,stripZeros:u.stripZeros,base64:o,bigNumberify:a.bigNumberify,BigNumber:a.BigNumber,hexlify:u.hexlify,toUtf8Bytes:g.toUtf8Bytes,toUtf8String:g.toUtf8String,namehash:f,id:c,getAddress:n.getAddress,getContractAddress:s.getContractAddress,formatEther:b.formatEther,parseEther:b.parseEther,formatUnits:b.formatUnits,parseUnits:b.parseUnits,keccak256:l,sha256:h,randomBytes:p,solidityPack:d.pack,solidityKeccak256:d.keccak256,soliditySha256:d.sha256,splitSignature:u.splitSignature}},{"./abi-coder":177,"./address":178,"./base64":180,"./bignumber":179,"./contract-address":182,"./convert":183,"./id":187,"./keccak256":189,"./namehash":190,"./properties":192,"./random-bytes":181,"./rlp":193,"./sha2":194,"./solidity":195,"./units":197,"./utf8":198}],189:[function(e,t,r){"use strict"
|
||
var n=e("js-sha3"),i=e("./convert.js")
|
||
t.exports=function(e){return e=i.arrayify(e),"0x"+n.keccak_256(e)}},{"./convert.js":183,"js-sha3":383}],190:[function(e,t,r){"use strict"
|
||
var n=e("./convert"),i=e("./utf8"),o=e("./keccak256"),a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=new RegExp("^((.*)\\.)?([^.]+)$"),u=new RegExp("^[a-z0-9.-]*$")
|
||
t.exports=function(e,t){if(!(e=e.toLowerCase()).match(u))throw new Error("contains invalid UseSTD3ASCIIRules characters")
|
||
for(var r=a,c=0;e.length&&(!t||c<t);){var l=e.match(s),f=i.toUtf8Bytes(l[3])
|
||
r=o(n.concat([r,o(f)])),e=l[2]||"",c++}return n.hexlify(r)}},{"./convert":183,"./keccak256":189,"./utf8":198}],191:[function(e,t,r){"use strict"
|
||
var n=e("./convert")
|
||
t.exports=function(e,t,r,i,o){var a,s,u,c=1,l=new Uint8Array(i),f=new Uint8Array(t.length+4)
|
||
f.set(t)
|
||
for(var h=1;h<=c;h++){f[t.length]=h>>24&255,f[t.length+1]=h>>16&255,f[t.length+2]=h>>8&255,f[t.length+3]=255&h
|
||
var d=o(e).update(f).digest()
|
||
a||(a=d.length,u=new Uint8Array(a),s=i-((c=Math.ceil(i/a))-1)*a),u.set(d)
|
||
for(var p=1;p<r;p++){d=o(e).update(d).digest()
|
||
for(var m=0;m<a;m++)u[m]^=d[m]}var y=(h-1)*a,g=h===c?s:a
|
||
l.set(n.arrayify(u).slice(0,g),y)}return n.arrayify(l)}},{"./convert":183}],192:[function(e,t,r){"use strict"
|
||
t.exports={defineFrozen:function(e,t,r){var n=JSON.stringify(r)
|
||
Object.defineProperty(e,t,{enumerable:!0,get:function(){return JSON.parse(n)}})},defineProperty:function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}}},{}],193:[function(e,t,r){"use strict"
|
||
var n=e("./convert.js")
|
||
function i(e){for(var t=[];e;)t.unshift(255&e),e>>=8
|
||
return t}function o(e,t,r){for(var n=0,i=0;i<r;i++)n=256*n+e[t+i]
|
||
return n}function a(e,t,r,n){for(var i=[];r<t+1+n;){var o=s(e,r)
|
||
if(i.push(o.result),(r+=o.consumed)>t+1+n)throw new Error("invalid rlp")}return{consumed:1+n,result:i}}function s(e,t){if(0===e.length)throw new Error("invalid rlp data")
|
||
if(e[t]>=248){if(t+1+(r=e[t]-247)>e.length)throw new Error("too short")
|
||
if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("to short")
|
||
return a(e,t,t+1+r,r+i)}if(e[t]>=192){if(t+1+(i=e[t]-192)>e.length)throw new Error("invalid rlp data")
|
||
return a(e,t,t+1,i)}if(e[t]>=184){var r
|
||
if(t+1+(r=e[t]-183)>e.length)throw new Error("invalid rlp data")
|
||
if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("invalid rlp data")
|
||
return{consumed:1+r+i,result:n.hexlify(e.slice(t+1+r,t+1+r+i))}}if(e[t]>=128){var i
|
||
if(t+1+(i=e[t]-128)>e.offset)throw new Error("invlaid rlp data")
|
||
return{consumed:1+i,result:n.hexlify(e.slice(t+1,t+1+i))}}return{consumed:1,result:n.hexlify(e[t])}}t.exports={encode:function(e){return n.hexlify(function e(t){if(Array.isArray(t)){var r=[]
|
||
return t.forEach(function(t){r=r.concat(e(t))}),r.length<=55?(r.unshift(192+r.length),r):((o=i(r.length)).unshift(247+o.length),o.concat(r))}return 1===(t=[].slice.call(n.arrayify(t))).length&&t[0]<=127?t:t.length<=55?(t.unshift(128+t.length),t):((o=i(t.length)).unshift(183+o.length),o.concat(t))
|
||
var o}(e))},decode:function(e){var t=s(e=n.arrayify(e),0)
|
||
if(t.consumed!==e.length)throw new Error("invalid rlp data")
|
||
return t.result}}},{"./convert.js":183}],194:[function(e,t,r){"use strict"
|
||
var n=e("hash.js"),i=e("./convert.js")
|
||
t.exports={sha256:function(e){return e=i.arrayify(e),"0x"+n.sha256().update(e).digest("hex")},sha512:function(e){return e=i.arrayify(e),"0x"+n.sha512().update(e).digest("hex")},createSha256:n.sha256,createSha512:n.sha512}},{"./convert.js":183,"hash.js":208}],195:[function(e,t,r){"use strict"
|
||
var n=e("./bignumber").bigNumberify,i=e("./convert"),o=(e("./address").getAddress,e("./utf8")),a=e("./keccak256"),s=e("./sha2").sha256,u=new RegExp("^bytes([0-9]+)$"),c=new RegExp("^(u?int)([0-9]*)$"),l=new RegExp("^(.*)\\[([0-9]*)\\]$"),f="0000000000000000000000000000000000000000000000000000000000000000"
|
||
function h(e,t){if(e.length!=t.length)throw new Error("type/value count mismatch")
|
||
var r=[]
|
||
return e.forEach(function(e,a){r.push(function e(t,r,a){switch(t){case"address":return a?i.padZeros(r,32):i.arrayify(r)
|
||
case"string":return o.toUtf8Bytes(r)
|
||
case"bytes":return i.arrayify(r)
|
||
case"bool":return r=r?"0x01":"0x00",a?i.padZeros(r,32):i.arrayify(r)}var s=t.match(c)
|
||
if(s){if(s[1],(h=parseInt(s[2]||"256"))%8!=0||0===h||h>256)throw new Error("invalid number type - "+t)
|
||
return a&&(h=256),r=n(r).toTwos(h),i.padZeros(r,h/8)}if(s=t.match(u)){var h
|
||
if((h=s[1])!=parseInt(h)||0===h||h>32)throw new Error("invalid number type - "+t)
|
||
if(h=parseInt(h),i.arrayify(r).byteLength!==h)throw new Error("invalid value for "+t)
|
||
return a?(r+f).substring(0,66):r}if(s=t.match(l)){var d=s[1]
|
||
if(parseInt(s[2]||r.length)!=r.length)throw new Error("invalid value for "+t)
|
||
var p=[]
|
||
return r.forEach(function(t){t=e(d,t,!0),p.push(t)}),i.concat(p)}throw new Error("unknown type - "+t)}(e,t[a]))}),i.hexlify(i.concat(r))}t.exports={pack:h,keccak256:function(e,t){return a(h(e,t))},sha256:function(e,t){return s(h(e,t))}}},{"./address":178,"./bignumber":179,"./convert":183,"./keccak256":189,"./sha2":194,"./utf8":198}],196:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){var r=new Error(e)
|
||
for(var n in t)r[n]=t[n]
|
||
throw r}},{}],197:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./bignumber.js").bigNumberify,o=e("./throw-error"),a=new i(0),s=new i(-1),u=["wei","kwei","Mwei","Gwei","szabo","finny","ether"],c=function(){var e={}
|
||
function t(e){return{decimals:e.length-1,tenPower:i(e)}}var r="1"
|
||
return u.forEach(function(n){var i=t(r)
|
||
e[n.toLowerCase()]=i,e[String(i.decimals)]=i,r+="000"}),function(r){var n=e[String(r).toLowerCase()]
|
||
if(!n&&"number"==typeof r&&parseInt(r)==r&&r>=0&&r<=256){for(var i="1",a=0;a<r;a++)i+="0"
|
||
n=t(i)}return n||o("invalid unitType",{unitType:r}),n}}()
|
||
function l(e,t,r){"object"!==(void 0===t?"undefined":n(t))||r||(r=t,t=void 0),null==t&&(t=18)
|
||
var o=c(t)
|
||
e=i(e),r||(r={})
|
||
var u=e.lt(a)
|
||
u&&(e=e.mul(s))
|
||
for(var l=e.mod(o.tenPower).toString(10);l.length<o.decimals;)l="0"+l
|
||
r.pad||(l=l.match(/^([0-9]*[1-9]|0)(0*)/)[1])
|
||
var f=e.div(o.tenPower).toString(10)
|
||
r.commify&&(f=f.replace(/\B(?=(\d{3})+(?!\d))/g,","))
|
||
e=f+"."+l
|
||
return u&&(e="-"+e),e}function f(e,t){null==t&&(t=18)
|
||
var r=c(t)
|
||
"string"==typeof e&&e.match(/^-?[0-9.,]+$/)||o("invalid value",{input:e})
|
||
var n="-"===(e=e.replace(/,/g,"")).substring(0,1)
|
||
n&&(e=e.substring(1)),"."===e&&o("invalid value",{input:e})
|
||
var a=e.split(".")
|
||
a.length>2&&o("too many decimal points",{input:e})
|
||
var u=a[0],l=a[1]
|
||
for(u||(u="0"),l||(l="0"),l.length>r.decimals&&o("too many decimal places",{input:e,decimals:l.length});l.length<r.decimals;)l+="0"
|
||
u=i(u),l=i(l)
|
||
var f=u.mul(r.tenPower).add(l)
|
||
return n&&(f=f.mul(s)),f}t.exports={formatEther:function(e,t){return l(e,18,t)},parseEther:function(e){return f(e,18)},formatUnits:l,parseUnits:f}},{"./bignumber.js":179,"./throw-error":196}],198:[function(e,t,r){"use strict"
|
||
var n=e("./convert.js")
|
||
t.exports={toUtf8Bytes:function(e){for(var t=[],r=0,i=0;i<e.length;i++){var o=e.charCodeAt(i)
|
||
o<128?t[r++]=o:o<2048?(t[r++]=o>>6|192,t[r++]=63&o|128):55296==(64512&o)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),t[r++]=o>>18|240,t[r++]=o>>12&63|128,t[r++]=o>>6&63|128,t[r++]=63&o|128):(t[r++]=o>>12|224,t[r++]=o>>6&63|128,t[r++]=63&o|128)}return n.arrayify(t)},toUtf8String:function(e){e=n.arrayify(e)
|
||
for(var t="",r=0;r<e.length;){var i=e[r++]
|
||
if(i>>7!=0){if(i>>6!=2){var o=null
|
||
if(i>>5==6)o=1
|
||
else if(i>>4==14)o=2
|
||
else if(i>>3==30)o=3
|
||
else if(i>>2==62)o=4
|
||
else{if(i>>1!=126)continue
|
||
o=5}if(r+o>e.length){for(;r<e.length&&e[r]>>6==2;r++);if(r!=e.length)continue
|
||
return t}var a,s=i&(1<<8-o-1)-1
|
||
for(a=0;a<o;a++){var u=e[r++]
|
||
if(u>>6!=2)break
|
||
s=s<<6|63&u}a==o?s<=65535?t+=String.fromCharCode(s):(s-=65536,t+=String.fromCharCode(55296+(s>>10&1023),56320+(1023&s))):r--}}else t+=String.fromCharCode(i)}return t}}},{"./convert.js":183}],199:[function(e,t,r){"use strict"
|
||
var n,i,o,a=new(e("elliptic").ec)("secp256k1"),s=e("./words.json").replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),u=(n=e("../utils/convert.js"),i=e("../utils/sha2"),o=e("../utils/hmac"),{defineProperty:e("../utils/properties.js").defineProperty,arrayify:n.arrayify,bigNumberify:e("../utils/bignumber.js").bigNumberify,hexlify:n.hexlify,toUtf8Bytes:e("../utils/utf8.js").toUtf8Bytes,sha256:i.sha256,createSha512Hmac:o.createSha512Hmac,pbkdf2:e("../utils/pbkdf2.js")}),c=u.toUtf8Bytes("Bitcoin seed")
|
||
function l(e){return(1<<e)-1<<8-e}function f(e,t,r,n){if(!(this instanceof f))throw new Error("missing new")
|
||
u.defineProperty(this,"_keyPair",e),u.defineProperty(this,"privateKey",u.hexlify(e.priv.toArray("be",32))),u.defineProperty(this,"publicKey","0x"+e.getPublic(!0,"hex")),u.defineProperty(this,"chainCode",u.hexlify(t)),u.defineProperty(this,"index",r),u.defineProperty(this,"depth",n)}function h(e,t){if(t)if(t.normalize)t=t.normalize("NFKD")
|
||
else for(var r=0;r<t.length;r++){var n=t.charCodeAt(r)
|
||
if(n<32||n>127)throw new Error("passwords with non-ASCII characters not supported in this environment")}else t=""
|
||
e=u.toUtf8Bytes(e,"NFKD")
|
||
var i=u.toUtf8Bytes("mnemonic"+t,"NFKD")
|
||
return u.hexlify(u.pbkdf2(e,i,2048,64,u.createSha512Hmac))}function d(e){var t=e.toLowerCase().split(" ")
|
||
if(t.length%3!=0)throw new Error("invalid mnemonic")
|
||
for(var r=u.arrayify(new Uint8Array(Math.ceil(11*t.length/8))),n=0,i=0;i<t.length;i++){var o=s.indexOf(t[i])
|
||
if(-1===o)throw new Error("invalid mnemonic")
|
||
for(var a=0;a<11;a++)o&1<<10-a&&(r[n>>3]|=1<<7-n%8),n++}var c=32*t.length/3,f=l(t.length/3),h=u.arrayify(u.sha256(r.slice(0,c/8)))[0]
|
||
if((h&=f)!==(r[r.length-1]&f))throw new Error("invalid checksum")
|
||
return u.hexlify(r.slice(0,c/8))}u.defineProperty(f.prototype,"_derive",function(e){if(!this.privateKey){if(e>=2147483648)throw new Error("cannot derive child of neutered node")
|
||
throw new Error("not implemented")}var t=new Uint8Array(37)
|
||
2147483648&e?t.set(u.arrayify(this.privateKey),1):t.set(this._keyPair.getPublic().encode(null,!0))
|
||
for(var r=24;r>=0;r-=8)t[33+(r>>3)]=e>>24-r&255
|
||
var n=u.arrayify(u.createSha512Hmac(this.chainCode).update(t).digest()),i=u.bigNumberify(n.slice(0,32)),o=(n.slice(32),i.add("0x"+this._keyPair.getPrivate("hex")).mod("0x"+a.curve.n.toString(16)))
|
||
return new f(a.keyFromPrivate(u.arrayify(o)),n.slice(32),e,this.depth+1)}),u.defineProperty(f.prototype,"derivePath",function(e){var t=e.split("/")
|
||
if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path")
|
||
"m"===t[0]&&t.shift()
|
||
for(var r=this,n=0;n<t.length;n++){var i=t[n]
|
||
if(i.match(/^[0-9]+'$/)){if((o=parseInt(i.substring(0,i.length-1)))>=2147483648)throw new Error("invalid path index - "+i)
|
||
r=r._derive(2147483648+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invlaid path component - "+i)
|
||
var o
|
||
if((o=parseInt(i))>=2147483648)throw new Error("invalid path index - "+i)
|
||
r=r._derive(o)}}return r}),u.defineProperty(f,"fromMnemonic",function(e){return d(e),f.fromSeed(h(e))}),u.defineProperty(f,"fromSeed",function(e){if((e=u.arrayify(e)).length<16||e.length>64)throw new Error("invalid seed")
|
||
var t=u.arrayify(u.createSha512Hmac(c).update(e).digest())
|
||
return new f(a.keyFromPrivate(t.slice(0,32)),t.slice(32),0,0,0)}),t.exports={fromMnemonic:f.fromMnemonic,fromSeed:f.fromSeed,mnemonicToEntropy:d,entropyToMnemonic:function(e){if((e=u.arrayify(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy")
|
||
for(var t=[0],r=11,n=0;n<e.length;n++)r>8?(t[t.length-1]<<=8,t[t.length-1]|=e[n],r-=8):(t[t.length-1]<<=r,t[t.length-1]|=e[n]>>8-r,t.push(e[n]&(1<<8-r)-1),r+=3)
|
||
var i=u.arrayify(u.sha256(e))[0],o=e.length/4
|
||
for(i&=l(o),t[t.length-1]<<=o,t[t.length-1]|=i>>8-o,n=0;n<t.length;n++)t[n]=s[t[n]]
|
||
return t.join(" ")},mnemonicToSeed:h,isValidMnemonic:function(e){try{return d(e),!0}catch(e){}return!1}}},{"../utils/bignumber.js":179,"../utils/convert.js":183,"../utils/hmac":186,"../utils/pbkdf2.js":191,"../utils/properties.js":192,"../utils/sha2":194,"../utils/utf8.js":198,"./words.json":204,elliptic:90}],200:[function(e,t,r){"use strict"
|
||
var n=e("./wallet"),i=e("./hdnode"),o=e("./signing-key")
|
||
t.exports={HDNode:i,Wallet:n,SigningKey:o}},{"./hdnode":199,"./signing-key":202,"./wallet":203}],201:[function(e,t,r){"use strict"
|
||
var n=e("aes-js"),i=e("scrypt-js"),o=e("uuid"),a=e("../utils/hmac"),s=e("../utils/pbkdf2"),u=e("../utils"),c=e("./signing-key"),l=e("./hdnode")
|
||
function f(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),u.arrayify(e)}function h(e,t){for(e=String(e);e.length<t;)e="0"+e
|
||
return e}function d(e){return"string"==typeof e?u.toUtf8Bytes(e,"NFKC"):u.arrayify(e,"password")}function p(e,t){for(var r=e,n=t.toLowerCase().split("/"),i=0;i<n.length;i++){var o=null
|
||
for(var a in r)if(a.toLowerCase()===n[i]){o=r[a]
|
||
break}if(null===o)return null
|
||
r=o}return r}var m={}
|
||
u.defineProperty(m,"isCrowdsaleWallet",function(e){try{var t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}),u.defineProperty(m,"isValidWallet",function(e){try{var t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}),u.defineProperty(m,"decryptCrowdsale",function(e,t){var r=JSON.parse(e)
|
||
t=d(t)
|
||
var i=u.getAddress(p(r,"ethaddr")),o=f(p(r,"encseed"))
|
||
if(!o||o.length%16!=0)throw new Error("invalid encseed")
|
||
var l=s(t,t,2e3,32,a.createSha256Hmac).slice(0,16),h=o.slice(0,16),m=o.slice(16),y=new n.ModeOfOperation.cbc(l,h),g=u.arrayify(y.decrypt(m))
|
||
g=n.padding.pkcs7.strip(g)
|
||
for(var b="",v=0;v<g.length;v++)b+=String.fromCharCode(g[v])
|
||
var _=u.toUtf8Bytes(b),w=new c(u.keccak256(_))
|
||
if(w.address!==i)throw new Error("corrupt crowdsale wallet")
|
||
return w}),u.defineProperty(m,"decrypt",function(e,t,r){var o=JSON.parse(e)
|
||
t=d(t)
|
||
var h=function(e,t){var r=f(p(o,"crypto/ciphertext"))
|
||
if(u.hexlify(function(e,t){return u.keccak256(u.concat([e,t]))}(e.slice(16,32),r)).substring(2)!==p(o,"crypto/mac").toLowerCase())return t(new Error("invalid password")),null
|
||
var i=function(e,t){if("aes-128-ctr"===p(o,"crypto/cipher")){var r=f(p(o,"crypto/cipherparams/iv")),i=new n.Counter(r)
|
||
return f(new n.ModeOfOperation.ctr(e,i).decrypt(t))}return null}(e.slice(0,16),r),a=e.slice(32,64)
|
||
if(!i)return t(new Error("unsupported cipher")),null
|
||
var s=new c(i)
|
||
if(s.address!==u.getAddress(o.address))return t(new Error("address mismatch")),null
|
||
if("0.1"===p(o,"x-ethers/version")){var h=f(p(o,"x-ethers/mnemonicCiphertext")),d=f(p(o,"x-ethers/mnemonicCounter")),m=new n.Counter(d),y=new n.ModeOfOperation.ctr(a,m),g=p(o,"x-ethers/path")||"m/44'/60'/0'/0/0",b=f(y.decrypt(h)),v=l.entropyToMnemonic(b)
|
||
if(l.fromMnemonic(v).derivePath(g).privateKey!=u.hexlify(i))return t(new Error("mnemonic mismatch")),null
|
||
s.mnemonic=v,s.path=g}return s}
|
||
return new Promise(function(e,n){var u=p(o,"crypto/kdf")
|
||
if(u&&"string"==typeof u)if("scrypt"===u.toLowerCase()){var c=f(p(o,"crypto/kdfparams/salt")),l=parseInt(p(o,"crypto/kdfparams/n")),d=parseInt(p(o,"crypto/kdfparams/r")),m=parseInt(p(o,"crypto/kdfparams/p"))
|
||
if(!l||!d||!m)return void n(new Error("unsupported key-derivation function parameters"))
|
||
if(0!=(l&l-1))return void n(new Error("unsupported key-derivation function parameter value for N"))
|
||
if(32!==(b=parseInt(p(o,"crypto/kdfparams/dklen"))))return void n(new Error("unsupported key-derivation derived-key length"))
|
||
i(t,c,l,d,m,64,function(t,i,o){if(t)t.progress=i,n(t)
|
||
else if(o){o=f(o)
|
||
var a=h(o,n)
|
||
if(!a)return
|
||
r&&r(1),e(a)}else if(r)return r(i)})}else if("pbkdf2"===u.toLowerCase()){c=f(p(o,"crypto/kdfparams/salt"))
|
||
var y=null,g=p(o,"crypto/kdfparams/prf")
|
||
if("hmac-sha256"===g)y=a.createSha256Hmac
|
||
else{if("hmac-sha512"!==g)return void n(new Error("unsupported prf"))
|
||
y=a.createSha512Hmac}var b,v=parseInt(p(o,"crypto/kdfparams/c"))
|
||
if(32!==(b=parseInt(p(o,"crypto/kdfparams/dklen"))))return void n(new Error("unsupported key-derivation derived-key length"))
|
||
var _=s(t,c,v,b,y),w=h(_,n)
|
||
if(!w)return
|
||
e(w)}else n(new Error("unsupported key-derivation function"))
|
||
else n(new Error("unsupported key-derivation function"))})}),u.defineProperty(m,"encrypt",function(e,t,r,a){if("function"!=typeof r||a||(a=r,r={}),r||(r={}),e instanceof c&&(e=e.privateKey),32!==(e=f(e)).length)throw new Error("invalid private key")
|
||
t=d(t)
|
||
var s=r.entropy
|
||
if(r.mnemonic)if(s){if(l.entropyToMnemonic(s)!==r.mnemonic)throw new Error("entropy and mnemonic mismatch")}else s=l.mnemonicToEntropy(r.mnemonic)
|
||
s&&(s=f(s))
|
||
var p=r.path
|
||
s&&!p&&(p="m/44'/60'/0'/0/0")
|
||
var m=r.client
|
||
m||(m="ethers.js")
|
||
var y=r.salt
|
||
y=y?f(y):u.randomBytes(32)
|
||
var g=null
|
||
if(r.iv){if(16!==(g=f(r.iv)).length)throw new Error("invalid iv")}else g=u.randomBytes(16)
|
||
var b=r.uuid
|
||
if(b){if(16!==(b=f(b)).length)throw new Error("invalid uuid")}else b=u.randomBytes(16)
|
||
var v=1<<17,_=8,w=1
|
||
return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(_=r.scrypt.r),r.scrypt.p&&(w=r.scrypt.p)),new Promise(function(r,l){i(t,y,v,_,w,64,function(t,i,d){if(t)t.progress=i,l(t)
|
||
else if(d){var p=(d=f(d)).slice(0,16),S=d.slice(16,32),E=d.slice(32,64),k=new c(e).address,x=new n.Counter(g),C=new n.ModeOfOperation.ctr(p,x),A=u.arrayify(C.encrypt(e)),T=u.keccak256(u.concat([S,A])),I={address:k.substring(2).toLowerCase(),id:o.v4({random:b}),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:u.hexlify(g).substring(2)},ciphertext:u.hexlify(A).substring(2),kdf:"scrypt",kdfparams:{salt:u.hexlify(y).substring(2),n:v,dklen:32,p:w,r:_},mac:T.substring(2)}}
|
||
if(s){var P=u.randomBytes(16),M=new n.Counter(P),R=new n.ModeOfOperation.ctr(E,M),O=u.arrayify(R.encrypt(s)),B=new Date,N=B.getUTCFullYear()+"-"+h(B.getUTCMonth()+1,2)+"-"+h(B.getUTCDate(),2)+"T"+h(B.getUTCHours(),2)+"-"+h(B.getUTCMinutes(),2)+"-"+h(B.getUTCSeconds(),2)+".0Z"
|
||
I["x-ethers"]={client:m,gethFilename:"UTC--"+N+"--"+I.address,mnemonicCounter:u.hexlify(P).substring(2),mnemonicCiphertext:u.hexlify(O).substring(2),version:"0.1"}}a&&a(1),r(JSON.stringify(I))}else if(a)return a(i)})})}),t.exports=m},{"../utils":188,"../utils/hmac":186,"../utils/pbkdf2":191,"./hdnode":199,"./signing-key":202,"aes-js":1,"scrypt-js":609,uuid:166}],202:[function(e,t,r){"use strict"
|
||
var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=new(e("elliptic").ec)("secp256k1"),a=(n=e("../utils/convert"),{defineProperty:e("../utils/properties").defineProperty,arrayify:n.arrayify,hexlify:n.hexlify,getAddress:e("../utils/address").getAddress,keccak256:e("../utils/keccak256")}),s=e("../utils/errors")
|
||
function u(e){s.checkNew(this,u)
|
||
try{32!==(e=a.arrayify(e)).length&&s.throwError("exactly 32 bytes required",s.INVALID_ARGUMENT,{value:e})}catch(e){var t={arg:"privateKey",reason:e.reason,value:"[REDACTED]"}
|
||
e.value&&("number"==typeof e.value.length&&(t.length=e.value.length),t.type=i(e.value)),s.throwError("invalid private key",e.code,t)}a.defineProperty(this,"privateKey",a.hexlify(e))
|
||
var r=o.keyFromPrivate(e)
|
||
a.defineProperty(this,"publicKey","0x"+r.getPublic(!0,"hex"))
|
||
var n=u.publicKeyToAddress("0x"+r.getPublic(!1,"hex"))
|
||
a.defineProperty(this,"address",n),a.defineProperty(this,"signDigest",function(e){var t=r.sign(a.arrayify(e),{canonical:!0})
|
||
return{recoveryParam:t.recoveryParam,r:"0x"+t.r.toString(16),s:"0x"+t.s.toString(16)}})}a.defineProperty(u,"recover",function(e,t,r,n){var i={r:a.arrayify(t),s:a.arrayify(r)},s=o.recoverPubKey(a.arrayify(e),i,n)
|
||
return u.publicKeyToAddress("0x"+s.encode("hex",!1))}),a.defineProperty(u,"getPublicKey",function(e,t){if(t=!!t,32===(e=a.arrayify(e)).length)return"0x"+o.keyFromPrivate(e).getPublic(t,"hex")
|
||
if(33===e.length)return"0x"+o.keyFromPublic(e).getPublic(t,"hex")
|
||
if(65===e.length)return"0x"+o.keyFromPublic(e).getPublic(t,"hex")
|
||
throw new Error("invalid value")}),a.defineProperty(u,"publicKeyToAddress",function(e){return e="0x"+u.getPublicKey(e,!1).slice(4),a.getAddress("0x"+a.keccak256(e).substring(26))}),t.exports=u},{"../utils/address":178,"../utils/convert":183,"../utils/errors":185,"../utils/keccak256":189,"../utils/properties":192,elliptic:90}],203:[function(e,t,r){"use strict"
|
||
var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("scrypt-js"),a=(n=e("../utils/convert"),{defineProperty:e("../utils/properties").defineProperty,arrayify:n.arrayify,concat:n.concat,hexlify:n.hexlify,stripZeros:n.stripZeros,hexZeroPad:n.hexZeroPad,bigNumberify:e("../utils/bignumber").bigNumberify,toUtf8Bytes:e("../utils/utf8").toUtf8Bytes,getAddress:e("../utils/address").getAddress,keccak256:e("../utils/keccak256"),randomBytes:e("../utils").randomBytes,RLP:e("../utils/rlp")}),s=e("../utils/errors"),u=e("./hdnode"),c=e("./secret-storage"),l=e("./signing-key")
|
||
e("setimmediate")
|
||
var f=[{name:"nonce",maxLength:32},{name:"gasPrice",maxLength:32},{name:"gasLimit",maxLength:32},{name:"to",length:20},{name:"value",maxLength:32},{name:"data"}]
|
||
function h(e,t){s.checkNew(this,h)
|
||
var r=e
|
||
e instanceof l||(r=new l(e)),a.defineProperty(this,"privateKey",r.privateKey),Object.defineProperty(this,"provider",{enumerable:!0,get:function(){return t},set:function(e){t=e}}),t&&(this.provider=t)
|
||
var n=15e5
|
||
Object.defineProperty(this,"defaultGasLimit",{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw new Error("invalid defaultGasLimit")
|
||
n=e}}),a.defineProperty(this,"address",r.address),a.defineProperty(this,"sign",function(e){var t=e.chainId
|
||
null==t&&this.provider&&(t=this.provider.chainId),t||(t=0)
|
||
var n=[]
|
||
f.forEach(function(t){var r,i=e[t.name]||[]
|
||
if(i=a.arrayify(a.hexlify(i),t.name),t.length&&i.length!==t.length&&i.length>0)throw(r=new Error("invalid "+t.name)).reason="wrong length",r.value=i,r
|
||
if(t.maxLength&&(i=a.stripZeros(i)).length>t.maxLength)throw(r=new Error("invalid "+t.name)).reason="too long",r.value=i,r
|
||
n.push(a.hexlify(i))}),t&&(n.push(a.hexlify(t)),n.push("0x"),n.push("0x"))
|
||
var i=a.keccak256(a.RLP.encode(n)),o=r.signDigest(i),s=27+o.recoveryParam
|
||
return t&&(n.pop(),n.pop(),n.pop(),s+=2*t+8),n.push(a.hexlify(s)),n.push(o.r),n.push(o.s),a.RLP.encode(n)})}function d(e){var t=a.concat([a.toUtf8Bytes("Ethereum Signed Message:\n"),a.toUtf8Bytes(String(e.length)),"string"==typeof e?a.toUtf8Bytes(e):e])
|
||
return a.keccak256(t)}a.defineProperty(h,"parseTransaction",function(e){e=a.hexlify(e,"rawTransaction")
|
||
var t=a.RLP.decode(e)
|
||
if(9!==t.length)throw new Error("invalid transaction")
|
||
var r=[],n={}
|
||
f.forEach(function(e,i){n[e.name]=t[i],r.push(t[i])}),n.to&&("0x"==n.to?delete n.to:n.to=a.getAddress(n.to)),["gasPrice","gasLimit","nonce","value"].forEach(function(e){n[e]&&(0===n[e].length?n[e]=a.bigNumberify(0):n[e]=a.bigNumberify(n[e]))}),n.nonce?n.nonce=n.nonce.toNumber():n.nonce=0
|
||
var i=a.arrayify(t[6]),o=a.arrayify(t[7]),s=a.arrayify(t[8])
|
||
if(i.length>=1&&o.length>=1&&o.length<=32&&s.length>=1&&s.length<=32){n.v=a.bigNumberify(i).toNumber(),n.r=t[7],n.s=t[8]
|
||
var u=(n.v-35)/2
|
||
u<0&&(u=0),u=parseInt(u),n.chainId=u
|
||
var c=n.v-27
|
||
u&&(r.push(a.hexlify(u)),r.push("0x"),r.push("0x"),c-=2*u+8)
|
||
var h=a.keccak256(a.RLP.encode(r))
|
||
try{n.from=l.recover(h,o,s,c)}catch(e){console.log(e)}}return n}),a.defineProperty(h.prototype,"getAddress",function(){return this.address}),a.defineProperty(h.prototype,"getBalance",function(e){if(!this.provider)throw new Error("missing provider")
|
||
return this.provider.getBalance(this.address,e)}),a.defineProperty(h.prototype,"getTransactionCount",function(e){if(!this.provider)throw new Error("missing provider")
|
||
return this.provider.getTransactionCount(this.address,e)}),a.defineProperty(h.prototype,"estimateGas",function(e){if(!this.provider)throw new Error("missing provider")
|
||
var t={}
|
||
return["from","to","data","value"].forEach(function(r){null!=e[r]&&(t[r]=e[r])}),null==e.from&&(t.from=this.address),this.provider.estimateGas(t)}),a.defineProperty(h.prototype,"sendTransaction",function(e){if(!this.provider)throw new Error("missing provider")
|
||
if(!e||"object"!==(void 0===e?"undefined":i(e)))throw new Error("invalid transaction object")
|
||
var t=e.gasLimit
|
||
null==t&&(t=this.defaultGasLimit)
|
||
var r=this,n=null
|
||
n=e.gasPrice?Promise.resolve(e.gasPrice):this.provider.getGasPrice()
|
||
var o=null
|
||
o=e.nonce?Promise.resolve(e.nonce):this.provider.getTransactionCount(r.address,"pending")
|
||
var s=this.provider.chainId,u=null
|
||
u=e.to?this.provider.resolveName(e.to):Promise.resolve(void 0)
|
||
var c=a.hexlify(e.data||"0x"),l=a.hexlify(e.value||0)
|
||
return Promise.all([n,o,u]).then(function(e){var n=r.sign({to:e[2],data:c,gasLimit:t,gasPrice:e[0],nonce:e[1],value:l,chainId:s})
|
||
return r.provider.sendTransaction(n).then(function(e){var t=h.parseTransaction(n)
|
||
return t.hash=e,t.wait=function(){return r.provider.waitForTransaction(e)},t})})}),a.defineProperty(h.prototype,"send",function(e,t,r){return r||(r={}),this.sendTransaction({to:e,gasLimit:r.gasLimit,gasPrice:r.gasPrice,nonce:r.nonce,value:t})}),a.defineProperty(h.prototype,"signMessage",function(e){var t=new l(this.privateKey).signDigest(d(e))
|
||
return a.hexZeroPad(t.r,32)+a.hexZeroPad(t.s,32).substring(2)+(t.recoveryParam?"1c":"1b")}),a.defineProperty(h,"verifyMessage",function(e,t){if(132!=(t=a.hexlify(t)).length)throw new Error("invalid signature")
|
||
var r=d(e),n=parseInt(t.substring(130),16)
|
||
if(n>=27&&(n-=27),n<0)throw new Error("invalid signature")
|
||
return l.recover(r,t.substring(0,66),"0x"+t.substring(66,130),n)}),a.defineProperty(h.prototype,"encrypt",function(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback")
|
||
if(t||(t={}),this.mnemonic){var n={}
|
||
for(var i in t)n[i]=t[i];(t=n).mnemonic=this.mnemonic,t.path=this.path}return c.encrypt(this.privateKey,e,t,r)}),a.defineProperty(h,"isEncryptedWallet",function(e){return c.isValidWallet(e)||c.isCrowdsaleWallet(e)}),a.defineProperty(h,"createRandom",function(e){var t=a.randomBytes(16)
|
||
e||(e={}),e.extraEntropy&&(t=a.keccak256(a.concat([t,e.extraEntropy])).substring(0,34))
|
||
var r=u.entropyToMnemonic(t)
|
||
return h.fromMnemonic(r,e.path)}),a.defineProperty(h,"fromEncryptedWallet",function(e,t,r){if(r&&"function"!=typeof r)throw new Error("invalid callback")
|
||
return new Promise(function(n,i){if(c.isCrowdsaleWallet(e))try{var o=c.decryptCrowdsale(e,t)
|
||
n(new h(o))}catch(e){i(e)}else c.isValidWallet(e)?c.decrypt(e,t,r).then(function(e){var t=new h(e)
|
||
e.mnemonic&&e.path&&(a.defineProperty(t,"mnemonic",e.mnemonic),a.defineProperty(t,"path",e.path)),n(t)},function(e){i(e)}):i("invalid wallet JSON")})}),a.defineProperty(h,"fromMnemonic",function(e,t){t||(t="m/44'/60'/0'/0/0")
|
||
var r=new h(u.fromMnemonic(e).derivePath(t).privateKey)
|
||
return a.defineProperty(r,"mnemonic",e),a.defineProperty(r,"path",t),r}),a.defineProperty(h,"fromBrainWallet",function(e,t,r){if(r&&"function"!=typeof r)throw new Error("invalid callback")
|
||
return e="string"==typeof e?a.toUtf8Bytes(e,"NFKC"):a.arrayify(e,"password"),t="string"==typeof t?a.toUtf8Bytes(t,"NFKC"):a.arrayify(t,"password"),new Promise(function(n,i){o(t,e,1<<18,8,1,32,function(e,t,o){if(e)i(e)
|
||
else if(o)n(new h(a.hexlify(o)))
|
||
else if(r)return r(t)})})}),t.exports=h},{"../utils":188,"../utils/address":178,"../utils/bignumber":179,"../utils/convert":183,"../utils/errors":185,"../utils/keccak256":189,"../utils/properties":192,"../utils/rlp":193,"../utils/utf8":198,"./hdnode":199,"./secret-storage":201,"./signing-key":202,"scrypt-js":609,setimmediate:621}],204:[function(e,t,r){t.exports="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo"},{}],205:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("md5.js")
|
||
t.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length")
|
||
for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var l=new i
|
||
l.update(c),l.update(e),t&&l.update(t),c=l.digest()
|
||
var f=0
|
||
if(a>0){var h=s.length-a
|
||
f=Math.min(a,c.length),c.copy(s,h,0,f),a-=f}if(f<c.length&&o>0){var d=u.length-o,p=Math.min(o,c.length-f)
|
||
c.copy(u,d,f,f+p),o-=p}}return c.fill(0),{key:s,iv:u}}},{"md5.js":460,"safe-buffer":608}],206:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t,r){var n=[]
|
||
return Array.isArray(e)?(e.forEach(function(e,i,o){var a=t.call(r,e,i,o)
|
||
Array.isArray(a)?n.push.apply(n,a):null!=a&&n.push(a)}),n):n}},{}],207:[function(e,t,r){"use strict"
|
||
t.exports=e("constants")},{constants:112}],208:[function(e,t,r){"use strict"
|
||
var n=r
|
||
n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":209,"./hash/hmac":210,"./hash/ripemd":211,"./hash/sha":212,"./hash/utils":219}],209:[function(e,t,r){"use strict"
|
||
var n=e("./utils"),i=e("minimalistic-assert")
|
||
function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8
|
||
this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian)
|
||
for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength)
|
||
n[0]=128
|
||
for(var i=1;i<r;i++)n[i]=0
|
||
if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0
|
||
n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0
|
||
return n}},{"./utils":219,"minimalistic-assert":464}],210:[function(e,t,r){"use strict"
|
||
var n=e("./utils"),i=e("minimalistic-assert")
|
||
function o(e,t,r){if(!(this instanceof o))return new o(e,t,r)
|
||
this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}t.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize)
|
||
for(var t=e.length;t<this.blockSize;t++)e.push(0)
|
||
for(t=0;t<e.length;t++)e[t]^=54
|
||
for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106
|
||
this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":219,"minimalistic-assert":464}],211:[function(e,t,r){"use strict"
|
||
var n=e("./utils"),i=e("./common"),o=n.rotl32,a=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash
|
||
function l(){if(!(this instanceof l))return new l
|
||
c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),r.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],b=r,v=n,_=i,w=c,S=l,E=0;E<80;E++){var k=a(o(u(r,f(E,n,i,c),e[p[E]+t],h(E)),y[E]),l)
|
||
r=l,l=c,c=o(i,10),i=n,n=k,k=a(o(u(b,f(79-E,v,_,w),e[m[E]+t],d(E)),g[E]),S),b=S,S=w,w=o(_,10),_=v,v=k}k=s(this.h[1],i,w),this.h[1]=s(this.h[2],c,S),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,_),this.h[0]=k},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")}
|
||
var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":209,"./utils":219}],212:[function(e,t,r){"use strict"
|
||
r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":213,"./sha/224":214,"./sha/256":215,"./sha/384":216,"./sha/512":217}],213:[function(e,t,r){"use strict"
|
||
var n=e("../utils"),i=e("../common"),o=e("./common"),a=n.rotl32,s=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782]
|
||
function h(){if(!(this instanceof h))return new h
|
||
l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,l),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n]
|
||
for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1)
|
||
var i=this.h[0],o=this.h[1],l=this.h[2],h=this.h[3],d=this.h[4]
|
||
for(n=0;n<r.length;n++){var p=~~(n/20),m=u(a(i,5),c(p,o,l,h),d,r[n],f[p])
|
||
d=h,h=l,l=a(o,30),o=i,i=m}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],l),this.h[3]=s(this.h[3],h),this.h[4]=s(this.h[4],d)},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":209,"../utils":219,"./common":218}],214:[function(e,t,r){"use strict"
|
||
var n=e("../utils"),i=e("./256")
|
||
function o(){if(!(this instanceof o))return new o
|
||
i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":219,"./256":215}],215:[function(e,t,r){"use strict"
|
||
var n=e("../utils"),i=e("../common"),o=e("./common"),a=e("minimalistic-assert"),s=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,y=i.BlockHash,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]
|
||
function b(){if(!(this instanceof b))return new b
|
||
y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,y),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n]
|
||
for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16])
|
||
var i=this.h[0],o=this.h[1],y=this.h[2],g=this.h[3],b=this.h[4],v=this.h[5],_=this.h[6],w=this.h[7]
|
||
for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=c(w,d(b),l(b,v,_),this.k[n],r[n]),E=s(h(i),f(i,o,y))
|
||
w=_,_=v,v=b,b=s(g,S),g=y,y=o,o=i,i=s(S,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],y),this.h[3]=s(this.h[3],g),this.h[4]=s(this.h[4],b),this.h[5]=s(this.h[5],v),this.h[6]=s(this.h[6],_),this.h[7]=s(this.h[7],w)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":209,"../utils":219,"./common":218,"minimalistic-assert":464}],216:[function(e,t,r){"use strict"
|
||
var n=e("../utils"),i=e("./512")
|
||
function o(){if(!(this instanceof o))return new o
|
||
i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":219,"./512":217}],217:[function(e,t,r){"use strict"
|
||
var n=e("../utils"),i=e("../common"),o=e("minimalistic-assert"),a=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,f=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,y=n.sum64_5_lo,g=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]
|
||
function v(){if(!(this instanceof v))return new v
|
||
g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function _(e,t,r,n,i){var o=e&r^~e&i
|
||
return o<0&&(o+=4294967296),o}function w(e,t,r,n,i,o){var a=t&n^~t&o
|
||
return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i
|
||
return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o
|
||
return a<0&&(a+=4294967296),a}function k(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7)
|
||
return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7)
|
||
return r<0&&(r+=4294967296),r}function C(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9)
|
||
return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9)
|
||
return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,1)^a(e,t,8)^u(e,t,7)
|
||
return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7)
|
||
return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,19)^a(t,e,29)^u(e,t,6)
|
||
return r<0&&(r+=4294967296),r}function M(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6)
|
||
return r<0&&(r+=4294967296),r}n.inherits(v,g),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n]
|
||
for(;n<r.length;n+=2){var i=P(r[n-4],r[n-3]),o=M(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],u=T(r[n-30],r[n-29]),c=I(r[n-30],r[n-29]),l=r[n-32],f=r[n-31]
|
||
r[n]=d(i,o,a,s,u,c,l,f),r[n+1]=p(i,o,a,s,u,c,l,f)}},v.prototype._update=function(e,t){this._prepareBlock(e,t)
|
||
var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],d=this.h[6],p=this.h[7],g=this.h[8],b=this.h[9],v=this.h[10],T=this.h[11],I=this.h[12],P=this.h[13],M=this.h[14],R=this.h[15]
|
||
o(this.k.length===r.length)
|
||
for(var O=0;O<r.length;O+=2){var B=M,N=R,j=C(g,b),L=A(g,b),D=_(g,b,v,T,I),U=w(g,b,v,T,I,P),F=this.k[O],z=this.k[O+1],q=r[O],V=r[O+1],H=m(B,N,j,L,D,U,F,z,q,V),K=y(B,N,j,L,D,U,F,z,q,V)
|
||
B=k(n,i),N=x(n,i),j=S(n,i,a,s,u),L=E(n,i,a,s,u,c)
|
||
var W=f(B,N,j,L),G=h(B,N,j,L)
|
||
M=I,R=P,I=v,P=T,v=g,T=b,g=f(d,p,H,K),b=h(p,p,H,K),d=u,p=c,u=a,c=s,a=n,s=i,n=f(H,K,W,G),i=h(H,K,W,G)}l(this.h,0,n,i),l(this.h,2,a,s),l(this.h,4,u,c),l(this.h,6,d,p),l(this.h,8,g,b),l(this.h,10,v,T),l(this.h,12,I,P),l(this.h,14,M,R)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":209,"../utils":219,"minimalistic-assert":464}],218:[function(e,t,r){"use strict"
|
||
var n=e("../utils").rotr32
|
||
function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}r.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},r.ch32=i,r.maj32=o,r.p32=a,r.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},r.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},r.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":219}],219:[function(e,t,r){"use strict"
|
||
var n=e("minimalistic-assert"),i=e("inherits")
|
||
function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice()
|
||
if(!e)return[]
|
||
var r=[]
|
||
if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i
|
||
o?r.push(o,a):r.push(a)}else for(n=0;n<e.length;n++)r[n]=0|e[n]
|
||
return r},r.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16))
|
||
return t},r.htonl=o,r.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n]
|
||
"little"===t&&(i=o(i)),r+=s(i.toString(16))}return r},r.zero2=a,r.zero8=s,r.join32=function(e,t,r,i){var o=r-t
|
||
n(o%4==0)
|
||
for(var a=new Array(o/4),s=0,u=t;s<a.length;s++,u+=4){var c
|
||
c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],a[s]=c>>>0}return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n]
|
||
"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<<t|e>>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i
|
||
e[t]=a>>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t
|
||
return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},r.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var l=0,f=t
|
||
return l+=(f=f+n>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+s>>>0)<s?1:0,e+r+i+a+u+(l+=(f=f+c>>>0)<c?1:0)>>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:220,"minimalistic-assert":464}],220:[function(e,t,r){arguments[4][118][0].apply(r,arguments)},{dup:118}],221:[function(e,t,r){"use strict"
|
||
var n=r,i=e("buffer").Buffer,o=e("os")
|
||
n.toBuffer=function(e,t,r){var n
|
||
if(r=~~r,this.isV4Format(e))n=t||new i(r+4),e.split(/\./g).map(function(e){n[r++]=255&parseInt(e,10)})
|
||
else if(this.isV6Format(e)){var o,a=e.split(":",8)
|
||
for(o=0;o<a.length;o++){var s
|
||
this.isV4Format(a[o])&&(s=this.toBuffer(a[o]),a[o]=s.slice(0,2).toString("hex")),s&&++o<8&&a.splice(o,0,s.slice(2,4).toString("hex"))}if(""===a[0])for(;a.length<8;)a.unshift("0")
|
||
else if(""===a[a.length-1])for(;a.length<8;)a.push("0")
|
||
else if(a.length<8){for(o=0;o<a.length&&""!==a[o];o++);var u=[o,1]
|
||
for(o=9-a.length;o>0;o--)u.push("0")
|
||
a.splice.apply(a,u)}for(n=t||new i(r+16),o=0;o<a.length;o++){var c=parseInt(a[o],16)
|
||
n[r++]=c>>8&255,n[r++]=255&c}}if(!n)throw Error("Invalid ip address: "+e)
|
||
return n},n.toString=function(e,t,r){t=~~t
|
||
var n=[]
|
||
if(4===(r=r||e.length-t)){for(var i=0;i<r;i++)n.push(e[t+i])
|
||
n=n.join(".")}else if(16===r){for(i=0;i<r;i+=2)n.push(e.readUInt16BE(t+i).toString(16))
|
||
n=(n=(n=n.join(":")).replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3")).replace(/:{3,4}/,"::")}return n}
|
||
var a=/^(\d{1,3}\.){3,3}\d{1,3}$/,s=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i
|
||
function u(e){return e?e.toLowerCase():"ipv4"}n.isV4Format=function(e){return a.test(e)},n.isV6Format=function(e){return s.test(e)},n.fromPrefixLen=function(e,t){var r=4
|
||
"ipv6"===(t=e>32?"ipv6":u(t))&&(r=16)
|
||
for(var o=new i(r),a=0,s=o.length;a<s;++a){var c=8
|
||
e<8&&(c=e),e-=c,o[a]=255&~(255>>c)}return n.toString(o)},n.mask=function(e,t){e=n.toBuffer(e),t=n.toBuffer(t)
|
||
var r=new i(Math.max(e.length,t.length)),o=0
|
||
if(e.length===t.length)for(o=0;o<e.length;o++)r[o]=e[o]&t[o]
|
||
else if(4===t.length)for(o=0;o<t.length;o++)r[o]=e[e.length-4+o]&t[o]
|
||
else{for(o=0;o<r.length-6;o++)r[o]=0
|
||
for(r[10]=255,r[11]=255,o=0;o<e.length;o++)r[o+12]=e[o]&t[o+12]
|
||
o+=12}for(;o<r.length;o++)r[o]=0
|
||
return n.toString(r)},n.cidr=function(e){var t=e.split("/"),r=t[0]
|
||
if(2!==t.length)throw new Error("invalid CIDR subnet: "+r)
|
||
var i=n.fromPrefixLen(parseInt(t[1],10))
|
||
return n.mask(r,i)},n.subnet=function(e,t){for(var r=n.toLong(n.mask(e,t)),i=n.toBuffer(t),o=0,a=0;a<i.length;a++)if(255===i[a])o+=8
|
||
else for(var s=255&i[a];s;)s=s<<1&255,o++
|
||
var u=Math.pow(2,32-o)
|
||
return{networkAddress:n.fromLong(r),firstAddress:u<=2?n.fromLong(r):n.fromLong(r+1),lastAddress:u<=2?n.fromLong(r+u-1):n.fromLong(r+u-2),broadcastAddress:n.fromLong(r+u-1),subnetMask:t,subnetMaskLength:o,numHosts:u<=2?u:u-2,length:u,contains:function(e){return r===n.toLong(n.mask(e,t))}}},n.cidrSubnet=function(e){var t=e.split("/"),r=t[0]
|
||
if(2!==t.length)throw new Error("invalid CIDR subnet: "+r)
|
||
var i=n.fromPrefixLen(parseInt(t[1],10))
|
||
return n.subnet(r,i)},n.not=function(e){for(var t=n.toBuffer(e),r=0;r<t.length;r++)t[r]=255^t[r]
|
||
return n.toString(t)},n.or=function(e,t){if(e=n.toBuffer(e),t=n.toBuffer(t),e.length===t.length){for(var r=0;r<e.length;++r)e[r]|=t[r]
|
||
return n.toString(e)}var i=e,o=t
|
||
t.length>e.length&&(i=t,o=e)
|
||
var a=i.length-o.length
|
||
for(r=a;r<i.length;++r)i[r]|=o[r-a]
|
||
return n.toString(i)},n.isEqual=function(e,t){if(e=n.toBuffer(e),t=n.toBuffer(t),e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1
|
||
return!0}if(4===t.length){var i=t
|
||
t=e,e=i}for(r=0;r<10;r++)if(0!==t[r])return!1
|
||
var o=t.readUInt16BE(10)
|
||
if(0!==o&&65535!==o)return!1
|
||
for(r=0;r<4;r++)if(e[r]!==t[r+12])return!1
|
||
return!0},n.isPrivate=function(e){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^f[cd][0-9a-f]{2}:/i.test(e)||/^fe80:/i.test(e)||/^::1$/.test(e)||/^::$/.test(e)},n.isPublic=function(e){return!n.isPrivate(e)},n.isLoopback=function(e){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(e)||/^fe80::1$/.test(e)||/^::1$/.test(e)||/^::$/.test(e)},n.loopback=function(e){if("ipv4"!==(e=u(e))&&"ipv6"!==e)throw new Error("family must be ipv4 or ipv6")
|
||
return"ipv4"===e?"127.0.0.1":"fe80::1"},n.address=function(e,t){var r,i=o.networkInterfaces()
|
||
if(t=u(t),e&&"private"!==e&&"public"!==e){var a=i[e].filter(function(e){return e.family.toLowerCase()===t})
|
||
if(0===a.length)return
|
||
return a[0].address}return(r=Object.keys(i).map(function(r){var o=i[r].filter(function(r){return r.family=r.family.toLowerCase(),r.family===t&&!n.isLoopback(r.address)&&(!e||("public"===e?n.isPrivate(r.address):n.isPublic(r.address)))})
|
||
return o.length?o[0].address:void 0}).filter(Boolean)).length?r[0]:n.loopback(t)},n.toLong=function(e){var t=0
|
||
return e.split(".").forEach(function(e){t<<=8,t+=parseInt(e)}),t>>>0},n.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(255&e)}},{buffer:110,os:121}],222:[function(e,t,r){(function(e){"use strict"
|
||
!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function')
|
||
var o,a,s=arguments.length
|
||
switch(s){case 0:case 1:return e.nextTick(t)
|
||
case 2:return e.nextTick(function(){t.call(null,r)})
|
||
case 3:return e.nextTick(function(){t.call(null,r,n)})
|
||
case 4:return e.nextTick(function(){t.call(null,r,n,i)})
|
||
default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a]
|
||
return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,e("_process"))},{_process:124}],223:[function(e,t,r){arguments[4][40][0].apply(r,arguments)},{"./_stream_readable":225,"./_stream_writable":227,"core-util-is":82,dup:40,inherits:220,"process-nextick-args":222}],224:[function(e,t,r){arguments[4][131][0].apply(r,arguments)},{"./_stream_transform":226,"core-util-is":82,dup:131,inherits:220}],225:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
t.exports=v
|
||
var o,a=e("isarray")
|
||
v.ReadableState=b
|
||
e("events").EventEmitter
|
||
var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,l=n.Uint8Array||function(){}
|
||
var f=e("core-util-is")
|
||
f.inherits=e("inherits")
|
||
var h=e("util"),d=void 0
|
||
d=h&&h.debuglog?h.debuglog("stream"):function(){}
|
||
var p,m=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy")
|
||
f.inherits(v,u)
|
||
var g=["error","close","destroy","pause","resume"]
|
||
function b(t,r){o=o||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof o
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode)
|
||
var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384
|
||
this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||e("./_stream_duplex"),!(this instanceof v))return new v(t)
|
||
this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(e,t,r,n,i){var o,a=e._readableState
|
||
null===t?(a.reading=!1,function(e,t){if(t.ended)return
|
||
if(t.decoder){var r=t.decoder.end()
|
||
r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,a)):(i||(o=function(e,t){var r
|
||
n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"))
|
||
var n
|
||
return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):C(e,a)):w(e,a,t,!1))):n||(a.reading=!1))
|
||
return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),C(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState
|
||
return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this}
|
||
var S=8388608
|
||
function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState
|
||
t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(x,e):x(e))}function x(e){d("emit readable"),e.emit("readable"),P(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length
|
||
t.readingMore=!1}function T(e){d("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState
|
||
for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n
|
||
e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data
|
||
e-=i.length
|
||
for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e
|
||
if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a))
|
||
break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1
|
||
n.data.copy(r),e-=n.data.length
|
||
for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e
|
||
if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a))
|
||
break}++i}return t.length-=i,r}(e,t)
|
||
return n}(e,t.buffer,t.decoder),r)
|
||
var r}function R(e){var t=e._readableState
|
||
if(t.length>0)throw new Error('"endReadable()" called on non-empty stream')
|
||
t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r
|
||
return-1}v.prototype.read=function(e){d("read",e),e=parseInt(e,10)
|
||
var t=this._readableState,r=e
|
||
if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):k(this),null
|
||
if(0===(e=E(e,t))&&t.ended)return 0===t.length&&R(this),null
|
||
var n,i=t.needReadable
|
||
return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var n=this,o=this._readableState
|
||
switch(o.pipesCount){case 0:o.pipes=e
|
||
break
|
||
case 1:o.pipes=[o.pipes,e]
|
||
break
|
||
default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t)
|
||
var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:v
|
||
function c(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",c)
|
||
var f=function(e){return function(){var t=e._readableState
|
||
d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(n)
|
||
e.on("drain",f)
|
||
var h=!1
|
||
var p=!1
|
||
function m(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(t){d("onerror",t),v(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),v()}function b(){d("onfinish"),e.removeListener("close",g),v()}function v(){d("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r)
|
||
e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",g),e.once("finish",b),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1}
|
||
if(0===t.pipesCount)return this
|
||
if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this)
|
||
if(!e){var n=t.pipes,i=t.pipesCount
|
||
t.pipes=null,t.pipesCount=0,t.flowing=!1
|
||
for(var o=0;o<i;o++)n[o].emit("unpipe",this,r)
|
||
return this}var a=B(t.pipes,e)
|
||
return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},v.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t)
|
||
if("data"===e)!1!==this._readableState.flowing&&this.resume()
|
||
else if("readable"===e){var n=this._readableState
|
||
n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):i.nextTick(T,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState
|
||
return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(I,e,t))}(this,e)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1
|
||
for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end()
|
||
e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i))
|
||
for(var o=0;o<g.length;o++)e.on(g[o],this.emit.bind(this,g[o]))
|
||
return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=M}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":223,"./internal/streams/BufferList":228,"./internal/streams/destroy":229,"./internal/streams/stream":230,_process:124,"core-util-is":82,events:114,inherits:220,isarray:382,"process-nextick-args":222,"safe-buffer":608,"string_decoder/":232,util:109}],226:[function(e,t,r){arguments[4][133][0].apply(r,arguments)},{"./_stream_duplex":223,"core-util-is":82,dup:133,inherits:220}],227:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
function o(e){var t=this
|
||
this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry
|
||
e.entry=null
|
||
for(;n;){var i=n.callback
|
||
t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e})(t,e)}}t.exports=g
|
||
var a,s=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i.nextTick
|
||
g.WritableState=y
|
||
var u=e("core-util-is")
|
||
u.inherits=e("inherits")
|
||
var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,h=n.Uint8Array||function(){}
|
||
var d,p=e("./internal/streams/destroy")
|
||
function m(){}function y(t,r){a=a||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof a
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode)
|
||
var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384
|
||
this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1
|
||
var f=!1===t.decodeStrings
|
||
this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,o=r.writecb
|
||
if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)(function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))})(e,r,n,t,o)
|
||
else{var a=w(r)
|
||
a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?s(v,e,r,a,o):v(e,r,a,o)}})(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(t){if(a=a||e("./_stream_duplex"),!(d.call(g,this)||this instanceof a))return new g(t)
|
||
this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function b(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function v(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function _(e,t){t.bufferProcessing=!0
|
||
var r=t.bufferedRequest
|
||
if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree
|
||
a.entry=r
|
||
for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1
|
||
i.allBuffers=u,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback
|
||
if(b(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=w(t)
|
||
return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next
|
||
return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===g&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,f.isBuffer(n)||n instanceof h)
|
||
return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=m),o.ended?function(e,t){var r=new Error("write after end")
|
||
e.emit("error",r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1
|
||
return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r))
|
||
return t}(t,n,i)
|
||
n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length
|
||
t.length+=s
|
||
var u=t.length<t.highWaterMark
|
||
u||(t.needDrain=!0)
|
||
if(t.writing||t.corked){var c=t.lastBufferedRequest
|
||
t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,n,i,o)
|
||
return u}(this,o,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState
|
||
e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e)
|
||
return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState
|
||
"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r))
|
||
t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=p.destroy,g.prototype._undestroy=p.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":223,"./internal/streams/destroy":229,"./internal/streams/stream":230,_process:124,"core-util-is":82,inherits:220,"process-nextick-args":222,"safe-buffer":608,"util-deprecate":659}],228:[function(e,t,r){arguments[4][43][0].apply(r,arguments)},{dup:43,"safe-buffer":608,util:109}],229:[function(e,t,r){arguments[4][44][0].apply(r,arguments)},{dup:44,"process-nextick-args":222}],230:[function(e,t,r){arguments[4][45][0].apply(r,arguments)},{dup:45,events:114}],231:[function(e,t,r){arguments[4][140][0].apply(r,arguments)},{"./lib/_stream_duplex.js":223,"./lib/_stream_passthrough.js":224,"./lib/_stream_readable.js":225,"./lib/_stream_transform.js":226,"./lib/_stream_writable.js":227,dup:140}],232:[function(e,t,r){arguments[4][46][0].apply(r,arguments)},{dup:46,"safe-buffer":608}],233:[function(e,t,r){t.exports={_args:[["ipfs-api@19.0.0","/home/basti/src/kosmos/kredits/kredits-web"]],_development:!0,_from:"ipfs-api@19.0.0",_id:"ipfs-api@19.0.0",_inBundle:!1,_integrity:"sha512-eDWW66KccHbK/yHlrKdmzw7Tm15tocIgr8Hrwx9xiZinxqtXbsM1AorKTaJ7ZJLls97KiclPRMRIDTIL54q++g==",_location:"/ipfs-api",_phantomChildren:{"brace-expansion":"1.1.11","core-util-is":"1.0.2","fs.realpath":"1.0.0",inflight:"1.0.6",inherits:"2.0.3",isarray:"1.0.0",once:"1.4.0","path-is-absolute":"1.0.1",pseudomap:"1.0.2","safe-buffer":"5.1.1","util-deprecate":"1.0.2",yallist:"2.1.2"},_requested:{type:"version",registry:!0,raw:"ipfs-api@19.0.0",name:"ipfs-api",escapedName:"ipfs-api",rawSpec:"19.0.0",saveSpec:null,fetchSpec:"19.0.0"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/ipfs-api/-/ipfs-api-19.0.0.tgz",_spec:"19.0.0",_where:"/home/basti/src/kosmos/kredits/kredits-web",author:{name:"Matt Bell",email:"mappum@gmail.com"},browser:{glob:!1,fs:!1,stream:"readable-stream",http:"stream-http","ipfs-api":!1,ipfs:!1},bugs:{url:"https://github.com/ipfs/js-ipfs-api/issues"},contributors:[{name:"Alan Shaw",email:"alan@tableflip.io"},{name:"Alex Mingoia",email:"talk@alexmingoia.com"},{name:"Antonio Tenorio-Fornés",email:"antoniotenorio@ucm.es"},{name:"Bruno Barbieri",email:"bbarbieri@delivery.com"},{name:"Connor Keenan",email:"ckeenan89@gmail.com"},{name:"Danny",email:"dannyid@protonmail.com"},{name:"David Braun",email:"David.Braun@Toptal.com"},{name:"David Dias",email:"daviddias.p@gmail.com"},{name:"Dmitriy Ryajov",email:"dryajov@gmail.com"},{name:"Fil",email:"fil@rezo.net"},{name:"Francisco Baio Dias",email:"xicombd@gmail.com"},{name:"Friedel Ziegelmayer",email:"dignifiedquire@gmail.com"},{name:"Gavin McDermott",email:"gavinmcdermott@gmail.com"},{name:"Greenkeeper",email:"support@greenkeeper.io"},{name:"Haad",email:"haadcode@users.noreply.github.com"},{name:"Harlan T Wood",email:"harlantwood@users.noreply.github.com"},{name:"Harlan T Wood",email:"code@harlantwood.net"},{name:"Henrique Dias",email:"hacdias@gmail.com"},{name:"Holodisc",email:"holodiscent@gmail.com"},{name:"Jacob Heun",email:"jacobheun@gmail.com"},{name:"James Halliday",email:"substack@gmail.com"},{name:"Jason Carver",email:"jacarver@linkedin.com"},{name:"Jason Papakostas",email:"vith@users.noreply.github.com"},{name:"Jeff Downie",email:"JeffDownie@users.noreply.github.com"},{name:"Jeromy",email:"why@ipfs.io"},{name:"Jeromy",email:"jeromyj@gmail.com"},{name:"Joe Turgeon",email:"arithmetric@gmail.com"},{name:"Jonathan",email:"jkrone@vt.edu"},{name:"João Antunes",email:"j.goncalo.antunes@gmail.com"},{name:"Juan Batiz-Benet",email:"juan@benet.ai"},{name:"Kevin Wang",email:"kevin@fossa.io"},{name:"Kristoffer Ström",email:"kristoffer@rymdkoloni.se"},{name:"Matt Bell",email:"mappum@gmail.com"},{name:"Maxime Lathuilière",email:"k@maxlath.eu"},{name:"Michael Muré",email:"batolettre@gmail.com"},{name:"Mitar",email:"mitar.git@tnode.com"},{name:"Mithgol",email:"getgit@mithgol.ru"},{name:"Nuno Nogueira",email:"nunofmn@gmail.com"},{name:"Pedro Teixeira",email:"i@pgte.me"},{name:"Pete Thomas",email:"pete@xminusone.net"},{name:"Richard Littauer",email:"richard.littauer@gmail.com"},{name:"Richard Schneider",email:"makaretu@gmail.com"},{name:"Stephen Whitmore",email:"stephen.whitmore@gmail.com"},{name:"Tara Vancil",email:"tbvanc@gmail.com"},{name:"Travis Person",email:"travis.person@gmail.com"},{name:"Victor Bjelkholm",email:"victor@typeform.com"},{name:"Volker Mische",email:"volker.mische@gmail.com"},{name:"dmitriy ryajov",email:"dryajov@dmitriys-MacBook-Pro.local"},{name:"elsehow",email:"yes@cosmopol.is"},{name:"ethers",email:"ethereum@outlook.com"},{name:"haad",email:"haad@headbanggames.com"},{name:"kumavis",email:"kumavis@users.noreply.github.com"},{name:"nginnever",email:"ginneversource@gmail.com"},{name:"noah the goodra",email:"peterpan0413@live.com"},{name:"priecint",email:"tp-dev@seznam.cz"},{name:"samuli",email:"samuli@nugg.ad"},{name:"victorbjelkholm",email:"victorbjelkholm@gmail.com"},{name:"Łukasz Magiera",email:"magik6k@users.noreply.github.com"}],dependencies:{async:"^2.6.0","big.js":"^5.0.3",bs58:"^4.0.1",cids:"~0.5.3","concat-stream":"^1.6.2","detect-node":"^2.0.3",flatmap:"0.0.3",glob:"^7.1.2","ipfs-block":"~0.6.1","ipfs-unixfs":"~0.1.14","ipld-dag-pb":"~0.13.1","is-ipfs":"^0.3.2","is-stream":"^1.1.0","lru-cache":"^4.1.2",multiaddr:"^3.1.0",multihashes:"~0.4.13",ndjson:"^1.5.0",once:"^1.4.0","peer-id":"~0.10.6","peer-info":"~0.11.6","promisify-es6":"^1.0.3","pull-defer":"^0.2.2","pull-pushable":"^2.2.0",pump:"^3.0.0",qs:"^6.5.1","readable-stream":"^2.3.5","stream-http":"^2.8.1","stream-to-pull-stream":"^1.7.2",streamifier:"^0.1.1","tar-stream":"^1.5.5"},description:"A client library for the IPFS HTTP API",devDependencies:{aegir:"^13.0.6","browser-process-platform":"^0.1.1",chai:"^4.1.2","cross-env":"^5.1.4","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.7.0","go-ipfs-dep":"^0.4.14",gulp:"^3.9.1",hapi:"^17.2.3","interface-ipfs-core":"~0.58.0",ipfs:"~0.28.2","ipfsd-ctl":"~0.31.0","pre-commit":"^1.2.2","pull-stream":"^3.6.2","socket.io":"^2.0.4","socket.io-client":"^2.0.4","stream-equal":"^1.1.1"},engines:{node:">=6.0.0",npm:">=3.0.0"},homepage:"https://github.com/ipfs/js-ipfs-api",keywords:["ipfs"],license:"MIT",main:"src/index.js",name:"ipfs-api","pre-commit":["lint","test"],repository:{type:"git",url:"git+https://github.com/ipfs/js-ipfs-api.git"},scripts:{build:"aegir build",coverage:"aegir coverage --timeout 100000","coverage-publish":"aegir coverage --provider coveralls --timeout 100000",lint:"aegir lint",release:"aegir release ","release-major":"aegir release --type major ","release-minor":"aegir release --type minor ",test:"aegir test","test:browser":"aegir test -t browser","test:node":"aegir test -t node","test:webworker":"aegir test -t webworker"},version:"19.0.0"}},{}],234:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{wantlist:e("./wantlist")(r),stat:e("./stat")(r),unwant:e("./unwant")(r)}}},{"../utils/module-config":348,"./stat":235,"./unwant":236,"./wantlist":237}],235:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("big.js"),o=function(e,t){t(null,{provideBufLen:e.ProvideBufLen,wantlist:e.Wantlist||[],peers:e.Peers||[],blocksReceived:new i(e.BlocksReceived),dataReceived:new i(e.DataReceived),blocksSent:new i(e.BlocksSent),dataSent:new i(e.DataSent),dupBlksReceived:new i(e.DupBlksReceived),dupDataReceived:new i(e.DupDataReceived)})}
|
||
t.exports=function(e){return n(function(t){e.andTransform({path:"bitswap/stat"},o,t)})}},{"big.js":35,"promisify-es6":542}],236:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"bitswap/unwant",args:t,qs:r},n)})}},{"promisify-es6":542}],237:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t){e({path:"bitswap/wantlist"},t)})}},{"promisify-es6":542}],238:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("promisify-es6"),i=e("ipfs-block"),o=e("cids"),a=e("../utils/stream-to-value")
|
||
t.exports=function(e){return n(function(t,n,s){"function"==typeof n&&(s=n,n={})
|
||
var u=void 0
|
||
try{if(o.isCID(t))t=(u=t).toBaseEncodedString()
|
||
else if(r.isBuffer(t))t=(u=new o(t)).toBaseEncodedString()
|
||
else{if("string"!=typeof t)return s(new Error("invalid argument"))
|
||
u=new o(t)}}catch(e){return s(e)}var c={path:"block/get",args:t,qs:n}
|
||
e.andTransform(c,function(e,t){r.isBuffer(e)?t(null,new i(e,u)):a(e,function(e,r){if(e)return t(e)
|
||
t(null,new i(r,u))})},s)})}}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,"../utils/stream-to-value":359,cids:79,"ipfs-block":363,"promisify-es6":542}],239:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{get:e("./get")(r),stat:e("./stat")(r),put:e("./put")(r)}}},{"../utils/module-config":348,"./get":238,"./put":240,"./stat":241}],240:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("promisify-es6"),o=e("ipfs-block"),a=e("cids"),s=e("once"),u=e("../utils/send-one-file")
|
||
t.exports=function(e){var t=u(e,"block/put")
|
||
return i(function(e,r,i){"function"==typeof r&&(i=r,r={})
|
||
var u=s(i)
|
||
if(Array.isArray(e))return u(new Error("block.put accepts only one block"))
|
||
"object"===(void 0===e?"undefined":n(e))&&e.data&&(e=e.data),t(e,{},function(t,r){if(t)return u(t)
|
||
u(null,new o(e,new a(r.Key)))})})}},{"../utils/send-one-file":356,cids:79,"ipfs-block":363,once:535,"promisify-es6":542}],241:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("cids"),o=e("multihashes")
|
||
t.exports=function(e){return n(function(t,r,n){t&&i.isCID(t)&&(t=o.toB58String(t.multihash)),"function"==typeof r&&(n=r,r={})
|
||
var a={path:"block/stat",args:t,qs:r}
|
||
e.andTransform(a,function(e,t){t(null,{key:e.Key,size:e.Size})},n)})}},{cids:79,multihashes:481,"promisify-es6":542}],242:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("promisify-es6")
|
||
t.exports=function(e){return i(function(t,r,i){"function"!=typeof r||i||(i=r,r={}),"function"==typeof r&&"function"==typeof i&&(i=r,r={}),t&&"object"===(void 0===t?"undefined":n(t))&&(r=t,t=void 0),e({path:"bootstrap/add",args:t,qs:r},i)})}},{"promisify-es6":542}],243:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{add:e("./add")(r),rm:e("./rm")(r),list:e("./list")(r)}}},{"../utils/module-config":348,"./add":242,"./list":244,"./rm":245}],244:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"bootstrap/list",qs:t},r)})}},{"promisify-es6":542}],245:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("promisify-es6")
|
||
t.exports=function(e){return i(function(t,r,i){"function"!=typeof r||i||(i=r,r={}),"function"==typeof r&&"function"==typeof i&&(i=r,r={}),t&&"object"===(void 0===t?"undefined":n(t))&&(r=t,t=void 0),e({path:"bootstrap/rm",args:t,qs:r},i)})}},{"promisify-es6":542}],246:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config")
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e){t({path:"commands"},e)})}},{"./utils/module-config":348,"promisify-es6":542}],247:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t=void 0),t?e({path:"config",args:t,buffer:!0},function(e,t){if(e)return r(e)
|
||
r(null,t.Value)}):e({path:"config/show",buffer:!0},r)})}},{"promisify-es6":542}],248:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{get:e("./get")(r),set:e("./set")(r),replace:e("./replace")(r)}}},{"../utils/module-config":348,"./get":247,"./replace":249,"./set":250}],249:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("streamifier"),o=e("promisify-es6"),a=e("../utils/send-one-file")
|
||
t.exports=function(e){var t=a(e,"config/replace")
|
||
return o(function(e,o){"object"===(void 0===e?"undefined":n(e))&&(e=i.createReadStream(r.from(JSON.stringify(e)))),t(e,{},o)})}}).call(this,e("buffer").Buffer)},{"../utils/send-one-file":356,buffer:110,"promisify-es6":542,streamifier:649}],250:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("promisify-es6")
|
||
t.exports=function(e){return i(function(t,r,i,o){return"function"==typeof i&&(o=i,i={}),"string"!=typeof t?o(new Error("Invalid key type")):"object"!==(void 0===r?"undefined":n(r))&&"boolean"!=typeof r&&"string"!=typeof r?o(new Error("Invalid value type")):("object"===(void 0===r?"undefined":n(r))&&(r=JSON.stringify(r),i={json:!0}),"boolean"==typeof r&&(r=r.toString(),i={bool:!0}),void e({path:"config",args:[t,r],qs:i,files:void 0,buffer:!0},o))})}},{"promisify-es6":542}],251:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/stream-to-value")
|
||
t.exports=function(e){return n(function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),e.andTransform({path:"dht/findpeer",args:t,qs:r},i,n)})}},{"../utils/stream-to-value":359,"promisify-es6":542}],252:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/stream-to-value")
|
||
t.exports=function(e){return n(function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),e.andTransform({path:"dht/findprovs",args:t,qs:r},i,n)})}},{"../utils/stream-to-value":359,"promisify-es6":542}],253:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),e({path:"dht/get",args:t,qs:r},function(e,t,r){if(t)return e(t)
|
||
if(!r)return e(new Error("empty response"))
|
||
if(0===r.length)return e(new Error("no value returned for key"))
|
||
Array.isArray(r)&&(r=r[0]),5===r.Type?e(null,r.Extra):e(new Error("key was not found (type 6)"))}.bind(null,n))})}},{"promisify-es6":542}],254:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{get:e("./get")(r),put:e("./put")(r),findprovs:e("./findprovs")(r),findpeer:e("./findpeer")(r),provide:e("./provide")(r),query:e("./query")(r)}}},{"../utils/module-config":348,"./findpeer":251,"./findprovs":252,"./get":253,"./provide":255,"./put":256,"./query":257}],255:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("cids")
|
||
t.exports=function(e){return n(function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),Array.isArray(t)||(t=[t])
|
||
try{t=t.map(function(e){return new i(e).toBaseEncodedString("base58btc")})}catch(e){return n(e)}e({path:"dht/provide",args:t,qs:r},n)})}},{cids:79,"promisify-es6":542}],256:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n,i){"function"!=typeof n||i||(i=n,n={}),"function"==typeof n&&"function"==typeof i&&(i=n,n={}),e({path:"dht/put",args:[t,r],qs:n},i)})}},{"promisify-es6":542}],257:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/stream-to-value")
|
||
t.exports=function(e){return n(function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),e.andTransform({path:"dht/query",args:t,qs:r},i,n)})}},{"../utils/stream-to-value":359,"promisify-es6":542}],258:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"diag/cmds",qs:t},r)})}},{"promisify-es6":542}],259:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{net:e("./net")(r),sys:e("./sys")(r),cmds:e("./cmds")(r)}}},{"../utils/module-config":348,"./cmds":258,"./net":260,"./sys":261}],260:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"diag/net",qs:t},r)})}},{"promisify-es6":542}],261:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"diag/sys",qs:t},r)})}},{"promisify-es6":542}],262:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config"),o=function(e,t){t(null,e.Path)}
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e,r,n){"function"==typeof r&&(n=r,r={}),t.andTransform({path:"dns",args:e,qs:r},o,n)})}},{"./utils/module-config":348,"promisify-es6":542}],263:[function(e,t,r){"use strict"
|
||
var n=e("../utils/send-files-stream"),i=e("../utils/file-result-stream-converter"),o=e("stream-to-pull-stream")
|
||
t.exports=function(e){return function(t){return(t=t||{}).converter=i,o(n(e,"add")({qs:t}))}}},{"../utils/file-result-stream-converter":346,"../utils/send-files-stream":354,"stream-to-pull-stream":648}],264:[function(e,t,r){"use strict"
|
||
var n=e("../utils/send-files-stream"),i=e("../utils/file-result-stream-converter")
|
||
t.exports=function(e){return function(t){return(t=t||{}).converter=i,n(e,"add")(t)}}},{"../utils/file-result-stream-converter":346,"../utils/send-files-stream":354}],265:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("promisify-es6"),o=e("concat-stream"),a=e("once"),s=e("is-stream"),u=e("buffer").Buffer,c=e("../utils/file-result-stream-converter"),l=e("../utils/send-files-stream")
|
||
t.exports=function(e){var t=l(e,"add")
|
||
return i(function(e,i,l){"function"==typeof i&&(l=i,i=null)
|
||
var f=a(l)
|
||
if(i||(i={}),i.converter=c,!(r.isBuffer(e)||s.readable(e)||Array.isArray(e)||u.isBuffer(e)||"object"===(void 0===e?"undefined":n(e))))return f(new Error("first arg must be a buffer, readable stream, an object or array of objects"))
|
||
var h=[].concat(e),d=t({qs:i}),p=o(function(e){return f(null,e)})
|
||
d.once("error",f),d.pipe(p),h.forEach(function(e){return d.write(e)}),d.end()})}}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,"../utils/file-result-stream-converter":346,"../utils/send-files-stream":354,buffer:110,"concat-stream":81,"is-stream":381,once:535,"promisify-es6":542}],266:[function(e,t,r){"use strict"
|
||
var n=e("../utils/clean-cid"),i=e("is-ipfs"),o=e("stream-to-pull-stream"),a=e("pull-defer")
|
||
t.exports=function(e){return function(t,r){r=r||{}
|
||
var s=a.source()
|
||
try{t=n(t)}catch(e){if(!i.ipfsPath(t))return s.end(e)}return e({path:"cat",args:t,buffer:r.buffer},function(e,t){if(e)return s.end(e)
|
||
s.resolve(o(t))}),s}}},{"../utils/clean-cid":343,"is-ipfs":379,"pull-defer":557,"stream-to-pull-stream":648}],267:[function(e,t,r){"use strict"
|
||
var n=e("../utils/clean-cid"),i=e("is-ipfs"),o=e("readable-stream"),a=e("pump")
|
||
t.exports=function(e){return function(t,r){r=r||{}
|
||
var s=new o.PassThrough
|
||
try{t=n(t)}catch(e){if(!i.ipfsPath(t))return s.destroy(e)}return e({path:"cat",args:t,buffer:r.buffer},function(e,t){if(e)return s.destroy(e)
|
||
a(t,s)}),s}}},{"../utils/clean-cid":343,"is-ipfs":379,pump:592,"readable-stream":231}],268:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/clean-cid"),o=e("is-ipfs"),a=e("bl")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={})
|
||
try{t=i(t)}catch(e){if(!o.ipfsPath(t))return n(e)}e({path:"cat",args:t,buffer:r.buffer},function(e,t){if(e)return n(e)
|
||
t.pipe(a(function(e,t){if(e)return n(e)
|
||
n(null,t)}))})})}},{"../utils/clean-cid":343,bl:37,"is-ipfs":379,"promisify-es6":542}],269:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"files/cp",args:t,qs:r},n)})}},{"promisify-es6":542}],270:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r){return"function"==typeof t&&(r=t,t="/"),e({path:"files/flush",args:t},r)})}},{"promisify-es6":542}],271:[function(e,t,r){"use strict"
|
||
var n=e("../utils/clean-cid"),i=e("../utils/tar-stream-to-objects"),o=e("is-ipfs"),a=e("through2"),s=e("pull-stream"),u=e("stream-to-pull-stream"),c=e("pull-defer")
|
||
t.exports=function(e){return function(t,r){r=r||{}
|
||
var l=c.source()
|
||
try{t=n(t)}catch(e){if(!o.ipfsPath(t))return l.end(e)}var f={path:"get",args:t,qs:r}
|
||
return e.andTransform(f,i,function(e,t){if(e)return l.end(e)
|
||
var r=[]
|
||
t.pipe(a.obj(function(e,t,n){e.content?r.push({path:e.path,content:u(e.content)}):r.push(e),n()},function(){return l.resolve(s.values(r))}))}),l}}},{"../utils/clean-cid":343,"../utils/tar-stream-to-objects":361,"is-ipfs":379,"pull-defer":557,"pull-stream":561,"stream-to-pull-stream":648,through2:655}],272:[function(e,t,r){"use strict"
|
||
var n=e("../utils/clean-cid"),i=e("../utils/tar-stream-to-objects"),o=e("is-ipfs"),a=e("readable-stream"),s=e("pump")
|
||
t.exports=function(e){return function(t,r){r=r||{}
|
||
var u=new a.PassThrough({objectMode:!0})
|
||
try{t=n(t)}catch(e){if(!o.ipfsPath(t))return u.destroy(e)}var c={path:"get",args:t,qs:r}
|
||
return e.andTransform(c,i,function(e,t){if(e)return u.destroy(e)
|
||
s(t,u)}),u}}},{"../utils/clean-cid":343,"../utils/tar-stream-to-objects":361,"is-ipfs":379,pump:592,"readable-stream":231}],273:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/clean-cid"),o=e("../utils/tar-stream-to-objects"),a=e("concat-stream"),s=e("through2"),u=e("is-ipfs")
|
||
t.exports=function(e){return n(function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={})
|
||
try{t=i(t)}catch(e){if(!u.ipfsPath(t))return n(e)}var c={path:"get",args:t,qs:r}
|
||
e.andTransform(c,o,function(e,t){if(e)return n(e)
|
||
var r=[]
|
||
t.pipe(s.obj(function(e,t,n){e.content?e.content.pipe(a(function(t){r.push({path:e.path,content:t})})):r.push(e),n()},function(){return n(null,r)}))})})}},{"../utils/clean-cid":343,"../utils/tar-stream-to-objects":361,"concat-stream":81,"is-ipfs":379,"promisify-es6":542,through2:655}],274:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{add:e("./add")(r),addReadableStream:e("./add-readable-stream")(r),addPullStream:e("./add-pull-stream")(r),cat:e("./cat")(r),catReadableStream:e("./cat-readable-stream")(r),catPullStream:e("./cat-pull-stream")(r),get:e("./get")(r),getReadableStream:e("./get-readable-stream")(r),getPullStream:e("./get-pull-stream")(r),flush:e("./flush")(r),cp:e("./cp")(r),mkdir:e("./mkdir")(r),stat:e("./stat")(r),rm:e("./rm")(r),ls:e("./ls")(r),read:e("./read")(r),write:e("./write")(r),mv:e("./mv")(r)}}},{"../utils/module-config":348,"./add":265,"./add-pull-stream":263,"./add-readable-stream":264,"./cat":268,"./cat-pull-stream":266,"./cat-readable-stream":267,"./cp":269,"./flush":270,"./get":273,"./get-pull-stream":271,"./get-readable-stream":272,"./ls":275,"./mkdir":276,"./mv":277,"./read":278,"./rm":279,"./stat":280,"./write":281}],275:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,(e.Entries||[]).map(function(e){return{name:e.Name,type:e.Type,size:e.Size,hash:e.Hash}}))}
|
||
t.exports=function(e){return n(function(t,r,n){return"function"==typeof r&&(n=r,r={}),e.andTransform({path:"files/ls",args:t,qs:r},i,n)})}},{"promisify-es6":542}],276:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"files/mkdir",args:t,qs:r},n)})}},{"promisify-es6":542}],277:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&void 0===n&&(n=r,r={}),e({path:"files/mv",args:t,qs:r},n)})}},{"promisify-es6":542}],278:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/stream-to-value")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"files/read",args:t,qs:r},i,n)})}},{"../utils/stream-to-value":359,"promisify-es6":542}],279:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),e({path:"files/rm",args:t,qs:r},n)})}},{"promisify-es6":542}],280:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("lodash"),o=function(e,t){t(null,{type:e.Type,blocks:e.Blocks,size:e.Size,hash:e.Hash,cumulativeSize:e.CumulativeSize,withLocality:e.WithLocality||!1,local:e.Local||void 0,sizeLocal:e.SizeLocal||void 0})}
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),r=i.mapKeys(r,function(e,t){return i.kebabCase(t)}),e.andTransform({path:"files/stat",args:t,qs:r},o,n)})}},{lodash:455,"promisify-es6":542}],281:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("concat-stream"),o=e("once"),a=e("../utils/file-result-stream-converter"),s=e("../utils/send-files-stream")
|
||
t.exports=function(e){var t=s(e,"files/write")
|
||
return n(function(e,r,n,s){"function"!=typeof n||s||(s=n,n={}),"function"==typeof n&&"function"==typeof s&&(s=n,n={})
|
||
var u=[].concat(r),c=o(s),l=t({qs:{args:e,qs:n,converter:a}}),f=i(function(e){return c(null,e)})
|
||
l.once("error",c),l.pipe(f),u.forEach(function(e){return l.write(e)}),l.end()})}},{"../utils/file-result-stream-converter":346,"../utils/send-files-stream":354,"concat-stream":81,once:535,"promisify-es6":542}],282:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config")
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e,r){"function"==typeof e&&(r=e,e=void 0),t({path:"id",args:e},function(e,t){if(e)return r(e)
|
||
var n={id:t.ID,publicKey:t.PublicKey,addresses:t.Addresses,agentVersion:t.AgentVersion,protocolVersion:t.ProtocolVersion}
|
||
r(null,n)})})}},{"./utils/module-config":348,"promisify-es6":542}],283:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("multiaddr"),o=e("./utils/load-commands"),a=e("./utils/default-config"),s=e("./utils/send-request")
|
||
t.exports=function(e,t,u){var c=a()
|
||
try{var l=i(e).nodeAddress()
|
||
c.host=l.address,c.port=l.port}catch(r){"string"==typeof e&&(c.host=e,c.port=t&&"object"!==(void 0===t?"undefined":n(t))?t:c.port)}for(var f=arguments.length;!u&&f-- >0&&!(u=arguments[f]););if(Object.assign(c,u),!c.host&&"undefined"!=typeof self){var h=self.location.host.split(":")
|
||
c.host=h[0],c.port=h[1]}var d=s(c),p=o(d)
|
||
return p.send=d,p.Buffer=r,p}}).call(this,e("buffer").Buffer)},{"./utils/default-config":345,"./utils/load-commands":347,"./utils/send-request":357,buffer:110,multiaddr:467}],284:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){e({path:"key/export",args:t,qs:{password:r}},function(e,t){if(e)return n(e)
|
||
n(null,t.toString())})})}},{"promisify-es6":542}],285:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,{id:e.Id,name:e.Name})}
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"key/gen",args:t,qs:r},i,n)})}},{"promisify-es6":542}],286:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,{id:e.Id,name:e.Name})}
|
||
t.exports=function(e){return n(function(t,r,n,o){e.andTransform({path:"key/import",args:t,qs:{pem:r,password:n}},i,o)})}},{"promisify-es6":542}],287:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{gen:e("./gen")(r),list:e("./list")(r),rename:e("./rename")(r),rm:e("./rm")(r),export:e("./export")(r),import:e("./import")(r)}}},{"../utils/module-config":348,"./export":284,"./gen":285,"./import":286,"./list":288,"./rename":289,"./rm":290}],288:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,e.Keys.map(function(e){return{id:e.Id,name:e.Name}}))}
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"key/list",qs:t},i,r)})}},{"promisify-es6":542}],289:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,{id:e.Id,was:e.Was,now:e.Now,overwrite:e.Overwrite})}
|
||
t.exports=function(e){return n(function(t,r,n){e.andTransform({path:"key/rename",args:[t,r]},i,n)})}},{"promisify-es6":542}],290:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,{id:e.Keys[0].Id,name:e.Keys[0].Name})}
|
||
t.exports=function(e){return n(function(t,r){e.andTransform({path:"key/rm",args:t},i,r)})}},{"promisify-es6":542}],291:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{tail:e("./tail")(r),ls:e("./ls")(r),level:e("./level")(r)}}},{"../utils/module-config":348,"./level":292,"./ls":293,"./tail":294}],292:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n,i){return"function"==typeof n&&(i=n,n={}),"string"!=typeof t?i(new Error("Invalid subsystem type")):"string"!=typeof r?i(new Error("Invalid level type")):void e({path:"log/level",args:[t,r],qs:n,files:void 0,buffer:!0},i)})}},{"promisify-es6":542}],293:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t){e({path:"log/ls"},function(e,r){if(e)return t(e)
|
||
t(null,r.Strings)})})}},{"promisify-es6":542}],294:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("pump"),o=e("ndjson")
|
||
t.exports=function(e){return n(function(t){return e({path:"log/tail"},function(e,r){if(e)return t(e)
|
||
var n=o.parse()
|
||
i(r,n),t(null,n)})})}},{ndjson:490,"promisify-es6":542,pump:592}],295:[function(e,t,r){"use strict"
|
||
var n=e("./utils/module-config"),i=e("pull-stream"),o=e("pull-defer")
|
||
t.exports=function(e){var t=n(e)
|
||
return function(e,r,n){"function"==typeof r&&(n=r,r={})
|
||
var a=o.source()
|
||
return t({path:"ls",args:e,qs:r},function(t,r){if(t)return n(t)
|
||
var o=r.Objects
|
||
return o?(o=o[0])?(o=o.Links,Array.isArray(o)?(o=o.map(function(t){return{depth:1,name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:function(e){switch(e.Type){case 1:case 5:return"dir"
|
||
case 2:return"file"
|
||
default:return"unknown"}}(t)}}),void a.resolve(i.values(o))):n(new Error("expected one array in results.Objects[0].Links"))):n(new Error("expected one array in results.Objects")):n(new Error("expected .Objects in results"))}),a}}},{"./utils/module-config":348,"pull-defer":557,"pull-stream":561}],296:[function(e,t,r){"use strict"
|
||
var n=e("./utils/module-config"),i=e("readable-stream")
|
||
t.exports=function(e){var t=n(e)
|
||
return function(e,r,n){"function"==typeof r&&(n=r,r={})
|
||
var o=new i.PassThrough({objectMode:!0})
|
||
return t({path:"ls",args:e,qs:r},function(t,r){if(t)return n(t)
|
||
var i=r.Objects
|
||
return i?(i=i[0])?(i=i.Links,Array.isArray(i)?((i=i.map(function(t){return{depth:1,name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:function(e){switch(e.Type){case 1:case 5:return"dir"
|
||
case 2:return"file"
|
||
default:return"unknown"}}(t)}})).forEach(function(e){return o.write(e)}),void o.end()):n(new Error("expected one array in results.Objects[0].Links"))):n(new Error("expected one array in results.Objects")):n(new Error("expected .Objects in results"))}),o}}},{"./utils/module-config":348,"readable-stream":231}],297:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config")
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e,r,n){"function"==typeof r&&(n=r,r={}),t({path:"ls",args:e,qs:r},function(t,r){if(t)return n(t)
|
||
var i=r.Objects
|
||
return i?(i=i[0])?(i=i.Links,Array.isArray(i)?(i=i.map(function(t){return{name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:function(e){switch(e.Type){case 1:case 5:return"dir"
|
||
case 2:return"file"
|
||
default:return"unknown"}}(t),depth:t.Depth||1}}),void n(null,i)):n(new Error("expected one array in results.Objects[0].Links"))):n(new Error("expected one array in results.Objects")):n(new Error("expected .Objects in results"))})})}},{"./utils/module-config":348,"promisify-es6":542}],298:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config")
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e,r,n){"function"==typeof e?(n=e,e=null):"function"==typeof r&&(n=r,r=null)
|
||
var i={}
|
||
e&&(i.f=e),r&&(i.n=r),t({path:"mount",qs:i},n)})}},{"./utils/module-config":348,"promisify-es6":542}],299:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{publish:e("./publish")(r),resolve:e("./resolve")(r)}}},{"../utils/module-config":348,"./publish":300,"./resolve":301}],300:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,{name:e.Name,value:e.Value})}
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"name/publish",args:t,qs:r},i,n)})}},{"promisify-es6":542}],301:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,e.Path)}
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"name/resolve",args:t,qs:r},i,n)})}},{"promisify-es6":542}],302:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/clean-multihash")
|
||
t.exports=function(t){var r=e("./get")(t)
|
||
return n(function(e,n,o,a){"function"==typeof o&&(a=o,o={}),o||(o={})
|
||
try{e=i(e,o)}catch(e){return a(e)}t({path:"object/patch/add-link",args:[e,n.name,i(n.multihash)]},function(e,t){if(e)return a(e)
|
||
r(t.Hash,{enc:"base58"},a)})})}},{"../utils/clean-multihash":344,"./get":305,"promisify-es6":542}],303:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("once"),o=e("../utils/clean-multihash"),a=e("../utils/send-one-file")
|
||
t.exports=function(t){var r=e("./get")(t),s=a(t,"object/patch/append-data")
|
||
return n(function(e,t,n,a){"function"==typeof n&&(a=n,n={})
|
||
var u=i(a)
|
||
n||(n={})
|
||
try{e=o(e,n)}catch(e){return u(e)}s(t,{args:[e]},function(e,t){if(e)return u(e)
|
||
r(t.Hash,{enc:"base58"},u)})})}},{"../utils/clean-multihash":344,"../utils/send-one-file":356,"./get":305,once:535,"promisify-es6":542}],304:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/stream-to-value"),o=e("cids"),a=e("lru-cache")({max:128})
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),r||(r={})
|
||
var s=void 0
|
||
try{s=(t=new o(t)).toBaseEncodedString()}catch(e){return n(e)}var u=a.get(s)
|
||
if(u)return n(null,u.data)
|
||
e({path:"object/data",args:s},function(e,t){if(e)return n(e)
|
||
"function"==typeof t.pipe?i(t,n):n(null,t)})})}},{"../utils/stream-to-value":359,cids:79,"lru-cache":459,"promisify-es6":542}],305:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("promisify-es6"),i=e("ipld-dag-pb"),o=i.DAGNode,a=i.DAGLink,s=e("bs58"),u=e("cids"),c=e("lru-cache")({max:128})
|
||
t.exports=function(e){return n(function(t,n,i){"function"==typeof n&&(i=n,n={}),n||(n={})
|
||
var l=void 0
|
||
try{t=new u(t),l=t.toBaseEncodedString()}catch(e){return i(e)}var f=c.get(l)
|
||
if(f)return i(null,f)
|
||
e({path:"object/get",args:l},function(e,t){if(e)return i(e)
|
||
var n=t.Links.map(function(e){return new a(e.Name,e.Size,r.from(s.decode(e.Hash)))})
|
||
o.create(t.Data,n,function(e,t){if(e)return i(e)
|
||
c.set(l,t),i(null,t)})})})}}).call(this,e("buffer").Buffer)},{bs58:70,buffer:110,cids:79,"ipld-dag-pb":376,"lru-cache":459,"promisify-es6":542}],306:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{get:e("./get")(r),put:e("./put")(r),data:e("./data")(r),links:e("./links")(r),stat:e("./stat")(r),new:e("./new")(r),patch:{addLink:e("./addLink")(r),rmLink:e("./rmLink")(r),setData:e("./setData")(r),appendData:e("./appendData")(r)}}}},{"../utils/module-config":348,"./addLink":302,"./appendData":303,"./data":304,"./get":305,"./links":307,"./new":308,"./put":309,"./rmLink":310,"./setData":311,"./stat":312}],307:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("promisify-es6"),i=e("ipld-dag-pb").DAGLink,o=e("../utils/clean-multihash"),a=e("bs58"),s=e("lru-cache")({max:128})
|
||
t.exports=function(e){return n(function(t,n,u){"function"==typeof n&&(u=n,n={}),n||(n={})
|
||
try{t=o(t,n)}catch(e){return u(e)}var c=s.get(t)
|
||
if(c)return u(null,c.links)
|
||
e({path:"object/links",args:t},function(e,t){if(e)return u(e)
|
||
var n=[]
|
||
t.Links&&(n=t.Links.map(function(e){return new i(e.Name,e.Size,r.from(a.decode(e.Hash)))})),u(null,n)})})}}).call(this,e("buffer").Buffer)},{"../utils/clean-multihash":344,bs58:70,buffer:110,"ipld-dag-pb":376,"lru-cache":459,"promisify-es6":542}],308:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("promisify-es6"),i=e("ipld-dag-pb").DAGNode,o=e("ipfs-unixfs")
|
||
t.exports=function(e){return n(function(t,n){"function"==typeof t&&(n=t,t=void 0),e({path:"object/new",args:t},function(e,a){if(e)return n(e)
|
||
var s=void 0
|
||
if(t){if("unixfs-dir"!==t)return n(new Error("unkown template: "+t))
|
||
s=new o("directory").marshal()}else s=r.alloc(0)
|
||
i.create(s,function(e,t){return e?n(e):t.toJSON().multihash!==a.Hash?n(new Error("multihashes do not match")):void n(null,t)})})})}}).call(this,e("buffer").Buffer)},{buffer:110,"ipfs-unixfs":364,"ipld-dag-pb":376,"promisify-es6":542}],309:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("promisify-es6"),o=e("ipld-dag-pb"),a=o.DAGNode,s=e("lru-cache")({max:128}),u=e("../utils/send-one-file"),c=e("once")
|
||
t.exports=function(e){var t=u(e,"object/put")
|
||
return i(function(e,i,u){"function"==typeof i&&(u=i,i={})
|
||
var l=c(u)
|
||
i||(i={})
|
||
var f={Data:null,Links:[]}
|
||
if(r.isBuffer(e))i.enc||(f={Data:e.toString(),Links:[]})
|
||
else if(e.multihash)f={Data:e.data.toString(),Links:e.links.map(function(e){var t=e.toJSON()
|
||
return t.hash=t.multihash,t})}
|
||
else{if("object"!==(void 0===e?"undefined":n(e)))return l(new Error("obj not recognized"))
|
||
f.Data=e.Data.toString(),f.Links=e.Links}var h=void 0
|
||
h=r.isBuffer(e)&&i.enc?e:r.from(JSON.stringify(f))
|
||
var d=i.enc||"json"
|
||
t(h,{qs:{inputenc:d}},function(t,n){if(t)return l(t)
|
||
r.isBuffer(e)&&(i.enc?"json"===i.enc&&(e=JSON.parse(e.toString())):e={Data:e,Links:[]})
|
||
var u=void 0
|
||
if(!e.multihash)return"protobuf"===i.enc?void o.util.deserialize(e,function(e,t){if(e)return l(e)
|
||
u=t,c()}):void a.create(r.from(e.Data),e.Links,function(e,t){if(e)return l(e)
|
||
u=t,c()})
|
||
function c(){if(u.toJSON().multihash!==n.Hash){var e=new Error("multihashes do not match")
|
||
return l(e)}s.set(n.Hash,u),l(null,u)}u=e,c()})})}}).call(this,e("buffer").Buffer)},{"../utils/send-one-file":356,buffer:110,"ipld-dag-pb":376,"lru-cache":459,once:535,"promisify-es6":542}],310:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/clean-multihash")
|
||
t.exports=function(t){var r=e("./get")(t)
|
||
return n(function(e,n,o,a){"function"==typeof o&&(a=o,o={}),o||(o={})
|
||
try{e=i(e,o)}catch(e){return a(e)}t({path:"object/patch/rm-link",args:[e,n.name]},function(e,t){if(e)return a(e)
|
||
r(t.Hash,{enc:"base58"},a)})})}},{"../utils/clean-multihash":344,"./get":305,"promisify-es6":542}],311:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("once"),o=e("../utils/clean-multihash"),a=e("../utils/send-one-file")
|
||
t.exports=function(t){var r=e("./get")(t),s=a(t,"object/patch/set-data")
|
||
return n(function(e,t,n,a){"function"==typeof n&&(a=n,n={})
|
||
var u=i(a)
|
||
n||(n={})
|
||
try{e=o(e,n)}catch(e){return u(e)}s(t,{args:[e]},function(e,t){if(e)return u(e)
|
||
r(t.Hash,{enc:"base58"},u)})})}},{"../utils/clean-multihash":344,"../utils/send-one-file":356,"./get":305,once:535,"promisify-es6":542}],312:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/clean-multihash")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),r||(r={})
|
||
try{t=i(t,r)}catch(e){return n(e)}e({path:"object/stat",args:t},n)})}},{"../utils/clean-multihash":344,"promisify-es6":542}],313:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r=null),e({path:"pin/add",args:t,qs:r},function(e,t){if(e)return n(e)
|
||
n(null,t.Pins.map(function(e){return{hash:e}}))})})}},{"promisify-es6":542}],314:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{add:e("./add")(r),rm:e("./rm")(r),ls:e("./ls")(r)}}},{"../utils/module-config":348,"./add":313,"./ls":315,"./rm":316}],315:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("lodash")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof t&&(n=t,r=null,t=null),"function"==typeof r&&(n=r),t&&t.type?(r=t,t=null):r=null,e({path:"pin/ls",args:t,qs:r},function(e,t){if(e)return n(e)
|
||
n(null,i.keys(t.Keys).map(function(e){return{hash:e,type:t.Keys[e].Type}}))})})}},{lodash:455,"promisify-es6":542}],316:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r=null),e({path:"pin/rm",args:t,qs:r},function(e,t){if(e)return n(e)
|
||
n(null,t.Pins.map(function(e){return{hash:e}}))})})}},{"promisify-es6":542}],317:[function(e,t,r){"use strict"
|
||
var n=e("stream-to-pull-stream"),i=e("pull-defer"),o=e("./utils/module-config")
|
||
t.exports=function(e){var t=o(e)
|
||
return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
r.n||r.count||(r.n=1)
|
||
var o={path:"ping",args:e,qs:r},a=i.source()
|
||
return t(o,function(e,t){if(e)return a.abort(e)
|
||
a.resolve(n.source(t))}),a}}},{"./utils/module-config":348,"pull-defer":557,"stream-to-pull-stream":648}],318:[function(e,t,r){"use strict"
|
||
var n=e("readable-stream"),i=e("pump"),o=e("./utils/module-config")
|
||
t.exports=function(e){var t=o(e)
|
||
return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
r.n||r.count||(r.n=1)
|
||
var o={path:"ping",args:e,qs:r},a=new n.PassThrough({objectMode:!0})
|
||
return t(o,function(e,t){if(e)return a.destroy(e)
|
||
i(t,a)}),a}}},{"./utils/module-config":348,pump:592,"readable-stream":231}],319:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config"),o=e("./utils/stream-to-value")
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e,r,n){if("function"==typeof r&&(n=r,r={}),r.n&&r.count)return n(new Error("Use either n or count, not both"))
|
||
r.n||r.count||(r.n=1)
|
||
var i={path:"ping",args:e,qs:r}
|
||
t.andTransform(i,function(e,t){o(e,function(e,r){if(e)return t(e)
|
||
t(null,r)})},n)})}},{"./utils/module-config":348,"./utils/stream-to-value":359,"promisify-es6":542}],320:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("promisify-es6"),i=e("events"),o=e("end-of-stream"),a=e("detect-node"),s=e("./utils/pubsub-message-stream"),u=e("./utils/stringlist-to-array"),c=e("./utils/module-config"),l=function(){return new Error("pubsub is currently not supported when run in the browser")}
|
||
t.exports=function(e){var t=c(e),f=new i,h={}
|
||
return f.id=Math.random(),{subscribe:function(e,t,r,n){var i={discover:!1}
|
||
return"function"==typeof t&&(n=r,r=t,t=i),t||(t=i),a?n?void d(e,t,r,n):new Promise(function(n,i){d(e,t,r,function(e){if(e)return i(e)
|
||
n()})}):n?n(l()):Promise.reject(l())},unsubscribe:function(e,t){if(!a)throw l()
|
||
if(0===f.listenerCount(e)||!h[e])throw new Error("Not subscribed to '"+e+"'")
|
||
f.removeListener(e,t),0===f.listenerCount(e)&&(h[e].abort(),h[e]=null)},publish:n(function(e,n,i){return a?r.isBuffer(n)?void t({path:"pubsub/pub",args:[e,n]},i):i(new Error("data must be a Buffer")):i(l())}),ls:n(function(e){if(!a)return e(l())
|
||
t.andTransform({path:"pubsub/ls"},u,e)}),peers:n(function(e,r){if(!a)return r(l())
|
||
var n={path:"pubsub/peers",args:[e]}
|
||
t.andTransform(n,u,r)}),setMaxListeners:function(e){return f.setMaxListeners(e)}}
|
||
function d(e,r,n,i){if(f.on(e,n),h[e])return i()
|
||
var a={path:"pubsub/sub",args:[e],qs:{discover:r.discover}}
|
||
h[e]=t.andTransform(a,s.from,function(t,r){if(t)return h[e]=null,f.removeListener(e,n),i(t)
|
||
r.on("data",function(t){f.emit(e,t)}),r.on("error",function(e){f.emit("error",e)}),o(r,function(t){t&&f.emit("error",t),h[e]=null,f.removeListener(e,n)}),i()})}}}).call(this,{isBuffer:e("../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../ember-browserify/node_modules/is-buffer/index.js":119,"./utils/module-config":348,"./utils/pubsub-message-stream":351,"./utils/stringlist-to-array":360,"detect-node":87,"end-of-stream":159,events:114,"promisify-es6":542}],321:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/stream-to-value"),o=e("./utils/module-config")
|
||
t.exports=function(e){var t=o(e),r=n(function(e,r,n){"function"==typeof r&&(n=r,r={})
|
||
var o={path:"refs",args:e,qs:r}
|
||
t.andTransform(o,i,n)})
|
||
return r.local=n(function(e,r){"function"==typeof e&&(r=e,e={})
|
||
var n={path:"refs/local",qs:e}
|
||
t.andTransform(n,i,r)}),r}},{"./utils/module-config":348,"./utils/stream-to-value":359,"promisify-es6":542}],322:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"repo/gc",qs:t},r)})}},{"promisify-es6":542}],323:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{gc:e("./gc")(r),stat:e("./stat")(r),version:e("./version")(r)}}},{"../utils/module-config":348,"./gc":322,"./stat":324,"./version":325}],324:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("big.js"),o=function(e,t){t(null,{numObjects:new i(e.NumObjects),repoSize:new i(e.RepoSize),repoPath:e.RepoPath,version:e.Version,storageMax:new i(e.StorageMax)})}
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"repo/stat",qs:t},o,r)})}},{"big.js":35,"promisify-es6":542}],325:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=function(e,t){t(null,e.Version)}
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"repo/version",qs:t},i,r)})}},{"promisify-es6":542}],326:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("big.js"),o=function(e,t){t(null,{provideBufLen:e.ProvideBufLen,wantlist:e.Wantlist||[],peers:e.Peers||[],blocksReceived:new i(e.BlocksReceived),dataReceived:new i(e.DataReceived),blocksSent:new i(e.BlocksSent),dataSent:new i(e.DataSent),dupBlksReceived:new i(e.DupBlksReceived),dupDataReceived:new i(e.DupDataReceived)})}
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"stats/bitswap",qs:t},o,r)})}},{"big.js":35,"promisify-es6":542}],327:[function(e,t,r){"use strict"
|
||
var n=e("stream-to-pull-stream"),i=e("pull-stream"),o=e("./bw-util"),a=e("pull-defer")
|
||
t.exports=function(e){return function(t){t=t||{}
|
||
var r=a.source()
|
||
return e({path:"stats/bw",qs:t},function(e,t){if(e)return r.end(e)
|
||
r.resolve(i(n.source(t),i.map(o)))}),r}}},{"./bw-util":329,"pull-defer":557,"pull-stream":561,"stream-to-pull-stream":648}],328:[function(e,t,r){"use strict"
|
||
var n=e("readable-stream"),i=e("pump"),o=e("./bw-util")
|
||
t.exports=function(e){return function(t){t=t||{}
|
||
var r=new n.Transform({objectMode:!0,transform:function(e,t,r){r(null,o(e))}})
|
||
return e({path:"stats/bw",qs:t},function(e,t){if(e)return r.destroy(e)
|
||
i(t,r)}),r}}},{"./bw-util":329,pump:592,"readable-stream":231}],329:[function(e,t,r){"use strict"
|
||
var n=e("big.js")
|
||
t.exports=function(e){return{totalIn:new n(e.TotalIn),totalOut:new n(e.TotalOut),rateIn:new n(e.RateIn),rateOut:new n(e.RateOut)}}},{"big.js":35}],330:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("../utils/stream-to-value"),o=e("./bw-util"),a=function(e,t){return i(e,function(e,r){if(e)return t(e)
|
||
t(null,o(r[0]))})}
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"stats/bw",qs:t},a,r)})}},{"../utils/stream-to-value":359,"./bw-util":329,"promisify-es6":542}],331:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{bitswap:e("./bitswap")(r),bw:e("./bw")(r),bwReadableStream:e("./bw-readable-stream")(r),bwPullStream:e("./bw-pull-stream")(r),repo:e("./repo")(r)}}},{"../utils/module-config":348,"./bitswap":326,"./bw":330,"./bw-pull-stream":327,"./bw-readable-stream":328,"./repo":332}],332:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("big.js"),o=function(e,t){t(null,{numObjects:new i(e.NumObjects),repoSize:new i(e.RepoSize),repoPath:e.RepoPath,version:e.Version,storageMax:new i(e.StorageMax)})}
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"stats/repo",qs:t},o,r)})}},{"big.js":35,"promisify-es6":542}],333:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config")
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e){t({path:"shutdown"},e)})}},{"./utils/module-config":348,"promisify-es6":542}],334:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("peer-info"),o=e("peer-id"),a=e("multiaddr")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"swarm/addrs",qs:t},function(e,t){if(e)return r(e)
|
||
var n=Object.keys(t.Addrs).map(function(e){var r=new i(o.createFromB58String(e))
|
||
return t.Addrs[e].forEach(function(e){r.multiaddrs.add(a(e))}),r})
|
||
r(null,n)})})}},{multiaddr:467,"peer-id":536,"peer-info":537,"promisify-es6":542}],335:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"swarm/connect",args:t,qs:r},n)})}},{"promisify-es6":542}],336:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6")
|
||
t.exports=function(e){return n(function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"swarm/disconnect",args:t,qs:r},n)})}},{"promisify-es6":542}],337:[function(e,t,r){"use strict"
|
||
var n=e("../utils/module-config")
|
||
t.exports=function(t){var r=n(t)
|
||
return{peers:e("./peers")(r),connect:e("./connect")(r),disconnect:e("./disconnect")(r),addrs:e("./addrs")(r),localAddrs:e("./localAddrs")(r)}}},{"../utils/module-config":348,"./addrs":334,"./connect":335,"./disconnect":336,"./localAddrs":338,"./peers":339}],338:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("multiaddr")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"swarm/addrs/local",qs:t},function(e,t){if(e)return r(e)
|
||
r(null,t.Strings.map(function(e){return i(e)}))})})}},{multiaddr:467,"promisify-es6":542}],339:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("multiaddr"),o=e("peer-id")
|
||
t.exports=function(e){return n(function(t,r){"function"==typeof t&&(r=t,t={})
|
||
var n=t.v||t.verbose
|
||
e({path:"swarm/peers",qs:t},function(e,t){if(e)return r(e)
|
||
t.Strings?r(null,t.Strings.map(function(e){var t={}
|
||
if(n){var r=e.split(" ")
|
||
t.addr=i(r[0]),t.latency=r[1]}else t.addr=i(e)
|
||
return t.peer=o.createFromB58String(t.addr.decapsulate("ipfs")),t})):t.Peers&&r(null,t.Peers.map(function(e){var t={addr:i(e.Addr),peer:o.createFromB58String(e.Peer),muxer:e.Muxer}
|
||
return e.Latency&&(t.latency=e.Latency),e.Streams&&(t.streams=e.Streams),t}))})})}},{multiaddr:467,"peer-id":536,"promisify-es6":542}],340:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config")
|
||
t.exports=function(e){var t=i(e)
|
||
return{apply:n(function(e,r){"function"==typeof e&&(r=e,e={}),t({path:"update",qs:e},r)}),check:n(function(e,r){"function"==typeof e&&(r=e,e={}),t({path:"update/check",qs:e},r)}),log:n(function(e,r){"function"==typeof e&&(r=e,e={}),t({path:"update/log",qs:e},r)})}}},{"./utils/module-config":348,"promisify-es6":542}],341:[function(e,t,r){"use strict"
|
||
var n=e("detect-node"),i=e("promisify-es6"),o=e("../utils/send-one-file-multiple-results"),a=e("../utils/file-result-stream-converter")
|
||
t.exports=function(e){var t=o(e,"add")
|
||
return i(function(e,r,i){return"function"==typeof r&&void 0===i&&(i=r,r={}),"function"==typeof r&&"function"==typeof i&&(i=r,r={}),n?"string"!=typeof e?i(new Error('"path" must be a string')):void t(e,{qs:r,converter:a},i):i(new Error("fsAdd does not work in the browser"))})}},{"../utils/file-result-stream-converter":346,"../utils/send-one-file-multiple-results":355,"detect-node":87,"promisify-es6":542}],342:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("url").parse,o=e("../utils/request"),a=e("../utils/send-one-file-multiple-results"),s=e("../utils/file-result-stream-converter")
|
||
t.exports=function(e){var t=a(e,"add")
|
||
return n(function(e,r,n){if("function"==typeof r&&void 0===n&&(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),!u(e))return n(new Error('"url" param must be an http(s) url'))
|
||
c(e,r,t,n)})}
|
||
var u=function(e){return"string"==typeof e&&e.startsWith("http")},c=function e(t,r,n,a){o(i(t).protocol)(t,function(t){if(t.once("error",a),t.statusCode>=400)return a(new Error("Failed to download with "+t.statusCode))
|
||
var i=t.headers.location
|
||
if(t.statusCode>=300&&t.statusCode<400&&i){if(!u(i))return a(new Error("redirection url must be an http(s) url"))
|
||
e(i,r,n,a)}else{n(t,{qs:r,converter:s},a)}}).end()}},{"../utils/file-result-stream-converter":346,"../utils/request":353,"../utils/send-one-file-multiple-results":355,"promisify-es6":542,url:151}],343:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("bs58"),o=e("cids")
|
||
t.exports=function(e){if(r.isBuffer(e)&&(e=i.encode(e)),o.isCID(e)&&(e=e.toBaseEncodedString()),"string"!=typeof e)throw new Error("unexpected cid type: "+(void 0===e?"undefined":n(e)))
|
||
return o.validateCID(new o(e.split("/")[0])),e}}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,bs58:70,cids:79}],344:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("bs58"),o=e("is-ipfs")
|
||
t.exports=function(e){if(r.isBuffer(e)&&(e=i.encode(e)),"string"!=typeof e)throw new Error("unexpected multihash type: "+(void 0===e?"undefined":n(e)))
|
||
if(!o.multihash(e.split("/")[0]))throw new Error("not valid multihash")
|
||
return e}}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,bs58:70,"is-ipfs":379}],345:[function(e,t,r){"use strict"
|
||
var n=e("../../package.json")
|
||
t.exports=function(){return{"api-path":"/api/v0/","user-agent":"/node-"+n.name+"/"+n.version+"/",host:"localhost",port:"5001",protocol:"http"}}},{"../../package.json":233}],346:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("readable-stream").Transform,o=function(e){function t(e){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t)
|
||
var r=Object.assign({},e||{},{objectMode:!0})
|
||
return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i),n(t,[{key:"_transform",value:function(e,t,r){if(!e.Hash)return r()
|
||
r(null,{path:e.Name,hash:e.Hash,size:parseInt(e.Size,10)})}}]),t}()
|
||
t.exports=o},{"readable-stream":231}],347:[function(e,t,r){"use strict"
|
||
t.exports=function(t){var r=function(){var t={add:e("../files/add"),addReadableStream:e("../files/add-readable-stream"),addPullStream:e("../files/add-pull-stream"),cat:e("../files/cat"),catReadableStream:e("../files/cat-readable-stream"),catPullStream:e("../files/cat-pull-stream"),get:e("../files/get"),getReadableStream:e("../files/get-readable-stream"),getPullStream:e("../files/get-pull-stream"),ls:e("../ls"),lsReadableStream:e("../ls-readable-stream"),lsPullStream:e("../ls-pull-stream"),bitswap:e("../bitswap"),block:e("../block"),bootstrap:e("../bootstrap"),commands:e("../commands"),config:e("../config"),dht:e("../dht"),diag:e("../diag"),id:e("../id"),key:e("../key"),log:e("../log"),mount:e("../mount"),name:e("../name"),object:e("../object"),pin:e("../pin"),ping:e("../ping"),pingReadableStream:e("../ping-readable-stream"),pingPullStream:e("../ping-pull-stream"),refs:e("../refs"),repo:e("../repo"),stop:e("../stop"),stats:e("../stats"),swarm:e("../swarm"),pubsub:e("../pubsub"),update:e("../update"),version:e("../version"),dns:e("../dns")}
|
||
return t.shutdown=t.stop,t.files=function(t){return e("../files")(t)},t.util=function(t){return{addFromFs:e("../util/fs-add")(t),addFromStream:e("../files/add")(t),addFromURL:e("../util/url-add")(t)}},t}(),n={}
|
||
return Object.keys(r).forEach(function(e){n[e]=r[e](t)}),n}},{"../bitswap":234,"../block":239,"../bootstrap":243,"../commands":246,"../config":248,"../dht":254,"../diag":259,"../dns":262,"../files":274,"../files/add":265,"../files/add-pull-stream":263,"../files/add-readable-stream":264,"../files/cat":268,"../files/cat-pull-stream":266,"../files/cat-readable-stream":267,"../files/get":273,"../files/get-pull-stream":271,"../files/get-readable-stream":272,"../id":282,"../key":287,"../log":291,"../ls":297,"../ls-pull-stream":295,"../ls-readable-stream":296,"../mount":298,"../name":299,"../object":306,"../pin":314,"../ping":319,"../ping-pull-stream":317,"../ping-readable-stream":318,"../pubsub":320,"../refs":321,"../repo":323,"../stats":331,"../stop":333,"../swarm":337,"../update":340,"../util/fs-add":341,"../util/url-add":342,"../version":362}],348:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./default-config"),o=e("./send-request"),a=e("multiaddr")
|
||
t.exports=function(e){var t=i()
|
||
if("function"==typeof e)return e
|
||
if("object"===(void 0===e?"undefined":n(e)))return o(e)
|
||
if("string"==typeof e){var r=a(e).nodeAddress()
|
||
return t.host=r.address,t.port=r.port,o(t)}throw new Error("Argument must be a send function or a config object.")}},{"./default-config":345,"./send-request":357,multiaddr:467}],349:[function(e,t,r){(function(r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("stream").Transform,o=e("detect-node"),a=r.from("\r\n"),s=function(e){function t(e){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t)
|
||
var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,Object.assign({},e,{objectMode:!0,highWaterMark:1})))
|
||
return r._boundary=r._generateBoundary(),r._files=[],r._draining=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i),n(t,[{key:"_flush",value:function(){this.push(r.from("--"+this._boundary+"--\r\n")),this.push(null)}},{key:"_generateBoundary",value:function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(10*Math.random()).toString(16)
|
||
return e}},{key:"_transform",value:function(e,t,n){if(r.isBuffer(e))return this.push(e),n()
|
||
this._files.push(e),this._maybeDrain(n)}},{key:"_maybeDrain",value:function(e){var t=this
|
||
if(this._draining)this.once("drained all files",e)
|
||
else if(this._files.length){this._draining=!0
|
||
var r=this._files.shift()
|
||
this._pushFile(r,function(r){t._draining=!1,r?t.emit("error",r):t._maybeDrain(e)})}else this.emit("drained all files"),e()}},{key:"_pushFile",value:function(e,t){var n=this,i=this._leading(e.headers||{})
|
||
this.push(i)
|
||
var s=e.content||r.alloc(0)
|
||
if(r.isBuffer(s))return this.push(s),this.push(a),t()
|
||
s.once("error",this.emit.bind(this,"error")),s.once("end",function(){n.push(a),t()}),s.on("data",function(e){!n.push(e)&&o&&(s.pause(),n.once("drain",function(){return s.resume()}))})}},{key:"_leading",value:function(e){var t=["--"+this._boundary]
|
||
Object.keys(e).forEach(function(r){t.push(r+": "+e[r])}),t.push(""),t.push("")
|
||
var n=t.join("\r\n")
|
||
return r.from(n)}}]),t}()
|
||
t.exports=s}).call(this,e("buffer").Buffer)},{buffer:110,"detect-node":87,stream:231}],350:[function(e,t,r){"use strict"
|
||
var n=e("detect-node"),i=e("flatmap")
|
||
t.exports=function(t,r){var o=[].concat(t)
|
||
return i(o,function(t){if("string"==typeof t){if(!n)throw new Error("Can only add file paths in node")
|
||
return function(t,r){var n=e("path"),i=e("fs"),o=e("glob"),a=null==t.followSymlinks||t.followSymlinks
|
||
r=n.resolve(r)
|
||
var s=i.statSync(r)
|
||
if(s.isDirectory()&&!t.recursive)throw new Error("Can only add directories using --recursive")
|
||
if(s.isDirectory()&&t.recursive){var u=(r=r.split(n.sep).join("/"))+(r.endsWith("/")?"":"/"),c=u.split("/")
|
||
c=c[c.length-2]+"/"
|
||
var l=new o.sync.GlobSync("**/*",{cwd:r,follow:a,dot:t.hidden,ignore:t.ignore})
|
||
return l.found.map(function(e){var t=u+e
|
||
return!0===l.symlinks[t]?{path:c+e,symlink:!0,dir:!1,content:i.readlinkSync(t)}:"FILE"===l.cache[t]?{path:c+e,symlink:!1,dir:!1,content:i.createReadStream(t)}:"DIR"===l.cache[t]||l.cache[t]instanceof Array?{path:c+e,symlink:!1,dir:!0}:void 0}).filter(Boolean)}return{path:n.basename(r),content:i.createReadStream(r)}}(r,t)}return t.path&&!t.content?(t.dir=!0,t):t.content||t.dir?t:{path:"",symlink:!1,dir:!1,content:t}})}},{"detect-node":87,flatmap:206,fs:109,glob:109,path:122}],351:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("readable-stream").Transform,o=e("./pubsub-message-utils"),a=function(e){function t(e){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t)
|
||
var r=Object.assign(e||{},{objectMode:!0})
|
||
return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i),n(t,[{key:"_transform",value:function(e,t,r){if(0===Object.keys(e).length)return r()
|
||
try{var n=o.deserialize(e,"base64")
|
||
this.push(n),r()}catch(e){return r(e)}}}],[{key:"from",value:function(e,r){var n=e.pipe(new t)
|
||
e.on("end",function(){return n.emit("end")}),r(null,n)}}]),t}()
|
||
t.exports=a},{"./pubsub-message-utils":352,"readable-stream":231}],352:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("bs58")
|
||
function i(e){if(!function(e){return e&&e.from&&e.seqno&&e.data&&(e.topicIDs||e.topicCIDs)}(e))throw new Error("Not a pubsub message")
|
||
return{from:n.encode(r.from(e.from,"base64")).toString(),seqno:r.from(e.seqno,"base64"),data:r.from(e.data,"base64"),topicIDs:e.topicIDs||e.topicCIDs}}t.exports={deserialize:function(e,t){if("json"===(t=t?t.toLowerCase():"json"))return function(e){return i(JSON.parse(e))}(e)
|
||
if("base64"===t)return i(e)
|
||
throw new Error("Unsupported encoding: '"+t+"'")}}}).call(this,e("buffer").Buffer)},{bs58:70,buffer:110}],353:[function(e,t,r){"use strict"
|
||
var n=e("http").request,i=e("https").request
|
||
t.exports=function(e){return 0===e.indexOf("https")?i:n}},{http:633,https:115}],354:[function(e,t,r){"use strict"
|
||
var n=e("stream").Duplex,i=e("async/eachSeries"),o=e("is-stream"),a=e("once"),s=e("./prepare-file"),u=e("./multipart")
|
||
function c(e,t,r){return t in e?e[t]:r in e?e[r]:void 0}t.exports=function(e,t){return function(r){var l=void 0,f=!1,h=!1
|
||
r=r?Object.assign({},r,r.qs):{}
|
||
var d=new u,p=new n({objectMode:!0})
|
||
p._read=function(e){},p._write=function(e,t,n){var o=a(n)
|
||
try{var u=s(e,r).map(function(e){return Object.assign({headers:function(e){var t={"Content-Disposition":'file; filename="'+(e.path?encodeURIComponent(e.path):"")+'"'}
|
||
return e.content?e.symlink?t["Content-Type"]="application/symlink":t["Content-Type"]="application/octet-stream":t["Content-Type"]="application/x-directory",t}(e)},e)})
|
||
h=!0,i(u,function(e,r){return d.write(e,t,r)},function(e){if(h=!1,e)return o(e)
|
||
f&&d.end(),o()})}catch(e){o(e)}},p.once("finish",function(){f||(f=!0,h||d.end())})
|
||
var m=r.qs||{}
|
||
m["cid-version"]=c(r,"cid-version","cidVersion"),m["raw-leaves"]=c(r,"raw-leaves","rawLeaves"),m["only-hash"]=c(r,"only-hash","onlyHash"),m.hash=c(r,"hash","hashAlg")
|
||
var y={path:t,qs:m,args:r.args,multipart:!0,multipartBoundary:d._boundary,stream:!0,recursive:!0,progress:r.progress}
|
||
return d.on("error",function(e){p.emit("error",e)}),(l=e(y,function(e,t){if(e)return p.emit("error",e)
|
||
if(!t)return p.push(null)
|
||
if(!o(t))return p.push(t),void p.push(null)
|
||
if(t.on("error",function(e){return p.emit("error",e)}),r.converter){t.on("data",function(e){e.Bytes&&r.progress&&r.progress(e.Bytes)})
|
||
var n=new(0,r.converter)
|
||
n.once("end",function(){return p.push(null)}),n.on("data",function(e){return p.push(e)}),t.pipe(n)}else t.on("data",function(e){e.Bytes&&r.progress&&r.progress(e.Bytes),p.push(e)}),t.once("end",function(){return p.push(null)})})).on("drain",function(){return d.emit("drain")}),d.pipe(l),p}}},{"./multipart":349,"./prepare-file":350,"async/eachSeries":18,"is-stream":381,once:535,stream:231}],355:[function(e,t,r){"use strict"
|
||
var n=e("once"),i=e("concat-stream"),o=e("./send-files-stream")
|
||
t.exports=function(e,t){var r=o(e,t)
|
||
return function(e,t,o){var a=n(o),s=r(t),u=i(function(e){return a(null,e)})
|
||
s.once("error",a),s.pipe(u),s.write(e),s.end()}}},{"./send-files-stream":354,"concat-stream":81,once:535}],356:[function(e,t,r){"use strict"
|
||
var n=e("./send-one-file-multiple-results")
|
||
t.exports=function(e,t){var r=n(e,t)
|
||
return function(e,t,n){r(e,t,function(e,t){if(e)return n(e)
|
||
n(null,t[0])})}}},{"./send-one-file-multiple-results":355}],357:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("qs"),o=e("qs/lib/utils").encode,a=e("detect-node"),s=e("ndjson"),u=e("pump"),c=e("once"),l=e("./stream-to-value"),f=e("./stream-to-json-value"),h=e("./request")
|
||
function d(e,t){return function(r){var n=Boolean(r.headers["x-stream-output"]),i=Boolean(r.headers["x-chunked-output"]),o=r.headers["content-type"]&&0===r.headers["content-type"].indexOf("application/json")
|
||
if(r.statusCode>=400||!r.statusCode)return function(e,t){var r=new Error("Server responded with "+e.statusCode)
|
||
f(e,function(e,n){if(e)return t(e)
|
||
n&&(r.code=n.Code,r.message=n.Message||n.toString()),t(r)})}(r,t)
|
||
if(n&&!e)return t(null,r)
|
||
if(i&&o){var a=s.parse()
|
||
return u(r,a),r.on("end",function(){var e=r.trailers["x-stream-error"]
|
||
if(e){try{e=JSON.parse(e)}catch(t){e={Message:e}}a.emit("error",new Error(e.Message))}}),t(null,a)}return o?f(r,t):l(r,t)}}t.exports=function(e){var t=function(t,s){return"object"!==(void 0===t?"undefined":n(t))?s(new Error("no options were passed")):function(e,t,n){n=c(n),t.qs=t.qs||{},Array.isArray(t.path)&&(t.path=t.path.join("/")),t.args&&!Array.isArray(t.args)&&(t.args=[t.args]),t.args&&(t.qs.arg=t.args),t.progress&&(t.qs.progress=!0),t.qs.r&&(t.qs.recursive=t.qs.r,delete t.qs.r),t.qs["stream-channels"]=!0,t.stream&&(t.buffer=!1),delete t.qs.followSymlinks
|
||
var s={}
|
||
if(a&&(s["User-Agent"]=e["user-agent"]),t.multipart){if(!t.multipartBoundary)return n(new Error("No multipartBoundary"))
|
||
s["Content-Type"]="multipart/form-data; boundary="+t.multipartBoundary}var u=i.stringify(t.qs,{arrayFormat:"repeat",encoder:function(e){if(r.isBuffer(e)){var t="",n=!0,i=!1,a=void 0
|
||
try{for(var s,u=e[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var c=s.value
|
||
if(c>=65&&c<=90||c>=97&&c<=122||c>=48&&c<=57||45===c||46===c||95===c||126===c)t+=String.fromCharCode(c)
|
||
else{var l=c.toString(16)
|
||
t+="%"+(1===l.length?"0"+l:l)}}}catch(e){i=!0,a=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw a}}return t}return o(e)}}),l={hostname:e.host,path:""+e["api-path"]+t.path+"?"+u,port:e.port,method:"POST",headers:s,protocol:e.protocol+":"},f=h(e.protocol)(l,d(t.buffer,n))
|
||
return f.on("error",function(e){n(e)}),t.stream||f.end(),f}(e,t,s)}
|
||
return t.andTransform=function(e,r,n){return t(e,function(e,t){if(e)return n(e)
|
||
r(t,n)})},t}}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,"./request":353,"./stream-to-json-value":358,"./stream-to-value":359,"detect-node":87,ndjson:490,once:535,pump:592,qs:594,"qs/lib/utils":597}],358:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("./stream-to-value")
|
||
t.exports=function(e,t){n(e,function(e,n){if(e)return t(e)
|
||
if(!n||0===n.length)return t()
|
||
r.isBuffer(n)&&(n=n.toString())
|
||
var i=void 0
|
||
try{i=JSON.parse(n)}catch(e){return t(e)}t(null,i)})}}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,"./stream-to-value":359}],359:[function(e,t,r){"use strict"
|
||
var n=e("pump"),i=e("concat-stream")
|
||
t.exports=function(e,t){n(e,i(function(e){return t(null,e)}),function(e){e&&t(e)})}},{"concat-stream":81,pump:592}],360:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){t(null,e.Strings||[])}},{}],361:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("pump"),o=e("tar-stream"),a=e("readable-stream").Readable,s=function(e){function t(e){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t)
|
||
var r=Object.assign(e||{},{objectMode:!0})
|
||
return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,a),n(t,[{key:"_read",value:function(){}}]),t}()
|
||
t.exports=function(e,t){var r=new s,n=o.extract()
|
||
n.on("entry",function(e,t,n){t.on("end",n),"directory"!==e.type?r.push({path:e.name,content:t}):(r.push({path:e.name}),t.resume())}).on("finish",function(){return r.push(null)}),i(e,n),t(null,r)}},{pump:592,"readable-stream":231,"tar-stream":653}],362:[function(e,t,r){"use strict"
|
||
var n=e("promisify-es6"),i=e("./utils/module-config")
|
||
t.exports=function(e){var t=i(e)
|
||
return n(function(e,r){"function"==typeof e&&(r=e,e={}),t({path:"version",qs:e},function(e,t){if(e)return r(e)
|
||
var n={version:t.Version,commit:t.Commit,repo:t.Repo}
|
||
r(null,n)})})}},{"./utils/module-config":348,"promisify-es6":542}],363:[function(e,t,r){(function(r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("cids"),o=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t||!r.isBuffer(t))throw new Error("first argument must be a buffer")
|
||
if(!n||!i.isCID(n))throw new Error("second argument must be a CID")
|
||
this._data=t,this._cid=n}return n(e,[{key:"data",get:function(){return this._data},set:function(e){throw new Error("Tried to change an immutable block")}},{key:"cid",get:function(){return this._cid},set:function(e){throw new Error("Tried to change an immutable block")}}],[{key:"isBlock",value:function(e){return e&&"Block"===e.constructor.name}}]),e}()
|
||
t.exports=o}).call(this,{isBuffer:e("../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../ember-browserify/node_modules/is-buffer/index.js":119,cids:79}],364:[function(e,t,r){"use strict"
|
||
var n=e("protons")(e("./unixfs.proto")).Data,i=["raw","directory","file","metadata","symlink","hamt-sharded-directory"],o=["directory","hamt-sharded-directory"]
|
||
function a(e,t){var r=this
|
||
if(!(this instanceof a))return new a(e,t)
|
||
if(-1===i.indexOf(e))throw new Error("Type: "+e+" is not valid")
|
||
this.type=e,this.data=t,this.blockSizes=[],this.addBlockSize=function(e){r.blockSizes.push(e)},this.removeBlockSize=function(e){r.blockSizes.splice(e,1)},this.fileSize=function(){if(!(o.indexOf(r.type)>=0)){var e=0
|
||
return r.blockSizes.forEach(function(t){e+=t}),t&&(e+=t.length),e}},this.marshal=function(){var e=void 0
|
||
switch(r.type){case"raw":e=n.DataType.Raw
|
||
break
|
||
case"directory":e=n.DataType.Directory
|
||
break
|
||
case"file":e=n.DataType.File
|
||
break
|
||
case"metadata":e=n.DataType.Metadata
|
||
break
|
||
case"symlink":e=n.DataType.Symlink
|
||
break
|
||
case"hamt-sharded-directory":e=n.DataType.HAMTShard
|
||
break
|
||
default:throw new Error('Unkown type: "'+r.type+'"')}var t=r.fileSize()
|
||
return t||(t=void 0),n.encode({Type:e,Data:r.data,filesize:t,blocksizes:r.blockSizes.length>0?r.blockSizes:void 0,hashType:r.hashType,fanout:r.fanout})}}a.unmarshal=function(e){var t=n.decode(e)
|
||
t.Data||(t.Data=void 0)
|
||
var r=new a(i[t.Type],t.Data)
|
||
return r.blockSizes=t.blocksizes,r},t.exports=a},{"./unixfs.proto":365,protons:553}],365:[function(e,t,r){"use strict"
|
||
t.exports="message Data {\n enum DataType {\n Raw = 0;\n Directory = 1;\n File = 2;\n Metadata = 3;\n Symlink = 4;\n HAMTShard = 5;\n }\n\n required DataType Type = 1;\n optional bytes Data = 2;\n optional uint64 filesize = 3;\n repeated uint64 blocksizes = 4;\n\n optional uint64 hashType = 5;\n optional uint64 fanout = 6;\n}\n\nmessage Metadata {\n required string MimeType = 1;\n}"},{}],366:[function(e,t,r){"use strict"
|
||
var n=e("./index.js")
|
||
t.exports=function(e,t,r,i){i(null,new n(e,t,r))}},{"./index.js":367}],367:[function(e,t,r){(function(n){"use strict"
|
||
var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var o=e("multihashes"),a=e("assert"),s=function(){function e(t,r,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),a(i,"A link requires a multihash to point to"),this._name=t,this._size=r,"string"==typeof i?this._multihash=o.fromB58String(i):n.isBuffer(i)&&(this._multihash=i)}return i(e,[{key:"toString",value:function(){return"DAGLink <"+o.toB58String(this.multihash)+' - name: "'+this.name+'", size: '+this.size+">"}},{key:"toJSON",value:function(){return{name:this.name,size:this.size,multihash:o.toB58String(this._multihash)}}},{key:"name",get:function(){return this._name},set:function(e){throw new Error("Can't set property: 'name' is immutable")}},{key:"size",get:function(){return this._size},set:function(e){throw new Error("Can't set property: 'size' is immutable")}},{key:"multihash",get:function(){return this._multihash},set:function(e){throw new Error("Can't set property: 'multihash' is immutable")}}]),e}();(r=t.exports=s).create=e("./create"),r.util=e("./util")}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,"./create":366,"./util":368,assert:107,multihashes:481}],368:[function(e,t,r){"use strict"
|
||
var n=e("./index");(r=t.exports).isDagLink=function(e){return e&&e.constructor&&"DAGLink"===e.constructor.name},r.createDagLinkFromB58EncodedHash=function(e){return new n(e.name?e.name:e.Name,e.size?e.size:e.Size,e.hash||e.Hash||e.multihash)}},{"./index":367}],369:[function(e,t,r){"use strict"
|
||
var n=e("./util"),i=n.cloneLinks,o=n.cloneData,a=n.toDAGLink,s=e("./../dag-link"),u=e("./create")
|
||
t.exports=function(e,t,r){var n=i(e),c=o(e)
|
||
if(t.constructor&&"DAGLink"===t.constructor.name);else if(t.constructor&&"DAGNode"===t.constructor.name)t=a(t)
|
||
else{t.multihash=t.multihash||t.hash
|
||
try{t=new s(t.name,t.size,t.multihash)}catch(e){return r(e)}}n.push(t),u(c,n,r)}},{"./../dag-link":367,"./create":371,"./util":374}],370:[function(e,t,r){"use strict"
|
||
var n=e("./util"),i=n.cloneLinks,o=n.cloneData,a=e("./create")
|
||
t.exports=function(e,t){var r=o(e),n=i(e)
|
||
a(r,n,t)}},{"./create":371,"./util":374}],371:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("multihashing-async"),i=e("stable"),o=e("../util.js").serialize,a=e("./util.js").linkSort,s=e("./index.js"),u=e("./../dag-link")
|
||
t.exports=function(e,t,c,l){if("function"==typeof e?(l=e,e=void 0):"string"==typeof e&&(e=r.from(e)),"function"==typeof t&&(l=t,t=[]),"function"==typeof c&&(l=c,c=void 0),!r.isBuffer(e))return l(new Error("Passed 'data' is not a buffer or a string!"))
|
||
c||(c="sha2-256")
|
||
var f=t.map(function(e){return u.util.isDagLink(e)?e:u.util.createDagLinkFromB58EncodedHash(e)}),h=i(f,a)
|
||
o({data:e,links:h},function(t,r){if(t)return l(t)
|
||
n(r,c,function(t,n){if(t)return l(t)
|
||
var i=new s(e,h,r,n)
|
||
l(null,i)})})}}).call(this,e("buffer").Buffer)},{"../util.js":378,"./../dag-link":367,"./index.js":372,"./util.js":374,buffer:110,"multihashing-async":486,stable:632}],372:[function(e,t,r){(function(n){"use strict"
|
||
var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var o=e("multihashes"),a=e("assert"),s=function(){function e(t,r,i,s){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),a(i,"DAGNode needs its serialized format"),a(s,"DAGNode needs its multihash"),"string"==typeof s&&(s=o.fromB58String(s)),this._data=t||n.alloc(0),this._links=r||[],this._serialized=i,this._multihash=s,this._size=this.links.reduce(function(e,t){return e+t.size},this.serialized.length),this._json={data:this.data,links:this.links.map(function(e){return e.toJSON()}),multihash:o.toB58String(this.multihash),size:this.size}}return i(e,[{key:"toJSON",value:function(){return this._json}},{key:"toString",value:function(){return"DAGNode <"+o.toB58String(this.multihash)+' - data: "'+this.data.toString()+'", links: '+this.links.length+", size: "+this.size+">"}},{key:"data",get:function(){return this._data},set:function(e){throw new Error("Can't set property: 'data' is immutable")}},{key:"links",get:function(){return this._links},set:function(e){throw new Error("Can't set property: 'links' is immutable")}},{key:"serialized",get:function(){return this._serialized},set:function(e){throw new Error("Can't set property: 'serialized' is immutable")}},{key:"size",get:function(){return this._size},set:function(e){throw new Error("Can't set property: 'size' is immutable")}},{key:"multihash",get:function(){return this._multihash},set:function(e){throw new Error("Can't set property: 'multihash' is immutable")}}]),e}();(r=t.exports=s).create=e("./create"),r.clone=e("./clone"),r.addLink=e("./addLink"),r.rmLink=e("./rmLink")}).call(this,e("buffer").Buffer)},{"./addLink":369,"./clone":370,"./create":371,"./rmLink":373,assert:107,buffer:110,multihashes:481}],373:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("./util"),i=n.cloneLinks,o=n.cloneData,a=e("./create")
|
||
t.exports=function(e,t,n){var s=o(e),u=i(e)
|
||
if("string"==typeof t)u=u.filter(function(e){return e.name!==t})
|
||
else{if(!r.isBuffer(t))return n(new Error("second arg needs to be a name or multihash"),null)
|
||
u=u.filter(function(e){return!e.multihash.equals(t)})}a(s,u,n)}}).call(this,{isBuffer:e("../../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../../ember-browserify/node_modules/is-buffer/index.js":119,"./create":371,"./util":374}],374:[function(e,t,r){(function(n){"use strict"
|
||
var i=e("./../dag-link");(r=t.exports).cloneData=function(e){var t=void 0
|
||
return e.data&&e.data.length>0?(t=n.alloc(e.data.length),e.data.copy(t)):t=n.alloc(0),t},r.cloneLinks=function(e){return e.links.slice()},r.linkSort=function(e,t){var r=n.from(e.name||""),i=n.from(t.name||"")
|
||
return r.compare(i)},r.toDAGLink=function(e){return new i("",e.size,e.multihash)}}).call(this,e("buffer").Buffer)},{"./../dag-link":367,buffer:110}],375:[function(e,t,r){"use strict"
|
||
t.exports="// An IPFS MerkleDAG Link\nmessage PBLink {\n\n // multihash of the target object\n optional bytes Hash = 1;\n\n // utf string name. should be unique per object\n optional string Name = 2;\n\n // cumulative size of target object\n optional uint64 Tsize = 3;\n}\n\n// An IPFS MerkleDAG Node\nmessage PBNode {\n\n // refs to other objects\n repeated PBLink Links = 2;\n\n // opaque user data\n optional bytes Data = 1;\n}"},{}],376:[function(e,t,r){"use strict"
|
||
r.DAGNode=e("./dag-node"),r.DAGLink=e("./dag-link"),r.resolver=e("./resolver"),r.util=e("./util")},{"./dag-link":367,"./dag-node":372,"./resolver":377,"./util":378}],377:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("async/waterfall"),o=e("cids"),a=e("./util");(r=t.exports).multicodec="dag-pb",r.resolve=function(e,t,r){i([function(t){return a.deserialize(e,t)},function(e,n){if(!t)return r(null,{value:e,remainderPath:""})
|
||
var i=t.split("/")
|
||
if("Links"===i[0]){if(!i[1])return n(null,{value:e.links.map(function(e){return e.toJSON()}),remainderPath:""})
|
||
var o={}
|
||
e.links.forEach(function(e,t){var r=e.toJSON()
|
||
o[t]={hash:r.multihash,name:r.name,size:r.size},o[r.name]=r.multihash})
|
||
var a=o[i[1]]
|
||
"Hash"===i[2]?a={"/":a.hash}:"Tsize"===i[2]?a={"/":a.size}:"Name"===i[2]&&(a={"/":a.name}),n(null,{value:a,remainderPath:i.slice(3).join("/")})}else"Data"===i[0]?n(null,{value:e.data,remainderPath:""}):n(new Error("path not available"))}],r)},r.tree=function(e,t,r){"function"==typeof t&&(r=t,t={}),t=t||{},a.deserialize(e,function(e,t){if(e)return r(e)
|
||
var n=[]
|
||
n.push("Links"),t.links.forEach(function(e,t){n.push("Links/"+t+"/Name"),n.push("Links/"+t+"/Tsize"),n.push("Links/"+t+"/Hash")}),n.push("Data"),r(null,n)})},r.isLink=function(e,t,i){r.resolve(e,t,function(e,t){if(e)return i(e)
|
||
if(t.remainderPath.length>0)return i(new Error("path out of scope"))
|
||
if("object"===n(t.value)&&t.value["/"]){var r=void 0
|
||
try{r=o.isCID(new o(t.value["/"]))}catch(e){r=!1}if(r)return i(null,t.value)}i(null,!1)})}},{"./util":378,"async/waterfall":32,cids:79}],378:[function(e,t,r){(function(n){"use strict"
|
||
var i=e("cids"),o=e("protons")(e("./dag.proto.js")),a=e("./dag-link"),s=e("./dag-node");(r=t.exports).serialize=function(e,t){var r=void 0
|
||
"DAGNode"!==e.constructor.name&&e.links&&(e.links=e.links.map(function(e){return a.util.isDagLink(e)?e:a.util.createDagLinkFromB58EncodedHash(e)}))
|
||
try{r=o.PBNode.encode(function(e){var t={}
|
||
return e.data&&e.data.length>0?t.Data=e.data:t.Data=null,e.links&&e.links.length>0?t.Links=e.links.map(function(e){return{Hash:e.multihash,Name:e.name,Tsize:e.size}}):t.Links=null,t}(e))}catch(e){return t(e)}t(null,r)},r.deserialize=function(e,t){var r=o.PBNode.decode(e),i=r.Links.map(function(e){return new a(e.Name,e.Tsize,e.Hash)}),u=null==r.Data?n.alloc(0):n.from(r.Data)
|
||
s.create(u,i,t)},r.cid=function(e,t){if(e.multihash)return t(null,new i(e.multihash))
|
||
t(new Error("not valid dagPB node"))}}).call(this,e("buffer").Buffer)},{"./dag-link":367,"./dag-node":372,"./dag.proto.js":375,buffer:110,cids:79,protons:553}],379:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("bs58"),i=e("multihashes"),o=e("cids"),a=/^https?:\/\/[^/]+\/(ip(f|n)s)\/((\w+).*)/,s=/^\/(ip(f|n)s)\/((\w+).*)/
|
||
function u(e){try{return o.isCID(new o(e))}catch(e){return!1}}function c(e,t){var r=f(e)
|
||
if(!r)return!1
|
||
var n=r.match(t)
|
||
return!!n&&("ipfs"===n[1]&&u(n[4]))}function l(e,t){var r=f(e)
|
||
if(!r)return!1
|
||
var n=r.match(t)
|
||
return!!n&&"ipns"===n[1]}function f(e){return r.isBuffer(e)?n.encode(e):"string"==typeof e&&e}t.exports={multihash:function(e){var t=f(e)
|
||
try{var o=new r(n.decode(t))
|
||
return i.decode(o),!0}catch(e){return!1}},cid:u,ipfsUrl:function(e){return c(e,a)},ipnsUrl:function(e){return l(e,a)},url:function(e){return c(e,a)||l(e,a)},urlPattern:a,ipfsPath:function(e){return c(e,s)},ipnsPath:function(e){return l(e,s)},path:function(e){return c(e,s)||l(e,s)},pathPattern:s,urlOrPath:function(e){return c(e,a)||l(e,a)||c(e,s)||l(e,s)}}}).call(this,e("buffer").Buffer)},{bs58:70,buffer:110,cids:79,multihashes:481}],380:[function(e,t,r){"use strict"
|
||
t.exports=function(e){return e&&"function"==typeof e.then}},{}],381:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=t.exports=function(e){return null!==e&&"object"===(void 0===e?"undefined":n(e))&&"function"==typeof e.pipe}
|
||
i.writable=function(e){return i(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"===n(e._writableState)},i.readable=function(e){return i(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"===n(e._readableState)},i.duplex=function(e){return i.writable(e)&&i.readable(e)},i.transform=function(e){return i.duplex(e)&&"function"==typeof e._transform&&"object"===n(e._transformState)}},{}],382:[function(e,t,r){arguments[4][120][0].apply(r,arguments)},{dup:120}],383:[function(e,t,r){(function(e,r){"use strict"
|
||
var n="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};(function(){var i="object"===("undefined"==typeof window?"undefined":n(window))?window:{}
|
||
!i.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":n(e))&&e.versions&&e.versions.node&&(i=r)
|
||
for(var o=!i.JS_SHA3_NO_COMMON_JS&&"object"===(void 0===t?"undefined":n(t))&&t.exports,a="0123456789abcdef".split(""),s=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],c=[224,256,384,512],l=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new S(e,t,e).update(n)[r]()}},h=function(e,t,r){return function(n,i){return new S(e,t,i).update(n)[r]()}},d=function(e,t){var r=f(e,t,"hex")
|
||
r.create=function(){return new S(e,t,e)},r.update=function(e){return r.create().update(e)}
|
||
for(var n=0;n<l.length;++n){var i=l[n]
|
||
r[i]=f(e,t,i)}return r},p=[{name:"keccak",padding:[1,256,65536,16777216],bits:c,createMethod:d},{name:"sha3",padding:[6,1536,393216,100663296],bits:c,createMethod:d},{name:"shake",padding:[31,7936,2031616,520093696],bits:[128,256],createMethod:function(e,t){var r=h(e,t,"hex")
|
||
r.create=function(r){return new S(e,t,r)},r.update=function(e,t){return r.create(t).update(e)}
|
||
for(var n=0;n<l.length;++n){var i=l[n]
|
||
r[i]=h(e,t,i)}return r}}],m={},y=[],g=0;g<p.length;++g)for(var b=p[g],v=b.bits,_=0;_<v.length;++_){var w=b.name+"_"+v[_]
|
||
y.push(w),m[w]=b.createMethod(v[_],b.padding)}function S(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3
|
||
for(var n=0;n<50;++n)this.s[n]=0}S.prototype.update=function(e){var t="string"!=typeof e
|
||
t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e))
|
||
for(var r,n,i=e.length,o=this.blocks,a=this.byteCount,u=this.blockCount,c=0,l=this.s;c<i;){if(this.reset)for(this.reset=!1,o[0]=this.block,r=1;r<u+1;++r)o[r]=0
|
||
if(t)for(r=this.start;c<i&&r<a;++c)o[r>>2]|=e[c]<<s[3&r++]
|
||
else for(r=this.start;c<i&&r<a;++c)(n=e.charCodeAt(c))<128?o[r>>2]|=n<<s[3&r++]:n<2048?(o[r>>2]|=(192|n>>6)<<s[3&r++],o[r>>2]|=(128|63&n)<<s[3&r++]):n<55296||n>=57344?(o[r>>2]|=(224|n>>12)<<s[3&r++],o[r>>2]|=(128|n>>6&63)<<s[3&r++],o[r>>2]|=(128|63&n)<<s[3&r++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++c)),o[r>>2]|=(240|n>>18)<<s[3&r++],o[r>>2]|=(128|n>>12&63)<<s[3&r++],o[r>>2]|=(128|n>>6&63)<<s[3&r++],o[r>>2]|=(128|63&n)<<s[3&r++])
|
||
if(this.lastByteIndex=r,r>=a){for(this.start=r-a,this.block=o[u],r=0;r<u;++r)l[r]^=o[r]
|
||
E(l),this.reset=!0}else this.start=r}return this},S.prototype.finalize=function(){var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s
|
||
if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0
|
||
for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t]
|
||
E(n)},S.prototype.toString=S.prototype.hex=function(){this.finalize()
|
||
for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,u="";s<n;){for(o=0;o<t&&s<n;++o,++s)e=r[o],u+=a[e>>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15]
|
||
s%t==0&&(E(r),o=0)}return i&&(e=r[o],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},S.prototype.arrayBuffer=function(){this.finalize()
|
||
var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3
|
||
e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s)
|
||
for(var u=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)u[a]=r[o]
|
||
a%t==0&&E(r)}return i&&(u[o]=r[o],e=e.slice(0,s)),e},S.prototype.buffer=S.prototype.arrayBuffer,S.prototype.digest=S.prototype.array=function(){this.finalize()
|
||
for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,u=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255
|
||
s%r==0&&E(n)}return o&&(e=s<<2,t=n[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u}
|
||
var E=function(e){var t,r,n,i,o,a,s,c,l,f,h,d,p,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P,M,R,O,B,N,j,L,D,U,F,z,q,V,H,K,W,G,Y,Q,X,$,J,Z,ee,te,re,ne,ie,oe,ae,se,ue,ce,le
|
||
for(n=0;n<48;n+=2){i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|l>>>31),r=o^(l<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|h>>>31),r=s^(h<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(d<<1|p>>>31),r=l^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=h^(o<<1|i>>>31)
|
||
e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],y=e[1],G=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,j=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30
|
||
te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,Z=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18
|
||
e[0]=m^~g&v,e[1]=y^~b&_,e[10]=x^~A&I,e[11]=C^~T&P,e[20]=N^~L&U,e[21]=j^~D&F,e[30]=K^~G&Q,e[31]=W^~Y&X,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&w,e[3]=b^~_&S,e[12]=A^~I&M,e[13]=T^~P&R,e[22]=L^~U&z,e[23]=D^~F&q,e[32]=G^~Q&$,e[33]=Y^~X&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~w&E,e[5]=_^~S&k,e[14]=I^~M&O,e[15]=P^~R&B,e[24]=U^~z&V,e[25]=F^~q&H,e[34]=Q^~$&Z,e[35]=X^~J&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le
|
||
e[6]=w^~E&m,e[7]=S^~k&y,e[16]=M^~O&x,e[17]=R^~B&C,e[26]=z^~V&N,e[27]=q^~H&j,e[36]=$^~Z&K,e[37]=J^~ee&W,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~m&g,e[9]=k^~y&b,e[18]=O^~x&A,e[19]=B^~C&T,e[28]=V^~N&L,e[29]=H^~j&D,e[38]=Z^~K&G,e[39]=ee^~W&Y,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=u[n],e[1]^=u[n+1]}}
|
||
if(o)t.exports=m
|
||
else for(g=0;g<y.length;++g)i[y[g]]=m[y[g]]})()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:124}],384:[function(e,t,r){"use strict"
|
||
function n(e,t){var r=[],n=[]
|
||
return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"}),function(i,o){if(r.length>0){var a=r.indexOf(this)
|
||
~a?r.splice(a+1):r.push(this),~a?n.splice(a,1/0,i):n.push(i),~r.indexOf(o)&&(o=t.call(this,i,o))}else r.push(o)
|
||
return null==e?o:e.call(this,i,o)}}(t.exports=function(e,t,r,i){return JSON.stringify(e,n(t,i),r)}).getSerialize=n},{}],385:[function(e,t,r){t.exports=[{constant:!0,inputs:[{name:"",type:"uint256"}],name:"contributors",outputs:[{name:"account",type:"address"},{name:"ipfsHash",type:"bytes32"},{name:"hashFunction",type:"uint8"},{name:"hashSize",type:"uint8"},{name:"isCore",type:"bool"},{name:"exists",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"implementation",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"_proxiedContractName",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contributorsCount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"contributorIds",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{anonymous:!1,inputs:[{indexed:!1,name:"id",type:"uint256"},{indexed:!1,name:"oldIpfsHash",type:"bytes32"},{indexed:!1,name:"newIpfsHash",type:"bytes32"}],name:"ContributorProfileUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"id",type:"uint256"},{indexed:!1,name:"oldAccount",type:"address"},{indexed:!1,name:"newAccount",type:"address"}],name:"ContributorAccountUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"id",type:"uint256"},{indexed:!1,name:"account",type:"address"}],name:"ContributorAdded",type:"event"},{constant:!1,inputs:[{name:"sender",type:"address"}],name:"initialize",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[],name:"coreContributorsCount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"id",type:"uint256"},{name:"oldAccount",type:"address"},{name:"newAccount",type:"address"}],name:"updateContributorAccount",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"id",type:"uint256"},{name:"ipfsHash",type:"bytes32"},{name:"hashFunction",type:"uint8"},{name:"hashSize",type:"uint8"}],name:"updateContributorIpfsHash",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"account",type:"address"},{name:"ipfsHash",type:"bytes32"},{name:"hashFunction",type:"uint8"},{name:"hashSize",type:"uint8"},{name:"isCore",type:"bool"}],name:"addContributor",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"id",type:"uint256"}],name:"isCore",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"id",type:"uint256"}],name:"exists",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"account",type:"address"}],name:"addressIsCore",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"account",type:"address"}],name:"addressExists",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"account",type:"address"}],name:"getContributorIdByAddress",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"id",type:"uint256"}],name:"getContributorAddressById",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_id",type:"uint256"}],name:"getContributorById",outputs:[{name:"id",type:"uint256"},{name:"account",type:"address"},{name:"ipfsHash",type:"bytes32"},{name:"hashFunction",type:"uint8"},{name:"hashSize",type:"uint8"},{name:"isCore",type:"bool"},{name:"balance",type:"uint256"},{name:"exists",type:"bool"}],payable:!1,stateMutability:"view",type:"function"}]},{}],386:[function(e,t,r){t.exports=[{constant:!0,inputs:[{name:"",type:"uint256"}],name:"proposals",outputs:[{name:"creatorAccount",type:"address"},{name:"contributorId",type:"uint256"},{name:"votesCount",type:"uint256"},{name:"votesNeeded",type:"uint256"},{name:"amount",type:"uint256"},{name:"executed",type:"bool"},{name:"ipfsHash",type:"bytes32"},{name:"hashFunction",type:"uint8"},{name:"hashSize",type:"uint8"},{name:"exists",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"proposalsCount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"implementation",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"_proxiedContractName",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"sender",type:"address"}],name:"initialize",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{anonymous:!1,inputs:[{indexed:!1,name:"id",type:"uint256"},{indexed:!1,name:"creatorAccount",type:"address"},{indexed:!1,name:"contributorId",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"}],name:"ProposalCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"id",type:"uint256"},{indexed:!1,name:"voterId",type:"uint256"},{indexed:!1,name:"totalVotes",type:"uint256"}],name:"ProposalVoted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"id",type:"uint256"},{indexed:!1,name:"contributorId",type:"uint256"},{indexed:!1,name:"amount",type:"uint256"}],name:"ProposalExecuted",type:"event"},{constant:!0,inputs:[],name:"contributorsContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"tokenContract",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"contributorsCount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"coreContributorsCount",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"contributorId",type:"uint256"},{name:"amount",type:"uint256"},{name:"ipfsHash",type:"bytes32"},{name:"hashFunction",type:"uint8"},{name:"hashSize",type:"uint8"}],name:"addProposal",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"proposalId",type:"uint256"}],name:"getProposal",outputs:[{name:"id",type:"uint256"},{name:"creatorAccount",type:"address"},{name:"contributorId",type:"uint256"},{name:"votesCount",type:"uint256"},{name:"votesNeeded",type:"uint256"},{name:"amount",type:"uint256"},{name:"executed",type:"bool"},{name:"ipfsHash",type:"bytes32"},{name:"hashFunction",type:"uint8"},{name:"hashSize",type:"uint8"},{name:"voterIds",type:"uint256[]"},{name:"exists",type:"bool"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"proposalId",type:"uint256"}],name:"vote",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},{}],387:[function(e,t,r){t.exports=[{constant:!0,inputs:[{name:"",type:"bytes32"}],name:"currentVersions",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"bytes32"}],name:"proxies",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"bytes32"},{name:"",type:"uint256"}],name:"versions",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{anonymous:!1,inputs:[{indexed:!1,name:"name",type:"string"},{indexed:!1,name:"proxy",type:"address"}],name:"ProxyCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"name",type:"string"},{indexed:!1,name:"version",type:"uint256"},{indexed:!1,name:"implementation",type:"address"}],name:"VersionAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"name",type:"string"},{indexed:!1,name:"version",type:"uint256"}],name:"ProxyImplementationUpgraded",type:"event"},{constant:!1,inputs:[{name:"name",type:"string"},{name:"implementation",type:"address"}],name:"addVersion",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{name:"name",type:"string"},{name:"version",type:"uint256"}],name:"getVersion",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"name",type:"string"}],name:"getLatestVersion",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"name",type:"string"}],name:"getProxyFor",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"name",type:"string"},{name:"version",type:"uint256"}],name:"upgrade",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"name",type:"string"}],name:"upgradeToLatest",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"name",type:"string"},{name:"version",type:"uint256"}],name:"createProxy",outputs:[{name:"",type:"address"}],payable:!0,stateMutability:"payable",type:"function"}]},{}],388:[function(e,t,r){t.exports=[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"implementation",outputs:[{name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"_proxiedContractName",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"recipient",type:"address"},{indexed:!1,name:"amount",type:"uint256"},{indexed:!1,name:"proposalId",type:"uint256"}],name:"LogMint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!1,inputs:[{name:"sender",type:"address"}],name:"initialize",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!1,inputs:[{name:"contributorAccount",type:"address"},{name:"amount",type:"uint256"},{name:"proposalId",type:"uint256"}],name:"mintFor",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}]},{}],389:[function(e,t,r){t.exports={42:"0xc270e6ea4fe303df9f1a3d4a132ac425264082e7",100:"0x7458dea485d9d8301e3ce43e8a1ec1456be5ba83"}},{}],390:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.contract=t}return n(e,[{key:"on",value:function(e,t){var r="on"+e.toLowerCase()
|
||
return this.contract[r]=t,this}},{key:"functions",get:function(){return this.contract.functions}},{key:"ipfs",get:function(){if(!this._ipfsAPI)throw new Error("IPFS API not configured; please set an ipfs instance")
|
||
return this._ipfsAPI},set:function(e){this._ipfsAPI=e}}]),e}()
|
||
t.exports=i},{}],391:[function(e,t,r){"use strict"
|
||
var n=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var o=e("ethers"),a=e("rsvp"),s=e("../serializers/contributor"),u=e("./base"),c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,u),i(t,[{key:"all",value:function(){var e=this
|
||
return this.functions.contributorsCount().then(function(t){t=t.toNumber()
|
||
for(var r=[],n=1;n<=t;n++)r.push(e.getById(n))
|
||
return a.all(r)})}},{key:"getById",value:function(e){var t=this
|
||
return e=o.utils.bigNumberify(e),this.functions.getContributorById(e).then(function(e){return e.hashDigest=e.ipfsHash,e}).then(function(e){return t.ipfs.catAndMerge(e,s.deserialize)})}},{key:"filterByAccount",value:function(e){return this._byAccount(e,"filter")}},{key:"findByAccount",value:function(e){return this._byAccount(e,"find")}},{key:"_byAccount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"filter"
|
||
return this.all().then(function(r){var i=Object.entries(e)
|
||
return r[t](function(e){return!!e.accounts&&e.accounts.find(function(e){return i.every(function(t){var r=n(t,2),i=r[0],o=r[1]
|
||
return e[i]===o})})})})}},{key:"add",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.serialize(e)
|
||
return this.ipfs.add(n).then(function(n){var i,o=[e.account,n.hashDigest,n.hashFunction,n.hashSize,e.isCore]
|
||
return(i=t.functions).addContributor.apply(i,o.concat([r]))})}}]),t}()
|
||
t.exports=c},{"../serializers/contributor":398,"./base":390,ethers:163,rsvp:401}],392:[function(e,t,r){"use strict"
|
||
t.exports={Contributors:e("./contributor"),Operator:e("./operator"),Token:e("./token"),Registry:e("./registry")}},{"./contributor":391,"./operator":393,"./registry":394,"./token":395}],393:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("ethers"),o=e("rsvp"),a=e("../serializers/contribution"),s=e("./base"),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,s),n(t,[{key:"all",value:function(){var e=this
|
||
return this.functions.proposalsCount().then(function(t){t=t.toNumber()
|
||
for(var r=[],n=1;n<=t;n++)r.push(e.getById(n))
|
||
return o.all(r)})}},{key:"getById",value:function(e){var t=this
|
||
return e=i.utils.bigNumberify(e),this.functions.getProposal(e).then(function(e){return e.hashDigest=e.ipfsHash,e}).then(function(e){return t.ipfs.catAndMerge(e,a.deserialize)})}},{key:"addProposal",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.serialize(e)
|
||
return this.ipfs.add(n).then(function(n){var i,o=[e.contributorId,e.amount,n.hashDigest,n.hashFunction,n.hashSize]
|
||
return(i=t.functions).addProposal.apply(i,o.concat([r]))})}}]),t}()
|
||
t.exports=u},{"../serializers/contribution":397,"./base":390,ethers:163,rsvp:401}],394:[function(e,t,r){"use strict"
|
||
var n=e("./base"),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n),t}()
|
||
t.exports=i},{"./base":390}],395:[function(e,t,r){"use strict"
|
||
var n=e("./base"),i=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,n),t}()
|
||
t.exports=i},{"./base":390}],396:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("ethers"),o=e("rsvp"),a=e("./utils/healthcheck"),s={Contributors:e("./abis/Contributors.json"),Operator:e("./abis/Operator.json"),Registry:e("./abis/Registry.json"),Token:e("./abis/Token.json")},u=e("./addresses/Registry.json"),c=e("./contracts"),l=e("./utils/ipfs")
|
||
function f(e){var t,r=(t=e,Array.isArray(t)?t:Array.from(t)),n=r[0],i=r.slice(1)
|
||
return""+n.toUpperCase()+i.join("")}var h=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e)
|
||
var i=n.addresses,o=n.abis,a=n.ipfsConfig
|
||
this.provider=t,this.signer=r,this.addresses=i||{Registry:u[this.provider.chainId.toString()]},this.abis=o||s,this.ipfs=new l(a),this.contracts={}}return n(e,[{key:"init",value:function(e){var t=this,r=(e||Object.keys(s)).map(function(e){return t.Registry.functions.getProxyFor(e).then(function(r){t.addresses[e]=r}).catch(function(r){throw new Error("Failed to get address for "+e+" from registry at "+t.Registry.contract.address+"\n - correct registry? does it have version entry? - "+r.message)})})
|
||
return o.all(r).then(function(){return t})}},{key:"contractFor",value:function(e){if(this.contracts[e])return this.contracts[e]
|
||
var t=f(e),r=this.addresses[t],n=this.abis[t]
|
||
if(!r||!n)throw new Error("Address or ABI not found for "+t)
|
||
var o=this.signer||this.provider,a=new i.Contract(r,n,o)
|
||
return this.contracts[e]=new c[t](a),this.contracts[e].ipfs=this.ipfs,this.contracts[e]}},{key:"healthcheck",value:function(){return new a(this).check()}},{key:"Registry",get:function(){return this.contractFor("registry")}},{key:"Contributor",get:function(){return this.contractFor("contributors")}},{key:"Contributors",get:function(){return console.log("Contributors is deprecated use Contributor instead"),this.Contributor}},{key:"Operator",get:function(){return this.contractFor("operator")}},{key:"Token",get:function(){return this.contractFor("token")}}],[{key:"setup",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null
|
||
return console.log("Kredits.setup() is deprecated use new Kredits().init() instead"),new e(t,r,{ipfsConfig:n}).init()}}]),e}()
|
||
t.exports=h},{"./abis/Contributors.json":385,"./abis/Operator.json":386,"./abis/Registry.json":387,"./abis/Token.json":388,"./addresses/Registry.json":389,"./contracts":392,"./utils/healthcheck":399,"./utils/ipfs":400,ethers:163,rsvp:401}],397:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e)}return n(e,null,[{key:"deserialize",value:function(e){var t=JSON.parse(e.toString("utf8"))
|
||
return{kind:t.kind,description:t.description,details:t.details,url:t.url,ipfsData:e}}},{key:"serialize",value:function(e){var t=e.contributorIpfsHash,r=e.kind,n=e.description,i=e.url,o={"@context":"https://schema.kosmos.org","@type":"Contribution",contributor:{ipfs:t},kind:r,description:n,details:e.details||{}}
|
||
return i&&(o.url=i),JSON.stringify(o,null,2)}}]),e}()
|
||
t.exports=i},{}],398:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e)}return n(e,null,[{key:"deserialize",value:function(e){var t=JSON.parse(e.toString("utf8")),r=t.name,n=t.kind,i=t.url,o=t.accounts,a=void 0,s=void 0,u=void 0,c=o.find(function(e){return"github.com"===e.site}),l=o.find(function(e){return"wiki.kosmos.org"===e.site})
|
||
return c&&(a=c.username,s=c.uid),l&&(u=l.username),{name:r,kind:n,url:i,accounts:o,github_uid:s,github_username:a,wiki_username:u,ipfsData:e}}},{key:"serialize",value:function(e){var t=e.name,r=e.kind,n=e.url,i=e.github_uid,o=e.github_username,a=e.wiki_username,s={"@context":"https://schema.kosmos.org","@type":"Contributor",kind:r,name:t,accounts:[]}
|
||
return n&&(s.url=n),i&&s.accounts.push({site:"github.com",uid:i,username:o,url:"https://github.com/"+o}),a&&s.accounts.push({site:"wiki.kosmos.org",username:a,url:"https://wiki.kosmos.org/User:"+a}),JSON.stringify(s,null,2)}}]),e}()
|
||
t.exports=i},{}],399:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.kredits=t}return n(e,[{key:"check",value:function(){var e=this
|
||
return this.kredits.ipfs._ipfsAPI.id().catch(function(t){throw new Error("IPFS node not available; config: "+JSON.stringify(e.kredits.ipfs.config)+" - "+t.message)}).then(function(){var t=Object.keys(e.kredits.contracts).map(function(t){var r=e.kredits.contracts[t]
|
||
return e.kredits.provider.getCode(r.contract.address).then(function(n){if("0x00"===n||n.length<5)throw new Error("Contract for: "+t+" not found at "+r.contract.address+" on network "+e.kredits.provider.chainId)
|
||
return!0})})
|
||
return Promise.all(t)})}}]),e}()
|
||
t.exports=i},{}],400:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("ipfs-api"),o=e("multihashes"),a=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),t||(t={host:"localhost",port:"5001",protocol:"http"}),this._ipfsAPI=i(t),this._config=t}return n(e,[{key:"catAndMerge",value:function(e,t){return e.hashSize&&0!==e.hashSize?(e.ipfsHash=o.toB58String(this.encodeHash(e)),this.cat(e.ipfsHash).then(t).then(function(t){return Object.assign({},e,t)})):e}},{key:"add",value:function(e){var t=this
|
||
return this._ipfsAPI.add(new this._ipfsAPI.Buffer(e)).then(function(e){return t.decodeHash(e[0].hash)})}},{key:"cat",value:function(e){var t=e
|
||
return e.hasOwnProperty("hashSize")&&(t=this.encodeHash(e)),this._ipfsAPI.cat(t)}},{key:"decodeHash",value:function(e){var t=o.decode(o.fromB58String(e))
|
||
return{hashDigest:"0x"+o.toHexString(t.digest),hashSize:t.length,hashFunction:t.code,ipfsHash:e}}},{key:"encodeHash",value:function(e){var t=this._ipfsAPI.Buffer.from(e.hashDigest.slice(2),"hex")
|
||
return o.encode(t,e.hashFunction,e.hashSize)}}]),e}()
|
||
t.exports=a},{"ipfs-api":283,multihashes:481}],401:[function(e,t,r){(function(n){"use strict"
|
||
var i,o,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}
|
||
i=void 0,o=function(t){function r(e){var t=e._promiseCallbacks
|
||
return t||(t=e._promiseCallbacks={}),t}var i={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e._promiseCallbacks=void 0,e},on:function(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function")
|
||
var n=r(this),i=void 0;(i=n[e])||(i=n[e]=[]),i.indexOf(t)&&i.push(t)},off:function(e,t){var n,i=r(this),o=void 0
|
||
t?-1!==(n=(o=i[e]).indexOf(t))&&o.splice(n,1):i[e]=[]},trigger:function(e,t,n){var i
|
||
if(i=r(this)[e])for(var o=0;o<i.length;o++)(0,i[o])(t,n)}},o={instrument:!1}
|
||
function s(e,t){if(2!==arguments.length)return o[e]
|
||
o[e]=t}i.mixin(o)
|
||
var u=[]
|
||
function c(e,t,r){1===u.push({name:e,payload:{key:t._guidKey,id:t._id,eventName:e,detail:t._result,childId:r&&r._id,label:t._label,timeStamp:Date.now(),error:o["instrument-with-stack"]?new Error(t._label):null}})&&setTimeout(function(){for(var e=0;e<u.length;e++){var t=u[e],r=t.payload
|
||
r.guid=r.key+r.id,r.childGuid=r.key+r.childId,r.error&&(r.stack=r.error.stack),o.trigger(t.name,t.payload)}u.length=0},50)}function l(e,t){if(e&&"object"===(void 0===e?"undefined":a(e))&&e.constructor===this)return e
|
||
var r=new this(f,t)
|
||
return w(r,e),r}function f(){}var h=void 0,d=1,p=2,m={error:null}
|
||
function y(e){try{return e.then}catch(e){return m.error=e,m}}var g=void 0
|
||
function b(){try{var e=g
|
||
return g=null,e.apply(this,arguments)}catch(e){return m.error=e,m}}function v(e){return g=e,b}function _(e,t,r){if(t.constructor===e.constructor&&r===T&&e.constructor.resolve===l)(function(e,t){t._state===d?E(e,t._result):t._state===p?(t._onError=null,k(e,t._result)):x(t,void 0,function(r){t===r?E(e,r):w(e,r)},function(t){return k(e,t)})})(e,t)
|
||
else if(r===m){var n=m.error
|
||
m.error=null,k(e,n)}else"function"==typeof r?function(e,t,r){o.async(function(e){var n=!1,i=v(r).call(t,function(r){n||(n=!0,t===r?E(e,r):w(e,r))},function(t){n||(n=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"))
|
||
if(!n&&i===m){n=!0
|
||
var o=m.error
|
||
m.error=null,k(e,o)}},e)}(e,t,r):E(e,t)}function w(e,t){var r,n
|
||
e===t?E(e,t):(n=void 0===(r=t)?"undefined":a(r),null===r||"object"!==n&&"function"!==n?E(e,t):_(e,t,y(t)))}function S(e){e._onError&&e._onError(e._result),C(e)}function E(e,t){e._state===h&&(e._result=t,e._state=d,0===e._subscribers.length?o.instrument&&c("fulfilled",e):o.async(C,e))}function k(e,t){e._state===h&&(e._state=p,e._result=t,o.async(S,e))}function x(e,t,r,n){var i=e._subscribers,a=i.length
|
||
e._onError=null,i[a]=t,i[a+d]=r,i[a+p]=n,0===a&&e._state&&o.async(C,e)}function C(e){var t=e._subscribers,r=e._state
|
||
if(o.instrument&&c(r===d?"fulfilled":"rejected",e),0!==t.length){for(var n=void 0,i=void 0,a=e._result,s=0;s<t.length;s+=3)n=t[s],i=t[s+r],n?A(r,n,i,a):i(a)
|
||
e._subscribers.length=0}}function A(e,t,r,n){var i="function"==typeof r,o=void 0
|
||
if(o=i?v(r)(n):n,t._state!==h);else if(o===t)k(t,new TypeError("A promises callback cannot return that same promise."))
|
||
else if(o===m){var a=m.error
|
||
m.error=null,k(t,a)}else i?w(t,o):e===d?E(t,o):e===p&&k(t,o)}function T(e,t,r){var n=this._state
|
||
if(n===d&&!e||n===p&&!t)return o.instrument&&c("chained",this,this),this
|
||
this._onError=null
|
||
var i=new this.constructor(f,r),a=this._result
|
||
if(o.instrument&&c("chained",this,i),n===h)x(this,i,e,t)
|
||
else{var s=n===d?e:t
|
||
o.async(function(){return A(n,i,s,a)})}return i}var I=function(){function e(e,t,r,n){this._instanceConstructor=e,this.promise=new e(f,n),this._abortOnReject=r,this._isUsingOwnPromise=e===O,this._isUsingOwnResolve=e.resolve===l,this._init.apply(this,arguments)}return e.prototype._init=function(e,t){var r=t.length||0
|
||
this.length=r,this._remaining=r,this._result=new Array(r),this._enumerate(t)},e.prototype._enumerate=function(e){for(var t=this.length,r=this.promise,n=0;r._state===h&&n<t;n++)this._eachEntry(e[n],n,!0)
|
||
this._checkFullfillment()},e.prototype._checkFullfillment=function(){0===this._remaining&&E(this.promise,this._result)},e.prototype._settleMaybeThenable=function(e,t,r){var n=this._instanceConstructor
|
||
if(this._isUsingOwnResolve){var i=y(e)
|
||
if(i===T&&e._state!==h)e._onError=null,this._settledAt(e._state,t,e._result,r)
|
||
else if("function"!=typeof i)this._settledAt(d,t,e,r)
|
||
else if(this._isUsingOwnPromise){var o=new n(f)
|
||
_(o,e,i),this._willSettleAt(o,t,r)}else this._willSettleAt(new n(function(t){return t(e)}),t,r)}else this._willSettleAt(n.resolve(e),t,r)},e.prototype._eachEntry=function(e,t,r){null!==e&&"object"===(void 0===e?"undefined":a(e))?this._settleMaybeThenable(e,t,r):this._setResultAt(d,t,e,r)},e.prototype._settledAt=function(e,t,r,n){var i=this.promise
|
||
i._state===h&&(this._abortOnReject&&e===p?k(i,r):(this._setResultAt(e,t,r,n),this._checkFullfillment()))},e.prototype._setResultAt=function(e,t,r,n){this._remaining--,this._result[t]=r},e.prototype._willSettleAt=function(e,t,r){var n=this
|
||
x(e,void 0,function(e){return n._settledAt(d,t,e,r)},function(e){return n._settledAt(p,t,e,r)})},e}()
|
||
function P(e,t,r){this._remaining--,this._result[t]=e===d?{state:"fulfilled",value:r}:{state:"rejected",reason:r}}var M="rsvp_"+Date.now()+"-",R=0
|
||
var O=function(){function e(t,r){this._id=R++,this._label=r,this._state=void 0,this._result=void 0,this._subscribers=[],o.instrument&&c("created",this),f!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){var r=!1
|
||
try{t(function(t){r||(r=!0,w(e,t))},function(t){r||(r=!0,k(e,t))})}catch(t){k(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype._onError=function(e){var t=this
|
||
o.after(function(){t._onError&&o.trigger("error",e,t._label)})},e.prototype.catch=function(e,t){return this.then(void 0,e,t)},e.prototype.finally=function(e,t){var r=this.constructor
|
||
return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})},t)},e}()
|
||
function B(e,t){return{then:function(r,n){return e.call(t,r,n)}}}function N(e,t){var r=function(){for(var r=arguments.length,n=new Array(r+1),i=!1,o=0;o<r;++o){var a=arguments[o]
|
||
if(!i){if((i=L(a))===m){var s=m.error
|
||
m.error=null
|
||
var u=new O(f)
|
||
return k(u,s),u}i&&!0!==i&&(a=B(i,a))}n[o]=a}var c=new O(f)
|
||
return n[r]=function(e,r){e?k(c,e):void 0===t?w(c,r):!0===t?w(c,function(e){for(var t=e.length,r=new Array(t-1),n=1;n<t;n++)r[n-1]=e[n]
|
||
return r}(arguments)):Array.isArray(t)?w(c,function(e,t){for(var r={},n=e.length,i=new Array(n),o=0;o<n;o++)i[o]=e[o]
|
||
for(var a=0;a<t.length;a++)r[t[a]]=i[a+1]
|
||
return r}(arguments,t)):w(c,r)},i?function(e,t,r,n){return O.all(t).then(function(t){return j(e,t,r,n)})}(c,n,e,this):j(c,n,e,this)}
|
||
return r.__proto__=e,r}function j(e,t,r,n){if(v(r).apply(n,t)===m){var i=m.error
|
||
m.error=null,k(e,i)}return e}function L(e){return null!==e&&"object"===(void 0===e?"undefined":a(e))&&(e.constructor===O||y(e))}function D(e,t){return O.all(e,t)}O.all=function(e,t){return Array.isArray(e)?new I(this,e,!0,t).promise:this.reject(new TypeError("Promise.all must be called with an array"),t)},O.race=function(e,t){var r=new this(f,t)
|
||
if(!Array.isArray(e))return k(r,new TypeError("Promise.race must be called with an array")),r
|
||
for(var n=0;r._state===h&&n<e.length;n++)x(this.resolve(e[n]),void 0,function(e){return w(r,e)},function(e){return k(r,e)})
|
||
return r},O.resolve=l,O.reject=function(e,t){var r=new this(f,t)
|
||
return k(r,e),r},O.prototype._guidKey=M,O.prototype.then=T
|
||
var U=function(e){function t(t,r,n){return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}(this,e.call(this,t,r,!1,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(t)))
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(I)
|
||
function F(e,t){return Array.isArray(e)?new U(O,e,t).promise:O.reject(new TypeError("Promise.allSettled must be called with an array"),t)}function z(e,t){return O.race(e,t)}U.prototype._setResultAt=P
|
||
var q=Object.prototype.hasOwnProperty,V=function(e){function t(t,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments[3]
|
||
return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}(this,e.call(this,t,r,n,i))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(t)))
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype._init=function(e,t){this._result={},this._enumerate(t),0===this._remaining&&E(this.promise,this._result)},t.prototype._enumerate=function(e){var t=this.promise,r=[]
|
||
for(var n in e)q.call(e,n)&&r.push({position:n,entry:e[n]})
|
||
var i=r.length
|
||
this._remaining=i
|
||
for(var o=void 0,a=0;t._state===h&&a<i;a++)o=r[a],this._eachEntry(o.entry,o.position)},t}(I)
|
||
function H(e,t){return null===e||"object"!==(void 0===e?"undefined":a(e))?O.reject(new TypeError("Promise.hash must be called with an object"),t):new V(O,e,t).promise}var K=function(e){function t(t,r,n){return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}(this,e.call(this,t,r,!1,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(t)))
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(V)
|
||
function W(e,t){return null===e||"object"!==(void 0===e?"undefined":a(e))?O.reject(new TypeError("RSVP.hashSettled must be called with an object"),t):new K(O,e,!1,t).promise}function G(e){throw setTimeout(function(){throw e}),e}function Y(e){var t={resolve:void 0,reject:void 0}
|
||
return t.promise=new O(function(e,r){t.resolve=e,t.reject=r},e),t}K.prototype._setResultAt=P
|
||
var Q=function(e){function t(t,r,n,i){return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}(this,e.call(this,t,r,!0,i,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(t)))
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype._init=function(e,t,r,n,i){var o=t.length||0
|
||
this.length=o,this._remaining=o,this._result=new Array(o),this._mapFn=i,this._enumerate(t)},t.prototype._setResultAt=function(e,t,r,n){if(n){var i=v(this._mapFn)(r,t)
|
||
i===m?this._settledAt(p,t,i.error,!1):this._eachEntry(i,t,!1)}else this._remaining--,this._result[t]=r},t}(I)
|
||
function X(e,t,r){return Array.isArray(e)?"function"!=typeof t?O.reject(new TypeError("RSVP.map expects a function as a second argument"),r):new Q(O,e,t,r).promise:O.reject(new TypeError("RSVP.map must be called with an array"),r)}function $(e,t){return O.resolve(e,t)}function J(e,t){return O.reject(e,t)}var Z={},ee=function(e){function t(t,r,n,i){return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!==(void 0===t?"undefined":a(t))&&"function"!=typeof t?e:t}(this,e.call(this,t,r,!0,i,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":a(t)))
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype._init=function(e,t,r,n,i){var o=t.length||0
|
||
this.length=o,this._remaining=o,this._result=new Array(o),this._filterFn=i,this._enumerate(t)},t.prototype._checkFullfillment=function(){0===this._remaining&&(this._result=this._result.filter(function(e){return e!==Z}),E(this.promise,this._result))},t.prototype._setResultAt=function(e,t,r,n){if(n){this._result[t]=r
|
||
var i=v(this._filterFn)(r,t)
|
||
i===m?this._settledAt(p,t,i.error,!1):this._eachEntry(i,t,!1)}else this._remaining--,r||(this._result[t]=Z)},t}(I)
|
||
function te(e,t,r){return"function"!=typeof t?O.reject(new TypeError("RSVP.filter expects function as a second argument"),r):O.resolve(e,r).then(function(e){if(!Array.isArray(e))throw new TypeError("RSVP.filter must be called with an array")
|
||
return new ee(O,e,t,r).promise})}var re=0,ne=void 0
|
||
function ie(e,t){fe[re]=e,fe[re+1]=t,2===(re+=2)&&_e()}var oe="undefined"!=typeof window?window:void 0,ae=oe||{},se=ae.MutationObserver||ae.WebKitMutationObserver,ue="undefined"==typeof self&&void 0!==n&&"[object process]"==={}.toString.call(n),ce="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel
|
||
function le(){return function(){return setTimeout(he,1)}}var fe=new Array(1e3)
|
||
function he(){for(var e=0;e<re;e+=2){(0,fe[e])(fe[e+1]),fe[e]=void 0,fe[e+1]=void 0}re=0}var de,pe,me,ye,ge,be,ve,_e=void 0
|
||
function we(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}ue?(ge=n.nextTick,be=n.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/),Array.isArray(be)&&"0"===be[1]&&"10"===be[2]&&(ge=setImmediate),_e=function(){return ge(he)}):se?(pe=0,me=new se(he),ye=document.createTextNode(""),me.observe(ye,{characterData:!0}),_e=function(){return ye.data=pe=++pe%2}):ce?((de=new MessageChannel).port1.onmessage=he,_e=function(){return de.port2.postMessage(0)}):_e=void 0===oe&&"function"==typeof e?function(){try{var t=e("vertx")
|
||
return void 0!==(ne=t.runOnLoop||t.runOnContext)?function(){ne(he)}:le()}catch(e){return le()}}():le(),o.async=ie,o.after=function(e){return setTimeout(e,0)}
|
||
var Se=function(e,t){return o.async(e,t)}
|
||
function Ee(){o.on.apply(o,arguments)}function ke(){o.off.apply(o,arguments)}if("undefined"!=typeof window&&"object"===a(window.__PROMISE_INSTRUMENTATION__)){var xe=window.__PROMISE_INSTRUMENTATION__
|
||
for(var Ce in s("instrument",!0),xe)xe.hasOwnProperty(Ce)&&Ee(Ce,xe[Ce])}var Ae=(we(ve={asap:ie,Promise:O,EventTarget:i,all:D,allSettled:F,race:z,hash:H,hashSettled:W,rethrow:G,defer:Y,denodeify:N,configure:s,on:Ee,off:ke,resolve:$,reject:J,map:X},"async",Se),we(ve,"filter",te),ve)
|
||
t.default=Ae,t.asap=ie,t.Promise=O,t.EventTarget=i,t.all=D,t.allSettled=F,t.race=z,t.hash=H,t.hashSettled=W,t.rethrow=G,t.defer=Y,t.denodeify=N,t.configure=s,t.on=Ee,t.off=ke,t.resolve=$,t.reject=J,t.map=X,t.async=Se,t.filter=te,Object.defineProperty(t,"__esModule",{value:!0})},"object"===(void 0===r?"undefined":a(r))&&void 0!==t?o(r):"function"==typeof define&&define.amd?define(["exports"],o):o(i.RSVP={})}).call(this,e("_process"))},{_process:124}],402:[function(e,t,r){"use strict"
|
||
var n=e("secp256k1"),i=e("multihashing-async"),o=e("async/setImmediate"),a="sha2-256"
|
||
t.exports=function(e){function t(e){if(!n.privateKeyVerify(e))throw new Error("Invalid private key")}return{generateKey:function(t){var r,i,a=void 0
|
||
do{a=e(32)}while(!n.privateKeyVerify(a))
|
||
r=null,i=a,o(function(){return t(r,i)})},privateKeyLength:32,hashAndSign:function(e,t,r){var s=function(e,t){return o(function(){return r(e,t)})}
|
||
i.digest(t,a,function(t,r){if(t)return s(t)
|
||
try{var i=n.sign(r,e),o=n.signatureExport(i.signature)
|
||
return s(null,o)}catch(t){s(t)}})},hashAndVerify:function(e,t,r,s){var u=function(e,t){return o(function(){return s(e,t)})}
|
||
i.digest(r,a,function(r,i){if(r)return u(r)
|
||
try{t=n.signatureImport(t)
|
||
var o=n.verify(i,t,e)
|
||
return u(null,o)}catch(r){u(r)}})},compressPublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key")
|
||
return n.publicKeyConvert(e,!0)},decompressPublicKey:function(e){return n.publicKeyConvert(e,!1)},validatePrivateKey:t,validatePublicKey:function(e){if(!n.publicKeyVerify(e))throw new Error("Invalid public key")},computePublicKey:function(e){return t(e),n.publicKeyCreate(e)}}}},{"async/setImmediate":31,"multihashing-async":486,secp256k1:610}],403:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e("multihashing-async")
|
||
t.exports=function(t,r,a){a=a||e("./crypto")(r)
|
||
var s=function(){function e(t){i(this,e),a.validatePublicKey(t),this._key=t}return n(e,[{key:"verify",value:function(e,t,r){c(r),a.hashAndVerify(this._key,t,e,r)}},{key:"marshal",value:function(){return a.compressPublicKey(this._key)}},{key:"equals",value:function(e){return this.bytes.equals(e.bytes)}},{key:"hash",value:function(e){c(e),o(this.bytes,"sha2-256",e)}},{key:"bytes",get:function(){return t.PublicKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()})}}]),e}(),u=function(){function e(t,r){i(this,e),this._key=t,this._publicKey=r||a.computePublicKey(t),a.validatePrivateKey(this._key),a.validatePublicKey(this._publicKey)}return n(e,[{key:"sign",value:function(e,t){c(t),a.hashAndSign(this._key,e,t)}},{key:"marshal",value:function(){return this._key}},{key:"equals",value:function(e){return this.bytes.equals(e.bytes)}},{key:"hash",value:function(e){c(e),o(this.bytes,"sha2-256",e)}},{key:"public",get:function(){return new s(this._publicKey)}},{key:"bytes",get:function(){return t.PrivateKey.encode({Type:t.KeyType.Secp256k1,Data:this.marshal()})}}]),e}()
|
||
function c(e){if("function"!=typeof e)throw new Error("callback is required")}return{Secp256k1PublicKey:s,Secp256k1PrivateKey:u,unmarshalSecp256k1PrivateKey:function(e,t){t(null,new u(e),null)},unmarshalSecp256k1PublicKey:function(e){return new s(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),c(t),a.generateKey(function(e,r){if(e)return t(e)
|
||
var n=void 0
|
||
try{n=new u(r)}catch(e){return t(e)}t(null,n)})}}}},{"./crypto":402,"multihashing-async":486}],404:[function(e,t,r){"use strict";(function(t){var r=function(e){var t,r=new Float64Array(16)
|
||
if(e)for(t=0;t<e.length;t++)r[t]=e[t]
|
||
return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32)
|
||
o[0]=9
|
||
var a=r(),s=r([1]),u=r([56129,1]),c=r([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=r([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),h=r([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139])
|
||
function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function m(e,t,r,n,i){var o,a=0
|
||
for(o=0;o<i;o++)a|=e[t+o]^r[n+o]
|
||
return(1&a-1>>>8)-1}function y(e,t,r,n){return m(e,t,r,n,16)}function g(e,t,r,n){return m(e,t,r,n,32)}function b(e,t,r,n){(function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,S=a,E=s,k=u,x=c,C=l,A=f,T=h,I=d,P=p,M=m,R=y,O=g,B=b,N=v,j=_,L=0;L<20;L+=2)w^=(i=(O^=(i=(I^=(i=(x^=(i=w+O|0)<<7|i>>>25)+w|0)<<9|i>>>23)+x|0)<<13|i>>>19)+I|0)<<18|i>>>14,C^=(i=(S^=(i=(B^=(i=(P^=(i=C+S|0)<<7|i>>>25)+C|0)<<9|i>>>23)+P|0)<<13|i>>>19)+B|0)<<18|i>>>14,M^=(i=(A^=(i=(E^=(i=(N^=(i=M+A|0)<<7|i>>>25)+M|0)<<9|i>>>23)+N|0)<<13|i>>>19)+E|0)<<18|i>>>14,j^=(i=(R^=(i=(T^=(i=(k^=(i=j+R|0)<<7|i>>>25)+j|0)<<9|i>>>23)+k|0)<<13|i>>>19)+T|0)<<18|i>>>14,w^=(i=(k^=(i=(E^=(i=(S^=(i=w+k|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+E|0)<<18|i>>>14,C^=(i=(x^=(i=(T^=(i=(A^=(i=C+x|0)<<7|i>>>25)+C|0)<<9|i>>>23)+A|0)<<13|i>>>19)+T|0)<<18|i>>>14,M^=(i=(P^=(i=(I^=(i=(R^=(i=M+P|0)<<7|i>>>25)+M|0)<<9|i>>>23)+R|0)<<13|i>>>19)+I|0)<<18|i>>>14,j^=(i=(N^=(i=(B^=(i=(O^=(i=j+N|0)<<7|i>>>25)+j|0)<<9|i>>>23)+O|0)<<13|i>>>19)+B|0)<<18|i>>>14
|
||
w=w+o|0,S=S+a|0,E=E+s|0,k=k+u|0,x=x+c|0,C=C+l|0,A=A+f|0,T=T+h|0,I=I+d|0,P=P+p|0,M=M+m|0,R=R+y|0,O=O+g|0,B=B+b|0,N=N+v|0,j=j+_|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255
|
||
e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=x>>>0&255,e[17]=x>>>8&255,e[18]=x>>>16&255,e[19]=x>>>24&255,e[20]=C>>>0&255,e[21]=C>>>8&255,e[22]=C>>>16&255,e[23]=C>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=P>>>0&255,e[37]=P>>>8&255,e[38]=P>>>16&255,e[39]=P>>>24&255,e[40]=M>>>0&255,e[41]=M>>>8&255,e[42]=M>>>16&255,e[43]=M>>>24&255
|
||
e[44]=R>>>0&255,e[45]=R>>>8&255,e[46]=R>>>16&255,e[47]=R>>>24&255,e[48]=O>>>0&255,e[49]=O>>>8&255,e[50]=O>>>16&255,e[51]=O>>>24&255,e[52]=B>>>0&255,e[53]=B>>>8&255,e[54]=B>>>16&255,e[55]=B>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=j>>>0&255,e[61]=j>>>8&255,e[62]=j>>>16&255,e[63]=j>>>24&255})(e,t,r,n)}function v(e,t,r,n){(function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,_=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(g^=(i=(d^=(i=(c^=(i=o+g|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,l^=(i=(a^=(i=(b^=(i=(p^=(i=l+a|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+b|0)<<18|i>>>14,m^=(i=(f^=(i=(s^=(i=(v^=(i=m+f|0)<<7|i>>>25)+m|0)<<9|i>>>23)+v|0)<<13|i>>>19)+s|0)<<18|i>>>14,_^=(i=(y^=(i=(h^=(i=(u^=(i=_+y|0)<<7|i>>>25)+_|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,l^=(i=(c^=(i=(h^=(i=(f^=(i=l+c|0)<<7|i>>>25)+l|0)<<9|i>>>23)+f|0)<<13|i>>>19)+h|0)<<18|i>>>14,m^=(i=(p^=(i=(d^=(i=(y^=(i=m+p|0)<<7|i>>>25)+m|0)<<9|i>>>23)+y|0)<<13|i>>>19)+d|0)<<18|i>>>14,_^=(i=(v^=(i=(b^=(i=(g^=(i=_+v|0)<<7|i>>>25)+_|0)<<9|i>>>23)+g|0)<<13|i>>>19)+b|0)<<18|i>>>14
|
||
e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=m>>>0&255,e[9]=m>>>8&255,e[10]=m>>>16&255,e[11]=m>>>24&255,e[12]=_>>>0&255,e[13]=_>>>8&255,e[14]=_>>>16&255,e[15]=_>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255
|
||
e[30]=p>>>16&255,e[31]=p>>>24&255})(e,t,r,n)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107])
|
||
function w(e,t,r,n,i,o,a){var s,u,c=new Uint8Array(16),l=new Uint8Array(64)
|
||
for(u=0;u<16;u++)c[u]=0
|
||
for(u=0;u<8;u++)c[u]=o[u]
|
||
for(;i>=64;){for(b(l,c,a,_),u=0;u<64;u++)e[t+u]=r[n+u]^l[u]
|
||
for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8
|
||
i-=64,t+=64,n+=64}if(i>0)for(b(l,c,a,_),u=0;u<i;u++)e[t+u]=r[n+u]^l[u]
|
||
return 0}function S(e,t,r,n,i){var o,a,s=new Uint8Array(16),u=new Uint8Array(64)
|
||
for(a=0;a<16;a++)s[a]=0
|
||
for(a=0;a<8;a++)s[a]=n[a]
|
||
for(;r>=64;){for(b(u,s,i,_),a=0;a<64;a++)e[t+a]=u[a]
|
||
for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8
|
||
r-=64,t+=64}if(r>0)for(b(u,s,i,_),a=0;a<r;a++)e[t+a]=u[a]
|
||
return 0}function E(e,t,r,n,i){var o=new Uint8Array(32)
|
||
v(o,n,i,_)
|
||
for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16]
|
||
return S(e,t,r,a,o)}function k(e,t,r,n,i,o,a){var s=new Uint8Array(32)
|
||
v(s,o,a,_)
|
||
for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=o[c+16]
|
||
return w(e,t,r,n,i,u,s)}var x=function(e){var t,r,n,i,o,a,s,u
|
||
this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8
|
||
this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8}
|
||
function C(e,t,r,n,i,o){var a=new x(o)
|
||
return a.update(r,n,i),a.finish(e,t),0}function A(e,t,r,n,i,o){var a=new Uint8Array(16)
|
||
return C(a,0,r,n,i,o),y(e,t,a,0)}function T(e,t,r,n,i){var o
|
||
if(r<32)return-1
|
||
for(k(e,0,t,0,r,n,i),C(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0
|
||
return 0}function I(e,t,r,n,i){var o,a=new Uint8Array(32)
|
||
if(r<32)return-1
|
||
if(E(a,0,32,n,i),0!==A(t,16,t,32,r-32,a))return-1
|
||
for(k(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0
|
||
return 0}function P(e,t){var r
|
||
for(r=0;r<16;r++)e[r]=0|t[r]}function M(e){var t,r,n=1
|
||
for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n
|
||
e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function O(e,t){var n,i,o,a=r(),s=r()
|
||
for(n=0;n<16;n++)s[n]=t[n]
|
||
for(M(s),M(s),M(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535
|
||
a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,R(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function B(e,t){var r=new Uint8Array(32),n=new Uint8Array(32)
|
||
return O(r,e),O(n,t),g(r,0,n,0)}function N(e){var t=new Uint8Array(32)
|
||
return O(t,e),1&t[0]}function j(e,t){var r
|
||
for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8)
|
||
e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function D(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,i,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,m=0,y=0,g=0,b=0,v=0,_=0,w=0,S=0,E=0,k=0,x=0,C=0,A=0,T=0,I=0,P=0,M=0,R=0,O=0,B=0,N=0,j=r[0],L=r[1],D=r[2],U=r[3],F=r[4],z=r[5],q=r[6],V=r[7],H=r[8],K=r[9],W=r[10],G=r[11],Y=r[12],Q=r[13],X=r[14],$=r[15]
|
||
o+=(n=t[0])*j,a+=n*L,s+=n*D,u+=n*U,c+=n*F,l+=n*z,f+=n*q,h+=n*V,d+=n*H,p+=n*K,m+=n*W,y+=n*G,g+=n*Y,b+=n*Q,v+=n*X,_+=n*$,a+=(n=t[1])*j,s+=n*L,u+=n*D,c+=n*U,l+=n*F,f+=n*z,h+=n*q,d+=n*V,p+=n*H,m+=n*K,y+=n*W,g+=n*G,b+=n*Y,v+=n*Q,_+=n*X,w+=n*$,s+=(n=t[2])*j,u+=n*L,c+=n*D,l+=n*U,f+=n*F,h+=n*z,d+=n*q,p+=n*V,m+=n*H,y+=n*K,g+=n*W,b+=n*G,v+=n*Y,_+=n*Q,w+=n*X,S+=n*$,u+=(n=t[3])*j,c+=n*L,l+=n*D,f+=n*U,h+=n*F,d+=n*z,p+=n*q,m+=n*V
|
||
y+=n*H,g+=n*K,b+=n*W,v+=n*G,_+=n*Y,w+=n*Q,S+=n*X,E+=n*$,c+=(n=t[4])*j,l+=n*L,f+=n*D,h+=n*U,d+=n*F,p+=n*z,m+=n*q,y+=n*V,g+=n*H,b+=n*K,v+=n*W,_+=n*G,w+=n*Y,S+=n*Q,E+=n*X,k+=n*$,l+=(n=t[5])*j,f+=n*L,h+=n*D,d+=n*U,p+=n*F,m+=n*z,y+=n*q,g+=n*V,b+=n*H,v+=n*K,_+=n*W,w+=n*G,S+=n*Y,E+=n*Q,k+=n*X,x+=n*$,f+=(n=t[6])*j,h+=n*L,d+=n*D,p+=n*U,m+=n*F,y+=n*z,g+=n*q,b+=n*V,v+=n*H,_+=n*K,w+=n*W,S+=n*G,E+=n*Y,k+=n*Q,x+=n*X,C+=n*$
|
||
h+=(n=t[7])*j,d+=n*L,p+=n*D,m+=n*U,y+=n*F,g+=n*z,b+=n*q,v+=n*V,_+=n*H,w+=n*K,S+=n*W,E+=n*G,k+=n*Y,x+=n*Q,C+=n*X,A+=n*$,d+=(n=t[8])*j,p+=n*L,m+=n*D,y+=n*U,g+=n*F,b+=n*z,v+=n*q,_+=n*V,w+=n*H,S+=n*K,E+=n*W,k+=n*G,x+=n*Y,C+=n*Q,A+=n*X,T+=n*$,p+=(n=t[9])*j,m+=n*L,y+=n*D,g+=n*U,b+=n*F,v+=n*z,_+=n*q,w+=n*V,S+=n*H,E+=n*K,k+=n*W,x+=n*G,C+=n*Y,A+=n*Q,T+=n*X,I+=n*$,m+=(n=t[10])*j,y+=n*L,g+=n*D,b+=n*U,v+=n*F,_+=n*z,w+=n*q,S+=n*V,E+=n*H
|
||
k+=n*K,x+=n*W,C+=n*G,A+=n*Y,T+=n*Q,I+=n*X,P+=n*$,y+=(n=t[11])*j,g+=n*L,b+=n*D,v+=n*U,_+=n*F,w+=n*z,S+=n*q,E+=n*V,k+=n*H,x+=n*K,C+=n*W,A+=n*G,T+=n*Y,I+=n*Q,P+=n*X,M+=n*$,g+=(n=t[12])*j,b+=n*L,v+=n*D,_+=n*U,w+=n*F,S+=n*z,E+=n*q,k+=n*V,x+=n*H,C+=n*K,A+=n*W,T+=n*G,I+=n*Y,P+=n*Q,M+=n*X,R+=n*$,b+=(n=t[13])*j,v+=n*L,_+=n*D,w+=n*U,S+=n*F,E+=n*z,k+=n*q,x+=n*V,C+=n*H,A+=n*K,T+=n*W,I+=n*G,P+=n*Y,M+=n*Q,R+=n*X,O+=n*$,v+=(n=t[14])*j
|
||
_+=n*L,w+=n*D,S+=n*U,E+=n*F,k+=n*z,x+=n*q,C+=n*V,A+=n*H,T+=n*K,I+=n*W,P+=n*G,M+=n*Y,R+=n*Q,O+=n*X,B+=n*$,_+=(n=t[15])*j,a+=38*(S+=n*D),s+=38*(E+=n*U),u+=38*(k+=n*F),c+=38*(x+=n*z),l+=38*(C+=n*q),f+=38*(A+=n*V),h+=38*(T+=n*H),d+=38*(I+=n*K),p+=38*(P+=n*W),m+=38*(M+=n*G),y+=38*(R+=n*Y),g+=38*(O+=n*Q),b+=38*(B+=n*X),v+=38*(N+=n*$),o=(n=(o+=38*(w+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536))
|
||
c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s
|
||
e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=m,e[11]=y,e[12]=g,e[13]=b,e[14]=v,e[15]=_}function F(e,t){U(e,t,t)}function z(e,t){var n,i=r()
|
||
for(n=0;n<16;n++)i[n]=t[n]
|
||
for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&U(i,i,t)
|
||
for(n=0;n<16;n++)e[n]=i[n]}function q(e,t,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),c=r(),l=r(),f=r(),h=r(),d=r(),p=r()
|
||
for(o=0;o<31;o++)a[o]=t[o]
|
||
for(a[31]=127&t[31]|64,a[0]&=248,j(s,n),o=0;o<16;o++)l[o]=s[o],h[o]=c[o]=f[o]=0
|
||
for(c[0]=h[0]=1,o=254;o>=0;--o)R(c,l,i=a[o>>>3]>>>(7&o)&1),R(f,h,i),L(d,c,f),D(c,c,f),L(f,l,h),D(l,l,h),F(h,d),F(p,c),U(c,f,c),U(f,l,d),L(d,c,f),D(c,c,f),F(l,c),D(f,h,p),U(c,f,u),L(c,c,h),U(f,f,c),U(c,h,p),U(h,l,s),F(l,d),R(c,l,i),R(f,h,i)
|
||
for(o=0;o<16;o++)s[o+16]=c[o],s[o+32]=f[o],s[o+48]=l[o],s[o+64]=h[o]
|
||
var m=s.subarray(32),y=s.subarray(16)
|
||
return z(m,m),U(y,y,m),O(e,y),0}function V(e,t){return q(e,t,o)}function H(e,t){return n(t,32),V(e,t)}function K(e,t,r){var n=new Uint8Array(32)
|
||
return q(n,r,t),v(e,i,n,_)}x.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_,w,S=this.fin?0:2048,E=this.h[0],k=this.h[1],x=this.h[2],C=this.h[3],A=this.h[4],T=this.h[5],I=this.h[6],P=this.h[7],M=this.h[8],R=this.h[9],O=this.r[0],B=this.r[1],N=this.r[2],j=this.r[3],L=this.r[4],D=this.r[5],U=this.r[6],F=this.r[7],z=this.r[8],q=this.r[9];r>=16;){E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8),k+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3),x+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6),C+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9),A+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12),T+=s>>>1&8191,I+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2),P+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5),l=255&e[t+14]|(255&e[t+15])<<8,h=f=0,h+=E*O,h+=k*(5*q),h+=x*(5*z),h+=C*(5*F),f=(h+=A*(5*U))>>>13,h&=8191,h+=T*(5*D),h+=I*(5*L),h+=P*(5*j),h+=(M+=8191&(c>>>8|l<<8))*(5*N),d=f+=(h+=(R+=l>>>5|S)*(5*B))>>>13,d+=E*B,d+=k*O,d+=x*(5*q),d+=C*(5*z),f=(d+=A*(5*F))>>>13,d&=8191,d+=T*(5*U),d+=I*(5*D),d+=P*(5*L),d+=M*(5*j),f+=(d+=R*(5*N))>>>13,d&=8191,p=f,p+=E*N,p+=k*B,p+=x*O,p+=C*(5*q),f=(p+=A*(5*z))>>>13,p&=8191,p+=T*(5*F),p+=I*(5*U),p+=P*(5*D)
|
||
p+=M*(5*L),m=f+=(p+=R*(5*j))>>>13,m+=E*j,m+=k*N,m+=x*B,m+=C*O,f=(m+=A*(5*q))>>>13,m&=8191,m+=T*(5*z),m+=I*(5*F),m+=P*(5*U),m+=M*(5*D),y=f+=(m+=R*(5*L))>>>13,y+=E*L,y+=k*j,y+=x*N,y+=C*B,f=(y+=A*O)>>>13,y&=8191,y+=T*(5*q),y+=I*(5*z),y+=P*(5*F),y+=M*(5*U),g=f+=(y+=R*(5*D))>>>13,g+=E*D,g+=k*L,g+=x*j,g+=C*N,f=(g+=A*B)>>>13,g&=8191,g+=T*O,g+=I*(5*q),g+=P*(5*z),g+=M*(5*F),b=f+=(g+=R*(5*U))>>>13,b+=E*U,b+=k*D,b+=x*L,b+=C*j,f=(b+=A*N)>>>13,b&=8191,b+=T*B,b+=I*O,b+=P*(5*q)
|
||
b+=M*(5*z),v=f+=(b+=R*(5*F))>>>13,v+=E*F,v+=k*U,v+=x*D,v+=C*L,f=(v+=A*j)>>>13,v&=8191,v+=T*N,v+=I*B,v+=P*O,v+=M*(5*q),_=f+=(v+=R*(5*z))>>>13,_+=E*z,_+=k*F,_+=x*U,_+=C*D,f=(_+=A*L)>>>13,_&=8191,_+=T*j,_+=I*N,_+=P*B,_+=M*O,w=f+=(_+=R*(5*q))>>>13,w+=E*q,w+=k*z,w+=x*F,w+=C*U,f=(w+=A*D)>>>13,w&=8191,w+=T*L,w+=I*j,w+=P*N,w+=M*B,E=h=8191&(f=(f=((f+=(w+=R*O)>>>13)<<2)+f|0)+(h&=8191)|0),k=d+=f>>>=13,x=p&=8191,C=m&=8191,A=y&=8191,T=g&=8191
|
||
I=b&=8191,P=v&=8191,M=_&=8191,R=w&=8191,t+=16,r-=16}this.h[0]=E,this.h[1]=k,this.h[2]=x,this.h[3]=C,this.h[4]=A,this.h[5]=T,this.h[6]=I,this.h[7]=P,this.h[8]=M,this.h[9]=R},x.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10)
|
||
if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0
|
||
this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191
|
||
for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191
|
||
for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n
|
||
for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o]
|
||
for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i
|
||
e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},x.prototype.update=function(e,t,r){var n,i
|
||
if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n]
|
||
if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return
|
||
this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n]
|
||
this.leftover+=r}}
|
||
var W=T,G=I
|
||
var Y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]
|
||
function Q(e,t,r,n){for(var i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P=new Int32Array(16),M=new Int32Array(16),R=e[0],O=e[1],B=e[2],N=e[3],j=e[4],L=e[5],D=e[6],U=e[7],F=t[0],z=t[1],q=t[2],V=t[3],H=t[4],K=t[5],W=t[6],G=t[7],Q=0;n>=128;){for(S=0;S<16;S++)E=8*S+Q,P[S]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],M[S]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7]
|
||
for(S=0;S<80;S++)if(i=R,o=O,a=B,s=N,u=j,c=L,l=D,f=U,h=F,d=z,p=q,m=V,y=H,g=K,b=W,v=G,C=65535&(x=G),A=x>>>16,T=65535&(k=U),I=k>>>16,C+=65535&(x=(H>>>14|j<<18)^(H>>>18|j<<14)^(j>>>9|H<<23)),A+=x>>>16,T+=65535&(k=(j>>>14|H<<18)^(j>>>18|H<<14)^(H>>>9|j<<23)),I+=k>>>16,C+=65535&(x=H&K^~H&W),A+=x>>>16,T+=65535&(k=j&L^~j&D),I+=k>>>16,k=Y[2*S],C+=65535&(x=Y[2*S+1]),A+=x>>>16,T+=65535&k,I+=k>>>16,k=P[S%16],A+=(x=M[S%16])>>>16,T+=65535&k,I+=k>>>16,T+=(A+=(C+=65535&x)>>>16)>>>16,C=65535&(x=w=65535&C|A<<16),A=x>>>16,T=65535&(k=_=65535&T|(I+=T>>>16)<<16),I=k>>>16,C+=65535&(x=(F>>>28|R<<4)^(R>>>2|F<<30)^(R>>>7|F<<25)),A+=x>>>16,T+=65535&(k=(R>>>28|F<<4)^(F>>>2|R<<30)^(F>>>7|R<<25)),I+=k>>>16,A+=(x=F&z^F&q^z&q)>>>16,T+=65535&(k=R&O^R&B^O&B),I+=k>>>16,f=65535&(T+=(A+=(C+=65535&x)>>>16)>>>16)|(I+=T>>>16)<<16,v=65535&C|A<<16,C=65535&(x=m),A=x>>>16,T=65535&(k=s),I=k>>>16,A+=(x=w)>>>16,T+=65535&(k=_),I+=k>>>16,O=i,B=o,N=a,j=s=65535&(T+=(A+=(C+=65535&x)>>>16)>>>16)|(I+=T>>>16)<<16,L=u,D=c,U=l,R=f,z=h,q=d,V=p,H=m=65535&C|A<<16,K=y,W=g,G=b,F=v,S%16==15)for(E=0;E<16;E++)k=P[E],C=65535&(x=M[E]),A=x>>>16,T=65535&k,I=k>>>16,k=P[(E+9)%16],C+=65535&(x=M[(E+9)%16]),A+=x>>>16,T+=65535&k,I+=k>>>16,_=P[(E+1)%16],C+=65535&(x=((w=M[(E+1)%16])>>>1|_<<31)^(w>>>8|_<<24)^(w>>>7|_<<25)),A+=x>>>16,T+=65535&(k=(_>>>1|w<<31)^(_>>>8|w<<24)^_>>>7),I+=k>>>16,_=P[(E+14)%16],A+=(x=((w=M[(E+14)%16])>>>19|_<<13)^(_>>>29|w<<3)^(w>>>6|_<<26))>>>16,T+=65535&(k=(_>>>19|w<<13)^(w>>>29|_<<3)^_>>>6),I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,P[E]=65535&T|I<<16,M[E]=65535&C|A<<16
|
||
C=65535&(x=F),A=x>>>16,T=65535&(k=R),I=k>>>16,k=e[0],A+=(x=t[0])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[0]=R=65535&T|I<<16,t[0]=F=65535&C|A<<16,C=65535&(x=z),A=x>>>16,T=65535&(k=O),I=k>>>16,k=e[1],A+=(x=t[1])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[1]=O=65535&T|I<<16,t[1]=z=65535&C|A<<16,C=65535&(x=q),A=x>>>16,T=65535&(k=B),I=k>>>16,k=e[2],A+=(x=t[2])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[2]=B=65535&T|I<<16,t[2]=q=65535&C|A<<16,C=65535&(x=V),A=x>>>16,T=65535&(k=N),I=k>>>16,k=e[3]
|
||
A+=(x=t[3])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[3]=N=65535&T|I<<16,t[3]=V=65535&C|A<<16,C=65535&(x=H),A=x>>>16,T=65535&(k=j),I=k>>>16,k=e[4],A+=(x=t[4])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[4]=j=65535&T|I<<16,t[4]=H=65535&C|A<<16,C=65535&(x=K),A=x>>>16,T=65535&(k=L),I=k>>>16,k=e[5],A+=(x=t[5])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[5]=L=65535&T|I<<16,t[5]=K=65535&C|A<<16,C=65535&(x=W),A=x>>>16,T=65535&(k=D),I=k>>>16,k=e[6],A+=(x=t[6])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[6]=D=65535&T|I<<16,t[6]=W=65535&C|A<<16
|
||
C=65535&(x=G),A=x>>>16,T=65535&(k=U),I=k>>>16,k=e[7],A+=(x=t[7])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(C+=65535&x)>>>16)>>>16)>>>16,e[7]=U=65535&T|I<<16,t[7]=G=65535&C|A<<16,Q+=128,n-=128}return n}function X(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r
|
||
for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Q(i,o,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n]
|
||
for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,p(a,r-8,s/536870912|0,s<<3),Q(i,o,a,r),n=0;n<8;n++)p(e,8*n,i[n],o[n])
|
||
return 0}function $(e,t){var n=r(),i=r(),o=r(),a=r(),s=r(),u=r(),c=r(),f=r(),h=r()
|
||
D(n,e[1],e[0]),D(h,t[1],t[0]),U(n,n,h),L(i,e[0],e[1]),L(h,t[0],t[1]),U(i,i,h),U(o,e[3],t[3]),U(o,o,l),U(a,e[2],t[2]),L(a,a,a),D(s,i,n),D(u,a,o),L(c,a,o),L(f,i,n),U(e[0],s,u),U(e[1],f,c),U(e[2],c,u),U(e[3],s,f)}function J(e,t,r){var n
|
||
for(n=0;n<4;n++)R(e[n],t[n],r)}function Z(e,t){var n=r(),i=r(),o=r()
|
||
z(o,t[2]),U(n,t[0],o),U(i,t[1],o),O(e,i),e[31]^=N(n)<<7}function ee(e,t,r){var n,i
|
||
for(P(e[0],a),P(e[1],s),P(e[2],s),P(e[3],a),i=255;i>=0;--i)J(e,t,n=r[i/8|0]>>(7&i)&1),$(t,e),$(e,e),J(e,t,n)}function te(e,t){var n=[r(),r(),r(),r()]
|
||
P(n[0],f),P(n[1],h),P(n[2],s),U(n[3],f,h),ee(e,n,t)}function re(e,t,i){var o,a=new Uint8Array(64),s=[r(),r(),r(),r()]
|
||
for(i||n(t,32),X(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64,te(s,a),Z(e,s),o=0;o<32;o++)t[o+32]=e[o]
|
||
return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16])
|
||
function ie(e,t){var r,n,i,o
|
||
for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ne[i-(n-32)],r=t[i]+128>>8,t[i]-=256*r
|
||
t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ne[i],r=t[i]>>8,t[i]&=255
|
||
for(i=0;i<32;i++)t[i]-=r*ne[i]
|
||
for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,r=new Float64Array(64)
|
||
for(t=0;t<64;t++)r[t]=e[t]
|
||
for(t=0;t<64;t++)e[t]=0
|
||
ie(e,r)}function ae(e,t,n,i){var o,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[r(),r(),r(),r()]
|
||
X(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64
|
||
var h=n+64
|
||
for(o=0;o<n;o++)e[64+o]=t[o]
|
||
for(o=0;o<32;o++)e[32+o]=s[32+o]
|
||
for(X(c,e.subarray(32),n+32),oe(c),te(f,c),Z(e,f),o=32;o<64;o++)e[o]=i[o]
|
||
for(X(u,e,n+64),oe(u),o=0;o<64;o++)l[o]=0
|
||
for(o=0;o<32;o++)l[o]=c[o]
|
||
for(o=0;o<32;o++)for(a=0;a<32;a++)l[o+a]+=u[o]*s[a]
|
||
return ie(e.subarray(32),l),h}function se(e,t){var n=r(),i=r(),o=r(),u=r(),l=r(),f=r(),h=r()
|
||
return P(e[2],s),j(e[1],t),F(o,e[1]),U(u,o,c),D(o,o,e[2]),L(u,e[2],u),F(l,u),F(f,l),U(h,f,l),U(n,h,o),U(n,n,u),function(e,t){var n,i=r()
|
||
for(n=0;n<16;n++)i[n]=t[n]
|
||
for(n=250;n>=0;n--)F(i,i),1!==n&&U(i,i,t)
|
||
for(n=0;n<16;n++)e[n]=i[n]}(n,n),U(n,n,o),U(n,n,u),U(n,n,u),U(e[0],n,u),F(i,e[0]),U(i,i,u),B(i,o)&&U(e[0],e[0],d),F(i,e[0]),U(i,i,u),B(i,o)?-1:(N(e[0])===t[31]>>7&&D(e[0],a,e[0]),U(e[3],e[0],e[1]),0)}function ue(e,t,n,i){var o,a=new Uint8Array(32),s=new Uint8Array(64),u=[r(),r(),r(),r()],c=[r(),r(),r(),r()]
|
||
if(-1,n<64)return-1
|
||
if(se(c,i))return-1
|
||
for(o=0;o<n;o++)e[o]=t[o]
|
||
for(o=0;o<32;o++)e[o+32]=i[o]
|
||
if(X(s,e,n),oe(s),ee(u,c,s),te(c,t.subarray(32)),$(u,c),Z(a,u),n-=64,g(t,0,a,0)){for(o=0;o<n;o++)e[o]=0
|
||
return-1}for(o=0;o<n;o++)e[o]=t[o+64]
|
||
return n}var ce=32,le=24,fe=32,he=32,de=le
|
||
function pe(e,t){if(e.length!==ce)throw new Error("bad key size")
|
||
if(t.length!==le)throw new Error("bad nonce size")}function me(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function ye(e){for(var t=0;t<e.length;t++)e[t]=0}t.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:k,crypto_stream:E,crypto_stream_salsa20_xor:w,crypto_stream_salsa20:S,crypto_onetimeauth:C,crypto_onetimeauth_verify:A,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:T,crypto_secretbox_open:I,crypto_scalarmult:q,crypto_scalarmult_base:V,crypto_box_beforenm:K,crypto_box_afternm:W,crypto_box:function(e,t,r,n,i,o){var a=new Uint8Array(32)
|
||
return K(a,i,o),W(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,i,o){var a=new Uint8Array(32)
|
||
return K(a,i,o),G(e,t,r,n,a)},crypto_box_keypair:H,crypto_hash:X,crypto_sign:ae,crypto_sign_keypair:re,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:ce,crypto_secretbox_NONCEBYTES:le,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:fe,crypto_box_SECRETKEYBYTES:he,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:de,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64},t.randomBytes=function(e){var t=new Uint8Array(e)
|
||
return n(t,e),t},t.secretbox=function(e,t,r){me(e,t,r),pe(r,t)
|
||
for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o]
|
||
return T(i,n,n.length,t,r),i.subarray(16)},t.secretbox.open=function(e,t,r){me(e,t,r),pe(r,t)
|
||
for(var n=new Uint8Array(16+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o]
|
||
return n.length<32?null:0!==I(i,n,n.length,t,r)?null:i.subarray(32)},t.secretbox.keyLength=ce,t.secretbox.nonceLength=le,t.secretbox.overheadLength=16,t.scalarMult=function(e,t){if(me(e,t),32!==e.length)throw new Error("bad n size")
|
||
if(32!==t.length)throw new Error("bad p size")
|
||
var r=new Uint8Array(32)
|
||
return q(r,e,t),r},t.scalarMult.base=function(e){if(me(e),32!==e.length)throw new Error("bad n size")
|
||
var t=new Uint8Array(32)
|
||
return V(t,e),t},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i)
|
||
return t.secretbox(e,r,o)},t.box.before=function(e,t){me(e,t),function(e,t){if(e.length!==fe)throw new Error("bad public key size")
|
||
if(t.length!==he)throw new Error("bad secret key size")}(e,t)
|
||
var r=new Uint8Array(32)
|
||
return K(r,e,t),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i)
|
||
return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(he)
|
||
return H(e,t),{publicKey:e,secretKey:t}},t.box.keyPair.fromSecretKey=function(e){if(me(e),e.length!==he)throw new Error("bad secret key size")
|
||
var t=new Uint8Array(fe)
|
||
return V(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},t.box.publicKeyLength=fe,t.box.secretKeyLength=he,t.box.sharedKeyLength=32,t.box.nonceLength=de,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(e,t){if(me(e,t),64!==t.length)throw new Error("bad secret key size")
|
||
var r=new Uint8Array(64+e.length)
|
||
return ae(r,e,e.length,t),r},t.sign.open=function(e,t){if(me(e,t),32!==t.length)throw new Error("bad public key size")
|
||
var r=new Uint8Array(e.length),n=ue(r,e,e.length,t)
|
||
if(n<0)return null
|
||
for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o]
|
||
return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=n[o]
|
||
return i},t.sign.detached.verify=function(e,t,r){if(me(e,t,r),64!==t.length)throw new Error("bad signature size")
|
||
if(32!==r.length)throw new Error("bad public key size")
|
||
var n,i=new Uint8Array(64+e.length),o=new Uint8Array(64+e.length)
|
||
for(n=0;n<64;n++)i[n]=t[n]
|
||
for(n=0;n<e.length;n++)i[n+64]=e[n]
|
||
return ue(o,i,i.length,r)>=0},t.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64)
|
||
return re(e,t),{publicKey:e,secretKey:t}},t.sign.keyPair.fromSecretKey=function(e){if(me(e),64!==e.length)throw new Error("bad secret key size")
|
||
for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r]
|
||
return{publicKey:t,secretKey:new Uint8Array(e)}},t.sign.keyPair.fromSeed=function(e){if(me(e),32!==e.length)throw new Error("bad seed size")
|
||
for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n]
|
||
return re(t,r,!0),{publicKey:t,secretKey:r}}
|
||
t.sign.publicKeyLength=32,t.sign.secretKeyLength=64,t.sign.seedLength=32,t.sign.signatureLength=64,t.hash=function(e){me(e)
|
||
var t=new Uint8Array(64)
|
||
return X(t,e,e.length),t},t.hash.hashLength=64,t.verify=function(e,t){return me(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===m(e,0,t,0,e.length))},t.setPRNG=function(e){n=e},function(){var r="undefined"!=typeof self?self.crypto||self.msCrypto:null
|
||
if(r&&r.getRandomValues){t.setPRNG(function(e,t){var n,i=new Uint8Array(t)
|
||
for(n=0;n<t;n+=65536)r.getRandomValues(i.subarray(n,n+Math.min(t-n,65536)))
|
||
for(n=0;n<t;n++)e[n]=i[n]
|
||
ye(i)})}else void 0!==e&&(r=e("crypto"))&&r.randomBytes&&t.setPRNG(function(e,t){var n,i=r.randomBytes(t)
|
||
for(n=0;n<t;n++)e[n]=i[n]
|
||
ye(i)})}()})(void 0!==t&&t.exports?t.exports:self.nacl=self.nacl||{})},{crypto:109}],405:[function(e,t,r){"use strict"
|
||
var n=e("browserify-aes")
|
||
t.exports={createCipheriv:n.createCipheriv,createDecipheriv:n.createDecipheriv}},{"browserify-aes":55}],406:[function(e,t,r){"use strict"
|
||
var n=e("./ciphers"),i={16:"aes-128-ctr",32:"aes-256-ctr"}
|
||
r.create=function(e,t,r){var o=i[e.length]
|
||
if(!o)return r(new Error("Invalid key length"))
|
||
var a=n.createCipheriv(o,e,t),s=n.createDecipheriv(o,e,t)
|
||
r(null,{encrypt:function(e,t){t(null,a.update(e))},decrypt:function(e,t){t(null,s.update(e))}})}},{"./ciphers":405}],407:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("../nodeify"),i=e("../webcrypto.js")(),o=e("./lengths"),a={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"}
|
||
r.create=function(e,r,s){var u=a[e]
|
||
n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:u}},!1,["sign"]).then(function(r){return{digest:function(e,o){(function(e,r,o){n(i.subtle.sign({name:"HMAC"},e,r).then(function(e){return t.from(e)}),o)})(r,e,o)},length:o[e]}}),s)}}).call(this,e("buffer").Buffer)},{"../nodeify":420,"../webcrypto.js":424,"./lengths":408,buffer:110}],408:[function(e,t,r){"use strict"
|
||
t.exports={SHA1:20,SHA256:32,SHA512:64}},{}],409:[function(e,t,r){"use strict"
|
||
var n=e("./hmac"),i=e("./aes"),o=e("./keys");(r=t.exports).aes=i,r.hmac=n,r.keys=o,r.randomBytes=e("./random-bytes"),r.pbkdf2=e("./pbkdf2")},{"./aes":406,"./hmac":407,"./keys":414,"./pbkdf2":421,"./random-bytes":422}],410:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("../webcrypto.js")(),i=e("../nodeify"),o=e("asn1.js").bignum,a=e("../util"),s=a.toBase64,u=a.toBn,c={"P-256":256,"P-384":384,"P-521":521}
|
||
r.generateEphmeralKeyPair=function(e,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:e},!0,["deriveBits"]).then(function(r){var a=function(a,u,l){"function"==typeof u&&(l=u,u=void 0)
|
||
var h=void 0
|
||
h=u?n.subtle.importKey("jwk",function(e,t){var r=f(e,t.public)
|
||
return r.d=s(new o(t.private)),r}(e,u),{name:"ECDH",namedCurve:e},!1,["deriveBits"]):Promise.resolve(r.privateKey)
|
||
var d=Promise.all([n.subtle.importKey("jwk",f(e,a),{name:"ECDH",namedCurve:e},!1,[]),h])
|
||
i(d.then(function(t){return n.subtle.deriveBits({name:"ECDH",namedCurve:e,public:t[0]},t[1],c[e])}).then(function(e){return t.from(e)}),l)}
|
||
return n.subtle.exportKey("jwk",r.publicKey).then(function(e){return{key:(r=e,n=l[r.crv],t.concat([t.from([4]),u(r.x).toArrayLike(t,"be",n),u(r.y).toArrayLike(t,"be",n)],1+2*n)),genSharedKey:a}
|
||
var r,n})}),r)}
|
||
var l={"P-256":32,"P-384":48,"P-521":66}
|
||
function f(e,r){var n=l[e]
|
||
if(!r.slice(0,1).equals(t.from([4])))throw new Error("Invalid key format")
|
||
var i=new o(r.slice(1,n+1)),a=new o(r.slice(1+n))
|
||
return{kty:"EC",crv:e,x:s(i,n),y:s(a,n),ext:!0}}}).call(this,e("buffer").Buffer)},{"../nodeify":420,"../util":423,"../webcrypto.js":424,"asn1.js":2,buffer:110}],411:[function(e,t,r){(function(r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e("multihashing-async"),a=e("protons"),s=e("bs58"),u=e("./ed25519"),c=a(e("./keys.proto")),l=function(){function e(t){i(this,e),this._key=d(t,u.publicKeyLength)}return n(e,[{key:"verify",value:function(e,t,r){h(r),u.hashAndVerify(this._key,t,e,r)}},{key:"marshal",value:function(){return r.from(this._key)}},{key:"equals",value:function(e){return this.bytes.equals(e.bytes)}},{key:"hash",value:function(e){h(e),o(this.bytes,"sha2-256",e)}},{key:"bytes",get:function(){return c.PublicKey.encode({Type:c.KeyType.Ed25519,Data:this.marshal()})}}]),e}(),f=function(){function e(t,r){i(this,e),this._key=d(t,u.privateKeyLength),this._publicKey=d(r,u.publicKeyLength)}return n(e,[{key:"sign",value:function(e,t){h(t),u.hashAndSign(this._key,e,t)}},{key:"marshal",value:function(){return r.concat([r.from(this._key),r.from(this._publicKey)])}},{key:"equals",value:function(e){return this.bytes.equals(e.bytes)}},{key:"hash",value:function(e){h(e),o(this.bytes,"sha2-256",e)}},{key:"id",value:function(e){this.public.hash(function(t,r){if(t)return e(t)
|
||
e(null,s.encode(r))})}},{key:"public",get:function(){if(!this._publicKey)throw new Error("public key not provided")
|
||
return new l(this._publicKey)}},{key:"bytes",get:function(){return c.PrivateKey.encode({Type:c.KeyType.Ed25519,Data:this.marshal()})}}]),e}()
|
||
function h(e){if("function"!=typeof e)throw new Error("callback is required")}function d(e,t){if(r.isBuffer(e)&&(e=new Uint8Array(e)),!(e instanceof Uint8Array)||e.length!==t)throw new Error("Key must be a Uint8Array or Buffer of length "+t)
|
||
return e}t.exports={Ed25519PublicKey:l,Ed25519PrivateKey:f,unmarshalEd25519PrivateKey:function(e,t){try{e=d(e,u.privateKeyLength+u.publicKeyLength)}catch(e){return t(e)}var r=e.slice(0,u.privateKeyLength),n=e.slice(u.privateKeyLength,e.length)
|
||
t(null,new f(r,n))},unmarshalEd25519PublicKey:function(e){return e=d(e,u.publicKeyLength),new l(e)},generateKeyPair:function(e,t){void 0===t&&"function"==typeof e&&(t=e),u.generateKey(function(e,r){if(e)return t(e)
|
||
var n=void 0
|
||
try{n=new f(r.secretKey,r.publicKey)}catch(e){return void t(e)}t(null,n)})},generateKeyPairFromSeed:function(e,t,r){void 0===r&&"function"==typeof t&&(r=t),u.generateKeyFromSeed(e,function(e,t){if(e)return r(e)
|
||
var n=void 0
|
||
try{n=new f(t.secretKey,t.publicKey)}catch(e){return void r(e)}r(null,n)})}}}).call(this,e("buffer").Buffer)},{"./ed25519":412,"./keys.proto":416,bs58:70,buffer:110,"multihashing-async":486,protons:553}],412:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("tweetnacl"),i=e("async/setImmediate")
|
||
r.publicKeyLength=n.sign.publicKeyLength,r.privateKeyLength=n.sign.secretKeyLength,r.generateKey=function(e){i(function(){var t=void 0
|
||
try{t=n.sign.keyPair()}catch(t){return e(t)}e(null,t)})},r.generateKeyFromSeed=function(e,t){i(function(){var r=void 0
|
||
try{r=n.sign.keyPair.fromSeed(e)}catch(e){return t(e)}t(null,r)})},r.hashAndSign=function(e,r,o){i(function(){o(null,t.from(n.sign.detached(r,e)))})},r.hashAndVerify=function(e,t,r,o){i(function(){var i=void 0
|
||
try{i=n.sign.detached.verify(r,t,e)}catch(e){return o(e)}o(null,i)})}}).call(this,e("buffer").Buffer)},{"async/setImmediate":31,buffer:110,tweetnacl:404}],413:[function(e,t,r){"use strict"
|
||
var n=e("./ecdh")
|
||
t.exports=function(e,t){n.generateEphmeralKeyPair(e,t)}},{"./ecdh":410}],414:[function(e,t,r){(function(n){"use strict"
|
||
var i=e("protons")(e("./keys.proto")),o=e("node-forge")
|
||
r=t.exports
|
||
var a={rsa:e("./rsa-class"),ed25519:e("./ed25519-class"),secp256k1:e("libp2p-crypto-secp256k1")(i,e("../random-bytes"))}
|
||
function s(e){return void 0!==a[e.toLowerCase()]}r.supportedKeys=a,r.keysPBM=i,r.keyStretcher=e("./key-stretcher"),r.generateEphemeralKeyPair=e("./ephemeral-keys"),r.generateKeyPair=function(e,t,r){var n=a[e.toLowerCase()]
|
||
if(!n)return r(new Error("invalid or unsupported key type"))
|
||
n.generateKeyPair(t,r)},r.generateKeyPairFromSeed=function(e,t,r,n){var i=a[e.toLowerCase()]
|
||
return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))},r.unmarshalPublicKey=function(e){var t=i.PublicKey.decode(e),r=t.Data
|
||
switch(t.Type){case i.KeyType.RSA:return a.rsa.unmarshalRsaPublicKey(r)
|
||
case i.KeyType.Ed25519:return a.ed25519.unmarshalEd25519PublicKey(r)
|
||
case i.KeyType.Secp256k1:if(a.secp256k1)return a.secp256k1.unmarshalSecp256k1PublicKey(r)
|
||
throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package")
|
||
default:throw new Error("invalid or unsupported key type")}},r.marshalPublicKey=function(e,t){if(!s(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type")
|
||
return e.bytes},r.unmarshalPrivateKey=function(e,t){var r=void 0
|
||
try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}var n=r.Data
|
||
switch(r.Type){case i.KeyType.RSA:return a.rsa.unmarshalRsaPrivateKey(n,t)
|
||
case i.KeyType.Ed25519:return a.ed25519.unmarshalEd25519PrivateKey(n,t)
|
||
case i.KeyType.Secp256k1:return a.secp256k1?a.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package"))
|
||
default:t(new Error("invalid or unsupported key type"))}},r.marshalPrivateKey=function(e,t){if(!s(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type")
|
||
return e.bytes},r.import=function(e,t,r){try{var i=o.pki.decryptRsaPrivateKey(e,t)
|
||
if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key")
|
||
var s=o.asn1.toDer(o.pki.privateKeyToAsn1(i))
|
||
return s=n.from(s.getBytes(),"binary"),a.rsa.unmarshalRsaPrivateKey(s,r)}catch(e){r(e)}}}).call(this,e("buffer").Buffer)},{"../random-bytes":422,"./ed25519-class":411,"./ephemeral-keys":413,"./key-stretcher":415,"./keys.proto":416,"./rsa-class":418,buffer:110,"libp2p-crypto-secp256k1":403,"node-forge":502,protons:553}],415:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("async/whilst"),i=e("../hmac"),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}}
|
||
t.exports=function(e,t,a,s){var u=o[e]
|
||
if(!u)return s(new Error("unkown cipherType passed"))
|
||
if(!t)return s(new Error("unkown hashType passed"))
|
||
var c=u.keySize,l=u.ivSize,f=r.from("key expansion"),h=2*(l+c+20)
|
||
i.create(t,a,function(e,t){if(e)return s(e)
|
||
t.digest(f,function(e,i){if(e)return s(e)
|
||
var o=[],a=0
|
||
n(function(){return a<h},function(e){t.digest(r.concat([i,f]),function(r,n){if(r)return e(r)
|
||
var s=n.length
|
||
a+s>h&&(s=h-a),o.push(n),a+=s,t.digest(i,function(t,r){if(t)return e(t)
|
||
i=r,e()})})},function(e){if(e)return s(e)
|
||
var t=h/2,n=r.concat(o),i=n.slice(0,t),a=n.slice(t,h),u=function(e){return{iv:e.slice(0,l),cipherKey:e.slice(l,l+c),macKey:e.slice(l+c)}}
|
||
s(null,{k1:u(i),k2:u(a)})})})})}}).call(this,e("buffer").Buffer)},{"../hmac":407,"async/whilst":33,buffer:110}],416:[function(e,t,r){"use strict"
|
||
t.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},{}],417:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("../nodeify"),i=e("../webcrypto.js")()
|
||
function o(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}r.utils=e("./rsa-utils"),r.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(o).then(function(e){return{privateKey:e[0],publicKey:e[1]}}),t)},r.unmarshalPrivateKey=function(e,t){var r,a=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"])
|
||
n(Promise.all([a,(r=e,i.subtle.importKey("jwk",{kty:r.kty,n:r.n,e:r.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then(function(e){return o({privateKey:e[0],publicKey:e[1]})}).then(function(e){return{privateKey:e[0],publicKey:e[1]}}),t)},r.getRandomValues=function(e){return t.from(i.getRandomValues(e))},r.hashAndSign=function(e,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(function(e){return i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))}).then(function(e){return t.from(e)}),o)},r.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(function(e){return i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)}),o)}}).call(this,e("buffer").Buffer)},{"../nodeify":420,"../webcrypto.js":424,"./rsa-utils":419,buffer:110}],418:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=e("multihashing-async"),a=e("protons"),s=e("bs58"),u=e("./rsa"),c=a(e("./keys.proto")),l=e("node-forge"),f=e("async/setImmediate"),h=function(){function e(t){i(this,e),this._key=t}return n(e,[{key:"verify",value:function(e,t,r){p(r),u.hashAndVerify(this._key,t,e,r)}},{key:"marshal",value:function(){return u.utils.jwkToPkix(this._key)}},{key:"encrypt",value:function(e){return this._key.encrypt(e,"RSAES-PKCS1-V1_5")}},{key:"equals",value:function(e){return this.bytes.equals(e.bytes)}},{key:"hash",value:function(e){p(e),o(this.bytes,"sha2-256",e)}},{key:"bytes",get:function(){return c.PublicKey.encode({Type:c.KeyType.RSA,Data:this.marshal()})}}]),e}(),d=function(){function e(t,r){i(this,e),this._key=t,this._publicKey=r}return n(e,[{key:"genSecret",value:function(){return u.getRandomValues(new Uint8Array(16))}},{key:"sign",value:function(e,t){p(t),u.hashAndSign(this._key,e,t)}},{key:"decrypt",value:function(e,t){u.decrypt(this._key,e,t)}},{key:"marshal",value:function(){return u.utils.jwkToPkcs1(this._key)}},{key:"equals",value:function(e){return this.bytes.equals(e.bytes)}},{key:"hash",value:function(e){p(e),o(this.bytes,"sha2-256",e)}},{key:"id",value:function(e){this.public.hash(function(t,r){if(t)return e(t)
|
||
e(null,s.encode(r))})}},{key:"export",value:function(e,t,r){var n=this
|
||
"function"==typeof t&&(r=t,t=e,e="pkcs-8"),p(r),f(function(){var i=null,o=null
|
||
try{var a=new l.util.ByteBuffer(n.marshal()),s=l.asn1.fromDer(a),u=l.pki.privateKeyFromAsn1(s)
|
||
if("pkcs-8"===e){o=l.pki.encryptRsaPrivateKey(u,t,{algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"})}else i=new Error("Unknown export format '"+e+"'")}catch(e){i=e}r(i,o)})}},{key:"public",get:function(){if(!this._publicKey)throw new Error("public key not provided")
|
||
return new h(this._publicKey)}},{key:"bytes",get:function(){return c.PrivateKey.encode({Type:c.KeyType.RSA,Data:this.marshal()})}}]),e}()
|
||
function p(e){if("function"!=typeof e)throw new Error("callback is required")}t.exports={RsaPublicKey:h,RsaPrivateKey:d,unmarshalRsaPublicKey:function(e){var t=u.utils.pkixToJwk(e)
|
||
return new h(t)},unmarshalRsaPrivateKey:function(e,t){var r=u.utils.pkcs1ToJwk(e)
|
||
u.unmarshalPrivateKey(r,function(e,r){if(e)return t(e)
|
||
t(null,new d(r.privateKey,r.publicKey))})},generateKeyPair:function(e,t){u.generateKey(e,function(e,r){if(e)return t(e)
|
||
t(null,new d(r.privateKey,r.publicKey))})},fromJwk:function(e,t){u.unmarshalPrivateKey(e,function(e,r){if(e)return t(e)
|
||
t(null,new d(r.privateKey,r.publicKey))})}}},{"./keys.proto":416,"./rsa":417,"async/setImmediate":31,bs58:70,"multihashing-async":486,"node-forge":502,protons:553}],419:[function(e,t,r){"use strict"
|
||
var n=e("asn1.js"),i=e("./../util"),o=i.toBase64,a=i.toBn,s=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),u=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),c=n.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())}),l=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})
|
||
r.pkcs1ToJwk=function(e){var t=s.decode(e,"der")
|
||
return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},r.jwkToPkcs1=function(e){return s.encode({version:0,modulus:a(e.n),publicExponent:a(e.e),privateExponent:a(e.d),prime1:a(e.p),prime2:a(e.q),exponent1:a(e.dp),exponent2:a(e.dq),coefficient:a(e.qi)},"der")},r.pkixToJwk=function(e){var t=c.decode(e,"der"),r=l.decode(t.subjectPublicKey.data,"der")
|
||
return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},r.jwkToPkix=function(e){return c.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:l.encode({modulus:a(e.n),publicExponent:a(e.e)},"der")}},"der")}},{"./../util":423,"asn1.js":2}],420:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){return e.then(function(e){t(null,e)},function(e){t(e)})}},{}],421:[function(e,t,r){"use strict"
|
||
var n=e("node-forge"),i={sha1:"sha1","sha2-256":"sha256","sha2-512":"sha512"}
|
||
t.exports=function(e,t,r,o,a){var s=i[a]
|
||
if(!s)throw new Error("Hash '"+a+"' is unknown or not supported")
|
||
var u=n.pkcs5.pbkdf2(e,t,r,o,s)
|
||
return n.util.encode64(u)}},{"node-forge":502}],422:[function(e,t,r){"use strict"
|
||
var n=e("./keys/rsa")
|
||
t.exports=function(e){if(!e||"number"!=typeof e)throw new Error("first argument must be a Number bigger than 0")
|
||
return n.getRandomValues(new Uint8Array(e))}},{"./keys/rsa":417}],423:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("asn1.js").bignum
|
||
r.toBase64=function(e,r){return e.toArrayLike(t,"be",r).toString("base64").replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},r.toBn=function(e){return new n(t.from(e,"base64"))}}).call(this,e("buffer").Buffer)},{"asn1.js":2,buffer:110}],424:[function(e,t,r){"use strict"
|
||
t.exports=function(){if("undefined"!=typeof self&&(e("webcrypto-shim")(self),self.crypto))return self.crypto
|
||
throw new Error("Please use an environment with crypto support")}},{"webcrypto-shim":664}],425:[function(e,t,r){(function(e){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=200,o="Expected a function",a="__lodash_hash_undefined__",s=1,u=2,c=1/0,l=9007199254740991,f="[object Arguments]",h="[object Array]",d="[object Boolean]",p="[object Date]",m="[object Error]",y="[object Function]",g="[object GeneratorFunction]",b="[object Map]",v="[object Number]",_="[object Object]",w="[object RegExp]",S="[object Set]",E="[object String]",k="[object Symbol]",x="[object ArrayBuffer]",C="[object DataView]",A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/,I=/^\./,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,B={}
|
||
B["[object Float32Array]"]=B["[object Float64Array]"]=B["[object Int8Array]"]=B["[object Int16Array]"]=B["[object Int32Array]"]=B["[object Uint8Array]"]=B["[object Uint8ClampedArray]"]=B["[object Uint16Array]"]=B["[object Uint32Array]"]=!0,B[f]=B[h]=B[x]=B[d]=B[C]=B[p]=B[m]=B[y]=B[b]=B[v]=B[_]=B[w]=B[S]=B[E]=B["[object WeakMap]"]=!1
|
||
var N="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e,j="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,L=N||j||Function("return this")(),D="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,U=D&&"object"==(void 0===t?"undefined":n(t))&&t&&!t.nodeType&&t,F=U&&U.exports===D&&N.process,z=function(){try{return F&&F.binding("util")}catch(e){}}(),q=z&&z.isTypedArray
|
||
function V(e,t){for(var r=-1,n=e?e.length:0,i=0,o=[];++r<n;){var a=e[r]
|
||
t(a,r,e)&&(o[i++]=a)}return o}function H(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0
|
||
return!1}function K(e){var t=!1
|
||
if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function W(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e,n){r[++t]=[n,e]}),r}function G(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e){r[++t]=e}),r}var Y,Q,X,$=Array.prototype,J=Function.prototype,Z=Object.prototype,ee=L["__core-js_shared__"],te=(Y=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",re=J.toString,ne=Z.hasOwnProperty,ie=Z.toString,oe=RegExp("^"+re.call(ne).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ae=L.Symbol,se=L.Uint8Array,ue=Z.propertyIsEnumerable,ce=$.splice,le=(Q=Object.keys,X=Object,function(e){return Q(X(e))}),fe=We(L,"DataView"),he=We(L,"Map"),de=We(L,"Promise"),pe=We(L,"Set"),me=We(L,"WeakMap"),ye=We(Object,"create"),ge=et(fe),be=et(he),ve=et(de),_e=et(pe),we=et(me),Se=ae?ae.prototype:void 0,Ee=Se?Se.valueOf:void 0,ke=Se?Se.toString:void 0
|
||
function xe(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Ce(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Ae(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Te(e){var t=-1,r=e?e.length:0
|
||
for(this.__data__=new Ae;++t<r;)this.add(e[t])}function Ie(e){this.__data__=new Ce(e)}function Pe(e,t){var r=it(e)||nt(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r)
|
||
return n}(e.length,String):[],n=r.length,i=!!n
|
||
for(var o in e)!t&&!ne.call(e,o)||i&&("length"==o||Ye(o,n))||r.push(o)
|
||
return r}function Me(e,t){for(var r=e.length;r--;)if(rt(e[r][0],t))return r
|
||
return-1}xe.prototype.clear=function(){this.__data__=ye?ye(null):{}},xe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},xe.prototype.get=function(e){var t=this.__data__
|
||
if(ye){var r=t[e]
|
||
return r===a?void 0:r}return ne.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__
|
||
return ye?void 0!==t[e]:ne.call(t,e)},xe.prototype.set=function(e,t){return this.__data__[e]=ye&&void 0===t?a:t,this},Ce.prototype.clear=function(){this.__data__=[]},Ce.prototype.delete=function(e){var t=this.__data__,r=Me(t,e)
|
||
return!(r<0||(r==t.length-1?t.pop():ce.call(t,r,1),0))},Ce.prototype.get=function(e){var t=this.__data__,r=Me(t,e)
|
||
return r<0?void 0:t[r][1]},Ce.prototype.has=function(e){return Me(this.__data__,e)>-1},Ce.prototype.set=function(e,t){var r=this.__data__,n=Me(r,e)
|
||
return n<0?r.push([e,t]):r[n][1]=t,this},Ae.prototype.clear=function(){this.__data__={hash:new xe,map:new(he||Ce),string:new xe}},Ae.prototype.delete=function(e){return Ke(this,e).delete(e)},Ae.prototype.get=function(e){return Ke(this,e).get(e)},Ae.prototype.has=function(e){return Ke(this,e).has(e)},Ae.prototype.set=function(e,t){return Ke(this,e).set(e,t),this},Te.prototype.add=Te.prototype.push=function(e){return this.__data__.set(e,a),this},Te.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new Ce},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__
|
||
if(r instanceof Ce){var n=r.__data__
|
||
if(!he||n.length<i-1)return n.push([e,t]),this
|
||
r=this.__data__=new Ae(n)}return r.set(e,t),this}
|
||
var Re,Oe,Be=(Re=function(e,t){return e&&je(e,t,ht)},function(e,t){if(null==e)return e
|
||
if(!ot(e))return Re(e,t)
|
||
for(var r=e.length,n=Oe?r:-1,i=Object(e);(Oe?n--:++n<r)&&!1!==t(i[n],n,i););return e})
|
||
function Ne(e,t){var r=[]
|
||
return Be(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}var je=function(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i]
|
||
if(!1===r(o[u],u,o))break}return t}}()
|
||
function Le(e,t){for(var r=0,n=(t=Qe(t,e)?[t]:Ve(t)).length;null!=e&&r<n;)e=e[Ze(t[r++])]
|
||
return r&&r==n?e:void 0}function De(e,t){return null!=e&&t in Object(e)}function Ue(e,t,r,n,i){return e===t||(null==e||null==t||!ut(e)&&!ct(t)?e!=e&&t!=t:function(e,t,r,n,i,o){var a=it(e),c=it(t),l=h,y=h
|
||
a||(l=(l=Ge(e))==f?_:l)
|
||
c||(y=(y=Ge(t))==f?_:y)
|
||
var g=l==_&&!K(e),A=y==_&&!K(t),T=l==y
|
||
if(T&&!g)return o||(o=new Ie),a||ft(e)?He(e,t,r,n,i,o):function(e,t,r,n,i,o,a){switch(r){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1
|
||
e=e.buffer,t=t.buffer
|
||
case x:return!(e.byteLength!=t.byteLength||!n(new se(e),new se(t)))
|
||
case d:case p:case v:return rt(+e,+t)
|
||
case m:return e.name==t.name&&e.message==t.message
|
||
case w:case E:return e==t+""
|
||
case b:var c=W
|
||
case S:var l=o&u
|
||
if(c||(c=G),e.size!=t.size&&!l)return!1
|
||
var f=a.get(e)
|
||
if(f)return f==t
|
||
o|=s,a.set(e,t)
|
||
var h=He(c(e),c(t),n,i,o,a)
|
||
return a.delete(e),h
|
||
case k:if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,l,r,n,i,o)
|
||
if(!(i&u)){var I=g&&ne.call(e,"__wrapped__"),P=A&&ne.call(t,"__wrapped__")
|
||
if(I||P){var M=I?e.value():e,R=P?t.value():t
|
||
return o||(o=new Ie),r(M,R,n,i,o)}}if(!T)return!1
|
||
return o||(o=new Ie),function(e,t,r,n,i,o){var a=i&u,s=ht(e),c=s.length,l=ht(t).length
|
||
if(c!=l&&!a)return!1
|
||
for(var f=c;f--;){var h=s[f]
|
||
if(!(a?h in t:ne.call(t,h)))return!1}var d=o.get(e)
|
||
if(d&&o.get(t))return d==t
|
||
var p=!0
|
||
o.set(e,t),o.set(t,e)
|
||
for(var m=a;++f<c;){h=s[f]
|
||
var y=e[h],g=t[h]
|
||
if(n)var b=a?n(g,y,h,t,e,o):n(y,g,h,e,t,o)
|
||
if(!(void 0===b?y===g||r(y,g,n,i,o):b)){p=!1
|
||
break}m||(m="constructor"==h)}if(p&&!m){var v=e.constructor,_=t.constructor
|
||
v!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(e),o.delete(t),p}(e,t,r,n,i,o)}(e,t,Ue,r,n,i))}function Fe(e){return!(!ut(e)||te&&te in e)&&(at(e)||K(e)?oe:R).test(et(e))}function ze(e){return"function"==typeof e?e:null==e?dt:"object"==(void 0===e?"undefined":n(e))?it(e)?function(e,t){if(Qe(e)&&Xe(t))return $e(Ze(e),t)
|
||
return function(r){var n=function(e,t,r){var n=null==e?void 0:Le(e,t)
|
||
return void 0===n?r:n}(r,e)
|
||
return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){var n,i=-1,o=(t=Qe(t,e)?[t]:Ve(t)).length
|
||
for(;++i<o;){var a=Ze(t[i])
|
||
if(!(n=null!=e&&r(e,a)))break
|
||
e=e[a]}if(n)return n
|
||
return!!(o=e?e.length:0)&&st(o)&&Ye(a,o)&&(it(e)||nt(e))}(e,t,De)}(r,e):Ue(t,n,void 0,s|u)}}(e[0],e[1]):function(e){var t=function(e){var t=ht(e),r=t.length
|
||
for(;r--;){var n=t[r],i=e[n]
|
||
t[r]=[n,i,Xe(i)]}return t}(e)
|
||
if(1==t.length&&t[0][2])return $e(t[0][0],t[0][1])
|
||
return function(r){return r===e||function(e,t,r,n){var i=r.length,o=i,a=!n
|
||
if(null==e)return!o
|
||
for(e=Object(e);i--;){var c=r[i]
|
||
if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<o;){var l=(c=r[i])[0],f=e[l],h=c[1]
|
||
if(a&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new Ie
|
||
if(n)var p=n(f,h,l,e,t,d)
|
||
if(!(void 0===p?Ue(h,f,n,s|u,d):p))return!1}}return!0}(r,e,t)}}(e):Qe(t=e)?(r=Ze(t),function(e){return null==e?void 0:e[r]}):function(e){return function(t){return Le(t,e)}}(t)
|
||
var t,r}function qe(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||Z,t!==n)return le(e)
|
||
var t,r,n,i=[]
|
||
for(var o in Object(e))ne.call(e,o)&&"constructor"!=o&&i.push(o)
|
||
return i}function Ve(e){return it(e)?e:Je(e)}function He(e,t,r,n,i,o){var a=i&u,c=e.length,l=t.length
|
||
if(c!=l&&!(a&&l>c))return!1
|
||
var f=o.get(e)
|
||
if(f&&o.get(t))return f==t
|
||
var h=-1,d=!0,p=i&s?new Te:void 0
|
||
for(o.set(e,t),o.set(t,e);++h<c;){var m=e[h],y=t[h]
|
||
if(n)var g=a?n(y,m,h,t,e,o):n(m,y,h,e,t,o)
|
||
if(void 0!==g){if(g)continue
|
||
d=!1
|
||
break}if(p){if(!H(t,function(e,t){if(!p.has(t)&&(m===e||r(m,e,n,i,o)))return p.add(t)})){d=!1
|
||
break}}else if(m!==y&&!r(m,y,n,i,o)){d=!1
|
||
break}}return o.delete(e),o.delete(t),d}function Ke(e,t){var r,i,o=e.__data__
|
||
return("string"==(i=void 0===(r=t)?"undefined":n(r))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function We(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t)
|
||
return Fe(r)?r:void 0}var Ge=function(e){return ie.call(e)}
|
||
function Ye(e,t){return!!(t=null==t?l:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Qe(e,t){if(it(e))return!1
|
||
var r=void 0===e?"undefined":n(e)
|
||
return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!lt(e))||(T.test(e)||!A.test(e)||null!=t&&e in Object(t))}function Xe(e){return e==e&&!ut(e)}function $e(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(fe&&Ge(new fe(new ArrayBuffer(1)))!=C||he&&Ge(new he)!=b||de&&"[object Promise]"!=Ge(de.resolve())||pe&&Ge(new pe)!=S||me&&"[object WeakMap]"!=Ge(new me))&&(Ge=function(e){var t=ie.call(e),r=t==_?e.constructor:void 0,n=r?et(r):void 0
|
||
if(n)switch(n){case ge:return C
|
||
case be:return b
|
||
case ve:return"[object Promise]"
|
||
case _e:return S
|
||
case we:return"[object WeakMap]"}return t})
|
||
var Je=tt(function(e){var t
|
||
e=null==(t=e)?"":function(e){if("string"==typeof e)return e
|
||
if(lt(e))return ke?ke.call(e):""
|
||
var t=e+""
|
||
return"0"==t&&1/e==-c?"-0":t}(t)
|
||
var r=[]
|
||
return I.test(e)&&r.push(""),e.replace(P,function(e,t,n,i){r.push(n?i.replace(M,"$1"):t||e)}),r})
|
||
function Ze(e){if("string"==typeof e||lt(e))return e
|
||
var t=e+""
|
||
return"0"==t&&1/e==-c?"-0":t}function et(e){if(null!=e){try{return re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function tt(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(o)
|
||
var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache
|
||
if(o.has(i))return o.get(i)
|
||
var a=e.apply(this,n)
|
||
return r.cache=o.set(i,a),a}
|
||
return r.cache=new(tt.Cache||Ae),r}function rt(e,t){return e===t||e!=e&&t!=t}function nt(e){return function(e){return ct(e)&&ot(e)}(e)&&ne.call(e,"callee")&&(!ue.call(e,"callee")||ie.call(e)==f)}tt.Cache=Ae
|
||
var it=Array.isArray
|
||
function ot(e){return null!=e&&st(e.length)&&!at(e)}function at(e){var t=ut(e)?ie.call(e):""
|
||
return t==y||t==g}function st(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function ut(e){var t=void 0===e?"undefined":n(e)
|
||
return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==(void 0===e?"undefined":n(e))}function lt(e){return"symbol"==(void 0===e?"undefined":n(e))||ct(e)&&ie.call(e)==k}var ft=q?function(e){return function(t){return e(t)}}(q):function(e){return ct(e)&&st(e.length)&&!!B[ie.call(e)]}
|
||
function ht(e){return ot(e)?Pe(e):qe(e)}function dt(e){return e}t.exports=function(e,t){return(it(e)?V:Ne)(e,ze(t))}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],426:[function(e,t,r){(function(e){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=200,o="Expected a function",a="__lodash_hash_undefined__",s=1,u=2,c=1/0,l=9007199254740991,f="[object Arguments]",h="[object Array]",d="[object Boolean]",p="[object Date]",m="[object Error]",y="[object Function]",g="[object GeneratorFunction]",b="[object Map]",v="[object Number]",_="[object Object]",w="[object RegExp]",S="[object Set]",E="[object String]",k="[object Symbol]",x="[object ArrayBuffer]",C="[object DataView]",A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/,I=/^\./,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,B={}
|
||
B["[object Float32Array]"]=B["[object Float64Array]"]=B["[object Int8Array]"]=B["[object Int16Array]"]=B["[object Int32Array]"]=B["[object Uint8Array]"]=B["[object Uint8ClampedArray]"]=B["[object Uint16Array]"]=B["[object Uint32Array]"]=!0,B[f]=B[h]=B[x]=B[d]=B[C]=B[p]=B[m]=B[y]=B[b]=B[v]=B[_]=B[w]=B[S]=B[E]=B["[object WeakMap]"]=!1
|
||
var N="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e,j="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,L=N||j||Function("return this")(),D="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,U=D&&"object"==(void 0===t?"undefined":n(t))&&t&&!t.nodeType&&t,F=U&&U.exports===D&&N.process,z=function(){try{return F&&F.binding("util")}catch(e){}}(),q=z&&z.isTypedArray
|
||
function V(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e)
|
||
return i}function H(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0
|
||
return!1}function K(e){var t=!1
|
||
if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function W(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e,n){r[++t]=[n,e]}),r}function G(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e){r[++t]=e}),r}var Y,Q,X,$=Array.prototype,J=Function.prototype,Z=Object.prototype,ee=L["__core-js_shared__"],te=(Y=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",re=J.toString,ne=Z.hasOwnProperty,ie=Z.toString,oe=RegExp("^"+re.call(ne).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ae=L.Symbol,se=L.Uint8Array,ue=Z.propertyIsEnumerable,ce=$.splice,le=(Q=Object.keys,X=Object,function(e){return Q(X(e))}),fe=We(L,"DataView"),he=We(L,"Map"),de=We(L,"Promise"),pe=We(L,"Set"),me=We(L,"WeakMap"),ye=We(Object,"create"),ge=et(fe),be=et(he),ve=et(de),_e=et(pe),we=et(me),Se=ae?ae.prototype:void 0,Ee=Se?Se.valueOf:void 0,ke=Se?Se.toString:void 0
|
||
function xe(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Ce(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Ae(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Te(e){var t=-1,r=e?e.length:0
|
||
for(this.__data__=new Ae;++t<r;)this.add(e[t])}function Ie(e){this.__data__=new Ce(e)}function Pe(e,t){var r=it(e)||nt(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r)
|
||
return n}(e.length,String):[],n=r.length,i=!!n
|
||
for(var o in e)!t&&!ne.call(e,o)||i&&("length"==o||Ye(o,n))||r.push(o)
|
||
return r}function Me(e,t){for(var r=e.length;r--;)if(rt(e[r][0],t))return r
|
||
return-1}xe.prototype.clear=function(){this.__data__=ye?ye(null):{}},xe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},xe.prototype.get=function(e){var t=this.__data__
|
||
if(ye){var r=t[e]
|
||
return r===a?void 0:r}return ne.call(t,e)?t[e]:void 0},xe.prototype.has=function(e){var t=this.__data__
|
||
return ye?void 0!==t[e]:ne.call(t,e)},xe.prototype.set=function(e,t){return this.__data__[e]=ye&&void 0===t?a:t,this},Ce.prototype.clear=function(){this.__data__=[]},Ce.prototype.delete=function(e){var t=this.__data__,r=Me(t,e)
|
||
return!(r<0||(r==t.length-1?t.pop():ce.call(t,r,1),0))},Ce.prototype.get=function(e){var t=this.__data__,r=Me(t,e)
|
||
return r<0?void 0:t[r][1]},Ce.prototype.has=function(e){return Me(this.__data__,e)>-1},Ce.prototype.set=function(e,t){var r=this.__data__,n=Me(r,e)
|
||
return n<0?r.push([e,t]):r[n][1]=t,this},Ae.prototype.clear=function(){this.__data__={hash:new xe,map:new(he||Ce),string:new xe}},Ae.prototype.delete=function(e){return Ke(this,e).delete(e)},Ae.prototype.get=function(e){return Ke(this,e).get(e)},Ae.prototype.has=function(e){return Ke(this,e).has(e)},Ae.prototype.set=function(e,t){return Ke(this,e).set(e,t),this},Te.prototype.add=Te.prototype.push=function(e){return this.__data__.set(e,a),this},Te.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new Ce},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__
|
||
if(r instanceof Ce){var n=r.__data__
|
||
if(!he||n.length<i-1)return n.push([e,t]),this
|
||
r=this.__data__=new Ae(n)}return r.set(e,t),this}
|
||
var Re,Oe,Be=(Re=function(e,t){return e&&Ne(e,t,ht)},function(e,t){if(null==e)return e
|
||
if(!ot(e))return Re(e,t)
|
||
for(var r=e.length,n=Oe?r:-1,i=Object(e);(Oe?n--:++n<r)&&!1!==t(i[n],n,i););return e}),Ne=function(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i]
|
||
if(!1===r(o[u],u,o))break}return t}}()
|
||
function je(e,t){for(var r=0,n=(t=Qe(t,e)?[t]:Ve(t)).length;null!=e&&r<n;)e=e[Ze(t[r++])]
|
||
return r&&r==n?e:void 0}function Le(e,t){return null!=e&&t in Object(e)}function De(e,t,r,n,i){return e===t||(null==e||null==t||!ut(e)&&!ct(t)?e!=e&&t!=t:function(e,t,r,n,i,o){var a=it(e),c=it(t),l=h,y=h
|
||
a||(l=(l=Ge(e))==f?_:l)
|
||
c||(y=(y=Ge(t))==f?_:y)
|
||
var g=l==_&&!K(e),A=y==_&&!K(t),T=l==y
|
||
if(T&&!g)return o||(o=new Ie),a||ft(e)?He(e,t,r,n,i,o):function(e,t,r,n,i,o,a){switch(r){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1
|
||
e=e.buffer,t=t.buffer
|
||
case x:return!(e.byteLength!=t.byteLength||!n(new se(e),new se(t)))
|
||
case d:case p:case v:return rt(+e,+t)
|
||
case m:return e.name==t.name&&e.message==t.message
|
||
case w:case E:return e==t+""
|
||
case b:var c=W
|
||
case S:var l=o&u
|
||
if(c||(c=G),e.size!=t.size&&!l)return!1
|
||
var f=a.get(e)
|
||
if(f)return f==t
|
||
o|=s,a.set(e,t)
|
||
var h=He(c(e),c(t),n,i,o,a)
|
||
return a.delete(e),h
|
||
case k:if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,l,r,n,i,o)
|
||
if(!(i&u)){var I=g&&ne.call(e,"__wrapped__"),P=A&&ne.call(t,"__wrapped__")
|
||
if(I||P){var M=I?e.value():e,R=P?t.value():t
|
||
return o||(o=new Ie),r(M,R,n,i,o)}}if(!T)return!1
|
||
return o||(o=new Ie),function(e,t,r,n,i,o){var a=i&u,s=ht(e),c=s.length,l=ht(t).length
|
||
if(c!=l&&!a)return!1
|
||
for(var f=c;f--;){var h=s[f]
|
||
if(!(a?h in t:ne.call(t,h)))return!1}var d=o.get(e)
|
||
if(d&&o.get(t))return d==t
|
||
var p=!0
|
||
o.set(e,t),o.set(t,e)
|
||
for(var m=a;++f<c;){h=s[f]
|
||
var y=e[h],g=t[h]
|
||
if(n)var b=a?n(g,y,h,t,e,o):n(y,g,h,e,t,o)
|
||
if(!(void 0===b?y===g||r(y,g,n,i,o):b)){p=!1
|
||
break}m||(m="constructor"==h)}if(p&&!m){var v=e.constructor,_=t.constructor
|
||
v!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(e),o.delete(t),p}(e,t,r,n,i,o)}(e,t,De,r,n,i))}function Ue(e){return!(!ut(e)||te&&te in e)&&(at(e)||K(e)?oe:R).test(et(e))}function Fe(e){return"function"==typeof e?e:null==e?dt:"object"==(void 0===e?"undefined":n(e))?it(e)?function(e,t){if(Qe(e)&&Xe(t))return $e(Ze(e),t)
|
||
return function(r){var n=function(e,t,r){var n=null==e?void 0:je(e,t)
|
||
return void 0===n?r:n}(r,e)
|
||
return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){var n,i=-1,o=(t=Qe(t,e)?[t]:Ve(t)).length
|
||
for(;++i<o;){var a=Ze(t[i])
|
||
if(!(n=null!=e&&r(e,a)))break
|
||
e=e[a]}if(n)return n
|
||
return!!(o=e?e.length:0)&&st(o)&&Ye(a,o)&&(it(e)||nt(e))}(e,t,Le)}(r,e):De(t,n,void 0,s|u)}}(e[0],e[1]):function(e){var t=function(e){var t=ht(e),r=t.length
|
||
for(;r--;){var n=t[r],i=e[n]
|
||
t[r]=[n,i,Xe(i)]}return t}(e)
|
||
if(1==t.length&&t[0][2])return $e(t[0][0],t[0][1])
|
||
return function(r){return r===e||function(e,t,r,n){var i=r.length,o=i,a=!n
|
||
if(null==e)return!o
|
||
for(e=Object(e);i--;){var c=r[i]
|
||
if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<o;){var l=(c=r[i])[0],f=e[l],h=c[1]
|
||
if(a&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new Ie
|
||
if(n)var p=n(f,h,l,e,t,d)
|
||
if(!(void 0===p?De(h,f,n,s|u,d):p))return!1}}return!0}(r,e,t)}}(e):Qe(t=e)?(r=Ze(t),function(e){return null==e?void 0:e[r]}):function(e){return function(t){return je(t,e)}}(t)
|
||
var t,r}function ze(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||Z,t!==n)return le(e)
|
||
var t,r,n,i=[]
|
||
for(var o in Object(e))ne.call(e,o)&&"constructor"!=o&&i.push(o)
|
||
return i}function qe(e,t){var r=-1,n=ot(e)?Array(e.length):[]
|
||
return Be(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function Ve(e){return it(e)?e:Je(e)}function He(e,t,r,n,i,o){var a=i&u,c=e.length,l=t.length
|
||
if(c!=l&&!(a&&l>c))return!1
|
||
var f=o.get(e)
|
||
if(f&&o.get(t))return f==t
|
||
var h=-1,d=!0,p=i&s?new Te:void 0
|
||
for(o.set(e,t),o.set(t,e);++h<c;){var m=e[h],y=t[h]
|
||
if(n)var g=a?n(y,m,h,t,e,o):n(m,y,h,e,t,o)
|
||
if(void 0!==g){if(g)continue
|
||
d=!1
|
||
break}if(p){if(!H(t,function(e,t){if(!p.has(t)&&(m===e||r(m,e,n,i,o)))return p.add(t)})){d=!1
|
||
break}}else if(m!==y&&!r(m,y,n,i,o)){d=!1
|
||
break}}return o.delete(e),o.delete(t),d}function Ke(e,t){var r,i,o=e.__data__
|
||
return("string"==(i=void 0===(r=t)?"undefined":n(r))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function We(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t)
|
||
return Ue(r)?r:void 0}var Ge=function(e){return ie.call(e)}
|
||
function Ye(e,t){return!!(t=null==t?l:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Qe(e,t){if(it(e))return!1
|
||
var r=void 0===e?"undefined":n(e)
|
||
return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!lt(e))||(T.test(e)||!A.test(e)||null!=t&&e in Object(t))}function Xe(e){return e==e&&!ut(e)}function $e(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(fe&&Ge(new fe(new ArrayBuffer(1)))!=C||he&&Ge(new he)!=b||de&&"[object Promise]"!=Ge(de.resolve())||pe&&Ge(new pe)!=S||me&&"[object WeakMap]"!=Ge(new me))&&(Ge=function(e){var t=ie.call(e),r=t==_?e.constructor:void 0,n=r?et(r):void 0
|
||
if(n)switch(n){case ge:return C
|
||
case be:return b
|
||
case ve:return"[object Promise]"
|
||
case _e:return S
|
||
case we:return"[object WeakMap]"}return t})
|
||
var Je=tt(function(e){var t
|
||
e=null==(t=e)?"":function(e){if("string"==typeof e)return e
|
||
if(lt(e))return ke?ke.call(e):""
|
||
var t=e+""
|
||
return"0"==t&&1/e==-c?"-0":t}(t)
|
||
var r=[]
|
||
return I.test(e)&&r.push(""),e.replace(P,function(e,t,n,i){r.push(n?i.replace(M,"$1"):t||e)}),r})
|
||
function Ze(e){if("string"==typeof e||lt(e))return e
|
||
var t=e+""
|
||
return"0"==t&&1/e==-c?"-0":t}function et(e){if(null!=e){try{return re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function tt(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(o)
|
||
var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache
|
||
if(o.has(i))return o.get(i)
|
||
var a=e.apply(this,n)
|
||
return r.cache=o.set(i,a),a}
|
||
return r.cache=new(tt.Cache||Ae),r}function rt(e,t){return e===t||e!=e&&t!=t}function nt(e){return function(e){return ct(e)&&ot(e)}(e)&&ne.call(e,"callee")&&(!ue.call(e,"callee")||ie.call(e)==f)}tt.Cache=Ae
|
||
var it=Array.isArray
|
||
function ot(e){return null!=e&&st(e.length)&&!at(e)}function at(e){var t=ut(e)?ie.call(e):""
|
||
return t==y||t==g}function st(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function ut(e){var t=void 0===e?"undefined":n(e)
|
||
return!!e&&("object"==t||"function"==t)}function ct(e){return!!e&&"object"==(void 0===e?"undefined":n(e))}function lt(e){return"symbol"==(void 0===e?"undefined":n(e))||ct(e)&&ie.call(e)==k}var ft=q?function(e){return function(t){return e(t)}}(q):function(e){return ct(e)&&st(e.length)&&!!B[ie.call(e)]}
|
||
function ht(e){return ot(e)?Pe(e):ze(e)}function dt(e){return e}t.exports=function(e,t){return(it(e)?V:qe)(e,Fe(t))}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],427:[function(e,t,r){(function(e){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=200,o="Expected a function",a="__lodash_hash_undefined__",s=1,u=2,c=1/0,l=9007199254740991,f="[object Arguments]",h="[object Array]",d="[object Boolean]",p="[object Date]",m="[object Error]",y="[object Function]",g="[object GeneratorFunction]",b="[object Map]",v="[object Number]",_="[object Object]",w="[object RegExp]",S="[object Set]",E="[object String]",k="[object Symbol]",x="[object ArrayBuffer]",C="[object DataView]",A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T=/^\w*$/,I=/^\./,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,M=/\\(\\)?/g,R=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,B={}
|
||
B["[object Float32Array]"]=B["[object Float64Array]"]=B["[object Int8Array]"]=B["[object Int16Array]"]=B["[object Int32Array]"]=B["[object Uint8Array]"]=B["[object Uint8ClampedArray]"]=B["[object Uint16Array]"]=B["[object Uint32Array]"]=!0,B[f]=B[h]=B[x]=B[d]=B[C]=B[p]=B[m]=B[y]=B[b]=B[v]=B[_]=B[w]=B[S]=B[E]=B["[object WeakMap]"]=!1
|
||
var N="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e,j="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,L=N||j||Function("return this")(),D="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,U=D&&"object"==(void 0===t?"undefined":n(t))&&t&&!t.nodeType&&t,F=U&&U.exports===D&&N.process,z=function(){try{return F&&F.binding("util")}catch(e){}}(),q=z&&z.isTypedArray
|
||
function V(e,t){return!!(e?e.length:0)&&function(e,t,r){if(t!=t)return function(e,t,r,n){var i=e.length,o=r+(n?1:-1)
|
||
for(;n?o--:++o<i;)if(t(e[o],o,e))return o
|
||
return-1}(e,W,r)
|
||
var n=r-1,i=e.length
|
||
for(;++n<i;)if(e[n]===t)return n
|
||
return-1}(e,t,0)>-1}function H(e,t,r){for(var n=-1,i=e?e.length:0;++n<i;)if(r(t,e[n]))return!0
|
||
return!1}function K(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0
|
||
return!1}function W(e){return e!=e}function G(e,t){return e.has(t)}function Y(e){var t=!1
|
||
if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function Q(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e,n){r[++t]=[n,e]}),r}function X(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e){r[++t]=e}),r}var $,J,Z,ee=Array.prototype,te=Function.prototype,re=Object.prototype,ne=L["__core-js_shared__"],ie=($=/[^.]+$/.exec(ne&&ne.keys&&ne.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",oe=te.toString,ae=re.hasOwnProperty,se=re.toString,ue=RegExp("^"+oe.call(ae).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=L.Symbol,le=L.Uint8Array,fe=re.propertyIsEnumerable,he=ee.splice,de=(J=Object.keys,Z=Object,function(e){return J(Z(e))}),pe=Ke(L,"DataView"),me=Ke(L,"Map"),ye=Ke(L,"Promise"),ge=Ke(L,"Set"),be=Ke(L,"WeakMap"),ve=Ke(Object,"create"),_e=Ze(pe),we=Ze(me),Se=Ze(ye),Ee=Ze(ge),ke=Ze(be),xe=ce?ce.prototype:void 0,Ce=xe?xe.valueOf:void 0,Ae=xe?xe.toString:void 0
|
||
function Te(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Ie(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Pe(e){var t=-1,r=e?e.length:0
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Me(e){var t=-1,r=e?e.length:0
|
||
for(this.__data__=new Pe;++t<r;)this.add(e[t])}function Re(e){this.__data__=new Ie(e)}function Oe(e,t){var r=nt(e)||rt(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r)
|
||
return n}(e.length,String):[],n=r.length,i=!!n
|
||
for(var o in e)!t&&!ae.call(e,o)||i&&("length"==o||Ge(o,n))||r.push(o)
|
||
return r}function Be(e,t){for(var r=e.length;r--;)if(tt(e[r][0],t))return r
|
||
return-1}function Ne(e,t){for(var r=0,n=(t=Ye(t,e)?[t]:ze(t)).length;null!=e&&r<n;)e=e[Je(t[r++])]
|
||
return r&&r==n?e:void 0}function je(e,t){return null!=e&&t in Object(e)}function Le(e,t,r,n,i){return e===t||(null==e||null==t||!st(e)&&!ut(t)?e!=e&&t!=t:function(e,t,r,n,i,o){var a=nt(e),c=nt(t),l=h,y=h
|
||
a||(l=(l=We(e))==f?_:l)
|
||
c||(y=(y=We(t))==f?_:y)
|
||
var g=l==_&&!Y(e),A=y==_&&!Y(t),T=l==y
|
||
if(T&&!g)return o||(o=new Re),a||lt(e)?Ve(e,t,r,n,i,o):function(e,t,r,n,i,o,a){switch(r){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1
|
||
e=e.buffer,t=t.buffer
|
||
case x:return!(e.byteLength!=t.byteLength||!n(new le(e),new le(t)))
|
||
case d:case p:case v:return tt(+e,+t)
|
||
case m:return e.name==t.name&&e.message==t.message
|
||
case w:case E:return e==t+""
|
||
case b:var c=Q
|
||
case S:var l=o&u
|
||
if(c||(c=X),e.size!=t.size&&!l)return!1
|
||
var f=a.get(e)
|
||
if(f)return f==t
|
||
o|=s,a.set(e,t)
|
||
var h=Ve(c(e),c(t),n,i,o,a)
|
||
return a.delete(e),h
|
||
case k:if(Ce)return Ce.call(e)==Ce.call(t)}return!1}(e,t,l,r,n,i,o)
|
||
if(!(i&u)){var I=g&&ae.call(e,"__wrapped__"),P=A&&ae.call(t,"__wrapped__")
|
||
if(I||P){var M=I?e.value():e,R=P?t.value():t
|
||
return o||(o=new Re),r(M,R,n,i,o)}}if(!T)return!1
|
||
return o||(o=new Re),function(e,t,r,n,i,o){var a=i&u,s=ft(e),c=s.length,l=ft(t).length
|
||
if(c!=l&&!a)return!1
|
||
for(var f=c;f--;){var h=s[f]
|
||
if(!(a?h in t:ae.call(t,h)))return!1}var d=o.get(e)
|
||
if(d&&o.get(t))return d==t
|
||
var p=!0
|
||
o.set(e,t),o.set(t,e)
|
||
for(var m=a;++f<c;){h=s[f]
|
||
var y=e[h],g=t[h]
|
||
if(n)var b=a?n(g,y,h,t,e,o):n(y,g,h,e,t,o)
|
||
if(!(void 0===b?y===g||r(y,g,n,i,o):b)){p=!1
|
||
break}m||(m="constructor"==h)}if(p&&!m){var v=e.constructor,_=t.constructor
|
||
v!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(e),o.delete(t),p}(e,t,r,n,i,o)}(e,t,Le,r,n,i))}function De(e){return!(!st(e)||ie&&ie in e)&&(ot(e)||Y(e)?ue:R).test(Ze(e))}function Ue(e){return"function"==typeof e?e:null==e?ht:"object"==(void 0===e?"undefined":n(e))?nt(e)?function(e,t){if(Ye(e)&&Qe(t))return Xe(Je(e),t)
|
||
return function(r){var n=function(e,t,r){var n=null==e?void 0:Ne(e,t)
|
||
return void 0===n?r:n}(r,e)
|
||
return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){var n,i=-1,o=(t=Ye(t,e)?[t]:ze(t)).length
|
||
for(;++i<o;){var a=Je(t[i])
|
||
if(!(n=null!=e&&r(e,a)))break
|
||
e=e[a]}if(n)return n
|
||
return!!(o=e?e.length:0)&&at(o)&&Ge(a,o)&&(nt(e)||rt(e))}(e,t,je)}(r,e):Le(t,n,void 0,s|u)}}(e[0],e[1]):function(e){var t=function(e){var t=ft(e),r=t.length
|
||
for(;r--;){var n=t[r],i=e[n]
|
||
t[r]=[n,i,Qe(i)]}return t}(e)
|
||
if(1==t.length&&t[0][2])return Xe(t[0][0],t[0][1])
|
||
return function(r){return r===e||function(e,t,r,n){var i=r.length,o=i,a=!n
|
||
if(null==e)return!o
|
||
for(e=Object(e);i--;){var c=r[i]
|
||
if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<o;){var l=(c=r[i])[0],f=e[l],h=c[1]
|
||
if(a&&c[2]){if(void 0===f&&!(l in e))return!1}else{var d=new Re
|
||
if(n)var p=n(f,h,l,e,t,d)
|
||
if(!(void 0===p?Le(h,f,n,s|u,d):p))return!1}}return!0}(r,e,t)}}(e):Ye(t=e)?(r=Je(t),function(e){return null==e?void 0:e[r]}):function(e){return function(t){return Ne(t,e)}}(t)
|
||
var t,r}function Fe(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||re,t!==n)return de(e)
|
||
var t,r,n,i=[]
|
||
for(var o in Object(e))ae.call(e,o)&&"constructor"!=o&&i.push(o)
|
||
return i}function ze(e){return nt(e)?e:$e(e)}Te.prototype.clear=function(){this.__data__=ve?ve(null):{}},Te.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Te.prototype.get=function(e){var t=this.__data__
|
||
if(ve){var r=t[e]
|
||
return r===a?void 0:r}return ae.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__
|
||
return ve?void 0!==t[e]:ae.call(t,e)},Te.prototype.set=function(e,t){return this.__data__[e]=ve&&void 0===t?a:t,this},Ie.prototype.clear=function(){this.__data__=[]},Ie.prototype.delete=function(e){var t=this.__data__,r=Be(t,e)
|
||
return!(r<0||(r==t.length-1?t.pop():he.call(t,r,1),0))},Ie.prototype.get=function(e){var t=this.__data__,r=Be(t,e)
|
||
return r<0?void 0:t[r][1]},Ie.prototype.has=function(e){return Be(this.__data__,e)>-1},Ie.prototype.set=function(e,t){var r=this.__data__,n=Be(r,e)
|
||
return n<0?r.push([e,t]):r[n][1]=t,this},Pe.prototype.clear=function(){this.__data__={hash:new Te,map:new(me||Ie),string:new Te}},Pe.prototype.delete=function(e){return He(this,e).delete(e)},Pe.prototype.get=function(e){return He(this,e).get(e)},Pe.prototype.has=function(e){return He(this,e).has(e)},Pe.prototype.set=function(e,t){return He(this,e).set(e,t),this},Me.prototype.add=Me.prototype.push=function(e){return this.__data__.set(e,a),this},Me.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.clear=function(){this.__data__=new Ie},Re.prototype.delete=function(e){return this.__data__.delete(e)},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var r=this.__data__
|
||
if(r instanceof Ie){var n=r.__data__
|
||
if(!me||n.length<i-1)return n.push([e,t]),this
|
||
r=this.__data__=new Pe(n)}return r.set(e,t),this}
|
||
var qe=ge&&1/X(new ge([,-0]))[1]==c?function(e){return new ge(e)}:function(){}
|
||
function Ve(e,t,r,n,i,o){var a=i&u,c=e.length,l=t.length
|
||
if(c!=l&&!(a&&l>c))return!1
|
||
var f=o.get(e)
|
||
if(f&&o.get(t))return f==t
|
||
var h=-1,d=!0,p=i&s?new Me:void 0
|
||
for(o.set(e,t),o.set(t,e);++h<c;){var m=e[h],y=t[h]
|
||
if(n)var g=a?n(y,m,h,t,e,o):n(m,y,h,e,t,o)
|
||
if(void 0!==g){if(g)continue
|
||
d=!1
|
||
break}if(p){if(!K(t,function(e,t){if(!p.has(t)&&(m===e||r(m,e,n,i,o)))return p.add(t)})){d=!1
|
||
break}}else if(m!==y&&!r(m,y,n,i,o)){d=!1
|
||
break}}return o.delete(e),o.delete(t),d}function He(e,t){var r,i,o=e.__data__
|
||
return("string"==(i=void 0===(r=t)?"undefined":n(r))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Ke(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t)
|
||
return De(r)?r:void 0}var We=function(e){return se.call(e)}
|
||
function Ge(e,t){return!!(t=null==t?l:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ye(e,t){if(nt(e))return!1
|
||
var r=void 0===e?"undefined":n(e)
|
||
return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ct(e))||(T.test(e)||!A.test(e)||null!=t&&e in Object(t))}function Qe(e){return e==e&&!st(e)}function Xe(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(pe&&We(new pe(new ArrayBuffer(1)))!=C||me&&We(new me)!=b||ye&&"[object Promise]"!=We(ye.resolve())||ge&&We(new ge)!=S||be&&"[object WeakMap]"!=We(new be))&&(We=function(e){var t=se.call(e),r=t==_?e.constructor:void 0,n=r?Ze(r):void 0
|
||
if(n)switch(n){case _e:return C
|
||
case we:return b
|
||
case Se:return"[object Promise]"
|
||
case Ee:return S
|
||
case ke:return"[object WeakMap]"}return t})
|
||
var $e=et(function(e){var t
|
||
e=null==(t=e)?"":function(e){if("string"==typeof e)return e
|
||
if(ct(e))return Ae?Ae.call(e):""
|
||
var t=e+""
|
||
return"0"==t&&1/e==-c?"-0":t}(t)
|
||
var r=[]
|
||
return I.test(e)&&r.push(""),e.replace(P,function(e,t,n,i){r.push(n?i.replace(M,"$1"):t||e)}),r})
|
||
function Je(e){if("string"==typeof e||ct(e))return e
|
||
var t=e+""
|
||
return"0"==t&&1/e==-c?"-0":t}function Ze(e){if(null!=e){try{return oe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function et(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(o)
|
||
var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache
|
||
if(o.has(i))return o.get(i)
|
||
var a=e.apply(this,n)
|
||
return r.cache=o.set(i,a),a}
|
||
return r.cache=new(et.Cache||Pe),r}function tt(e,t){return e===t||e!=e&&t!=t}function rt(e){return function(e){return ut(e)&&it(e)}(e)&&ae.call(e,"callee")&&(!fe.call(e,"callee")||se.call(e)==f)}et.Cache=Pe
|
||
var nt=Array.isArray
|
||
function it(e){return null!=e&&at(e.length)&&!ot(e)}function ot(e){var t=st(e)?se.call(e):""
|
||
return t==y||t==g}function at(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=l}function st(e){var t=void 0===e?"undefined":n(e)
|
||
return!!e&&("object"==t||"function"==t)}function ut(e){return!!e&&"object"==(void 0===e?"undefined":n(e))}function ct(e){return"symbol"==(void 0===e?"undefined":n(e))||ut(e)&&se.call(e)==k}var lt=q?function(e){return function(t){return e(t)}}(q):function(e){return ut(e)&&at(e.length)&&!!B[se.call(e)]}
|
||
function ft(e){return it(e)?Oe(e):Fe(e)}function ht(e){return e}t.exports=function(e,t){return e&&e.length?function(e,t,r){var n=-1,o=V,a=e.length,s=!0,u=[],c=u
|
||
if(r)s=!1,o=H
|
||
else if(a>=i){var l=t?null:qe(e)
|
||
if(l)return X(l)
|
||
s=!1,o=G,c=new Me}else c=t?[]:u
|
||
e:for(;++n<a;){var f=e[n],h=t?t(f):f
|
||
if(f=r||0!==f?f:0,s&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e
|
||
t&&c.push(h),u.push(f)}else o(c,h,r)||(c!==u&&c.push(h),u.push(f))}return u}(e,Ue(t)):[]}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],428:[function(e,t,r){"use strict"
|
||
var n=e("./_root").Symbol
|
||
t.exports=n},{"./_root":444}],429:[function(e,t,r){"use strict"
|
||
var n=e("./_baseTimes"),i=e("./isArguments"),o=e("./isArray"),a=e("./isBuffer"),s=e("./_isIndex"),u=e("./isTypedArray"),c=Object.prototype.hasOwnProperty
|
||
t.exports=function(e,t){var r=o(e),l=!r&&i(e),f=!r&&!l&&a(e),h=!r&&!l&&!f&&u(e),d=r||l||f||h,p=d?n(e.length,String):[],m=p.length
|
||
for(var y in e)!t&&!c.call(e,y)||d&&("length"==y||f&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,m))||p.push(y)
|
||
return p}},{"./_baseTimes":434,"./_isIndex":438,"./isArguments":445,"./isArray":446,"./isBuffer":448,"./isTypedArray":453}],430:[function(e,t,r){"use strict"
|
||
var n=e("./_Symbol"),i=e("./_getRawTag"),o=e("./_objectToString"),a="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0
|
||
t.exports=function(e){return null==e?void 0===e?s:a:u&&u in Object(e)?i(e):o(e)}},{"./_Symbol":428,"./_getRawTag":437,"./_objectToString":442}],431:[function(e,t,r){"use strict"
|
||
var n=e("./_baseGetTag"),i=e("./isObjectLike"),o="[object Arguments]"
|
||
t.exports=function(e){return i(e)&&n(e)==o}},{"./_baseGetTag":430,"./isObjectLike":452}],432:[function(e,t,r){"use strict"
|
||
var n=e("./_baseGetTag"),i=e("./isLength"),o=e("./isObjectLike"),a={}
|
||
a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(e){return o(e)&&i(e.length)&&!!a[n(e)]}},{"./_baseGetTag":430,"./isLength":450,"./isObjectLike":452}],433:[function(e,t,r){"use strict"
|
||
var n=e("./_isPrototype"),i=e("./_nativeKeys"),o=Object.prototype.hasOwnProperty
|
||
t.exports=function(e){if(!n(e))return i(e)
|
||
var t=[]
|
||
for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r)
|
||
return t}},{"./_isPrototype":439,"./_nativeKeys":440}],434:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r)
|
||
return n}},{}],435:[function(e,t,r){"use strict"
|
||
t.exports=function(e){return function(t){return e(t)}}},{}],436:[function(e,t,r){(function(e){"use strict"
|
||
var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"==(void 0===e?"undefined":r(e))&&e&&e.Object===Object&&e
|
||
t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],437:[function(e,t,r){"use strict"
|
||
var n=e("./_Symbol"),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0
|
||
t.exports=function(e){var t=o.call(e,s),r=e[s]
|
||
try{e[s]=void 0
|
||
var n=!0}catch(e){}var i=a.call(e)
|
||
return n&&(t?e[s]=r:delete e[s]),i}},{"./_Symbol":428}],438:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=9007199254740991,o=/^(?:0|[1-9]\d*)$/
|
||
t.exports=function(e,t){var r=void 0===e?"undefined":n(e)
|
||
return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&o.test(e))&&e>-1&&e%1==0&&e<t}},{}],439:[function(e,t,r){"use strict"
|
||
var n=Object.prototype
|
||
t.exports=function(e){var t=e&&e.constructor
|
||
return e===("function"==typeof t&&t.prototype||n)}},{}],440:[function(e,t,r){"use strict"
|
||
var n=e("./_overArg")(Object.keys,Object)
|
||
t.exports=n},{"./_overArg":443}],441:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./_freeGlobal"),o="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,a=o&&"object"==(void 0===t?"undefined":n(t))&&t&&!t.nodeType&&t,s=a&&a.exports===o&&i.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}()
|
||
t.exports=u},{"./_freeGlobal":436}],442:[function(e,t,r){"use strict"
|
||
var n=Object.prototype.toString
|
||
t.exports=function(e){return n.call(e)}},{}],443:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){return function(r){return e(t(r))}}},{}],444:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./_freeGlobal"),o="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,a=i||o||Function("return this")()
|
||
t.exports=a},{"./_freeGlobal":436}],445:[function(e,t,r){"use strict"
|
||
var n=e("./_baseIsArguments"),i=e("./isObjectLike"),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")}
|
||
t.exports=u},{"./_baseIsArguments":431,"./isObjectLike":452}],446:[function(e,t,r){"use strict"
|
||
var n=Array.isArray
|
||
t.exports=n},{}],447:[function(e,t,r){"use strict"
|
||
var n=e("./isFunction"),i=e("./isLength")
|
||
t.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},{"./isFunction":449,"./isLength":450}],448:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./_root"),o=e("./stubFalse"),a="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,s=a&&"object"==(void 0===t?"undefined":n(t))&&t&&!t.nodeType&&t,u=s&&s.exports===a?i.Buffer:void 0,c=(u?u.isBuffer:void 0)||o
|
||
t.exports=c},{"./_root":444,"./stubFalse":457}],449:[function(e,t,r){"use strict"
|
||
var n=e("./_baseGetTag"),i=e("./isObject"),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]"
|
||
t.exports=function(e){if(!i(e))return!1
|
||
var t=n(e)
|
||
return t==a||t==s||t==o||t==u}},{"./_baseGetTag":430,"./isObject":451}],450:[function(e,t,r){"use strict"
|
||
var n=9007199254740991
|
||
t.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},{}],451:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
t.exports=function(e){var t=void 0===e?"undefined":n(e)
|
||
return null!=e&&("object"==t||"function"==t)}},{}],452:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
t.exports=function(e){return null!=e&&"object"==(void 0===e?"undefined":n(e))}},{}],453:[function(e,t,r){"use strict"
|
||
var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),o=e("./_nodeUtil"),a=o&&o.isTypedArray,s=a?i(a):n
|
||
t.exports=s},{"./_baseIsTypedArray":432,"./_baseUnary":435,"./_nodeUtil":441}],454:[function(e,t,r){"use strict"
|
||
var n=e("./_arrayLikeKeys"),i=e("./_baseKeys"),o=e("./isArrayLike")
|
||
t.exports=function(e){return o(e)?n(e):i(e)}},{"./_arrayLikeKeys":429,"./_baseKeys":433,"./isArrayLike":447}],455:[function(e,t,r){(function(e){"use strict"
|
||
var n="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};(function(){var i,o=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="__lodash_hash_undefined__",c=500,l="__lodash_placeholder__",f=1,h=2,d=4,p=1,m=2,y=1,g=2,b=4,v=8,_=16,w=32,S=64,E=128,k=256,x=512,C=30,A="...",T=800,I=16,P=1,M=2,R=1/0,O=9007199254740991,B=1.7976931348623157e308,N=NaN,j=4294967295,L=j-1,D=j>>>1,U=[["ary",E],["bind",y],["bindKey",g],["curry",v],["curryRight",_],["flip",x],["partial",w],["partialRight",S],["rearg",k]],F="[object Arguments]",z="[object Array]",q="[object AsyncFunction]",V="[object Boolean]",H="[object Date]",K="[object DOMException]",W="[object Error]",G="[object Function]",Y="[object GeneratorFunction]",Q="[object Map]",X="[object Number]",$="[object Null]",J="[object Object]",Z="[object Proxy]",ee="[object RegExp]",te="[object Set]",re="[object String]",ne="[object Symbol]",ie="[object Undefined]",oe="[object WeakMap]",ae="[object WeakSet]",se="[object ArrayBuffer]",ue="[object DataView]",ce="[object Float32Array]",le="[object Float64Array]",fe="[object Int8Array]",he="[object Int16Array]",de="[object Int32Array]",pe="[object Uint8Array]",me="[object Uint8ClampedArray]",ye="[object Uint16Array]",ge="[object Uint32Array]",be=/\b__p \+= '';/g,ve=/\b(__p \+=) '' \+/g,_e=/(__e\(.*?\)|\b__t\)) \+\n'';/g,we=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Ee=RegExp(we.source),ke=RegExp(Se.source),xe=/<%-([\s\S]+?)%>/g,Ce=/<%([\s\S]+?)%>/g,Ae=/<%=([\s\S]+?)%>/g,Te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ie=/^\w*$/,Pe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Me=/[\\^$.*+?()[\]{}|]/g,Re=RegExp(Me.source),Oe=/^\s+|\s+$/g,Be=/^\s+/,Ne=/\s+$/,je=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Le=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,Ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Fe=/\\(\\)?/g,ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qe=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,He=/^0b[01]+$/i,Ke=/^\[object .+?Constructor\]$/,We=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Xe=/['\n\r\u2028\u2029\\]/g,$e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Je="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ze="[\\ud800-\\udfff]",et="["+Je+"]",tt="["+$e+"]",rt="\\d+",nt="[\\u2700-\\u27bf]",it="[a-z\\xdf-\\xf6\\xf8-\\xff]",ot="[^\\ud800-\\udfff"+Je+rt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",at="\\ud83c[\\udffb-\\udfff]",st="[^\\ud800-\\udfff]",ut="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",lt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ft="(?:"+it+"|"+ot+")",ht="(?:"+lt+"|"+ot+")",dt="(?:"+tt+"|"+at+")"+"?",pt="[\\ufe0e\\ufe0f]?"+dt+("(?:\\u200d(?:"+[st,ut,ct].join("|")+")[\\ufe0e\\ufe0f]?"+dt+")*"),mt="(?:"+[nt,ut,ct].join("|")+")"+pt,yt="(?:"+[st+tt+"?",tt,ut,ct,Ze].join("|")+")",gt=RegExp("['’]","g"),bt=RegExp(tt,"g"),vt=RegExp(at+"(?="+at+")|"+yt+pt,"g"),_t=RegExp([lt+"?"+it+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[et,lt,"$"].join("|")+")",ht+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[et,lt+ft,"$"].join("|")+")",lt+"?"+ft+"+(?:['’](?:d|ll|m|re|s|t|ve))?",lt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rt,mt].join("|"),"g"),wt=RegExp("[\\u200d\\ud800-\\udfff"+$e+"\\ufe0e\\ufe0f]"),St=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Et=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kt=-1,xt={}
|
||
xt[ce]=xt[le]=xt[fe]=xt[he]=xt[de]=xt[pe]=xt[me]=xt[ye]=xt[ge]=!0,xt[F]=xt[z]=xt[se]=xt[V]=xt[ue]=xt[H]=xt[W]=xt[G]=xt[Q]=xt[X]=xt[J]=xt[ee]=xt[te]=xt[re]=xt[oe]=!1
|
||
var Ct={}
|
||
Ct[F]=Ct[z]=Ct[se]=Ct[ue]=Ct[V]=Ct[H]=Ct[ce]=Ct[le]=Ct[fe]=Ct[he]=Ct[de]=Ct[Q]=Ct[X]=Ct[J]=Ct[ee]=Ct[te]=Ct[re]=Ct[ne]=Ct[pe]=Ct[me]=Ct[ye]=Ct[ge]=!0,Ct[W]=Ct[G]=Ct[oe]=!1
|
||
var At={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Tt=parseFloat,It=parseInt,Pt="object"==(void 0===e?"undefined":n(e))&&e&&e.Object===Object&&e,Mt="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,Rt=Pt||Mt||Function("return this")(),Ot="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,Bt=Ot&&"object"==(void 0===t?"undefined":n(t))&&t&&!t.nodeType&&t,Nt=Bt&&Bt.exports===Ot,jt=Nt&&Pt.process,Lt=function(){try{return jt&&jt.binding&&jt.binding("util")}catch(e){}}(),Dt=Lt&&Lt.isArrayBuffer,Ut=Lt&&Lt.isDate,Ft=Lt&&Lt.isMap,zt=Lt&&Lt.isRegExp,qt=Lt&&Lt.isSet,Vt=Lt&&Lt.isTypedArray
|
||
function Ht(e,t,r){switch(r.length){case 0:return e.call(t)
|
||
case 1:return e.call(t,r[0])
|
||
case 2:return e.call(t,r[0],r[1])
|
||
case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Kt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i]
|
||
t(n,a,r(a),e)}return n}function Wt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Gt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Yt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1
|
||
return!0}function Qt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r]
|
||
t(a,r,e)&&(o[i++]=a)}return o}function Xt(e,t){return!!(null==e?0:e.length)&&ar(e,t,0)>-1}function $t(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0
|
||
return!1}function Jt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e)
|
||
return i}function Zt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r]
|
||
return e}function er(e,t,r,n){var i=-1,o=null==e?0:e.length
|
||
for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e)
|
||
return r}function tr(e,t,r,n){var i=null==e?0:e.length
|
||
for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e)
|
||
return r}function rr(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0
|
||
return!1}var nr=lr("length")
|
||
function ir(e,t,r){var n
|
||
return r(e,function(e,r,i){if(t(e,r,i))return n=r,!1}),n}function or(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o
|
||
return-1}function ar(e,t,r){return t==t?function(e,t,r){var n=r-1,i=e.length
|
||
for(;++n<i;)if(e[n]===t)return n
|
||
return-1}(e,t,r):or(e,ur,r)}function sr(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i
|
||
return-1}function ur(e){return e!=e}function cr(e,t){var r=null==e?0:e.length
|
||
return r?dr(e,t)/r:N}function lr(e){return function(t){return null==t?i:t[e]}}function fr(e){return function(t){return null==e?i:e[t]}}function hr(e,t,r,n,i){return i(e,function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)}),r}function dr(e,t){for(var r,n=-1,o=e.length;++n<o;){var a=t(e[n])
|
||
a!==i&&(r=r===i?a:r+a)}return r}function pr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r)
|
||
return n}function mr(e){return function(t){return e(t)}}function yr(e,t){return Jt(t,function(t){return e[t]})}function gr(e,t){return e.has(t)}function br(e,t){for(var r=-1,n=e.length;++r<n&&ar(t,e[r],0)>-1;);return r}function vr(e,t){for(var r=e.length;r--&&ar(t,e[r],0)>-1;);return r}var _r=fr({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),wr=fr({"&":"&","<":"<",">":">",'"':""","'":"'"})
|
||
function Sr(e){return"\\"+At[e]}function Er(e){return wt.test(e)}function kr(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e,n){r[++t]=[n,e]}),r}function xr(e,t){return function(r){return e(t(r))}}function Cr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r]
|
||
a!==t&&a!==l||(e[r]=l,o[i++]=r)}return o}function Ar(e,t){return"__proto__"==t?i:e[t]}function Tr(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e){r[++t]=e}),r}function Ir(e){var t=-1,r=Array(e.size)
|
||
return e.forEach(function(e){r[++t]=[e,e]}),r}function Pr(e){return Er(e)?function(e){var t=vt.lastIndex=0
|
||
for(;vt.test(e);)++t
|
||
return t}(e):nr(e)}function Mr(e){return Er(e)?function(e){return e.match(vt)||[]}(e):function(e){return e.split("")}(e)}var Rr=fr({"&":"&","<":"<",">":">",""":'"',"'":"'"})
|
||
var Or=function e(t){var r,$e=(t=null==t?Rt:Or.defaults(Rt.Object(),t,Or.pick(Rt,Et))).Array,Je=t.Date,Ze=t.Error,et=t.Function,tt=t.Math,rt=t.Object,nt=t.RegExp,it=t.String,ot=t.TypeError,at=$e.prototype,st=et.prototype,ut=rt.prototype,ct=t["__core-js_shared__"],lt=st.toString,ft=ut.hasOwnProperty,ht=0,dt=(r=/[^.]+$/.exec(ct&&ct.keys&&ct.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",pt=ut.toString,mt=lt.call(rt),yt=Rt._,vt=nt("^"+lt.call(ft).replace(Me,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wt=Nt?t.Buffer:i,At=t.Symbol,Pt=t.Uint8Array,Mt=wt?wt.allocUnsafe:i,Ot=xr(rt.getPrototypeOf,rt),Bt=rt.create,jt=ut.propertyIsEnumerable,Lt=at.splice,nr=At?At.isConcatSpreadable:i,fr=At?At.iterator:i,Br=At?At.toStringTag:i,Nr=function(){try{var e=zo(rt,"defineProperty")
|
||
return e({},"",{}),e}catch(e){}}(),jr=t.clearTimeout!==Rt.clearTimeout&&t.clearTimeout,Lr=Je&&Je.now!==Rt.Date.now&&Je.now,Dr=t.setTimeout!==Rt.setTimeout&&t.setTimeout,Ur=tt.ceil,Fr=tt.floor,zr=rt.getOwnPropertySymbols,qr=wt?wt.isBuffer:i,Vr=t.isFinite,Hr=at.join,Kr=xr(rt.keys,rt),Wr=tt.max,Gr=tt.min,Yr=Je.now,Qr=t.parseInt,Xr=tt.random,$r=at.reverse,Jr=zo(t,"DataView"),Zr=zo(t,"Map"),en=zo(t,"Promise"),tn=zo(t,"Set"),rn=zo(t,"WeakMap"),nn=zo(rt,"create"),on=rn&&new rn,an={},sn=ha(Jr),un=ha(Zr),cn=ha(en),ln=ha(tn),fn=ha(rn),hn=At?At.prototype:i,dn=hn?hn.valueOf:i,pn=hn?hn.toString:i
|
||
function mn(e){if(Is(e)&&!bs(e)&&!(e instanceof vn)){if(e instanceof bn)return e
|
||
if(ft.call(e,"__wrapped__"))return da(e)}return new bn(e)}var yn=function(){function e(){}return function(t){if(!Ts(t))return{}
|
||
if(Bt)return Bt(t)
|
||
e.prototype=t
|
||
var r=new e
|
||
return e.prototype=i,r}}()
|
||
function gn(){}function bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function _n(e){var t=-1,r=null==e?0:e.length
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function wn(e){var t=-1,r=null==e?0:e.length
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function Sn(e){var t=-1,r=null==e?0:e.length
|
||
for(this.clear();++t<r;){var n=e[t]
|
||
this.set(n[0],n[1])}}function En(e){var t=-1,r=null==e?0:e.length
|
||
for(this.__data__=new Sn;++t<r;)this.add(e[t])}function kn(e){var t=this.__data__=new wn(e)
|
||
this.size=t.size}function xn(e,t){var r=bs(e),n=!r&&gs(e),i=!r&&!n&&Ss(e),o=!r&&!n&&!i&&Ls(e),a=r||n||i||o,s=a?pr(e.length,it):[],u=s.length
|
||
for(var c in e)!t&&!ft.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Yo(c,u))||s.push(c)
|
||
return s}function Cn(e){var t=e.length
|
||
return t?e[Ei(0,t-1)]:i}function An(e,t){return ca(io(e),jn(t,0,e.length))}function Tn(e){return ca(io(e))}function In(e,t,r){(r===i||ps(e[t],r))&&(r!==i||t in e)||Bn(e,t,r)}function Pn(e,t,r){var n=e[t]
|
||
ft.call(e,t)&&ps(n,r)&&(r!==i||t in e)||Bn(e,t,r)}function Mn(e,t){for(var r=e.length;r--;)if(ps(e[r][0],t))return r
|
||
return-1}function Rn(e,t,r,n){return zn(e,function(e,i,o){t(n,e,r(e),o)}),n}function On(e,t){return e&&oo(t,ou(t),e)}function Bn(e,t,r){"__proto__"==t&&Nr?Nr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Nn(e,t){for(var r=-1,n=t.length,o=$e(n),a=null==e;++r<n;)o[r]=a?i:eu(e,t[r])
|
||
return o}function jn(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function Ln(e,t,r,n,o,a){var s,u=t&f,c=t&h,l=t&d
|
||
if(r&&(s=o?r(e,n,o,a):r(e)),s!==i)return s
|
||
if(!Ts(e))return e
|
||
var p=bs(e)
|
||
if(p){if(s=function(e){var t=e.length,r=new e.constructor(t)
|
||
return t&&"string"==typeof e[0]&&ft.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return io(e,s)}else{var m=Ho(e),y=m==G||m==Y
|
||
if(Ss(e))return Ji(e,u)
|
||
if(m==J||m==F||y&&!o){if(s=c||y?{}:Wo(e),!u)return c?function(e,t){return oo(e,Vo(e),t)}(e,function(e,t){return e&&oo(t,au(t),e)}(s,e)):function(e,t){return oo(e,qo(e),t)}(e,On(s,e))}else{if(!Ct[m])return o?e:{}
|
||
s=function(e,t,r){var n,i,o,a=e.constructor
|
||
switch(t){case se:return Zi(e)
|
||
case V:case H:return new a(+e)
|
||
case ue:return function(e,t){var r=t?Zi(e.buffer):e.buffer
|
||
return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r)
|
||
case ce:case le:case fe:case he:case de:case pe:case me:case ye:case ge:return eo(e,r)
|
||
case Q:return new a
|
||
case X:case re:return new a(e)
|
||
case ee:return(o=new(i=e).constructor(i.source,qe.exec(i))).lastIndex=i.lastIndex,o
|
||
case te:return new a
|
||
case ne:return n=e,dn?rt(dn.call(n)):{}}}(e,m,u)}}a||(a=new kn)
|
||
var g=a.get(e)
|
||
if(g)return g
|
||
if(a.set(e,s),Bs(e))return e.forEach(function(n){s.add(Ln(n,t,r,n,e,a))}),s
|
||
if(Ps(e))return e.forEach(function(n,i){s.set(i,Ln(n,t,r,i,e,a))}),s
|
||
var b=p?i:(l?c?Bo:Oo:c?au:ou)(e)
|
||
return Wt(b||e,function(n,i){b&&(n=e[i=n]),Pn(s,i,Ln(n,t,r,i,e,a))}),s}function Dn(e,t,r){var n=r.length
|
||
if(null==e)return!n
|
||
for(e=rt(e);n--;){var o=r[n],a=t[o],s=e[o]
|
||
if(s===i&&!(o in e)||!a(s))return!1}return!0}function Un(e,t,r){if("function"!=typeof e)throw new ot(s)
|
||
return oa(function(){e.apply(i,r)},t)}function Fn(e,t,r,n){var i=-1,a=Xt,s=!0,u=e.length,c=[],l=t.length
|
||
if(!u)return c
|
||
r&&(t=Jt(t,mr(r))),n?(a=$t,s=!1):t.length>=o&&(a=gr,s=!1,t=new En(t))
|
||
e:for(;++i<u;){var f=e[i],h=null==r?f:r(f)
|
||
if(f=n||0!==f?f:0,s&&h==h){for(var d=l;d--;)if(t[d]===h)continue e
|
||
c.push(f)}else a(t,h,n)||c.push(f)}return c}mn.templateSettings={escape:xe,evaluate:Ce,interpolate:Ae,variable:"",imports:{_:mn}},mn.prototype=gn.prototype,mn.prototype.constructor=mn,bn.prototype=yn(gn.prototype),bn.prototype.constructor=bn,vn.prototype=yn(gn.prototype),vn.prototype.constructor=vn,_n.prototype.clear=function(){this.__data__=nn?nn(null):{},this.size=0},_n.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e]
|
||
return this.size-=t?1:0,t},_n.prototype.get=function(e){var t=this.__data__
|
||
if(nn){var r=t[e]
|
||
return r===u?i:r}return ft.call(t,e)?t[e]:i},_n.prototype.has=function(e){var t=this.__data__
|
||
return nn?t[e]!==i:ft.call(t,e)},_n.prototype.set=function(e,t){var r=this.__data__
|
||
return this.size+=this.has(e)?0:1,r[e]=nn&&t===i?u:t,this},wn.prototype.clear=function(){this.__data__=[],this.size=0},wn.prototype.delete=function(e){var t=this.__data__,r=Mn(t,e)
|
||
return!(r<0||(r==t.length-1?t.pop():Lt.call(t,r,1),--this.size,0))},wn.prototype.get=function(e){var t=this.__data__,r=Mn(t,e)
|
||
return r<0?i:t[r][1]},wn.prototype.has=function(e){return Mn(this.__data__,e)>-1},wn.prototype.set=function(e,t){var r=this.__data__,n=Mn(r,e)
|
||
return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Sn.prototype.clear=function(){this.size=0,this.__data__={hash:new _n,map:new(Zr||wn),string:new _n}},Sn.prototype.delete=function(e){var t=Uo(this,e).delete(e)
|
||
return this.size-=t?1:0,t},Sn.prototype.get=function(e){return Uo(this,e).get(e)},Sn.prototype.has=function(e){return Uo(this,e).has(e)},Sn.prototype.set=function(e,t){var r=Uo(this,e),n=r.size
|
||
return r.set(e,t),this.size+=r.size==n?0:1,this},En.prototype.add=En.prototype.push=function(e){return this.__data__.set(e,u),this},En.prototype.has=function(e){return this.__data__.has(e)},kn.prototype.clear=function(){this.__data__=new wn,this.size=0},kn.prototype.delete=function(e){var t=this.__data__,r=t.delete(e)
|
||
return this.size=t.size,r},kn.prototype.get=function(e){return this.__data__.get(e)},kn.prototype.has=function(e){return this.__data__.has(e)},kn.prototype.set=function(e,t){var r=this.__data__
|
||
if(r instanceof wn){var n=r.__data__
|
||
if(!Zr||n.length<o-1)return n.push([e,t]),this.size=++r.size,this
|
||
r=this.__data__=new Sn(n)}return r.set(e,t),this.size=r.size,this}
|
||
var zn=uo(Qn),qn=uo(Xn,!0)
|
||
function Vn(e,t){var r=!0
|
||
return zn(e,function(e,n,i){return r=!!t(e,n,i)}),r}function Hn(e,t,r){for(var n=-1,o=e.length;++n<o;){var a=e[n],s=t(a)
|
||
if(null!=s&&(u===i?s==s&&!js(s):r(s,u)))var u=s,c=a}return c}function Kn(e,t){var r=[]
|
||
return zn(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}function Wn(e,t,r,n,i){var o=-1,a=e.length
|
||
for(r||(r=Go),i||(i=[]);++o<a;){var s=e[o]
|
||
t>0&&r(s)?t>1?Wn(s,t-1,r,n,i):Zt(i,s):n||(i[i.length]=s)}return i}var Gn=co(),Yn=co(!0)
|
||
function Qn(e,t){return e&&Gn(e,t,ou)}function Xn(e,t){return e&&Yn(e,t,ou)}function $n(e,t){return Qt(t,function(t){return xs(e[t])})}function Jn(e,t){for(var r=0,n=(t=Yi(t,e)).length;null!=e&&r<n;)e=e[fa(t[r++])]
|
||
return r&&r==n?e:i}function Zn(e,t,r){var n=t(e)
|
||
return bs(e)?n:Zt(n,r(e))}function ei(e){return null==e?e===i?ie:$:Br&&Br in rt(e)?function(e){var t=ft.call(e,Br),r=e[Br]
|
||
try{e[Br]=i
|
||
var n=!0}catch(e){}var o=pt.call(e)
|
||
return n&&(t?e[Br]=r:delete e[Br]),o}(e):function(e){return pt.call(e)}(e)}function ti(e,t){return e>t}function ri(e,t){return null!=e&&ft.call(e,t)}function ni(e,t){return null!=e&&t in rt(e)}function ii(e,t,r){for(var n=r?$t:Xt,o=e[0].length,a=e.length,s=a,u=$e(a),c=1/0,l=[];s--;){var f=e[s]
|
||
s&&t&&(f=Jt(f,mr(t))),c=Gr(f.length,c),u[s]=!r&&(t||o>=120&&f.length>=120)?new En(s&&f):i}f=e[0]
|
||
var h=-1,d=u[0]
|
||
e:for(;++h<o&&l.length<c;){var p=f[h],m=t?t(p):p
|
||
if(p=r||0!==p?p:0,!(d?gr(d,m):n(l,m,r))){for(s=a;--s;){var y=u[s]
|
||
if(!(y?gr(y,m):n(e[s],m,r)))continue e}d&&d.push(m),l.push(p)}}return l}function oi(e,t,r){var n=null==(e=na(e,t=Yi(t,e)))?e:e[fa(ka(t))]
|
||
return null==n?i:Ht(n,e,r)}function ai(e){return Is(e)&&ei(e)==F}function si(e,t,r,n,o){return e===t||(null==e||null==t||!Is(e)&&!Is(t)?e!=e&&t!=t:function(e,t,r,n,o,a){var s=bs(e),u=bs(t),c=s?z:Ho(e),l=u?z:Ho(t),f=(c=c==F?J:c)==J,h=(l=l==F?J:l)==J,d=c==l
|
||
if(d&&Ss(e)){if(!Ss(t))return!1
|
||
s=!0,f=!1}if(d&&!f)return a||(a=new kn),s||Ls(e)?Mo(e,t,r,n,o,a):function(e,t,r,n,i,o,a){switch(r){case ue:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1
|
||
e=e.buffer,t=t.buffer
|
||
case se:return!(e.byteLength!=t.byteLength||!o(new Pt(e),new Pt(t)))
|
||
case V:case H:case X:return ps(+e,+t)
|
||
case W:return e.name==t.name&&e.message==t.message
|
||
case ee:case re:return e==t+""
|
||
case Q:var s=kr
|
||
case te:var u=n&p
|
||
if(s||(s=Tr),e.size!=t.size&&!u)return!1
|
||
var c=a.get(e)
|
||
if(c)return c==t
|
||
n|=m,a.set(e,t)
|
||
var l=Mo(s(e),s(t),n,i,o,a)
|
||
return a.delete(e),l
|
||
case ne:if(dn)return dn.call(e)==dn.call(t)}return!1}(e,t,c,r,n,o,a)
|
||
if(!(r&p)){var y=f&&ft.call(e,"__wrapped__"),g=h&&ft.call(t,"__wrapped__")
|
||
if(y||g){var b=y?e.value():e,v=g?t.value():t
|
||
return a||(a=new kn),o(b,v,r,n,a)}}return!!d&&(a||(a=new kn),function(e,t,r,n,o,a){var s=r&p,u=Oo(e),c=u.length,l=Oo(t).length
|
||
if(c!=l&&!s)return!1
|
||
for(var f=c;f--;){var h=u[f]
|
||
if(!(s?h in t:ft.call(t,h)))return!1}var d=a.get(e)
|
||
if(d&&a.get(t))return d==t
|
||
var m=!0
|
||
a.set(e,t),a.set(t,e)
|
||
for(var y=s;++f<c;){h=u[f]
|
||
var g=e[h],b=t[h]
|
||
if(n)var v=s?n(b,g,h,t,e,a):n(g,b,h,e,t,a)
|
||
if(!(v===i?g===b||o(g,b,r,n,a):v)){m=!1
|
||
break}y||(y="constructor"==h)}if(m&&!y){var _=e.constructor,w=t.constructor
|
||
_!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(m=!1)}return a.delete(e),a.delete(t),m}(e,t,r,n,o,a))}(e,t,r,n,si,o))}function ui(e,t,r,n){var o=r.length,a=o,s=!n
|
||
if(null==e)return!a
|
||
for(e=rt(e);o--;){var u=r[o]
|
||
if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=r[o])[0],l=e[c],f=u[1]
|
||
if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var h=new kn
|
||
if(n)var d=n(l,f,c,e,t,h)
|
||
if(!(d===i?si(f,l,p|m,n,h):d))return!1}}return!0}function ci(e){return!(!Ts(e)||dt&&dt in e)&&(xs(e)?vt:Ke).test(ha(e))}function li(e){return"function"==typeof e?e:null==e?Mu:"object"==(void 0===e?"undefined":n(e))?bs(e)?yi(e[0],e[1]):mi(e):Fu(e)}function fi(e){if(!Zo(e))return Kr(e)
|
||
var t=[]
|
||
for(var r in rt(e))ft.call(e,r)&&"constructor"!=r&&t.push(r)
|
||
return t}function hi(e){if(!Ts(e))return function(e){var t=[]
|
||
if(null!=e)for(var r in rt(e))t.push(r)
|
||
return t}(e)
|
||
var t=Zo(e),r=[]
|
||
for(var n in e)("constructor"!=n||!t&&ft.call(e,n))&&r.push(n)
|
||
return r}function di(e,t){return e<t}function pi(e,t){var r=-1,n=_s(e)?$e(e.length):[]
|
||
return zn(e,function(e,i,o){n[++r]=t(e,i,o)}),n}function mi(e){var t=Fo(e)
|
||
return 1==t.length&&t[0][2]?ta(t[0][0],t[0][1]):function(r){return r===e||ui(r,e,t)}}function yi(e,t){return Xo(e)&&ea(t)?ta(fa(e),t):function(r){var n=eu(r,e)
|
||
return n===i&&n===t?tu(r,e):si(t,n,p|m)}}function gi(e,t,r,n,o){e!==t&&Gn(t,function(a,s){if(Ts(a))o||(o=new kn),function(e,t,r,n,o,a,s){var u=Ar(e,r),c=Ar(t,r),l=s.get(c)
|
||
if(l)In(e,r,l)
|
||
else{var f=a?a(u,c,r+"",e,t,s):i,h=f===i
|
||
if(h){var d=bs(c),p=!d&&Ss(c),m=!d&&!p&&Ls(c)
|
||
f=c,d||p||m?bs(u)?f=u:ws(u)?f=io(u):p?(h=!1,f=Ji(c,!0)):m?(h=!1,f=eo(c,!0)):f=[]:Rs(c)||gs(c)?(f=u,gs(u)?f=Ks(u):(!Ts(u)||n&&xs(u))&&(f=Wo(c))):h=!1}h&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),In(e,r,f)}}(e,t,s,r,gi,n,o)
|
||
else{var u=n?n(Ar(e,s),a,s+"",e,t,o):i
|
||
u===i&&(u=a),In(e,s,u)}},au)}function bi(e,t){var r=e.length
|
||
if(r)return Yo(t+=t<0?r:0,r)?e[t]:i}function vi(e,t,r){var n=-1
|
||
return t=Jt(t.length?t:[Mu],mr(Do())),function(e,t){var r=e.length
|
||
for(e.sort(t);r--;)e[r]=e[r].value
|
||
return e}(pi(e,function(e,r,i){return{criteria:Jt(t,function(t){return t(e)}),index:++n,value:e}}),function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var u=to(i[n],o[n])
|
||
if(u){if(n>=s)return u
|
||
var c=r[n]
|
||
return u*("desc"==c?-1:1)}}return e.index-t.index}(e,t,r)})}function _i(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Jn(e,a)
|
||
r(s,a)&&Ti(o,Yi(a,e),s)}return o}function wi(e,t,r,n){var i=n?sr:ar,o=-1,a=t.length,s=e
|
||
for(e===t&&(t=io(t)),r&&(s=Jt(e,mr(r)));++o<a;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(s,l,u,n))>-1;)s!==e&&Lt.call(s,u,1),Lt.call(e,u,1)
|
||
return e}function Si(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r]
|
||
if(r==n||i!==o){var o=i
|
||
Yo(i)?Lt.call(e,i,1):Fi(e,i)}}return e}function Ei(e,t){return e+Fr(Xr()*(t-e+1))}function ki(e,t){var r=""
|
||
if(!e||t<1||t>O)return r
|
||
do{t%2&&(r+=e),(t=Fr(t/2))&&(e+=e)}while(t)
|
||
return r}function xi(e,t){return aa(ra(e,t,Mu),e+"")}function Ci(e){return Cn(pu(e))}function Ai(e,t){var r=pu(e)
|
||
return ca(r,jn(t,0,r.length))}function Ti(e,t,r,n){if(!Ts(e))return e
|
||
for(var o=-1,a=(t=Yi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=fa(t[o]),l=r
|
||
if(o!=s){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Ts(f)?f:Yo(t[o+1])?[]:{})}Pn(u,c,l),u=u[c]}return e}var Ii=on?function(e,t){return on.set(e,t),e}:Mu,Pi=Nr?function(e,t){return Nr(e,"toString",{configurable:!0,enumerable:!1,value:Tu(t),writable:!0})}:Mu
|
||
function Mi(e){return ca(pu(e))}function Ri(e,t,r){var n=-1,i=e.length
|
||
t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0
|
||
for(var o=$e(i);++n<i;)o[n]=e[n+t]
|
||
return o}function Oi(e,t){var r
|
||
return zn(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}function Bi(e,t,r){var n=0,i=null==e?n:e.length
|
||
if("number"==typeof t&&t==t&&i<=D){for(;n<i;){var o=n+i>>>1,a=e[o]
|
||
null!==a&&!js(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return Ni(e,t,Mu,r)}function Ni(e,t,r,n){t=r(t)
|
||
for(var o=0,a=null==e?0:e.length,s=t!=t,u=null===t,c=js(t),l=t===i;o<a;){var f=Fr((o+a)/2),h=r(e[f]),d=h!==i,p=null===h,m=h==h,y=js(h)
|
||
if(s)var g=n||m
|
||
else g=l?m&&(n||d):u?m&&d&&(n||!p):c?m&&d&&!p&&(n||!y):!p&&!y&&(n?h<=t:h<t)
|
||
g?o=f+1:a=f}return Gr(a,L)}function ji(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a
|
||
if(!r||!ps(s,u)){var u=s
|
||
o[i++]=0===a?0:a}}return o}function Li(e){return"number"==typeof e?e:js(e)?N:+e}function Di(e){if("string"==typeof e)return e
|
||
if(bs(e))return Jt(e,Di)+""
|
||
if(js(e))return pn?pn.call(e):""
|
||
var t=e+""
|
||
return"0"==t&&1/e==-R?"-0":t}function Ui(e,t,r){var n=-1,i=Xt,a=e.length,s=!0,u=[],c=u
|
||
if(r)s=!1,i=$t
|
||
else if(a>=o){var l=t?null:xo(e)
|
||
if(l)return Tr(l)
|
||
s=!1,i=gr,c=new En}else c=t?[]:u
|
||
e:for(;++n<a;){var f=e[n],h=t?t(f):f
|
||
if(f=r||0!==f?f:0,s&&h==h){for(var d=c.length;d--;)if(c[d]===h)continue e
|
||
t&&c.push(h),u.push(f)}else i(c,h,r)||(c!==u&&c.push(h),u.push(f))}return u}function Fi(e,t){return null==(e=na(e,t=Yi(t,e)))||delete e[fa(ka(t))]}function zi(e,t,r,n){return Ti(e,t,r(Jn(e,t)),n)}function qi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?Ri(e,n?0:o,n?o+1:i):Ri(e,n?o+1:0,n?i:o)}function Vi(e,t){var r=e
|
||
return r instanceof vn&&(r=r.value()),er(t,function(e,t){return t.func.apply(t.thisArg,Zt([e],t.args))},r)}function Hi(e,t,r){var n=e.length
|
||
if(n<2)return n?Ui(e[0]):[]
|
||
for(var i=-1,o=$e(n);++i<n;)for(var a=e[i],s=-1;++s<n;)s!=i&&(o[i]=Fn(o[i]||a,e[s],t,r))
|
||
return Ui(Wn(o,1),t,r)}function Ki(e,t,r){for(var n=-1,o=e.length,a=t.length,s={};++n<o;){var u=n<a?t[n]:i
|
||
r(s,e[n],u)}return s}function Wi(e){return ws(e)?e:[]}function Gi(e){return"function"==typeof e?e:Mu}function Yi(e,t){return bs(e)?e:Xo(e,t)?[e]:la(Ws(e))}var Qi=xi
|
||
function Xi(e,t,r){var n=e.length
|
||
return r=r===i?n:r,!t&&r>=n?e:Ri(e,t,r)}var $i=jr||function(e){return Rt.clearTimeout(e)}
|
||
function Ji(e,t){if(t)return e.slice()
|
||
var r=e.length,n=Mt?Mt(r):new e.constructor(r)
|
||
return e.copy(n),n}function Zi(e){var t=new e.constructor(e.byteLength)
|
||
return new Pt(t).set(new Pt(e)),t}function eo(e,t){var r=t?Zi(e.buffer):e.buffer
|
||
return new e.constructor(r,e.byteOffset,e.length)}function to(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,a=js(e),s=t!==i,u=null===t,c=t==t,l=js(t)
|
||
if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||n&&s&&c||!r&&c||!o)return 1
|
||
if(!n&&!a&&!l&&e<t||l&&r&&o&&!n&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function ro(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,u=t.length,c=Wr(o-a,0),l=$e(u+c),f=!n;++s<u;)l[s]=t[s]
|
||
for(;++i<a;)(f||i<o)&&(l[r[i]]=e[i])
|
||
for(;c--;)l[s++]=e[i++]
|
||
return l}function no(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,u=-1,c=t.length,l=Wr(o-s,0),f=$e(l+c),h=!n;++i<l;)f[i]=e[i]
|
||
for(var d=i;++u<c;)f[d+u]=t[u]
|
||
for(;++a<s;)(h||i<o)&&(f[d+r[a]]=e[i++])
|
||
return f}function io(e,t){var r=-1,n=e.length
|
||
for(t||(t=$e(n));++r<n;)t[r]=e[r]
|
||
return t}function oo(e,t,r,n){var o=!r
|
||
r||(r={})
|
||
for(var a=-1,s=t.length;++a<s;){var u=t[a],c=n?n(r[u],e[u],u,r,e):i
|
||
c===i&&(c=e[u]),o?Bn(r,u,c):Pn(r,u,c)}return r}function ao(e,t){return function(r,n){var i=bs(r)?Kt:Rn,o=t?t():{}
|
||
return i(r,e,Do(n,2),o)}}function so(e){return xi(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,s=o>2?r[2]:i
|
||
for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&Qo(r[0],r[1],s)&&(a=o<3?i:a,o=1),t=rt(t);++n<o;){var u=r[n]
|
||
u&&e(t,u,n,a)}return t})}function uo(e,t){return function(r,n){if(null==r)return r
|
||
if(!_s(r))return e(r,n)
|
||
for(var i=r.length,o=t?i:-1,a=rt(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function co(e){return function(t,r,n){for(var i=-1,o=rt(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i]
|
||
if(!1===r(o[u],u,o))break}return t}}function lo(e){return function(t){var r=Er(t=Ws(t))?Mr(t):i,n=r?r[0]:t.charAt(0),o=r?Xi(r,1).join(""):t.slice(1)
|
||
return n[e]()+o}}function fo(e){return function(t){return er(xu(gu(t).replace(gt,"")),e,"")}}function ho(e){return function(){var t=arguments
|
||
switch(t.length){case 0:return new e
|
||
case 1:return new e(t[0])
|
||
case 2:return new e(t[0],t[1])
|
||
case 3:return new e(t[0],t[1],t[2])
|
||
case 4:return new e(t[0],t[1],t[2],t[3])
|
||
case 5:return new e(t[0],t[1],t[2],t[3],t[4])
|
||
case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5])
|
||
case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=yn(e.prototype),n=e.apply(r,t)
|
||
return Ts(n)?n:r}}function po(e){return function(t,r,n){var o=rt(t)
|
||
if(!_s(t)){var a=Do(r,3)
|
||
t=ou(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,n)
|
||
return s>-1?o[a?t[s]:s]:i}}function mo(e){return Ro(function(t){var r=t.length,n=r,o=bn.prototype.thru
|
||
for(e&&t.reverse();n--;){var a=t[n]
|
||
if("function"!=typeof a)throw new ot(s)
|
||
if(o&&!u&&"wrapper"==jo(a))var u=new bn([],!0)}for(n=u?n:r;++n<r;){var c=jo(a=t[n]),l="wrapper"==c?No(a):i
|
||
u=l&&$o(l[0])&&l[1]==(E|v|w|k)&&!l[4].length&&1==l[9]?u[jo(l[0])].apply(u,l[3]):1==a.length&&$o(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0]
|
||
if(u&&1==e.length&&bs(n))return u.plant(n).value()
|
||
for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o)
|
||
return o}})}function yo(e,t,r,n,o,a,s,u,c,l){var f=t&E,h=t&y,d=t&g,p=t&(v|_),m=t&x,b=d?i:ho(e)
|
||
return function y(){for(var g=arguments.length,v=$e(g),_=g;_--;)v[_]=arguments[_]
|
||
if(p)var w=Lo(y),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n
|
||
return n}(v,w)
|
||
if(n&&(v=ro(v,n,o,p)),a&&(v=no(v,a,s,p)),g-=S,p&&g<l){var E=Cr(v,w)
|
||
return Eo(e,t,yo,y.placeholder,r,v,E,u,c,l-g)}var k=h?r:this,x=d?k[e]:e
|
||
return g=v.length,u?v=function(e,t){for(var r=e.length,n=Gr(t.length,r),o=io(e);n--;){var a=t[n]
|
||
e[n]=Yo(a,r)?o[a]:i}return e}(v,u):m&&g>1&&v.reverse(),f&&c<g&&(v.length=c),this&&this!==Rt&&this instanceof y&&(x=b||ho(x)),x.apply(k,v)}}function go(e,t){return function(r,n){return function(e,t,r,n){return Qn(e,function(e,i,o){t(n,r(e),i,o)}),n}(r,e,t(n),{})}}function bo(e,t){return function(r,n){var o
|
||
if(r===i&&n===i)return t
|
||
if(r!==i&&(o=r),n!==i){if(o===i)return n
|
||
"string"==typeof r||"string"==typeof n?(r=Di(r),n=Di(n)):(r=Li(r),n=Li(n)),o=e(r,n)}return o}}function vo(e){return Ro(function(t){return t=Jt(t,mr(Do())),xi(function(r){var n=this
|
||
return e(t,function(e){return Ht(e,n,r)})})})}function _o(e,t){var r=(t=t===i?" ":Di(t)).length
|
||
if(r<2)return r?ki(t,e):t
|
||
var n=ki(t,Ur(e/Pr(t)))
|
||
return Er(t)?Xi(Mr(n),0,e).join(""):n.slice(0,e)}function wo(e){return function(t,r,n){return n&&"number"!=typeof n&&Qo(t,r,n)&&(r=n=i),t=zs(t),r===i?(r=t,t=0):r=zs(r),function(e,t,r,n){for(var i=-1,o=Wr(Ur((t-e)/(r||1)),0),a=$e(o);o--;)a[n?o:++i]=e,e+=r
|
||
return a}(t,r,n=n===i?t<r?1:-1:zs(n),e)}}function So(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Hs(t),r=Hs(r)),e(t,r)}}function Eo(e,t,r,n,o,a,s,u,c,l){var f=t&v
|
||
t|=f?w:S,(t&=~(f?S:w))&b||(t&=~(y|g))
|
||
var h=[e,t,o,f?a:i,f?s:i,f?i:a,f?i:s,u,c,l],d=r.apply(i,h)
|
||
return $o(e)&&ia(d,h),d.placeholder=n,sa(d,e,t)}function ko(e){var t=tt[e]
|
||
return function(e,r){if(e=Hs(e),r=null==r?0:Gr(qs(r),292)){var n=(Ws(e)+"e").split("e")
|
||
return+((n=(Ws(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var xo=tn&&1/Tr(new tn([,-0]))[1]==R?function(e){return new tn(e)}:ju
|
||
function Co(e){return function(t){var r=Ho(t)
|
||
return r==Q?kr(t):r==te?Ir(t):function(e,t){return Jt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Ao(e,t,r,n,o,a,u,c){var f=t&g
|
||
if(!f&&"function"!=typeof e)throw new ot(s)
|
||
var h=n?n.length:0
|
||
if(h||(t&=~(w|S),n=o=i),u=u===i?u:Wr(qs(u),0),c=c===i?c:qs(c),h-=o?o.length:0,t&S){var d=n,p=o
|
||
n=o=i}var m=f?i:No(e),x=[e,t,r,n,o,d,p,a,u,c]
|
||
if(m&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<(y|g|E),a=n==E&&r==v||n==E&&r==k&&e[7].length<=t[8]||n==(E|k)&&t[7].length<=t[8]&&r==v
|
||
if(!o&&!a)return e
|
||
n&y&&(e[2]=t[2],i|=r&y?0:b)
|
||
var s=t[3]
|
||
if(s){var u=e[3]
|
||
e[3]=u?ro(u,s,t[4]):s,e[4]=u?Cr(e[3],l):t[4]}(s=t[5])&&(u=e[5],e[5]=u?no(u,s,t[6]):s,e[6]=u?Cr(e[5],l):t[6]),(s=t[7])&&(e[7]=s),n&E&&(e[8]=null==e[8]?t[8]:Gr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(x,m),e=x[0],t=x[1],r=x[2],n=x[3],o=x[4],!(c=x[9]=x[9]===i?f?0:e.length:Wr(x[9]-h,0))&&t&(v|_)&&(t&=~(v|_)),t&&t!=y)C=t==v||t==_?function(e,t,r){var n=ho(e)
|
||
return function o(){for(var a=arguments.length,s=$e(a),u=a,c=Lo(o);u--;)s[u]=arguments[u]
|
||
var l=a<3&&s[0]!==c&&s[a-1]!==c?[]:Cr(s,c)
|
||
return(a-=l.length)<r?Eo(e,t,yo,o.placeholder,i,s,l,i,i,r-a):Ht(this&&this!==Rt&&this instanceof o?n:e,this,s)}}(e,t,c):t!=w&&t!=(y|w)||o.length?yo.apply(i,x):function(e,t,r,n){var i=t&y,o=ho(e)
|
||
return function t(){for(var a=-1,s=arguments.length,u=-1,c=n.length,l=$e(c+s),f=this&&this!==Rt&&this instanceof t?o:e;++u<c;)l[u]=n[u]
|
||
for(;s--;)l[u++]=arguments[++a]
|
||
return Ht(f,i?r:this,l)}}(e,t,r,n)
|
||
else var C=function(e,t,r){var n=t&y,i=ho(e)
|
||
return function t(){return(this&&this!==Rt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r)
|
||
return sa((m?Ii:ia)(C,x),e,t)}function To(e,t,r,n){return e===i||ps(e,ut[r])&&!ft.call(n,r)?t:e}function Io(e,t,r,n,o,a){return Ts(e)&&Ts(t)&&(a.set(t,e),gi(e,t,i,Io,a),a.delete(t)),e}function Po(e){return Rs(e)?i:e}function Mo(e,t,r,n,o,a){var s=r&p,u=e.length,c=t.length
|
||
if(u!=c&&!(s&&c>u))return!1
|
||
var l=a.get(e)
|
||
if(l&&a.get(t))return l==t
|
||
var f=-1,h=!0,d=r&m?new En:i
|
||
for(a.set(e,t),a.set(t,e);++f<u;){var y=e[f],g=t[f]
|
||
if(n)var b=s?n(g,y,f,t,e,a):n(y,g,f,e,t,a)
|
||
if(b!==i){if(b)continue
|
||
h=!1
|
||
break}if(d){if(!rr(t,function(e,t){if(!gr(d,t)&&(y===e||o(y,e,r,n,a)))return d.push(t)})){h=!1
|
||
break}}else if(y!==g&&!o(y,g,r,n,a)){h=!1
|
||
break}}return a.delete(e),a.delete(t),h}function Ro(e){return aa(ra(e,i,va),e+"")}function Oo(e){return Zn(e,ou,qo)}function Bo(e){return Zn(e,au,Vo)}var No=on?function(e){return on.get(e)}:ju
|
||
function jo(e){for(var t=e.name+"",r=an[t],n=ft.call(an,t)?r.length:0;n--;){var i=r[n],o=i.func
|
||
if(null==o||o==e)return i.name}return t}function Lo(e){return(ft.call(mn,"placeholder")?mn:e).placeholder}function Do(){var e=mn.iteratee||Ru
|
||
return e=e===Ru?li:e,arguments.length?e(arguments[0],arguments[1]):e}function Uo(e,t){var r,i,o=e.__data__
|
||
return("string"==(i=void 0===(r=t)?"undefined":n(r))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Fo(e){for(var t=ou(e),r=t.length;r--;){var n=t[r],i=e[n]
|
||
t[r]=[n,i,ea(i)]}return t}function zo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t)
|
||
return ci(r)?r:i}var qo=zr?function(e){return null==e?[]:(e=rt(e),Qt(zr(e),function(t){return jt.call(e,t)}))}:Vu,Vo=zr?function(e){for(var t=[];e;)Zt(t,qo(e)),e=Ot(e)
|
||
return t}:Vu,Ho=ei
|
||
function Ko(e,t,r){for(var n=-1,i=(t=Yi(t,e)).length,o=!1;++n<i;){var a=fa(t[n])
|
||
if(!(o=null!=e&&r(e,a)))break
|
||
e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&As(i)&&Yo(a,i)&&(bs(e)||gs(e))}function Wo(e){return"function"!=typeof e.constructor||Zo(e)?{}:yn(Ot(e))}function Go(e){return bs(e)||gs(e)||!!(nr&&e&&e[nr])}function Yo(e,t){var r=void 0===e?"undefined":n(e)
|
||
return!!(t=null==t?O:t)&&("number"==r||"symbol"!=r&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function Qo(e,t,r){if(!Ts(r))return!1
|
||
var i=void 0===t?"undefined":n(t)
|
||
return!!("number"==i?_s(r)&&Yo(t,r.length):"string"==i&&t in r)&&ps(r[t],e)}function Xo(e,t){if(bs(e))return!1
|
||
var r=void 0===e?"undefined":n(e)
|
||
return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!js(e))||Ie.test(e)||!Te.test(e)||null!=t&&e in rt(t)}function $o(e){var t=jo(e),r=mn[t]
|
||
if("function"!=typeof r||!(t in vn.prototype))return!1
|
||
if(e===r)return!0
|
||
var n=No(r)
|
||
return!!n&&e===n[0]}(Jr&&Ho(new Jr(new ArrayBuffer(1)))!=ue||Zr&&Ho(new Zr)!=Q||en&&"[object Promise]"!=Ho(en.resolve())||tn&&Ho(new tn)!=te||rn&&Ho(new rn)!=oe)&&(Ho=function(e){var t=ei(e),r=t==J?e.constructor:i,n=r?ha(r):""
|
||
if(n)switch(n){case sn:return ue
|
||
case un:return Q
|
||
case cn:return"[object Promise]"
|
||
case ln:return te
|
||
case fn:return oe}return t})
|
||
var Jo=ct?xs:Hu
|
||
function Zo(e){var t=e&&e.constructor
|
||
return e===("function"==typeof t&&t.prototype||ut)}function ea(e){return e==e&&!Ts(e)}function ta(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in rt(r))}}function ra(e,t,r){return t=Wr(t===i?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=Wr(n.length-t,0),a=$e(o);++i<o;)a[i]=n[t+i]
|
||
i=-1
|
||
for(var s=$e(t+1);++i<t;)s[i]=n[i]
|
||
return s[t]=r(a),Ht(e,this,s)}}function na(e,t){return t.length<2?e:Jn(e,Ri(t,0,-1))}var ia=ua(Ii),oa=Dr||function(e,t){return Rt.setTimeout(e,t)},aa=ua(Pi)
|
||
function sa(e,t,r){var n=t+""
|
||
return aa(e,function(e,t){var r=t.length
|
||
if(!r)return e
|
||
var n=r-1
|
||
return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(je,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Wt(U,function(r){var n="_."+r[0]
|
||
t&r[1]&&!Xt(e,n)&&e.push(n)}),e.sort()}(function(e){var t=e.match(Le)
|
||
return t?t[1].split(De):[]}(n),r)))}function ua(e){var t=0,r=0
|
||
return function(){var n=Yr(),o=I-(n-r)
|
||
if(r=n,o>0){if(++t>=T)return arguments[0]}else t=0
|
||
return e.apply(i,arguments)}}function ca(e,t){var r=-1,n=e.length,o=n-1
|
||
for(t=t===i?n:t;++r<t;){var a=Ei(r,o),s=e[a]
|
||
e[a]=e[r],e[r]=s}return e.length=t,e}var la=function(e){var t=us(e,function(e){return r.size===c&&r.clear(),e}),r=t.cache
|
||
return t}(function(e){var t=[]
|
||
return 46===e.charCodeAt(0)&&t.push(""),e.replace(Pe,function(e,r,n,i){t.push(n?i.replace(Fe,"$1"):r||e)}),t})
|
||
function fa(e){if("string"==typeof e||js(e))return e
|
||
var t=e+""
|
||
return"0"==t&&1/e==-R?"-0":t}function ha(e){if(null!=e){try{return lt.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function da(e){if(e instanceof vn)return e.clone()
|
||
var t=new bn(e.__wrapped__,e.__chain__)
|
||
return t.__actions__=io(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var pa=xi(function(e,t){return ws(e)?Fn(e,Wn(t,1,ws,!0)):[]}),ma=xi(function(e,t){var r=ka(t)
|
||
return ws(r)&&(r=i),ws(e)?Fn(e,Wn(t,1,ws,!0),Do(r,2)):[]}),ya=xi(function(e,t){var r=ka(t)
|
||
return ws(r)&&(r=i),ws(e)?Fn(e,Wn(t,1,ws,!0),i,r):[]})
|
||
function ga(e,t,r){var n=null==e?0:e.length
|
||
if(!n)return-1
|
||
var i=null==r?0:qs(r)
|
||
return i<0&&(i=Wr(n+i,0)),or(e,Do(t,3),i)}function ba(e,t,r){var n=null==e?0:e.length
|
||
if(!n)return-1
|
||
var o=n-1
|
||
return r!==i&&(o=qs(r),o=r<0?Wr(n+o,0):Gr(o,n-1)),or(e,Do(t,3),o,!0)}function va(e){return null!=e&&e.length?Wn(e,1):[]}function _a(e){return e&&e.length?e[0]:i}var wa=xi(function(e){var t=Jt(e,Wi)
|
||
return t.length&&t[0]===e[0]?ii(t):[]}),Sa=xi(function(e){var t=ka(e),r=Jt(e,Wi)
|
||
return t===ka(r)?t=i:r.pop(),r.length&&r[0]===e[0]?ii(r,Do(t,2)):[]}),Ea=xi(function(e){var t=ka(e),r=Jt(e,Wi)
|
||
return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?ii(r,i,t):[]})
|
||
function ka(e){var t=null==e?0:e.length
|
||
return t?e[t-1]:i}var xa=xi(Ca)
|
||
function Ca(e,t){return e&&e.length&&t&&t.length?wi(e,t):e}var Aa=Ro(function(e,t){var r=null==e?0:e.length,n=Nn(e,t)
|
||
return Si(e,Jt(t,function(e){return Yo(e,r)?+e:e}).sort(to)),n})
|
||
function Ta(e){return null==e?e:$r.call(e)}var Ia=xi(function(e){return Ui(Wn(e,1,ws,!0))}),Pa=xi(function(e){var t=ka(e)
|
||
return ws(t)&&(t=i),Ui(Wn(e,1,ws,!0),Do(t,2))}),Ma=xi(function(e){var t=ka(e)
|
||
return t="function"==typeof t?t:i,Ui(Wn(e,1,ws,!0),i,t)})
|
||
function Ra(e){if(!e||!e.length)return[]
|
||
var t=0
|
||
return e=Qt(e,function(e){if(ws(e))return t=Wr(e.length,t),!0}),pr(t,function(t){return Jt(e,lr(t))})}function Oa(e,t){if(!e||!e.length)return[]
|
||
var r=Ra(e)
|
||
return null==t?r:Jt(r,function(e){return Ht(t,i,e)})}var Ba=xi(function(e,t){return ws(e)?Fn(e,t):[]}),Na=xi(function(e){return Hi(Qt(e,ws))}),ja=xi(function(e){var t=ka(e)
|
||
return ws(t)&&(t=i),Hi(Qt(e,ws),Do(t,2))}),La=xi(function(e){var t=ka(e)
|
||
return t="function"==typeof t?t:i,Hi(Qt(e,ws),i,t)}),Da=xi(Ra)
|
||
var Ua=xi(function(e){var t=e.length,r=t>1?e[t-1]:i
|
||
return Oa(e,r="function"==typeof r?(e.pop(),r):i)})
|
||
function Fa(e){var t=mn(e)
|
||
return t.__chain__=!0,t}function za(e,t){return t(e)}var qa=Ro(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return Nn(t,e)}
|
||
return!(t>1||this.__actions__.length)&&n instanceof vn&&Yo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:za,args:[o],thisArg:i}),new bn(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)})
|
||
var Va=ao(function(e,t,r){ft.call(e,r)?++e[r]:Bn(e,r,1)})
|
||
var Ha=po(ga),Ka=po(ba)
|
||
function Wa(e,t){return(bs(e)?Wt:zn)(e,Do(t,3))}function Ga(e,t){return(bs(e)?Gt:qn)(e,Do(t,3))}var Ya=ao(function(e,t,r){ft.call(e,r)?e[r].push(t):Bn(e,r,[t])})
|
||
var Qa=xi(function(e,t,r){var n=-1,i="function"==typeof t,o=_s(e)?$e(e.length):[]
|
||
return zn(e,function(e){o[++n]=i?Ht(t,e,r):oi(e,t,r)}),o}),Xa=ao(function(e,t,r){Bn(e,r,t)})
|
||
function $a(e,t){return(bs(e)?Jt:pi)(e,Do(t,3))}var Ja=ao(function(e,t,r){e[r?0:1].push(t)},function(){return[[],[]]})
|
||
var Za=xi(function(e,t){if(null==e)return[]
|
||
var r=t.length
|
||
return r>1&&Qo(e,t[0],t[1])?t=[]:r>2&&Qo(t[0],t[1],t[2])&&(t=[t[0]]),vi(e,Wn(t,1),[])}),es=Lr||function(){return Rt.Date.now()}
|
||
function ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ao(e,E,i,i,i,i,t)}function rs(e,t){var r
|
||
if("function"!=typeof t)throw new ot(s)
|
||
return e=qs(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var ns=xi(function(e,t,r){var n=y
|
||
if(r.length){var i=Cr(r,Lo(ns))
|
||
n|=w}return Ao(e,n,t,r,i)}),is=xi(function(e,t,r){var n=y|g
|
||
if(r.length){var i=Cr(r,Lo(is))
|
||
n|=w}return Ao(t,n,e,r,i)})
|
||
function os(e,t,r){var n,o,a,u,c,l,f=0,h=!1,d=!1,p=!0
|
||
if("function"!=typeof e)throw new ot(s)
|
||
function m(t){var r=n,a=o
|
||
return n=o=i,f=t,u=e.apply(a,r)}function y(e){var r=e-l
|
||
return l===i||r>=t||r<0||d&&e-f>=a}function g(){var e=es()
|
||
if(y(e))return b(e)
|
||
c=oa(g,function(e){var r=t-(e-l)
|
||
return d?Gr(r,a-(e-f)):r}(e))}function b(e){return c=i,p&&n?m(e):(n=o=i,u)}function v(){var e=es(),r=y(e)
|
||
if(n=arguments,o=this,l=e,r){if(c===i)return function(e){return f=e,c=oa(g,t),h?m(e):u}(l)
|
||
if(d)return c=oa(g,t),m(l)}return c===i&&(c=oa(g,t)),u}return t=Hs(t)||0,Ts(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Wr(Hs(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),v.cancel=function(){c!==i&&$i(c),f=0,n=l=o=c=i},v.flush=function(){return c===i?u:b(es())},v}var as=xi(function(e,t){return Un(e,1,t)}),ss=xi(function(e,t,r){return Un(e,Hs(t)||0,r)})
|
||
function us(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ot(s)
|
||
var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache
|
||
if(o.has(i))return o.get(i)
|
||
var a=e.apply(this,n)
|
||
return r.cache=o.set(i,a)||o,a}
|
||
return r.cache=new(us.Cache||Sn),r}function cs(e){if("function"!=typeof e)throw new ot(s)
|
||
return function(){var t=arguments
|
||
switch(t.length){case 0:return!e.call(this)
|
||
case 1:return!e.call(this,t[0])
|
||
case 2:return!e.call(this,t[0],t[1])
|
||
case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}us.Cache=Sn
|
||
var ls=Qi(function(e,t){var r=(t=1==t.length&&bs(t[0])?Jt(t[0],mr(Do())):Jt(Wn(t,1),mr(Do()))).length
|
||
return xi(function(n){for(var i=-1,o=Gr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i])
|
||
return Ht(e,this,n)})}),fs=xi(function(e,t){var r=Cr(t,Lo(fs))
|
||
return Ao(e,w,i,t,r)}),hs=xi(function(e,t){var r=Cr(t,Lo(hs))
|
||
return Ao(e,S,i,t,r)}),ds=Ro(function(e,t){return Ao(e,k,i,i,i,t)})
|
||
function ps(e,t){return e===t||e!=e&&t!=t}var ms=So(ti),ys=So(function(e,t){return e>=t}),gs=ai(function(){return arguments}())?ai:function(e){return Is(e)&&ft.call(e,"callee")&&!jt.call(e,"callee")},bs=$e.isArray,vs=Dt?mr(Dt):function(e){return Is(e)&&ei(e)==se}
|
||
function _s(e){return null!=e&&As(e.length)&&!xs(e)}function ws(e){return Is(e)&&_s(e)}var Ss=qr||Hu,Es=Ut?mr(Ut):function(e){return Is(e)&&ei(e)==H}
|
||
function ks(e){if(!Is(e))return!1
|
||
var t=ei(e)
|
||
return t==W||t==K||"string"==typeof e.message&&"string"==typeof e.name&&!Rs(e)}function xs(e){if(!Ts(e))return!1
|
||
var t=ei(e)
|
||
return t==G||t==Y||t==q||t==Z}function Cs(e){return"number"==typeof e&&e==qs(e)}function As(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=O}function Ts(e){var t=void 0===e?"undefined":n(e)
|
||
return null!=e&&("object"==t||"function"==t)}function Is(e){return null!=e&&"object"==(void 0===e?"undefined":n(e))}var Ps=Ft?mr(Ft):function(e){return Is(e)&&Ho(e)==Q}
|
||
function Ms(e){return"number"==typeof e||Is(e)&&ei(e)==X}function Rs(e){if(!Is(e)||ei(e)!=J)return!1
|
||
var t=Ot(e)
|
||
if(null===t)return!0
|
||
var r=ft.call(t,"constructor")&&t.constructor
|
||
return"function"==typeof r&&r instanceof r&<.call(r)==mt}var Os=zt?mr(zt):function(e){return Is(e)&&ei(e)==ee}
|
||
var Bs=qt?mr(qt):function(e){return Is(e)&&Ho(e)==te}
|
||
function Ns(e){return"string"==typeof e||!bs(e)&&Is(e)&&ei(e)==re}function js(e){return"symbol"==(void 0===e?"undefined":n(e))||Is(e)&&ei(e)==ne}var Ls=Vt?mr(Vt):function(e){return Is(e)&&As(e.length)&&!!xt[ei(e)]}
|
||
var Ds=So(di),Us=So(function(e,t){return e<=t})
|
||
function Fs(e){if(!e)return[]
|
||
if(_s(e))return Ns(e)?Mr(e):io(e)
|
||
if(fr&&e[fr])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value)
|
||
return r}(e[fr]())
|
||
var t=Ho(e)
|
||
return(t==Q?kr:t==te?Tr:pu)(e)}function zs(e){return e?(e=Hs(e))===R||e===-R?(e<0?-1:1)*B:e==e?e:0:0===e?e:0}function qs(e){var t=zs(e),r=t%1
|
||
return t==t?r?t-r:t:0}function Vs(e){return e?jn(qs(e),0,j):0}function Hs(e){if("number"==typeof e)return e
|
||
if(js(e))return N
|
||
if(Ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e
|
||
e=Ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e
|
||
e=e.replace(Oe,"")
|
||
var r=He.test(e)
|
||
return r||We.test(e)?It(e.slice(2),r?2:8):Ve.test(e)?N:+e}function Ks(e){return oo(e,au(e))}function Ws(e){return null==e?"":Di(e)}var Gs=so(function(e,t){if(Zo(t)||_s(t))oo(t,ou(t),e)
|
||
else for(var r in t)ft.call(t,r)&&Pn(e,r,t[r])}),Ys=so(function(e,t){oo(t,au(t),e)}),Qs=so(function(e,t,r,n){oo(t,au(t),e,n)}),Xs=so(function(e,t,r,n){oo(t,ou(t),e,n)}),$s=Ro(Nn)
|
||
var Js=xi(function(e,t){e=rt(e)
|
||
var r=-1,n=t.length,o=n>2?t[2]:i
|
||
for(o&&Qo(t[0],t[1],o)&&(n=1);++r<n;)for(var a=t[r],s=au(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===i||ps(f,ut[l])&&!ft.call(e,l))&&(e[l]=a[l])}return e}),Zs=xi(function(e){return e.push(i,Io),Ht(uu,i,e)})
|
||
function eu(e,t,r){var n=null==e?i:Jn(e,t)
|
||
return n===i?r:n}function tu(e,t){return null!=e&&Ko(e,t,ni)}var ru=go(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),e[t]=r},Tu(Mu)),nu=go(function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=pt.call(t)),ft.call(e,t)?e[t].push(r):e[t]=[r]},Do),iu=xi(oi)
|
||
function ou(e){return _s(e)?xn(e):fi(e)}function au(e){return _s(e)?xn(e,!0):hi(e)}var su=so(function(e,t,r){gi(e,t,r)}),uu=so(function(e,t,r,n){gi(e,t,r,n)}),cu=Ro(function(e,t){var r={}
|
||
if(null==e)return r
|
||
var n=!1
|
||
t=Jt(t,function(t){return t=Yi(t,e),n||(n=t.length>1),t}),oo(e,Bo(e),r),n&&(r=Ln(r,f|h|d,Po))
|
||
for(var i=t.length;i--;)Fi(r,t[i])
|
||
return r})
|
||
var lu=Ro(function(e,t){return null==e?{}:function(e,t){return _i(e,t,function(t,r){return tu(e,r)})}(e,t)})
|
||
function fu(e,t){if(null==e)return{}
|
||
var r=Jt(Bo(e),function(e){return[e]})
|
||
return t=Do(t),_i(e,r,function(e,r){return t(e,r[0])})}var hu=Co(ou),du=Co(au)
|
||
function pu(e){return null==e?[]:yr(e,ou(e))}var mu=fo(function(e,t,r){return t=t.toLowerCase(),e+(r?yu(t):t)})
|
||
function yu(e){return ku(Ws(e).toLowerCase())}function gu(e){return(e=Ws(e))&&e.replace(Ye,_r).replace(bt,"")}var bu=fo(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}),vu=fo(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()}),_u=lo("toLowerCase")
|
||
var wu=fo(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})
|
||
var Su=fo(function(e,t,r){return e+(r?" ":"")+ku(t)})
|
||
var Eu=fo(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),ku=lo("toUpperCase")
|
||
function xu(e,t,r){return e=Ws(e),(t=r?i:t)===i?function(e){return St.test(e)}(e)?function(e){return e.match(_t)||[]}(e):function(e){return e.match(Ue)||[]}(e):e.match(t)||[]}var Cu=xi(function(e,t){try{return Ht(e,i,t)}catch(e){return ks(e)?e:new Ze(e)}}),Au=Ro(function(e,t){return Wt(t,function(t){t=fa(t),Bn(e,t,ns(e[t],e))}),e})
|
||
function Tu(e){return function(){return e}}var Iu=mo(),Pu=mo(!0)
|
||
function Mu(e){return e}function Ru(e){return li("function"==typeof e?e:Ln(e,f))}var Ou=xi(function(e,t){return function(r){return oi(r,e,t)}}),Bu=xi(function(e,t){return function(r){return oi(e,r,t)}})
|
||
function Nu(e,t,r){var n=ou(t),i=$n(t,n)
|
||
null!=r||Ts(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=$n(t,ou(t)))
|
||
var o=!(Ts(r)&&"chain"in r&&!r.chain),a=xs(e)
|
||
return Wt(i,function(r){var n=t[r]
|
||
e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__
|
||
if(o||t){var r=e(this.__wrapped__)
|
||
return(r.__actions__=io(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Zt([this.value()],arguments))})}),e}function ju(){}var Lu=vo(Jt),Du=vo(Yt),Uu=vo(rr)
|
||
function Fu(e){return Xo(e)?lr(fa(e)):function(e){return function(t){return Jn(t,e)}}(e)}var zu=wo(),qu=wo(!0)
|
||
function Vu(){return[]}function Hu(){return!1}var Ku=bo(function(e,t){return e+t},0),Wu=ko("ceil"),Gu=bo(function(e,t){return e/t},1),Yu=ko("floor")
|
||
var Qu,Xu=bo(function(e,t){return e*t},1),$u=ko("round"),Ju=bo(function(e,t){return e-t},0)
|
||
mn.after=function(e,t){if("function"!=typeof t)throw new ot(s)
|
||
return e=qs(e),function(){if(--e<1)return t.apply(this,arguments)}},mn.ary=ts,mn.assign=Gs,mn.assignIn=Ys,mn.assignInWith=Qs,mn.assignWith=Xs,mn.at=$s,mn.before=rs,mn.bind=ns,mn.bindAll=Au,mn.bindKey=is,mn.castArray=function(){if(!arguments.length)return[]
|
||
var e=arguments[0]
|
||
return bs(e)?e:[e]},mn.chain=Fa,mn.chunk=function(e,t,r){t=(r?Qo(e,t,r):t===i)?1:Wr(qs(t),0)
|
||
var n=null==e?0:e.length
|
||
if(!n||t<1)return[]
|
||
for(var o=0,a=0,s=$e(Ur(n/t));o<n;)s[a++]=Ri(e,o,o+=t)
|
||
return s},mn.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t]
|
||
o&&(i[n++]=o)}return i},mn.concat=function(){var e=arguments.length
|
||
if(!e)return[]
|
||
for(var t=$e(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n]
|
||
return Zt(bs(r)?io(r):[r],Wn(t,1))},mn.cond=function(e){var t=null==e?0:e.length,r=Do()
|
||
return e=t?Jt(e,function(e){if("function"!=typeof e[1])throw new ot(s)
|
||
return[r(e[0]),e[1]]}):[],xi(function(r){for(var n=-1;++n<t;){var i=e[n]
|
||
if(Ht(i[0],this,r))return Ht(i[1],this,r)}})},mn.conforms=function(e){return function(e){var t=ou(e)
|
||
return function(r){return Dn(r,e,t)}}(Ln(e,f))},mn.constant=Tu,mn.countBy=Va,mn.create=function(e,t){var r=yn(e)
|
||
return null==t?r:On(r,t)},mn.curry=function e(t,r,n){var o=Ao(t,v,i,i,i,i,i,r=n?i:r)
|
||
return o.placeholder=e.placeholder,o},mn.curryRight=function e(t,r,n){var o=Ao(t,_,i,i,i,i,i,r=n?i:r)
|
||
return o.placeholder=e.placeholder,o},mn.debounce=os,mn.defaults=Js,mn.defaultsDeep=Zs,mn.defer=as,mn.delay=ss,mn.difference=pa,mn.differenceBy=ma
|
||
return mn.differenceWith=ya,mn.drop=function(e,t,r){var n=null==e?0:e.length
|
||
return n?Ri(e,(t=r||t===i?1:qs(t))<0?0:t,n):[]},mn.dropRight=function(e,t,r){var n=null==e?0:e.length
|
||
return n?Ri(e,0,(t=n-(t=r||t===i?1:qs(t)))<0?0:t):[]},mn.dropRightWhile=function(e,t){return e&&e.length?qi(e,Do(t,3),!0,!0):[]},mn.dropWhile=function(e,t){return e&&e.length?qi(e,Do(t,3),!0):[]},mn.fill=function(e,t,r,n){var o=null==e?0:e.length
|
||
return o?(r&&"number"!=typeof r&&Qo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length
|
||
for((r=qs(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:qs(n))<0&&(n+=o),n=r>n?0:Vs(n);r<n;)e[r++]=t
|
||
return e}(e,t,r,n)):[]},mn.filter=function(e,t){return(bs(e)?Qt:Kn)(e,Do(t,3))},mn.flatMap=function(e,t){return Wn($a(e,t),1)},mn.flatMapDeep=function(e,t){return Wn($a(e,t),R)},mn.flatMapDepth=function(e,t,r){return r=r===i?1:qs(r),Wn($a(e,t),r)},mn.flatten=va,mn.flattenDeep=function(e){return null!=e&&e.length?Wn(e,R):[]},mn.flattenDepth=function(e,t){return null!=e&&e.length?Wn(e,t=t===i?1:qs(t)):[]},mn.flip=function(e){return Ao(e,x)},mn.flow=Iu,mn.flowRight=Pu,mn.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t]
|
||
n[i[0]]=i[1]}return n},mn.functions=function(e){return null==e?[]:$n(e,ou(e))},mn.functionsIn=function(e){return null==e?[]:$n(e,au(e))},mn.groupBy=Ya,mn.initial=function(e){return null!=e&&e.length?Ri(e,0,-1):[]},mn.intersection=wa,mn.intersectionBy=Sa,mn.intersectionWith=Ea,mn.invert=ru,mn.invertBy=nu,mn.invokeMap=Qa,mn.iteratee=Ru,mn.keyBy=Xa,mn.keys=ou,mn.keysIn=au,mn.map=$a,mn.mapKeys=function(e,t){var r={}
|
||
return t=Do(t,3),Qn(e,function(e,n,i){Bn(r,t(e,n,i),e)}),r},mn.mapValues=function(e,t){var r={}
|
||
return t=Do(t,3),Qn(e,function(e,n,i){Bn(r,n,t(e,n,i))}),r},mn.matches=function(e){return mi(Ln(e,f))},mn.matchesProperty=function(e,t){return yi(e,Ln(t,f))},mn.memoize=us,mn.merge=su,mn.mergeWith=uu,mn.method=Ou,mn.methodOf=Bu,mn.mixin=Nu,mn.negate=cs,mn.nthArg=function(e){return e=qs(e),xi(function(t){return bi(t,e)})},mn.omit=cu,mn.omitBy=function(e,t){return fu(e,cs(Do(t)))},mn.once=function(e){return rs(2,e)},mn.orderBy=function(e,t,r,n){return null==e?[]:(bs(t)||(t=null==t?[]:[t]),bs(r=n?i:r)||(r=null==r?[]:[r]),vi(e,t,r))},mn.over=Lu,mn.overArgs=ls,mn.overEvery=Du,mn.overSome=Uu,mn.partial=fs,mn.partialRight=hs,mn.partition=Ja,mn.pick=lu,mn.pickBy=fu,mn.property=Fu,mn.propertyOf=function(e){return function(t){return null==e?i:Jn(e,t)}},mn.pull=xa,mn.pullAll=Ca,mn.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?wi(e,t,Do(r,2)):e},mn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?wi(e,t,i,r):e},mn.pullAt=Aa,mn.range=zu,mn.rangeRight=qu,mn.rearg=ds,mn.reject=function(e,t){return(bs(e)?Qt:Kn)(e,cs(Do(t,3)))},mn.remove=function(e,t){var r=[]
|
||
if(!e||!e.length)return r
|
||
var n=-1,i=[],o=e.length
|
||
for(t=Do(t,3);++n<o;){var a=e[n]
|
||
t(a,n,e)&&(r.push(a),i.push(n))}return Si(e,i),r},mn.rest=function(e,t){if("function"!=typeof e)throw new ot(s)
|
||
return xi(e,t=t===i?t:qs(t))},mn.reverse=Ta,mn.sampleSize=function(e,t,r){return t=(r?Qo(e,t,r):t===i)?1:qs(t),(bs(e)?An:Ai)(e,t)},mn.set=function(e,t,r){return null==e?e:Ti(e,t,r)},mn.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Ti(e,t,r,n)},mn.shuffle=function(e){return(bs(e)?Tn:Mi)(e)},mn.slice=function(e,t,r){var n=null==e?0:e.length
|
||
return n?(r&&"number"!=typeof r&&Qo(e,t,r)?(t=0,r=n):(t=null==t?0:qs(t),r=r===i?n:qs(r)),Ri(e,t,r)):[]},mn.sortBy=Za,mn.sortedUniq=function(e){return e&&e.length?ji(e):[]},mn.sortedUniqBy=function(e,t){return e&&e.length?ji(e,Do(t,2)):[]},mn.split=function(e,t,r){return r&&"number"!=typeof r&&Qo(e,t,r)&&(t=r=i),(r=r===i?j:r>>>0)?(e=Ws(e))&&("string"==typeof t||null!=t&&!Os(t))&&!(t=Di(t))&&Er(e)?Xi(Mr(e),0,r):e.split(t,r):[]},mn.spread=function(e,t){if("function"!=typeof e)throw new ot(s)
|
||
return t=null==t?0:Wr(qs(t),0),xi(function(r){var n=r[t],i=Xi(r,0,t)
|
||
return n&&Zt(i,n),Ht(e,this,i)})},mn.tail=function(e){var t=null==e?0:e.length
|
||
return t?Ri(e,1,t):[]},mn.take=function(e,t,r){return e&&e.length?Ri(e,0,(t=r||t===i?1:qs(t))<0?0:t):[]},mn.takeRight=function(e,t,r){var n=null==e?0:e.length
|
||
return n?Ri(e,(t=n-(t=r||t===i?1:qs(t)))<0?0:t,n):[]},mn.takeRightWhile=function(e,t){return e&&e.length?qi(e,Do(t,3),!1,!0):[]},mn.takeWhile=function(e,t){return e&&e.length?qi(e,Do(t,3)):[]},mn.tap=function(e,t){return t(e),e},mn.throttle=function(e,t,r){var n=!0,i=!0
|
||
if("function"!=typeof e)throw new ot(s)
|
||
return Ts(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),os(e,t,{leading:n,maxWait:t,trailing:i})},mn.thru=za,mn.toArray=Fs,mn.toPairs=hu,mn.toPairsIn=du,mn.toPath=function(e){return bs(e)?Jt(e,fa):js(e)?[e]:io(la(Ws(e)))},mn.toPlainObject=Ks,mn.transform=function(e,t,r){var n=bs(e),i=n||Ss(e)||Ls(e)
|
||
if(t=Do(t,4),null==r){var o=e&&e.constructor
|
||
r=i?n?new o:[]:Ts(e)&&xs(o)?yn(Ot(e)):{}}return(i?Wt:Qn)(e,function(e,n,i){return t(r,e,n,i)}),r},mn.unary=function(e){return ts(e,1)},mn.union=Ia,mn.unionBy=Pa,mn.unionWith=Ma,mn.uniq=function(e){return e&&e.length?Ui(e):[]},mn.uniqBy=function(e,t){return e&&e.length?Ui(e,Do(t,2)):[]},mn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?Ui(e,i,t):[]},mn.unset=function(e,t){return null==e||Fi(e,t)},mn.unzip=Ra,mn.unzipWith=Oa,mn.update=function(e,t,r){return null==e?e:zi(e,t,Gi(r))},mn.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:zi(e,t,Gi(r),n)},mn.values=pu,mn.valuesIn=function(e){return null==e?[]:yr(e,au(e))},mn.without=Ba,mn.words=xu,mn.wrap=function(e,t){return fs(Gi(t),e)},mn.xor=Na,mn.xorBy=ja,mn.xorWith=La,mn.zip=Da,mn.zipObject=function(e,t){return Ki(e||[],t||[],Pn)},mn.zipObjectDeep=function(e,t){return Ki(e||[],t||[],Ti)},mn.zipWith=Ua,mn.entries=hu,mn.entriesIn=du,mn.extend=Ys,mn.extendWith=Qs,Nu(mn,mn),mn.add=Ku,mn.attempt=Cu,mn.camelCase=mu,mn.capitalize=yu,mn.ceil=Wu,mn.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=Hs(r))==r?r:0),t!==i&&(t=(t=Hs(t))==t?t:0),jn(Hs(e),t,r)},mn.clone=function(e){return Ln(e,d)},mn.cloneDeep=function(e){return Ln(e,f|d)},mn.cloneDeepWith=function(e,t){return Ln(e,f|d,t="function"==typeof t?t:i)},mn.cloneWith=function(e,t){return Ln(e,d,t="function"==typeof t?t:i)},mn.conformsTo=function(e,t){return null==t||Dn(e,t,ou(t))},mn.deburr=gu,mn.defaultTo=function(e,t){return null==e||e!=e?t:e},mn.divide=Gu,mn.endsWith=function(e,t,r){e=Ws(e),t=Di(t)
|
||
var n=e.length,o=r=r===i?n:jn(qs(r),0,n)
|
||
return(r-=t.length)>=0&&e.slice(r,o)==t},mn.eq=ps,mn.escape=function(e){return(e=Ws(e))&&ke.test(e)?e.replace(Se,wr):e},mn.escapeRegExp=function(e){return(e=Ws(e))&&Re.test(e)?e.replace(Me,"\\$&"):e},mn.every=function(e,t,r){var n=bs(e)?Yt:Vn
|
||
return r&&Qo(e,t,r)&&(t=i),n(e,Do(t,3))},mn.find=Ha,mn.findIndex=ga,mn.findKey=function(e,t){return ir(e,Do(t,3),Qn)},mn.findLast=Ka,mn.findLastIndex=ba,mn.findLastKey=function(e,t){return ir(e,Do(t,3),Xn)},mn.floor=Yu,mn.forEach=Wa,mn.forEachRight=Ga,mn.forIn=function(e,t){return null==e?e:Gn(e,Do(t,3),au)},mn.forInRight=function(e,t){return null==e?e:Yn(e,Do(t,3),au)},mn.forOwn=function(e,t){return e&&Qn(e,Do(t,3))},mn.forOwnRight=function(e,t){return e&&Xn(e,Do(t,3))},mn.get=eu,mn.gt=ms,mn.gte=ys,mn.has=function(e,t){return null!=e&&Ko(e,t,ri)},mn.hasIn=tu,mn.head=_a,mn.identity=Mu,mn.includes=function(e,t,r,n){e=_s(e)?e:pu(e),r=r&&!n?qs(r):0
|
||
var i=e.length
|
||
return r<0&&(r=Wr(i+r,0)),Ns(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&ar(e,t,r)>-1},mn.indexOf=function(e,t,r){var n=null==e?0:e.length
|
||
if(!n)return-1
|
||
var i=null==r?0:qs(r)
|
||
return i<0&&(i=Wr(n+i,0)),ar(e,t,i)},mn.inRange=function(e,t,r){return t=zs(t),r===i?(r=t,t=0):r=zs(r),function(e,t,r){return e>=Gr(t,r)&&e<Wr(t,r)}(e=Hs(e),t,r)},mn.invoke=iu,mn.isArguments=gs,mn.isArray=bs,mn.isArrayBuffer=vs,mn.isArrayLike=_s,mn.isArrayLikeObject=ws,mn.isBoolean=function(e){return!0===e||!1===e||Is(e)&&ei(e)==V},mn.isBuffer=Ss,mn.isDate=Es,mn.isElement=function(e){return Is(e)&&1===e.nodeType&&!Rs(e)},mn.isEmpty=function(e){if(null==e)return!0
|
||
if(_s(e)&&(bs(e)||"string"==typeof e||"function"==typeof e.splice||Ss(e)||Ls(e)||gs(e)))return!e.length
|
||
var t=Ho(e)
|
||
if(t==Q||t==te)return!e.size
|
||
if(Zo(e))return!fi(e).length
|
||
for(var r in e)if(ft.call(e,r))return!1
|
||
return!0},mn.isEqual=function(e,t){return si(e,t)},mn.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i
|
||
return n===i?si(e,t,i,r):!!n},mn.isError=ks,mn.isFinite=function(e){return"number"==typeof e&&Vr(e)},mn.isFunction=xs,mn.isInteger=Cs,mn.isLength=As,mn.isMap=Ps,mn.isMatch=function(e,t){return e===t||ui(e,t,Fo(t))},mn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,ui(e,t,Fo(t),r)},mn.isNaN=function(e){return Ms(e)&&e!=+e},mn.isNative=function(e){if(Jo(e))throw new Ze(a)
|
||
return ci(e)},mn.isNil=function(e){return null==e},mn.isNull=function(e){return null===e},mn.isNumber=Ms,mn.isObject=Ts,mn.isObjectLike=Is,mn.isPlainObject=Rs,mn.isRegExp=Os,mn.isSafeInteger=function(e){return Cs(e)&&e>=-O&&e<=O},mn.isSet=Bs,mn.isString=Ns,mn.isSymbol=js,mn.isTypedArray=Ls,mn.isUndefined=function(e){return e===i},mn.isWeakMap=function(e){return Is(e)&&Ho(e)==oe},mn.isWeakSet=function(e){return Is(e)&&ei(e)==ae},mn.join=function(e,t){return null==e?"":Hr.call(e,t)},mn.kebabCase=bu,mn.last=ka,mn.lastIndexOf=function(e,t,r){var n=null==e?0:e.length
|
||
if(!n)return-1
|
||
var o=n
|
||
return r!==i&&(o=(o=qs(r))<0?Wr(n+o,0):Gr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n
|
||
return n}(e,t,o):or(e,ur,o,!0)},mn.lowerCase=vu,mn.lowerFirst=_u,mn.lt=Ds,mn.lte=Us,mn.max=function(e){return e&&e.length?Hn(e,Mu,ti):i},mn.maxBy=function(e,t){return e&&e.length?Hn(e,Do(t,2),ti):i},mn.mean=function(e){return cr(e,Mu)},mn.meanBy=function(e,t){return cr(e,Do(t,2))},mn.min=function(e){return e&&e.length?Hn(e,Mu,di):i},mn.minBy=function(e,t){return e&&e.length?Hn(e,Do(t,2),di):i},mn.stubArray=Vu,mn.stubFalse=Hu,mn.stubObject=function(){return{}},mn.stubString=function(){return""},mn.stubTrue=function(){return!0},mn.multiply=Xu,mn.nth=function(e,t){return e&&e.length?bi(e,qs(t)):i},mn.noConflict=function(){return Rt._===this&&(Rt._=yt),this},mn.noop=ju,mn.now=es,mn.pad=function(e,t,r){e=Ws(e)
|
||
var n=(t=qs(t))?Pr(e):0
|
||
if(!t||n>=t)return e
|
||
var i=(t-n)/2
|
||
return _o(Fr(i),r)+e+_o(Ur(i),r)},mn.padEnd=function(e,t,r){e=Ws(e)
|
||
var n=(t=qs(t))?Pr(e):0
|
||
return t&&n<t?e+_o(t-n,r):e},mn.padStart=function(e,t,r){e=Ws(e)
|
||
var n=(t=qs(t))?Pr(e):0
|
||
return t&&n<t?_o(t-n,r)+e:e},mn.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Qr(Ws(e).replace(Be,""),t||0)},mn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Qo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=zs(e),t===i?(t=e,e=0):t=zs(t)),e>t){var n=e
|
||
e=t,t=n}if(r||e%1||t%1){var o=Xr()
|
||
return Gr(e+o*(t-e+Tt("1e-"+((o+"").length-1))),t)}return Ei(e,t)},mn.reduce=function(e,t,r){var n=bs(e)?er:hr,i=arguments.length<3
|
||
return n(e,Do(t,4),r,i,zn)},mn.reduceRight=function(e,t,r){var n=bs(e)?tr:hr,i=arguments.length<3
|
||
return n(e,Do(t,4),r,i,qn)},mn.repeat=function(e,t,r){return t=(r?Qo(e,t,r):t===i)?1:qs(t),ki(Ws(e),t)},mn.replace=function(){var e=arguments,t=Ws(e[0])
|
||
return e.length<3?t:t.replace(e[1],e[2])},mn.result=function(e,t,r){var n=-1,o=(t=Yi(t,e)).length
|
||
for(o||(o=1,e=i);++n<o;){var a=null==e?i:e[fa(t[n])]
|
||
a===i&&(n=o,a=r),e=xs(a)?a.call(e):a}return e},mn.round=$u,mn.runInContext=e,mn.sample=function(e){return(bs(e)?Cn:Ci)(e)},mn.size=function(e){if(null==e)return 0
|
||
if(_s(e))return Ns(e)?Pr(e):e.length
|
||
var t=Ho(e)
|
||
return t==Q||t==te?e.size:fi(e).length},mn.snakeCase=wu,mn.some=function(e,t,r){var n=bs(e)?rr:Oi
|
||
return r&&Qo(e,t,r)&&(t=i),n(e,Do(t,3))},mn.sortedIndex=function(e,t){return Bi(e,t)},mn.sortedIndexBy=function(e,t,r){return Ni(e,t,Do(r,2))},mn.sortedIndexOf=function(e,t){var r=null==e?0:e.length
|
||
if(r){var n=Bi(e,t)
|
||
if(n<r&&ps(e[n],t))return n}return-1},mn.sortedLastIndex=function(e,t){return Bi(e,t,!0)},mn.sortedLastIndexBy=function(e,t,r){return Ni(e,t,Do(r,2),!0)},mn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=Bi(e,t,!0)-1
|
||
if(ps(e[r],t))return r}return-1},mn.startCase=Su,mn.startsWith=function(e,t,r){return e=Ws(e),r=null==r?0:jn(qs(r),0,e.length),t=Di(t),e.slice(r,r+t.length)==t},mn.subtract=Ju,mn.sum=function(e){return e&&e.length?dr(e,Mu):0},mn.sumBy=function(e,t){return e&&e.length?dr(e,Do(t,2)):0},mn.template=function(e,t,r){var n=mn.templateSettings
|
||
r&&Qo(e,t,r)&&(t=i),e=Ws(e),t=Qs({},t,n,To)
|
||
var o,a,s=Qs({},t.imports,n.imports,To),u=ou(s),c=yr(s,u),l=0,f=t.interpolate||Qe,h="__p += '",d=nt((t.escape||Qe).source+"|"+f.source+"|"+(f===Ae?ze:Qe).source+"|"+(t.evaluate||Qe).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++kt+"]")+"\n"
|
||
e.replace(d,function(t,r,n,i,s,u){return n||(n=i),h+=e.slice(l,u).replace(Xe,Sr),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t}),h+="';\n"
|
||
var m=t.variable
|
||
m||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(be,""):h).replace(ve,"$1").replace(_e,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}"
|
||
var y=Cu(function(){return et(u,p+"return "+h).apply(i,c)})
|
||
if(y.source=h,ks(y))throw y
|
||
return y},mn.times=function(e,t){if((e=qs(e))<1||e>O)return[]
|
||
var r=j,n=Gr(e,j)
|
||
t=Do(t),e-=j
|
||
for(var i=pr(n,t);++r<e;)t(r)
|
||
return i},mn.toFinite=zs,mn.toInteger=qs,mn.toLength=Vs,mn.toLower=function(e){return Ws(e).toLowerCase()},mn.toNumber=Hs,mn.toSafeInteger=function(e){return e?jn(qs(e),-O,O):0===e?e:0},mn.toString=Ws,mn.toUpper=function(e){return Ws(e).toUpperCase()},mn.trim=function(e,t,r){if((e=Ws(e))&&(r||t===i))return e.replace(Oe,"")
|
||
if(!e||!(t=Di(t)))return e
|
||
var n=Mr(e),o=Mr(t)
|
||
return Xi(n,br(n,o),vr(n,o)+1).join("")},mn.trimEnd=function(e,t,r){if((e=Ws(e))&&(r||t===i))return e.replace(Ne,"")
|
||
if(!e||!(t=Di(t)))return e
|
||
var n=Mr(e)
|
||
return Xi(n,0,vr(n,Mr(t))+1).join("")},mn.trimStart=function(e,t,r){if((e=Ws(e))&&(r||t===i))return e.replace(Be,"")
|
||
if(!e||!(t=Di(t)))return e
|
||
var n=Mr(e)
|
||
return Xi(n,br(n,Mr(t))).join("")},mn.truncate=function(e,t){var r=C,n=A
|
||
if(Ts(t)){var o="separator"in t?t.separator:o
|
||
r="length"in t?qs(t.length):r,n="omission"in t?Di(t.omission):n}var a=(e=Ws(e)).length
|
||
if(Er(e)){var s=Mr(e)
|
||
a=s.length}if(r>=a)return e
|
||
var u=r-Pr(n)
|
||
if(u<1)return n
|
||
var c=s?Xi(s,0,u).join(""):e.slice(0,u)
|
||
if(o===i)return c+n
|
||
if(s&&(u+=c.length-u),Os(o)){if(e.slice(u).search(o)){var l,f=c
|
||
for(o.global||(o=nt(o.source,Ws(qe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index
|
||
c=c.slice(0,h===i?u:h)}}else if(e.indexOf(Di(o),u)!=u){var d=c.lastIndexOf(o)
|
||
d>-1&&(c=c.slice(0,d))}return c+n},mn.unescape=function(e){return(e=Ws(e))&&Ee.test(e)?e.replace(we,Rr):e},mn.uniqueId=function(e){var t=++ht
|
||
return Ws(e)+t},mn.upperCase=Eu,mn.upperFirst=ku,mn.each=Wa,mn.eachRight=Ga,mn.first=_a,Nu(mn,(Qu={},Qn(mn,function(e,t){ft.call(mn.prototype,t)||(Qu[t]=e)}),Qu),{chain:!1}),mn.VERSION="4.17.5",Wt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){mn[e].placeholder=mn}),Wt(["drop","take"],function(e,t){vn.prototype[e]=function(r){r=r===i?1:Wr(qs(r),0)
|
||
var n=this.__filtered__&&!t?new vn(this):this.clone()
|
||
return n.__filtered__?n.__takeCount__=Gr(r,n.__takeCount__):n.__views__.push({size:Gr(r,j),type:e+(n.__dir__<0?"Right":"")}),n},vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Wt(["filter","map","takeWhile"],function(e,t){var r=t+1,n=r==P||3==r
|
||
vn.prototype[e]=function(e){var t=this.clone()
|
||
return t.__iteratees__.push({iteratee:Do(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}}),Wt(["head","last"],function(e,t){var r="take"+(t?"Right":"")
|
||
vn.prototype[e]=function(){return this[r](1).value()[0]}}),Wt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right")
|
||
vn.prototype[e]=function(){return this.__filtered__?new vn(this):this[r](1)}}),vn.prototype.compact=function(){return this.filter(Mu)},vn.prototype.find=function(e){return this.filter(e).head()},vn.prototype.findLast=function(e){return this.reverse().find(e)},vn.prototype.invokeMap=xi(function(e,t){return"function"==typeof e?new vn(this):this.map(function(r){return oi(r,e,t)})}),vn.prototype.reject=function(e){return this.filter(cs(Do(e)))},vn.prototype.slice=function(e,t){e=qs(e)
|
||
var r=this
|
||
return r.__filtered__&&(e>0||t<0)?new vn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=qs(t))<0?r.dropRight(-t):r.take(t-e)),r)},vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},vn.prototype.toArray=function(){return this.take(j)},Qn(vn.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=mn[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t)
|
||
o&&(mn.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,u=t instanceof vn,c=s[0],l=u||bs(t),f=function(e){var t=o.apply(mn,Zt([e],s))
|
||
return n&&h?t[0]:t}
|
||
l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1)
|
||
var h=this.__chain__,d=!!this.__actions__.length,p=a&&!h,m=u&&!d
|
||
if(!a&&l){t=m?t:new vn(this)
|
||
var y=e.apply(t,s)
|
||
return y.__actions__.push({func:za,args:[f],thisArg:i}),new bn(y,h)}return p&&m?e.apply(this,s):(y=this.thru(f),p?n?y.value()[0]:y.value():y)})}),Wt(["pop","push","shift","sort","splice","unshift"],function(e){var t=at[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e)
|
||
mn.prototype[e]=function(){var e=arguments
|
||
if(n&&!this.__chain__){var i=this.value()
|
||
return t.apply(bs(i)?i:[],e)}return this[r](function(r){return t.apply(bs(r)?r:[],e)})}}),Qn(vn.prototype,function(e,t){var r=mn[t]
|
||
if(r){var n=r.name+"";(an[n]||(an[n]=[])).push({name:t,func:r})}}),an[yo(i,g).name]=[{name:"wrapper",func:i}],vn.prototype.clone=function(){var e=new vn(this.__wrapped__)
|
||
return e.__actions__=io(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=io(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=io(this.__views__),e},vn.prototype.reverse=function(){if(this.__filtered__){var e=new vn(this)
|
||
e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1
|
||
return e},vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=bs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size
|
||
switch(o.type){case"drop":e+=a
|
||
break
|
||
case"dropRight":t-=a
|
||
break
|
||
case"take":t=Gr(t,e+a)
|
||
break
|
||
case"takeRight":e=Wr(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=n?s:a-1,l=this.__iteratees__,f=l.length,h=0,d=Gr(u,this.__takeCount__)
|
||
if(!r||!n&&i==u&&d==u)return Vi(e,this.__actions__)
|
||
var p=[]
|
||
e:for(;u--&&h<d;){for(var m=-1,y=e[c+=t];++m<f;){var g=l[m],b=g.iteratee,v=g.type,_=b(y)
|
||
if(v==M)y=_
|
||
else if(!_){if(v==P)continue e
|
||
break e}}p[h++]=y}return p},mn.prototype.at=qa,mn.prototype.chain=function(){return Fa(this)},mn.prototype.commit=function(){return new bn(this.value(),this.__chain__)},mn.prototype.next=function(){this.__values__===i&&(this.__values__=Fs(this.value()))
|
||
var e=this.__index__>=this.__values__.length
|
||
return{done:e,value:e?i:this.__values__[this.__index__++]}},mn.prototype.plant=function(e){for(var t,r=this;r instanceof gn;){var n=da(r)
|
||
n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n
|
||
var o=n
|
||
r=r.__wrapped__}return o.__wrapped__=e,t},mn.prototype.reverse=function(){var e=this.__wrapped__
|
||
if(e instanceof vn){var t=e
|
||
return this.__actions__.length&&(t=new vn(this)),(t=t.reverse()).__actions__.push({func:za,args:[Ta],thisArg:i}),new bn(t,this.__chain__)}return this.thru(Ta)},mn.prototype.toJSON=mn.prototype.valueOf=mn.prototype.value=function(){return Vi(this.__wrapped__,this.__actions__)},mn.prototype.first=mn.prototype.head,fr&&(mn.prototype[fr]=function(){return this}),mn}()
|
||
"function"==typeof define&&"object"==n(define.amd)&&define.amd?(Rt._=Or,define(function(){return Or})):Bt?((Bt.exports=Or)._=Or,Ot._=Or):Rt._=Or}).call(void 0)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],456:[function(e,t,r){"use strict"
|
||
t.exports=function(){}},{}],457:[function(e,t,r){"use strict"
|
||
t.exports=function(){return!1}},{}],458:[function(e,t,r){"use strict"
|
||
t.exports=function(e){(function t(){var r=!0,n=!1
|
||
do{n=!0,r=!1,e.call(this,function(){n?r=!0:t()}),n=!1}while(r)})()}},{}],459:[function(e,t,r){"use strict"
|
||
t.exports=g
|
||
var n,i=e("pseudomap"),o=e("util"),a=e("yallist"),s=(n="function"==typeof Symbol?function(e){return Symbol.for(e)}:function(e){return"_"+e})("max"),u=n("length"),c=n("lengthCalculator"),l=n("allowStale"),f=n("maxAge"),h=n("dispose"),d=n("noDisposeOnSet"),p=n("lruList"),m=n("cache")
|
||
function y(){return 1}function g(e){if(!(this instanceof g))return new g(e)
|
||
"number"==typeof e&&(e={max:e}),e||(e={})
|
||
var t=this[s]=e.max;(!t||"number"!=typeof t||t<=0)&&(this[s]=1/0)
|
||
var r=e.length||y
|
||
"function"!=typeof r&&(r=y),this[c]=r,this[l]=e.stale||!1,this[f]=e.maxAge||0,this[h]=e.dispose,this[d]=e.noDisposeOnSet||!1,this.reset()}function b(e,t,r,n){var i=r.value
|
||
_(e,i)&&(S(e,r),e[l]||(i=void 0)),i&&t.call(n,i.value,i.key,e)}function v(e,t,r){var n=e[m].get(t)
|
||
if(n){var i=n.value
|
||
_(e,i)?(S(e,n),e[l]||(i=void 0)):r&&e[p].unshiftNode(n),i&&(i=i.value)}return i}function _(e,t){if(!t||!t.maxAge&&!e[f])return!1
|
||
var r=Date.now()-t.now
|
||
return t.maxAge?r>t.maxAge:e[f]&&r>e[f]}function w(e){if(e[u]>e[s])for(var t=e[p].tail;e[u]>e[s]&&null!==t;){var r=t.prev
|
||
S(e,t),t=r}}function S(e,t){if(t){var r=t.value
|
||
e[h]&&e[h](r.key,r.value),e[u]-=r.length,e[m].delete(r.key),e[p].removeNode(t)}}Object.defineProperty(g.prototype,"max",{set:function(e){(!e||"number"!=typeof e||e<=0)&&(e=1/0),this[s]=e,w(this)},get:function(){return this[s]},enumerable:!0}),Object.defineProperty(g.prototype,"allowStale",{set:function(e){this[l]=!!e},get:function(){return this[l]},enumerable:!0}),Object.defineProperty(g.prototype,"maxAge",{set:function(e){(!e||"number"!=typeof e||e<0)&&(e=0),this[f]=e,w(this)},get:function(){return this[f]},enumerable:!0}),Object.defineProperty(g.prototype,"lengthCalculator",{set:function(e){"function"!=typeof e&&(e=y),e!==this[c]&&(this[c]=e,this[u]=0,this[p].forEach(function(e){e.length=this[c](e.value,e.key),this[u]+=e.length},this)),w(this)},get:function(){return this[c]},enumerable:!0}),Object.defineProperty(g.prototype,"length",{get:function(){return this[u]},enumerable:!0}),Object.defineProperty(g.prototype,"itemCount",{get:function(){return this[p].length},enumerable:!0}),g.prototype.rforEach=function(e,t){t=t||this
|
||
for(var r=this[p].tail;null!==r;){var n=r.prev
|
||
b(this,e,r,t),r=n}},g.prototype.forEach=function(e,t){t=t||this
|
||
for(var r=this[p].head;null!==r;){var n=r.next
|
||
b(this,e,r,t),r=n}},g.prototype.keys=function(){return this[p].toArray().map(function(e){return e.key},this)},g.prototype.values=function(){return this[p].toArray().map(function(e){return e.value},this)},g.prototype.reset=function(){this[h]&&this[p]&&this[p].length&&this[p].forEach(function(e){this[h](e.key,e.value)},this),this[m]=new i,this[p]=new a,this[u]=0},g.prototype.dump=function(){return this[p].map(function(e){if(!_(this,e))return{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}},this).toArray().filter(function(e){return e})},g.prototype.dumpLru=function(){return this[p]},g.prototype.inspect=function(e,t){var r="LRUCache {",n=!1
|
||
this[l]&&(r+="\n allowStale: true",n=!0)
|
||
var i=this[s]
|
||
i&&i!==1/0&&(n&&(r+=","),r+="\n max: "+o.inspect(i,t),n=!0)
|
||
var a=this[f]
|
||
a&&(n&&(r+=","),r+="\n maxAge: "+o.inspect(a,t),n=!0)
|
||
var h=this[c]
|
||
h&&h!==y&&(n&&(r+=","),r+="\n length: "+o.inspect(this[u],t),n=!0)
|
||
var d=!1
|
||
return this[p].forEach(function(e){d?r+=",\n ":(n&&(r+=",\n"),d=!0,r+="\n ")
|
||
var i=o.inspect(e.key).split("\n").join("\n "),s={value:e.value}
|
||
e.maxAge!==a&&(s.maxAge=e.maxAge),h!==y&&(s.length=e.length),_(this,e)&&(s.stale=!0),s=o.inspect(s,t).split("\n").join("\n "),r+=i+" => "+s}),(d||n)&&(r+="\n"),r+="}"},g.prototype.set=function(e,t,r){var n=(r=r||this[f])?Date.now():0,i=this[c](t,e)
|
||
if(this[m].has(e)){if(i>this[s])return S(this,this[m].get(e)),!1
|
||
var o=this[m].get(e).value
|
||
return this[h]&&(this[d]||this[h](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[u]+=i-o.length,o.length=i,this.get(e),w(this),!0}var a=new function(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}(e,t,i,n,r)
|
||
return a.length>this[s]?(this[h]&&this[h](e,t),!1):(this[u]+=a.length,this[p].unshift(a),this[m].set(e,this[p].head),w(this),!0)},g.prototype.has=function(e){return!!this[m].has(e)&&!_(this,this[m].get(e).value)},g.prototype.get=function(e){return v(this,e,!0)},g.prototype.peek=function(e){return v(this,e,!1)},g.prototype.pop=function(){var e=this[p].tail
|
||
return e?(S(this,e),e.value):null},g.prototype.del=function(e){S(this,this[m].get(e))},g.prototype.load=function(e){this.reset()
|
||
for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0
|
||
if(0===i)this.set(n.k,n.v)
|
||
else{var o=i-t
|
||
o>0&&this.set(n.k,n.v,o)}}},g.prototype.prune=function(){var e=this
|
||
this[m].forEach(function(t,r){v(e,r,!1)})}},{pseudomap:554,util:156,yallist:667}],460:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("inherits"),i=e("hash-base"),o=new Array(16)
|
||
function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(e,t){return e<<t|e>>>32-t}function u(e,t,r,n,i,o,a){return s(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return s(e+(t&n|r&~n)+i+o|0,a)+t|0}function l(e,t,r,n,i,o,a){return s(e+(t^r^n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return s(e+(r^(t|~n))+i+o|0,a)+t|0}n(a,i),a.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t)
|
||
var r=this._a,n=this._b,i=this._c,a=this._d
|
||
i=c(i=c(i=c(i=c(i=u(i=u(i=u(i=u(i,a=u(a,r=u(r,n,i,a,e[0],3614090360,7),n,i,e[1],3905402710,12),r,n,e[2],606105819,17),a=u(a,r=u(r,n=u(n,i,a,r,e[3],3250441966,22),i,a,e[4],4118548399,7),n,i,e[5],1200080426,12),r,n,e[6],2821735955,17),a=u(a,r=u(r,n=u(n,i,a,r,e[7],4249261313,22),i,a,e[8],1770035416,7),n,i,e[9],2336552879,12),r,n,e[10],4294925233,17),a=u(a,r=u(r,n=u(n,i,a,r,e[11],2304563134,22),i,a,e[12],1804603682,7),n,i,e[13],4254626195,12),r,n,e[14],2792965006,17),a=c(a,r=c(r,n=u(n,i,a,r,e[15],1236535329,22),i,a,e[1],4129170786,5),n,i,e[6],3225465664,9),r,n,e[11],643717713,14),a=c(a,r=c(r,n=c(n,i,a,r,e[0],3921069994,20),i,a,e[5],3593408605,5),n,i,e[10],38016083,9),r,n,e[15],3634488961,14),a=c(a,r=c(r,n=c(n,i,a,r,e[4],3889429448,20),i,a,e[9],568446438,5),n,i,e[14],3275163606,9),r,n,e[3],4107603335,14),a=c(a,r=c(r,n=c(n,i,a,r,e[8],1163531501,20),i,a,e[13],2850285829,5),n,i,e[2],4243563512,9),r,n,e[7],1735328473,14),n=f(n=f(n=f(n=f(n=l(n=l(n=l(n=l(n=c(n,i,a,r,e[12],2368359562,20),i=l(i,a=l(a,r=l(r,n,i,a,e[5],4294588738,4),n,i,e[8],2272392833,11),r,n,e[11],1839030562,16),a,r,e[14],4259657740,23),i=l(i,a=l(a,r=l(r,n,i,a,e[1],2763975236,4),n,i,e[4],1272893353,11),r,n,e[7],4139469664,16),a,r,e[10],3200236656,23),i=l(i,a=l(a,r=l(r,n,i,a,e[13],681279174,4),n,i,e[0],3936430074,11),r,n,e[3],3572445317,16),a,r,e[6],76029189,23),i=l(i,a=l(a,r=l(r,n,i,a,e[9],3654602809,4),n,i,e[12],3873151461,11),r,n,e[15],530742520,16),a,r,e[2],3299628645,23),i=f(i,a=f(a,r=f(r,n,i,a,e[0],4096336452,6),n,i,e[7],1126891415,10),r,n,e[14],2878612391,15),a,r,e[5],4237533241,21),i=f(i,a=f(a,r=f(r,n,i,a,e[12],1700485571,6),n,i,e[3],2399980690,10),r,n,e[10],4293915773,15),a,r,e[1],2240044497,21),i=f(i,a=f(a,r=f(r,n,i,a,e[8],1873313359,6),n,i,e[15],4264355552,10),r,n,e[6],2734768916,15),a,r,e[13],1309151649,21),i=f(i,a=f(a,r=f(r,n,i,a,e[4],4149444226,6),n,i,e[11],3174756917,10),r,n,e[2],718787259,15),a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update()
|
||
var e=new r(16)
|
||
return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=a}).call(this,e("buffer").Buffer)},{buffer:110,"hash-base":461,inherits:462}],461:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("stream").Transform
|
||
function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,i),o.prototype._transform=function(e,t,r){var n=null
|
||
try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null
|
||
try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called")
|
||
n.isBuffer(e)||(e=n.from(e,t))
|
||
for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++]
|
||
this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++]
|
||
for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s)
|
||
return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called")
|
||
this._finalized=!0
|
||
var t=this._digest()
|
||
void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0
|
||
for(var r=0;r<4;++r)this._length[r]=0
|
||
return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{inherits:462,"safe-buffer":463,stream:144}],462:[function(e,t,r){arguments[4][118][0].apply(r,arguments)},{dup:118}],463:[function(e,t,r){arguments[4][143][0].apply(r,arguments)},{buffer:110,dup:143}],464:[function(e,t,r){"use strict"
|
||
function n(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],465:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("lodash.map"),i=e("lodash.filter"),o=e("./convert"),a=e("./protocols-table"),s=e("varint")
|
||
function u(e){var t=[],r=e.split("/").slice(1)
|
||
if(1===r.length&&""===r[0])return[]
|
||
for(var n=0;n<r.length;n++){var i=r[n]
|
||
if(0!==a(i).size){if(++n>=r.length)throw v("invalid address: "+e)
|
||
t.push([i,r[n]])}else t.push([i])}return t}function c(e){var t=[]
|
||
return n(e,function(e){var r=_(e)
|
||
t.push(r.name),e.length>1&&t.push(e[1])}),"/"+t.join("/")}function l(e){return n(e,function(e){Array.isArray(e)||(e=[e])
|
||
var t=_(e)
|
||
return e.length>1?[t.code,o.toBuffer(t.code,e[1])]:[t.code]})}function f(e){return n(e,function(e){var t=_(e)
|
||
return e.length>1?[t.code,o.toString(t.code,e[1])]:[t.code]})}function h(e){return y(r.concat(n(e,function(e){var t=_(e),n=r.from(s.encode(t.code))
|
||
return e.length>1&&(n=r.concat([n,e[1]])),n})))}function d(e,t){return e.size>0?e.size/8:0===e.size?0:s.decode(t)+s.decode.bytes}function p(e){for(var t=[],r=0;r<e.length;){var n=s.decode(e,r),i=s.decode.bytes,o=d(a(n),e.slice(r+i))
|
||
if(0!==o){var u=e.slice(r+i,r+i+o)
|
||
if((r+=o+i)>e.length)throw v("Invalid address buffer: "+e.toString("hex"))
|
||
t.push([n,u])}else t.push([n]),r+=i}return t}function m(e){return h(l(u(e=b(e))))}function y(e){var t=g(e)
|
||
if(t)throw t
|
||
return r.from(e)}function g(e){try{p(e)}catch(e){return e}}function b(e){return"/"+i(e.trim().split("/")).join("/")}function v(e){return new Error("Error parsing address: "+e)}function _(e){return a(e[0])}t.exports={stringToStringTuples:u,stringTuplesToString:c,tuplesToStringTuples:f,stringTuplesToTuples:l,bufferToTuples:p,tuplesToBuffer:h,bufferToString:function(e){return c(f(p(e)))},stringToBuffer:m,fromString:function(e){return m(e)},fromBuffer:y,validateBuffer:g,isValidBuffer:function(e){return void 0===g(e)},cleanPath:b,ParseError:v,protoFromTuple:_,sizeForAddr:d}}).call(this,e("buffer").Buffer)},{"./convert":466,"./protocols-table":468,buffer:110,"lodash.filter":425,"lodash.map":426,varint:662}],466:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("ip"),i=e("./protocols-table"),o=e("bs58"),a=e("varint")
|
||
function s(e,t){return t instanceof r?s.toString(e,t):s.toBuffer(e,t)}t.exports=s,s.toString=function(e,t){switch((e=i(e)).code){case 4:case 41:return n.toString(t)
|
||
case 6:case 17:case 33:case 132:return function(e){return e.readUInt16BE(0)}(t)
|
||
case 54:case 55:case 56:return function(e){var t=a.decode(e)
|
||
if((e=e.slice(a.decode.bytes)).length!==t)throw new Error("inconsistent lengths")
|
||
return e.toString()}(t)
|
||
case 421:return function(e){var t=a.decode(e),r=e.slice(a.decode.bytes)
|
||
if(r.length!==t)throw new Error("inconsistent lengths")
|
||
return o.encode(r)}(t)
|
||
default:return t.toString("hex")}},s.toBuffer=function(e,t){switch((e=i(e)).code){case 4:case 41:return n.toBuffer(t)
|
||
case 6:case 17:case 33:case 132:return l=parseInt(t,10),(f=r.alloc(2)).writeUInt16BE(l,0),f
|
||
case 54:case 55:case 56:return function(e){var t=r.from(e),n=r.from(a.encode(t.length))
|
||
return r.concat([n,t])}(t)
|
||
case 421:return s=t,u=r.from(o.decode(s)),c=r.from(a.encode(u.length)),r.concat([c,u])
|
||
default:return r.from(t,"hex")}var s,u,c,l,f}}).call(this,e("buffer").Buffer)},{"./protocols-table":468,bs58:70,buffer:110,ip:221,varint:662}],467:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("lodash.map"),i=e("xtend"),o=e("./codec"),a=e("./protocols-table"),s=e("varint"),u=e("bs58"),c=new Error("Sorry, Not Implemented Yet.")
|
||
function l(e){if(!(this instanceof l))return new l(e)
|
||
if(null==e&&(e=""),e instanceof r)this.buffer=o.fromBuffer(e)
|
||
else if("string"==typeof e||e instanceof String)this.buffer=o.fromString(e)
|
||
else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr")
|
||
this.buffer=o.fromBuffer(e.buffer)}}t.exports=l,l.prototype.toString=function(){return o.bufferToString(this.buffer)},l.prototype.toOptions=function(){var e={},t=this.toString().split("/")
|
||
return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},l.prototype.inspect=function(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+o.bufferToString(this.buffer)+">"},l.prototype.protos=function(){return n(this.protoCodes(),function(e){return i(a(e))})},l.prototype.protoCodes=function(){for(var e=[],t=this.buffer,r=0;r<t.length;){var n=s.decode(t,r),i=s.decode.bytes,u=a(n)
|
||
r+=o.sizeForAddr(u,t.slice(r+i))+i,e.push(n)}return e},l.prototype.protoNames=function(){return n(this.protos(),function(e){return e.name})},l.prototype.tuples=function(){return o.bufferToTuples(this.buffer)},l.prototype.stringTuples=function(){var e=o.bufferToTuples(this.buffer)
|
||
return o.tuplesToStringTuples(e)},l.prototype.encapsulate=function(e){return e=l(e),l(this.toString()+e.toString())},l.prototype.decapsulate=function(e){e=e.toString()
|
||
var t=this.toString(),r=t.lastIndexOf(e)
|
||
if(r<0)throw new Error("Address "+this+" does not contain subaddress: "+e)
|
||
return l(t.slice(0,r))},l.prototype.getPeerId=function(){var e=null
|
||
try{e=this.stringTuples().filter(function(e){if(e[0]===a.names.ipfs.code)return!0})[0][1],u.decode(e)}catch(t){e=null}return e},l.prototype.equals=function(e){return this.buffer.equals(e.buffer)},l.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.')
|
||
var e=this.protoCodes(),t=this.toString().split("/").slice(1)
|
||
return{family:41===e[0]?"IPv6":"IPv4",address:t[1],port:t[3]}},l.fromNodeAddress=function(e,t){if(!e)throw new Error("requires node address object")
|
||
if(!t)throw new Error("requires transport protocol")
|
||
return l("/"+["IPv6"===e.family?"ip6":"ip4",e.address,t,e.port].join("/"))},l.prototype.isThinWaistAddress=function(e){var t=(e||this).protos()
|
||
return 2===t.length&&((4===t[0].code||41===t[0].code)&&(6===t[1].code||17===t[1].code))},l.prototype.fromStupidString=function(e){throw c},l.protocols=a,l.isMultiaddr=function(e){return e.constructor&&e.constructor.name?"Multiaddr"===e.constructor.name:Boolean(e.fromStupidString&&e.protos)},l.isName=function(e){return!!l.isMultiaddr(e)&&e.protos().some(function(e){return e.resolvable})},l.resolve=function(e,t){return l.isMultiaddr(e)&&l.isName(e)?t(new Error("not implemented yet")):t(new Error("not a valid name"))}}).call(this,e("buffer").Buffer)},{"./codec":465,"./protocols-table":468,bs58:70,buffer:110,"lodash.map":426,varint:662,xtend:666}],468:[function(e,t,r){"use strict"
|
||
var n=e("lodash.map")
|
||
function i(e){if("number"==typeof e){if(i.codes[e])return i.codes[e]
|
||
throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(i.names[e])return i.names[e]
|
||
throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}function o(e,t,r,n){return{code:e,size:t,name:r,resolvable:Boolean(n)}}i.lengthPrefixedVarSize=-1,i.V=-1,i.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[54,-1,"dns4","resolvable"],[55,-1,"dns6","resolvable"],[56,-1,"dnsaddr","resolvable"],[132,16,"sctp"],[302,0,"utp"],[421,i.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[290,0,"p2p-circuit"]],i.names={},i.codes={},n(i.table,function(e){var t=o.apply(null,e)
|
||
i.codes[t.code]=t,i.names[t.name]=t}),i.object=o,t.exports=i},{"lodash.map":426}],469:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=function(){function e(t,r,n,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.name=t,this.code=r,this.alphabet=i,n&&i&&(this.engine=n(i))}return n(e,[{key:"encode",value:function(e){return this.engine.encode(e)}},{key:"decode",value:function(e){return this.engine.decode(e)}},{key:"isImplemented",value:function(){return this.engine}}]),e}()
|
||
t.exports=i},{}],470:[function(e,t,r){(function(e){"use strict"
|
||
t.exports=function(t){return{encode:function(t){return"string"==typeof t?e.from(t).toString("hex"):t.toString("hex")},decode:function(r){var n=!0,i=!1,o=void 0
|
||
try{for(var a,s=r[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value
|
||
if(t.indexOf(u)<0)throw new Error("invalid base16 character")}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return e.from(r,"hex")}}}}).call(this,e("buffer").Buffer)},{buffer:110}],471:[function(e,t,r){(function(e){"use strict"
|
||
function r(e,t){var r=e.byteLength,n=new Uint8Array(e),i=t.indexOf("=")===t.length-1
|
||
i&&(t=t.substring(0,t.length-2))
|
||
for(var o=0,a=0,s="",u=0;u<r;u++)for(a=a<<8|n[u],o+=8;o>=5;)s+=t[a>>>o-5&31],o-=5
|
||
if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="="
|
||
return s}t.exports=function(t){return{encode:function(n){return r("string"==typeof n?e.from(n):n,t)},decode:function(e){var r=!0,n=!1,i=void 0
|
||
try{for(var o,a=e[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value
|
||
if(t.indexOf(s)<0)throw new Error("invalid base32 character")}}catch(e){n=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw i}}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s<r;s++)i=i<<5|t.indexOf(e[s]),(n+=5)>=8&&(a[o++]=i>>>n-8&255,n-=8)
|
||
return a.buffer}(e,t)}}}}).call(this,e("buffer").Buffer)},{buffer:110}],472:[function(e,t,r){(function(e){"use strict"
|
||
t.exports=function(t){var r=t.indexOf("=")>-1,n=t.indexOf("-")>-1&&t.indexOf("_")>-1
|
||
return{encode:function(t){var i=""
|
||
i="string"==typeof t?e.from(t).toString("base64"):t.toString("base64"),n&&(i=(i=i.replace("+","-")).replace("/","_"))
|
||
var o=i.indexOf("=")
|
||
return o>0&&!r&&(i=i.substring(0,o)),i},decode:function(r){n&&(r=(r=r.replace("+","-")).replace("/","_"))
|
||
var i=!0,o=!1,a=void 0
|
||
try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value
|
||
if(t.indexOf(c)<0)throw new Error("invalid base64 character")}}catch(e){o=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return e.from(r,"base64")}}}}).call(this,e("buffer").Buffer)},{buffer:110}],473:[function(e,t,r){"use strict"
|
||
var n=e("./base.js"),i=e("base-x"),o=e("./base16"),a=e("./base32"),s=e("./base64"),u=[["base1","1","","1"],["base2","0",i,"01"],["base8","7",i,"01234567"],["base10","9",i,"0123456789"],["base16","f",o,"0123456789abcdef"],["base32","b",a,"abcdefghijklmnopqrstuvwxyz234567"],["base32pad","c",a,"abcdefghijklmnopqrstuvwxyz234567="],["base32hex","v",a,"0123456789abcdefghijklmnopqrstuv"],["base32hexpad","t",a,"0123456789abcdefghijklmnopqrstuv="],["base32z","h",a,"ybndrfg8ejkmcpqxot1uwisza345h769"],["base58flickr","Z",i,"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"],["base58btc","z",i,"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"],["base64","m",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"],["base64pad","M",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],["base64url","u",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"],["base64urlpad","U",s,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_="]],c=u.reduce(function(e,t){return e[t[0]]=new n(t[0],t[1],t[2],t[3]),e},{}),l=u.reduce(function(e,t){return e[t[1]]=c[t[0]],e},{})
|
||
t.exports={names:c,codes:l}},{"./base.js":469,"./base16":470,"./base32":471,"./base64":472,"base-x":34}],474:[function(e,t,r){(function(n){"use strict"
|
||
var i=e("./constants");(r=t.exports=a).encode=function(e,t){var r=s(e)
|
||
return a(r.name,n.from(r.encode(t)))},r.decode=function(e){n.isBuffer(e)&&(e=e.toString())
|
||
var t=e.substring(0,1)
|
||
"string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e))
|
||
var r=s(t)
|
||
return r.name,n.from(r.decode(e.toString()))},r.isEncoded=function(e){n.isBuffer(e)&&(e=e.toString())
|
||
var t=e.substring(0,1)
|
||
try{var r=s(t)
|
||
return r.name}catch(e){return!1}}
|
||
var o=new Error("Unsupported encoding")
|
||
function a(e,t){if(!t)throw new Error("requires an encoded buffer")
|
||
var r=s(e),i=n.from(r.code)
|
||
return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t=void 0
|
||
if(i.names[e])t=i.names[e]
|
||
else{if(!i.codes[e])throw o
|
||
t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet")
|
||
return t}}).call(this,e("buffer").Buffer)},{"./constants":473,buffer:110}],475:[function(e,t,r){(function(e){"use strict";(r=t.exports).raw=e.from("55","hex"),r.base1=e.from("01","hex"),r.base2=e.from("00","hex"),r.base8=e.from("07","hex"),r.base10=e.from("09","hex"),r.cbor=e.from("51","hex"),r.protobuf=e.from("50","hex"),r.rlp=e.from("60","hex"),r.bencode=e.from("63","hex"),r.multicodec=e.from("30","hex"),r.multihash=e.from("31","hex"),r.multiaddr=e.from("32","hex"),r.multibase=e.from("33","hex"),r.md4=e.from("d4","hex"),r.md5=e.from("d5","hex"),r.sha1=e.from("11","hex"),r["sha2-256"]=e.from("12","hex"),r["sha2-512"]=e.from("13","hex"),r["dbl-sha2-256"]=e.from("56","hex"),r["sha3-224"]=e.from("17","hex"),r["sha3-256"]=e.from("16","hex"),r["sha3-384"]=e.from("15","hex"),r["sha3-512"]=e.from("14","hex"),r["shake-128"]=e.from("18","hex"),r["shake-256"]=e.from("19","hex"),r["keccak-224"]=e.from("1a","hex"),r["keccak-256"]=e.from("1b","hex"),r["keccak-384"]=e.from("1c","hex"),r["keccak-512"]=e.from("1d","hex"),r.murmur3=e.from("22","hex"),r["blake2b-8"]=e.from("b201","hex"),r["blake2b-16"]=e.from("b202","hex"),r["blake2b-24"]=e.from("b203","hex"),r["blake2b-32"]=e.from("b204","hex"),r["blake2b-40"]=e.from("b205","hex"),r["blake2b-48"]=e.from("b206","hex"),r["blake2b-56"]=e.from("b207","hex"),r["blake2b-64"]=e.from("b208","hex"),r["blake2b-72"]=e.from("b209","hex"),r["blake2b-80"]=e.from("b20a","hex"),r["blake2b-88"]=e.from("b20b","hex"),r["blake2b-96"]=e.from("b20c","hex"),r["blake2b-104"]=e.from("b20d","hex"),r["blake2b-112"]=e.from("b20e","hex"),r["blake2b-120"]=e.from("b20f","hex"),r["blake2b-128"]=e.from("b210","hex"),r["blake2b-136"]=e.from("b211","hex"),r["blake2b-144"]=e.from("b212","hex"),r["blake2b-152"]=e.from("b213","hex"),r["blake2b-160"]=e.from("b214","hex"),r["blake2b-168"]=e.from("b215","hex"),r["blake2b-176"]=e.from("b216","hex"),r["blake2b-184"]=e.from("b217","hex"),r["blake2b-192"]=e.from("b218","hex"),r["blake2b-200"]=e.from("b219","hex"),r["blake2b-208"]=e.from("b21a","hex"),r["blake2b-216"]=e.from("b21b","hex"),r["blake2b-224"]=e.from("b21c","hex"),r["blake2b-232"]=e.from("b21d","hex")
|
||
r["blake2b-240"]=e.from("b21e","hex"),r["blake2b-248"]=e.from("b21f","hex"),r["blake2b-256"]=e.from("b220","hex"),r["blake2b-264"]=e.from("b221","hex"),r["blake2b-272"]=e.from("b222","hex"),r["blake2b-280"]=e.from("b223","hex"),r["blake2b-288"]=e.from("b224","hex"),r["blake2b-296"]=e.from("b225","hex"),r["blake2b-304"]=e.from("b226","hex"),r["blake2b-312"]=e.from("b227","hex"),r["blake2b-320"]=e.from("b228","hex"),r["blake2b-328"]=e.from("b229","hex"),r["blake2b-336"]=e.from("b22a","hex"),r["blake2b-344"]=e.from("b22b","hex"),r["blake2b-352"]=e.from("b22c","hex"),r["blake2b-360"]=e.from("b22d","hex"),r["blake2b-368"]=e.from("b22e","hex"),r["blake2b-376"]=e.from("b22f","hex"),r["blake2b-384"]=e.from("b230","hex"),r["blake2b-392"]=e.from("b231","hex"),r["blake2b-400"]=e.from("b232","hex"),r["blake2b-408"]=e.from("b233","hex"),r["blake2b-416"]=e.from("b234","hex"),r["blake2b-424"]=e.from("b235","hex"),r["blake2b-432"]=e.from("b236","hex"),r["blake2b-440"]=e.from("b237","hex"),r["blake2b-448"]=e.from("b238","hex"),r["blake2b-456"]=e.from("b239","hex"),r["blake2b-464"]=e.from("b23a","hex"),r["blake2b-472"]=e.from("b23b","hex")
|
||
r["blake2b-480"]=e.from("b23c","hex"),r["blake2b-488"]=e.from("b23d","hex"),r["blake2b-496"]=e.from("b23e","hex"),r["blake2b-504"]=e.from("b23f","hex"),r["blake2b-512"]=e.from("b240","hex"),r["blake2s-8"]=e.from("b241","hex"),r["blake2s-16"]=e.from("b242","hex"),r["blake2s-24"]=e.from("b243","hex"),r["blake2s-32"]=e.from("b244","hex"),r["blake2s-40"]=e.from("b245","hex"),r["blake2s-48"]=e.from("b246","hex"),r["blake2s-56"]=e.from("b247","hex"),r["blake2s-64"]=e.from("b248","hex"),r["blake2s-72"]=e.from("b249","hex"),r["blake2s-80"]=e.from("b24a","hex"),r["blake2s-88"]=e.from("b24b","hex"),r["blake2s-96"]=e.from("b24c","hex"),r["blake2s-104"]=e.from("b24d","hex"),r["blake2s-112"]=e.from("b24e","hex"),r["blake2s-120"]=e.from("b24f","hex"),r["blake2s-128"]=e.from("b250","hex"),r["blake2s-136"]=e.from("b251","hex"),r["blake2s-144"]=e.from("b252","hex"),r["blake2s-152"]=e.from("b253","hex"),r["blake2s-160"]=e.from("b254","hex"),r["blake2s-168"]=e.from("b255","hex"),r["blake2s-176"]=e.from("b256","hex"),r["blake2s-184"]=e.from("b257","hex"),r["blake2s-192"]=e.from("b258","hex"),r["blake2s-200"]=e.from("b259","hex")
|
||
r["blake2s-208"]=e.from("b25a","hex"),r["blake2s-216"]=e.from("b25b","hex"),r["blake2s-224"]=e.from("b25c","hex"),r["blake2s-232"]=e.from("b25d","hex"),r["blake2s-240"]=e.from("b25e","hex"),r["blake2s-248"]=e.from("b25f","hex"),r["blake2s-256"]=e.from("b260","hex"),r["skein256-8"]=e.from("b301","hex"),r["skein256-16"]=e.from("b302","hex"),r["skein256-24"]=e.from("b303","hex"),r["skein256-32"]=e.from("b304","hex"),r["skein256-40"]=e.from("b305","hex"),r["skein256-48"]=e.from("b306","hex"),r["skein256-56"]=e.from("b307","hex"),r["skein256-64"]=e.from("b308","hex"),r["skein256-72"]=e.from("b309","hex"),r["skein256-80"]=e.from("b30a","hex"),r["skein256-88"]=e.from("b30b","hex"),r["skein256-96"]=e.from("b30c","hex"),r["skein256-104"]=e.from("b30d","hex"),r["skein256-112"]=e.from("b30e","hex"),r["skein256-120"]=e.from("b30f","hex"),r["skein256-128"]=e.from("b310","hex"),r["skein256-136"]=e.from("b311","hex"),r["skein256-144"]=e.from("b312","hex"),r["skein256-152"]=e.from("b313","hex"),r["skein256-160"]=e.from("b314","hex"),r["skein256-168"]=e.from("b315","hex"),r["skein256-176"]=e.from("b316","hex"),r["skein256-184"]=e.from("b317","hex")
|
||
r["skein256-192"]=e.from("b318","hex"),r["skein256-200"]=e.from("b319","hex"),r["skein256-208"]=e.from("b31a","hex"),r["skein256-216"]=e.from("b31b","hex"),r["skein256-224"]=e.from("b31c","hex"),r["skein256-232"]=e.from("b31d","hex"),r["skein256-240"]=e.from("b31e","hex"),r["skein256-248"]=e.from("b31f","hex"),r["skein256-256"]=e.from("b320","hex"),r["skein512-8"]=e.from("b321","hex"),r["skein512-16"]=e.from("b322","hex"),r["skein512-24"]=e.from("b323","hex"),r["skein512-32"]=e.from("b324","hex"),r["skein512-40"]=e.from("b325","hex"),r["skein512-48"]=e.from("b326","hex"),r["skein512-56"]=e.from("b327","hex"),r["skein512-64"]=e.from("b328","hex"),r["skein512-72"]=e.from("b329","hex"),r["skein512-80"]=e.from("b32a","hex"),r["skein512-88"]=e.from("b32b","hex"),r["skein512-96"]=e.from("b32c","hex"),r["skein512-104"]=e.from("b32d","hex"),r["skein512-112"]=e.from("b32e","hex"),r["skein512-120"]=e.from("b32f","hex"),r["skein512-128"]=e.from("b330","hex"),r["skein512-136"]=e.from("b331","hex"),r["skein512-144"]=e.from("b332","hex"),r["skein512-152"]=e.from("b333","hex"),r["skein512-160"]=e.from("b334","hex"),r["skein512-168"]=e.from("b335","hex")
|
||
r["skein512-176"]=e.from("b336","hex"),r["skein512-184"]=e.from("b337","hex"),r["skein512-192"]=e.from("b338","hex"),r["skein512-200"]=e.from("b339","hex"),r["skein512-208"]=e.from("b33a","hex"),r["skein512-216"]=e.from("b33b","hex"),r["skein512-224"]=e.from("b33c","hex"),r["skein512-232"]=e.from("b33d","hex"),r["skein512-240"]=e.from("b33e","hex"),r["skein512-248"]=e.from("b33f","hex"),r["skein512-256"]=e.from("b340","hex"),r["skein512-264"]=e.from("b341","hex"),r["skein512-272"]=e.from("b342","hex"),r["skein512-280"]=e.from("b343","hex"),r["skein512-288"]=e.from("b344","hex"),r["skein512-296"]=e.from("b345","hex"),r["skein512-304"]=e.from("b346","hex"),r["skein512-312"]=e.from("b347","hex"),r["skein512-320"]=e.from("b348","hex"),r["skein512-328"]=e.from("b349","hex"),r["skein512-336"]=e.from("b34a","hex"),r["skein512-344"]=e.from("b34b","hex"),r["skein512-352"]=e.from("b34c","hex"),r["skein512-360"]=e.from("b34d","hex"),r["skein512-368"]=e.from("b34e","hex"),r["skein512-376"]=e.from("b34f","hex"),r["skein512-384"]=e.from("b350","hex"),r["skein512-392"]=e.from("b351","hex"),r["skein512-400"]=e.from("b352","hex"),r["skein512-408"]=e.from("b353","hex")
|
||
r["skein512-416"]=e.from("b354","hex"),r["skein512-424"]=e.from("b355","hex"),r["skein512-432"]=e.from("b356","hex"),r["skein512-440"]=e.from("b357","hex"),r["skein512-448"]=e.from("b358","hex"),r["skein512-456"]=e.from("b359","hex"),r["skein512-464"]=e.from("b35a","hex"),r["skein512-472"]=e.from("b35b","hex"),r["skein512-480"]=e.from("b35c","hex"),r["skein512-488"]=e.from("b35d","hex"),r["skein512-496"]=e.from("b35e","hex"),r["skein512-504"]=e.from("b35f","hex"),r["skein512-512"]=e.from("b360","hex"),r["skein1024-8"]=e.from("b361","hex"),r["skein1024-16"]=e.from("b362","hex"),r["skein1024-24"]=e.from("b363","hex"),r["skein1024-32"]=e.from("b364","hex"),r["skein1024-40"]=e.from("b365","hex"),r["skein1024-48"]=e.from("b366","hex"),r["skein1024-56"]=e.from("b367","hex"),r["skein1024-64"]=e.from("b368","hex"),r["skein1024-72"]=e.from("b369","hex"),r["skein1024-80"]=e.from("b36a","hex"),r["skein1024-88"]=e.from("b36b","hex"),r["skein1024-96"]=e.from("b36c","hex"),r["skein1024-104"]=e.from("b36d","hex"),r["skein1024-112"]=e.from("b36e","hex"),r["skein1024-120"]=e.from("b36f","hex"),r["skein1024-128"]=e.from("b370","hex"),r["skein1024-136"]=e.from("b371","hex")
|
||
r["skein1024-144"]=e.from("b372","hex"),r["skein1024-152"]=e.from("b373","hex"),r["skein1024-160"]=e.from("b374","hex"),r["skein1024-168"]=e.from("b375","hex"),r["skein1024-176"]=e.from("b376","hex"),r["skein1024-184"]=e.from("b377","hex"),r["skein1024-192"]=e.from("b378","hex"),r["skein1024-200"]=e.from("b379","hex"),r["skein1024-208"]=e.from("b37a","hex"),r["skein1024-216"]=e.from("b37b","hex"),r["skein1024-224"]=e.from("b37c","hex"),r["skein1024-232"]=e.from("b37d","hex"),r["skein1024-240"]=e.from("b37e","hex"),r["skein1024-248"]=e.from("b37f","hex"),r["skein1024-256"]=e.from("b380","hex"),r["skein1024-264"]=e.from("b381","hex"),r["skein1024-272"]=e.from("b382","hex"),r["skein1024-280"]=e.from("b383","hex"),r["skein1024-288"]=e.from("b384","hex"),r["skein1024-296"]=e.from("b385","hex"),r["skein1024-304"]=e.from("b386","hex"),r["skein1024-312"]=e.from("b387","hex"),r["skein1024-320"]=e.from("b388","hex"),r["skein1024-328"]=e.from("b389","hex"),r["skein1024-336"]=e.from("b38a","hex"),r["skein1024-344"]=e.from("b38b","hex"),r["skein1024-352"]=e.from("b38c","hex"),r["skein1024-360"]=e.from("b38d","hex"),r["skein1024-368"]=e.from("b38e","hex"),r["skein1024-376"]=e.from("b38f","hex")
|
||
r["skein1024-384"]=e.from("b390","hex"),r["skein1024-392"]=e.from("b391","hex"),r["skein1024-400"]=e.from("b392","hex"),r["skein1024-408"]=e.from("b393","hex"),r["skein1024-416"]=e.from("b394","hex"),r["skein1024-424"]=e.from("b395","hex"),r["skein1024-432"]=e.from("b396","hex"),r["skein1024-440"]=e.from("b397","hex"),r["skein1024-448"]=e.from("b398","hex"),r["skein1024-456"]=e.from("b399","hex"),r["skein1024-464"]=e.from("b39a","hex"),r["skein1024-472"]=e.from("b39b","hex"),r["skein1024-480"]=e.from("b39c","hex"),r["skein1024-488"]=e.from("b39d","hex"),r["skein1024-496"]=e.from("b39e","hex"),r["skein1024-504"]=e.from("b39f","hex"),r["skein1024-512"]=e.from("b3a0","hex"),r["skein1024-520"]=e.from("b3a1","hex"),r["skein1024-528"]=e.from("b3a2","hex"),r["skein1024-536"]=e.from("b3a3","hex"),r["skein1024-544"]=e.from("b3a4","hex"),r["skein1024-552"]=e.from("b3a5","hex"),r["skein1024-560"]=e.from("b3a6","hex"),r["skein1024-568"]=e.from("b3a7","hex"),r["skein1024-576"]=e.from("b3a8","hex"),r["skein1024-584"]=e.from("b3a9","hex"),r["skein1024-592"]=e.from("b3aa","hex"),r["skein1024-600"]=e.from("b3ab","hex"),r["skein1024-608"]=e.from("b3ac","hex"),r["skein1024-616"]=e.from("b3ad","hex")
|
||
r["skein1024-624"]=e.from("b3ae","hex"),r["skein1024-632"]=e.from("b3af","hex"),r["skein1024-640"]=e.from("b3b0","hex"),r["skein1024-648"]=e.from("b3b1","hex"),r["skein1024-656"]=e.from("b3b2","hex"),r["skein1024-664"]=e.from("b3b3","hex"),r["skein1024-672"]=e.from("b3b4","hex"),r["skein1024-680"]=e.from("b3b5","hex"),r["skein1024-688"]=e.from("b3b6","hex"),r["skein1024-696"]=e.from("b3b7","hex"),r["skein1024-704"]=e.from("b3b8","hex"),r["skein1024-712"]=e.from("b3b9","hex"),r["skein1024-720"]=e.from("b3ba","hex"),r["skein1024-728"]=e.from("b3bb","hex"),r["skein1024-736"]=e.from("b3bc","hex"),r["skein1024-744"]=e.from("b3bd","hex"),r["skein1024-752"]=e.from("b3be","hex"),r["skein1024-760"]=e.from("b3bf","hex"),r["skein1024-768"]=e.from("b3c0","hex"),r["skein1024-776"]=e.from("b3c1","hex"),r["skein1024-784"]=e.from("b3c2","hex"),r["skein1024-792"]=e.from("b3c3","hex"),r["skein1024-800"]=e.from("b3c4","hex"),r["skein1024-808"]=e.from("b3c5","hex"),r["skein1024-816"]=e.from("b3c6","hex"),r["skein1024-824"]=e.from("b3c7","hex"),r["skein1024-832"]=e.from("b3c8","hex"),r["skein1024-840"]=e.from("b3c9","hex"),r["skein1024-848"]=e.from("b3ca","hex"),r["skein1024-856"]=e.from("b3cb","hex")
|
||
r["skein1024-864"]=e.from("b3cc","hex"),r["skein1024-872"]=e.from("b3cd","hex"),r["skein1024-880"]=e.from("b3ce","hex"),r["skein1024-888"]=e.from("b3cf","hex"),r["skein1024-896"]=e.from("b3d0","hex"),r["skein1024-904"]=e.from("b3d1","hex"),r["skein1024-912"]=e.from("b3d2","hex"),r["skein1024-920"]=e.from("b3d3","hex"),r["skein1024-928"]=e.from("b3d4","hex"),r["skein1024-936"]=e.from("b3d5","hex"),r["skein1024-944"]=e.from("b3d6","hex"),r["skein1024-952"]=e.from("b3d7","hex"),r["skein1024-960"]=e.from("b3d8","hex"),r["skein1024-968"]=e.from("b3d9","hex"),r["skein1024-976"]=e.from("b3da","hex"),r["skein1024-984"]=e.from("b3db","hex"),r["skein1024-992"]=e.from("b3dc","hex"),r["skein1024-1000"]=e.from("b3dd","hex"),r["skein1024-1008"]=e.from("b3de","hex"),r["skein1024-1016"]=e.from("b3df","hex"),r["skein1024-1024"]=e.from("b3e0","hex"),r.ip4=e.from("04","hex"),r.ip6=e.from("29","hex"),r.tcp=e.from("06","hex"),r.udp=e.from("0111","hex"),r.dccp=e.from("21","hex"),r.sctp=e.from("84","hex"),r.udt=e.from("012d","hex"),r.utp=e.from("012e","hex"),r.ipfs=e.from("01a5","hex")
|
||
r.http=e.from("01e0","hex"),r.https=e.from("01bb","hex"),r.quic=e.from("01cc","hex"),r.ws=e.from("01dd","hex"),r.onion=e.from("01bc","hex"),r["p2p-circuit"]=e.from("0122","hex"),r["git-raw"]=e.from("78","hex"),r["dag-pb"]=e.from("70","hex"),r["dag-cbor"]=e.from("71","hex"),r["git-raw"]=e.from("78","hex"),r["eth-block"]=e.from("90","hex"),r["eth-block-list"]=e.from("91","hex"),r["eth-tx-trie"]=e.from("92","hex"),r["eth-tx"]=e.from("93","hex"),r["eth-tx-receipt-trie"]=e.from("94","hex"),r["eth-tx-receipt"]=e.from("95","hex"),r["eth-state-trie"]=e.from("96","hex"),r["eth-account-snapshot"]=e.from("97","hex"),r["eth-storage-trie"]=e.from("98","hex"),r["bitcoin-block"]=e.from("b0","hex"),r["bitcoin-tx"]=e.from("b1","hex"),r["zcash-block"]=e.from("c0","hex"),r["zcash-tx"]=e.from("c1","hex"),r["stellar-block"]=e.from("d0","hex"),r["stellar-tx"]=e.from("d1","hex"),r["torrent-info"]=e.from("7b","hex"),r["torrent-file"]=e.from("7c","hex"),r["ed25519-pub"]=e.from("ed","hex")}).call(this,e("buffer").Buffer)},{buffer:110}],476:[function(e,t,r){(function(n){"use strict"
|
||
var i=e("varint"),o=e("./varint-table"),a=e("./name-table"),s=e("./util");(r=t.exports).addPrefix=function(e,t){var r=void 0
|
||
if(n.isBuffer(e))r=s.varintBufferEncode(e)
|
||
else{if(!o[e])throw new Error("multicodec not recognized")
|
||
r=o[e]}return n.concat([r,t])},r.rmPrefix=function(e){return i.decode(e),e.slice(i.decode.bytes)},r.getCodec=function(e){var t=s.varintBufferDecode(e)
|
||
return a[t.toString("hex")]}}).call(this,e("buffer").Buffer)},{"./name-table":477,"./util":478,"./varint-table":479,buffer:110,varint:662}],477:[function(e,t,r){"use strict"
|
||
var n=e("./base-table"),i={}
|
||
for(var o in t.exports=i,n){i[n[o].toString("hex")]=o}},{"./base-table":475}],478:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("varint")
|
||
function i(e){return parseInt(e.toString("hex"),16)}function o(e){var t=e.toString(16)
|
||
return t.length%2==1&&(t="0"+t),r.from(t,"hex")}t.exports={numberToBuffer:o,bufferToNumber:i,varintBufferEncode:function(e){return r.from(n.encode(i(e)))},varintBufferDecode:function(e){return o(n.decode(e))}}}).call(this,e("buffer").Buffer)},{buffer:110,varint:662}],479:[function(e,t,r){"use strict"
|
||
var n=e("./base-table"),i=e("./util").varintBufferEncode,o={}
|
||
for(var a in t.exports=o,n){var s=n[a]
|
||
o[a]=i(s)}},{"./base-table":475,"./util":478}],480:[function(e,t,r){"use strict"
|
||
r.names=Object.freeze({sha1:17,"sha2-256":18,"sha2-512":19,"dbl-sha2-256":86,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,"murmur3-128":34,"murmur3-32":35,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"Skein256-8":45825,"Skein256-16":45826,"Skein256-24":45827,"Skein256-32":45828,"Skein256-40":45829,"Skein256-48":45830,"Skein256-56":45831,"Skein256-64":45832,"Skein256-72":45833,"Skein256-80":45834,"Skein256-88":45835,"Skein256-96":45836,"Skein256-104":45837,"Skein256-112":45838,"Skein256-120":45839,"Skein256-128":45840,"Skein256-136":45841,"Skein256-144":45842,"Skein256-152":45843,"Skein256-160":45844,"Skein256-168":45845,"Skein256-176":45846,"Skein256-184":45847,"Skein256-192":45848,"Skein256-200":45849,"Skein256-208":45850,"Skein256-216":45851,"Skein256-224":45852,"Skein256-232":45853,"Skein256-240":45854,"Skein256-248":45855,"Skein256-256":45856,"Skein512-8":45857,"Skein512-16":45858,"Skein512-24":45859,"Skein512-32":45860,"Skein512-40":45861,"Skein512-48":45862,"Skein512-56":45863,"Skein512-64":45864,"Skein512-72":45865,"Skein512-80":45866,"Skein512-88":45867,"Skein512-96":45868,"Skein512-104":45869,"Skein512-112":45870,"Skein512-120":45871,"Skein512-128":45872,"Skein512-136":45873,"Skein512-144":45874,"Skein512-152":45875,"Skein512-160":45876,"Skein512-168":45877,"Skein512-176":45878,"Skein512-184":45879,"Skein512-192":45880,"Skein512-200":45881,"Skein512-208":45882,"Skein512-216":45883,"Skein512-224":45884,"Skein512-232":45885,"Skein512-240":45886,"Skein512-248":45887,"Skein512-256":45888,"Skein512-264":45889,"Skein512-272":45890,"Skein512-280":45891,"Skein512-288":45892,"Skein512-296":45893,"Skein512-304":45894,"Skein512-312":45895,"Skein512-320":45896,"Skein512-328":45897,"Skein512-336":45898,"Skein512-344":45899,"Skein512-352":45900,"Skein512-360":45901,"Skein512-368":45902,"Skein512-376":45903,"Skein512-384":45904,"Skein512-392":45905,"Skein512-400":45906,"Skein512-408":45907,"Skein512-416":45908,"Skein512-424":45909,"Skein512-432":45910,"Skein512-440":45911,"Skein512-448":45912,"Skein512-456":45913,"Skein512-464":45914,"Skein512-472":45915,"Skein512-480":45916,"Skein512-488":45917,"Skein512-496":45918,"Skein512-504":45919,"Skein512-512":45920,"Skein1024-8":45921,"Skein1024-16":45922,"Skein1024-24":45923,"Skein1024-32":45924,"Skein1024-40":45925,"Skein1024-48":45926,"Skein1024-56":45927,"Skein1024-64":45928,"Skein1024-72":45929,"Skein1024-80":45930,"Skein1024-88":45931,"Skein1024-96":45932,"Skein1024-104":45933,"Skein1024-112":45934,"Skein1024-120":45935,"Skein1024-128":45936,"Skein1024-136":45937,"Skein1024-144":45938,"Skein1024-152":45939,"Skein1024-160":45940,"Skein1024-168":45941,"Skein1024-176":45942,"Skein1024-184":45943,"Skein1024-192":45944,"Skein1024-200":45945,"Skein1024-208":45946,"Skein1024-216":45947,"Skein1024-224":45948,"Skein1024-232":45949,"Skein1024-240":45950,"Skein1024-248":45951,"Skein1024-256":45952,"Skein1024-264":45953,"Skein1024-272":45954,"Skein1024-280":45955,"Skein1024-288":45956,"Skein1024-296":45957,"Skein1024-304":45958,"Skein1024-312":45959,"Skein1024-320":45960,"Skein1024-328":45961,"Skein1024-336":45962,"Skein1024-344":45963,"Skein1024-352":45964,"Skein1024-360":45965,"Skein1024-368":45966,"Skein1024-376":45967,"Skein1024-384":45968,"Skein1024-392":45969,"Skein1024-400":45970,"Skein1024-408":45971,"Skein1024-416":45972,"Skein1024-424":45973,"Skein1024-432":45974,"Skein1024-440":45975,"Skein1024-448":45976,"Skein1024-456":45977,"Skein1024-464":45978,"Skein1024-472":45979,"Skein1024-480":45980,"Skein1024-488":45981,"Skein1024-496":45982,"Skein1024-504":45983,"Skein1024-512":45984,"Skein1024-520":45985,"Skein1024-528":45986,"Skein1024-536":45987,"Skein1024-544":45988,"Skein1024-552":45989,"Skein1024-560":45990,"Skein1024-568":45991,"Skein1024-576":45992,"Skein1024-584":45993,"Skein1024-592":45994,"Skein1024-600":45995,"Skein1024-608":45996,"Skein1024-616":45997,"Skein1024-624":45998,"Skein1024-632":45999,"Skein1024-640":46e3,"Skein1024-648":46001,"Skein1024-656":46002,"Skein1024-664":46003,"Skein1024-672":46004,"Skein1024-680":46005,"Skein1024-688":46006,"Skein1024-696":46007,"Skein1024-704":46008,"Skein1024-712":46009,"Skein1024-720":46010,"Skein1024-728":46011,"Skein1024-736":46012,"Skein1024-744":46013,"Skein1024-752":46014,"Skein1024-760":46015,"Skein1024-768":46016,"Skein1024-776":46017,"Skein1024-784":46018,"Skein1024-792":46019,"Skein1024-800":46020,"Skein1024-808":46021,"Skein1024-816":46022,"Skein1024-824":46023,"Skein1024-832":46024,"Skein1024-840":46025,"Skein1024-848":46026,"Skein1024-856":46027,"Skein1024-864":46028,"Skein1024-872":46029,"Skein1024-880":46030,"Skein1024-888":46031,"Skein1024-896":46032,"Skein1024-904":46033,"Skein1024-912":46034,"Skein1024-920":46035,"Skein1024-928":46036,"Skein1024-936":46037,"Skein1024-944":46038,"Skein1024-952":46039,"Skein1024-960":46040,"Skein1024-968":46041,"Skein1024-976":46042,"Skein1024-984":46043,"Skein1024-992":46044,"Skein1024-1000":46045,"Skein1024-1008":46046,"Skein1024-1016":46047,"Skein1024-1024":46048}),r.codes=Object.freeze({17:"sha1",18:"sha2-256",19:"sha2-512",86:"dbl-sha2-256",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"Skein256-8",45826:"Skein256-16",45827:"Skein256-24",45828:"Skein256-32",45829:"Skein256-40",45830:"Skein256-48",45831:"Skein256-56",45832:"Skein256-64",45833:"Skein256-72",45834:"Skein256-80",45835:"Skein256-88",45836:"Skein256-96",45837:"Skein256-104",45838:"Skein256-112",45839:"Skein256-120",45840:"Skein256-128",45841:"Skein256-136",45842:"Skein256-144",45843:"Skein256-152",45844:"Skein256-160",45845:"Skein256-168",45846:"Skein256-176",45847:"Skein256-184",45848:"Skein256-192",45849:"Skein256-200",45850:"Skein256-208",45851:"Skein256-216",45852:"Skein256-224",45853:"Skein256-232",45854:"Skein256-240",45855:"Skein256-248",45856:"Skein256-256",45857:"Skein512-8",45858:"Skein512-16",45859:"Skein512-24",45860:"Skein512-32",45861:"Skein512-40",45862:"Skein512-48",45863:"Skein512-56",45864:"Skein512-64",45865:"Skein512-72",45866:"Skein512-80",45867:"Skein512-88",45868:"Skein512-96",45869:"Skein512-104",45870:"Skein512-112",45871:"Skein512-120",45872:"Skein512-128",45873:"Skein512-136",45874:"Skein512-144",45875:"Skein512-152",45876:"Skein512-160",45877:"Skein512-168",45878:"Skein512-176",45879:"Skein512-184",45880:"Skein512-192",45881:"Skein512-200",45882:"Skein512-208",45883:"Skein512-216",45884:"Skein512-224",45885:"Skein512-232",45886:"Skein512-240",45887:"Skein512-248",45888:"Skein512-256",45889:"Skein512-264",45890:"Skein512-272",45891:"Skein512-280",45892:"Skein512-288",45893:"Skein512-296",45894:"Skein512-304",45895:"Skein512-312",45896:"Skein512-320",45897:"Skein512-328",45898:"Skein512-336",45899:"Skein512-344",45900:"Skein512-352",45901:"Skein512-360",45902:"Skein512-368",45903:"Skein512-376",45904:"Skein512-384",45905:"Skein512-392",45906:"Skein512-400",45907:"Skein512-408",45908:"Skein512-416",45909:"Skein512-424",45910:"Skein512-432",45911:"Skein512-440",45912:"Skein512-448",45913:"Skein512-456",45914:"Skein512-464",45915:"Skein512-472",45916:"Skein512-480",45917:"Skein512-488",45918:"Skein512-496",45919:"Skein512-504",45920:"Skein512-512",45921:"Skein1024-8",45922:"Skein1024-16",45923:"Skein1024-24",45924:"Skein1024-32",45925:"Skein1024-40",45926:"Skein1024-48",45927:"Skein1024-56",45928:"Skein1024-64",45929:"Skein1024-72",45930:"Skein1024-80",45931:"Skein1024-88",45932:"Skein1024-96",45933:"Skein1024-104",45934:"Skein1024-112",45935:"Skein1024-120",45936:"Skein1024-128",45937:"Skein1024-136",45938:"Skein1024-144",45939:"Skein1024-152",45940:"Skein1024-160",45941:"Skein1024-168",45942:"Skein1024-176",45943:"Skein1024-184",45944:"Skein1024-192",45945:"Skein1024-200",45946:"Skein1024-208",45947:"Skein1024-216",45948:"Skein1024-224",45949:"Skein1024-232",45950:"Skein1024-240",45951:"Skein1024-248",45952:"Skein1024-256",45953:"Skein1024-264",45954:"Skein1024-272",45955:"Skein1024-280",45956:"Skein1024-288",45957:"Skein1024-296",45958:"Skein1024-304",45959:"Skein1024-312",45960:"Skein1024-320",45961:"Skein1024-328",45962:"Skein1024-336",45963:"Skein1024-344",45964:"Skein1024-352",45965:"Skein1024-360",45966:"Skein1024-368",45967:"Skein1024-376",45968:"Skein1024-384",45969:"Skein1024-392",45970:"Skein1024-400",45971:"Skein1024-408",45972:"Skein1024-416",45973:"Skein1024-424",45974:"Skein1024-432",45975:"Skein1024-440",45976:"Skein1024-448",45977:"Skein1024-456",45978:"Skein1024-464",45979:"Skein1024-472",45980:"Skein1024-480",45981:"Skein1024-488",45982:"Skein1024-496",45983:"Skein1024-504",45984:"Skein1024-512",45985:"Skein1024-520",45986:"Skein1024-528",45987:"Skein1024-536",45988:"Skein1024-544",45989:"Skein1024-552",45990:"Skein1024-560",45991:"Skein1024-568",45992:"Skein1024-576",45993:"Skein1024-584",45994:"Skein1024-592",45995:"Skein1024-600",45996:"Skein1024-608",45997:"Skein1024-616",45998:"Skein1024-624",45999:"Skein1024-632",46000:"Skein1024-640",46001:"Skein1024-648",46002:"Skein1024-656",46003:"Skein1024-664",46004:"Skein1024-672",46005:"Skein1024-680",46006:"Skein1024-688",46007:"Skein1024-696",46008:"Skein1024-704",46009:"Skein1024-712",46010:"Skein1024-720",46011:"Skein1024-728",46012:"Skein1024-736",46013:"Skein1024-744",46014:"Skein1024-752",46015:"Skein1024-760",46016:"Skein1024-768",46017:"Skein1024-776",46018:"Skein1024-784",46019:"Skein1024-792",46020:"Skein1024-800",46021:"Skein1024-808",46022:"Skein1024-816",46023:"Skein1024-824",46024:"Skein1024-832",46025:"Skein1024-840",46026:"Skein1024-848",46027:"Skein1024-856",46028:"Skein1024-864",46029:"Skein1024-872",46030:"Skein1024-880",46031:"Skein1024-888",46032:"Skein1024-896",46033:"Skein1024-904",46034:"Skein1024-912",46035:"Skein1024-920",46036:"Skein1024-928",46037:"Skein1024-936",46038:"Skein1024-944",46039:"Skein1024-952",46040:"Skein1024-960",46041:"Skein1024-968",46042:"Skein1024-976",46043:"Skein1024-984",46044:"Skein1024-992",46045:"Skein1024-1000",46046:"Skein1024-1008",46047:"Skein1024-1016",46048:"Skein1024-1024"}),r.defaultLengths=Object.freeze({17:20,18:32,19:64,86:32,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,34:32,45569:1,45570:2,45571:3,45572:4,45573:5,45574:6,45575:7,45576:8,45577:9,45578:10,45579:11,45580:12,45581:13,45582:14,45583:15,45584:16,45585:17,45586:18,45587:19,45588:20,45589:21,45590:22,45591:23,45592:24,45593:25,45594:26,45595:27,45596:28,45597:29,45598:30,45599:31,45600:32,45601:33,45602:34,45603:35,45604:36,45605:37,45606:38,45607:39,45608:40,45609:41,45610:42,45611:43,45612:44,45613:45,45614:46,45615:47,45616:48,45617:49,45618:50,45619:51,45620:52,45621:53,45622:54,45623:55,45624:56,45625:57,45626:58,45627:59,45628:60,45629:61,45630:62,45631:63,45632:64,45633:1,45634:2,45635:3,45636:4,45637:5,45638:6,45639:7,45640:8,45641:9,45642:10,45643:11,45644:12,45645:13,45646:14,45647:15,45648:16,45649:17,45650:18,45651:19,45652:20,45653:21,45654:22,45655:23,45656:24,45657:25,45658:26,45659:27,45660:28,45661:29,45662:30,45663:31,45664:32,45825:1,45826:2,45827:3,45828:4,45829:5,45830:6,45831:7,45832:8,45833:9,45834:10,45835:11,45836:12,45837:13,45838:14,45839:15,45840:16,45841:17,45842:18,45843:19,45844:20,45845:21,45846:22,45847:23,45848:24,45849:25,45850:26,45851:27,45852:28,45853:29,45854:30,45855:31,45856:32,45857:1,45858:2,45859:3,45860:4,45861:5,45862:6,45863:7,45864:8,45865:9,45866:10,45867:11,45868:12,45869:13,45870:14,45871:15,45872:16,45873:17,45874:18,45875:19,45876:20,45877:21,45878:22,45879:23,45880:24,45881:25,45882:26,45883:27,45884:28,45885:29,45886:30,45887:31,45888:32,45889:33,45890:34,45891:35,45892:36,45893:37,45894:38,45895:39,45896:40,45897:41,45898:42,45899:43,45900:44,45901:45,45902:46,45903:47,45904:48,45905:49,45906:50,45907:51,45908:52,45909:53,45910:54,45911:55,45912:56,45913:57,45914:58,45915:59,45916:60,45917:61,45918:62,45919:63,45920:64,45921:1,45922:2,45923:3,45924:4,45925:5,45926:6,45927:7,45928:8,45929:9,45930:10,45931:11,45932:12,45933:13,45934:14,45935:15,45936:16,45937:17,45938:18,45939:19,45940:20,45941:21,45942:22,45943:23,45944:24,45945:25,45946:26,45947:27,45948:28,45949:29,45950:30,45951:31,45952:32,45953:33,45954:34,45955:35,45956:36,45957:37,45958:38,45959:39,45960:40,45961:41,45962:42,45963:43,45964:44,45965:45,45966:46,45967:47,45968:48,45969:49,45970:50,45971:51,45972:52,45973:53,45974:54,45975:55,45976:56,45977:57,45978:58,45979:59,45980:60,45981:61,45982:62,45983:63,45984:64,45985:65,45986:66,45987:67,45988:68,45989:69,45990:70,45991:71,45992:72,45993:73,45994:74,45995:75,45996:76,45997:77,45998:78,45999:79,46000:80,46001:81,46002:82,46003:83,46004:84,46005:85,46006:86,46007:87,46008:88,46009:89,46010:90,46011:91,46012:92,46013:93,46014:94,46015:95,46016:96,46017:97,46018:98,46019:99,46020:100,46021:101,46022:102,46023:103,46024:104,46025:105,46026:106,46027:107,46028:108,46029:109,46030:110,46031:111,46032:112,46033:113,46034:114,46035:115,46036:116,46037:117,46038:118,46039:119,46040:120,46041:121,46042:122,46043:123,46044:124,46045:125,46046:126,46047:127,46048:128})},{}],481:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("bs58"),i=e("./constants")
|
||
r.names=i.names,r.codes=i.codes,r.defaultLengths=i.defaultLengths
|
||
var o=e("varint")
|
||
function a(e){r.decode(e)}r.toHexString=function(e){if(!t.isBuffer(e))throw new Error("must be passed a buffer")
|
||
return e.toString("hex")},r.fromHexString=function(e){return t.from(e,"hex")},r.toB58String=function(e){if(!t.isBuffer(e))throw new Error("must be passed a buffer")
|
||
return n.encode(e)},r.fromB58String=function(e){var r=e
|
||
return t.isBuffer(e)&&(r=e.toString()),t.from(n.decode(r))},r.decode=function(e){if(!t.isBuffer(e))throw new Error("multihash must be a Buffer")
|
||
if(e.length<3)throw new Error("multihash too short. must be > 3 bytes.")
|
||
var n=o.decode(e)
|
||
if(!r.isValidCode(n))throw new Error("multihash unknown function code: 0x"+n.toString(16))
|
||
e=e.slice(o.decode.bytes)
|
||
var a=o.decode(e)
|
||
if(a<1)throw new Error("multihash invalid length: 0x"+a.toString(16))
|
||
if((e=e.slice(o.decode.bytes)).length!==a)throw new Error("multihash length inconsistent: 0x"+e.toString("hex"))
|
||
return{code:n,name:i.codes[n],length:a,digest:e}},r.encode=function(e,n,i){if(!e||!n)throw new Error("multihash encode requires at least two args: digest, code")
|
||
var a=r.coerceCode(n)
|
||
if(!t.isBuffer(e))throw new Error("digest should be a Buffer")
|
||
if(null==i&&(i=e.length),i&&e.length!==i)throw new Error("digest length should be equal to specified length.")
|
||
return t.concat([t.from(o.encode(a)),t.from(o.encode(i)),e])},r.coerceCode=function(e){var t=e
|
||
if("string"==typeof e){if(!i.names[e])throw new Error("Unrecognized hash function named: "+e)
|
||
t=i.names[e]}if("number"!=typeof t)throw new Error("Hash function code should be a number. Got: "+t)
|
||
if(!i.codes[t]&&!r.isAppCode(t))throw new Error("Unrecognized function code: "+t)
|
||
return t},r.isAppCode=function(e){return e>0&&e<16},r.isValidCode=function(e){return!!r.isAppCode(e)||!!i.codes[e]},r.validate=a,r.prefix=function(e){return a(e),e.slice(0,2)}}).call(this,e("buffer").Buffer)},{"./constants":480,bs58:70,buffer:110,varint:662}],482:[function(e,t,r){(function(e,r){"use strict"
|
||
var n="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};(function(){var i="input is invalid type",o="object"===("undefined"==typeof window?"undefined":n(window)),a=o?window:{}
|
||
a.JS_SHA3_NO_WINDOW&&(o=!1)
|
||
var s=!o&&"object"===("undefined"==typeof self?"undefined":n(self))
|
||
!a.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":n(e))&&e.versions&&e.versions.node?a=r:s&&(a=self)
|
||
var u=!a.JS_SHA3_NO_COMMON_JS&&"object"===(void 0===t?"undefined":n(t))&&t.exports,c="function"==typeof define&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),h=[4,1024,262144,67108864],d=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],y=[128,256],g=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136}
|
||
!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(void 0===e?"undefined":n(e))&&e.buffer&&e.buffer.constructor===ArrayBuffer})
|
||
for(var v=function(e,t,r){return function(n){return new B(e,t,e).update(n)[r]()}},_=function(e,t,r){return function(n,i){return new B(e,t,i).update(n)[r]()}},w=function(e,t,r){return function(t,n,i,o){return C["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return C["kmac"+e].update(t,n,i,o)[r]()}},E=function(e,t,r,n){for(var i=0;i<g.length;++i){var o=g[i]
|
||
e[o]=t(r,n,o)}return e},k=function(e,t){var r=v(e,t,"hex")
|
||
return r.create=function(){return new B(e,t,e)},r.update=function(e){return r.create().update(e)},E(r,v,e,t)},x=[{name:"keccak",padding:[1,256,65536,16777216],bits:m,createMethod:k},{name:"sha3",padding:[6,1536,393216,100663296],bits:m,createMethod:k},{name:"shake",padding:[31,7936,2031616,520093696],bits:y,createMethod:function(e,t){var r=_(e,t,"hex")
|
||
return r.create=function(r){return new B(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},E(r,_,e,t)}},{name:"cshake",padding:h,bits:y,createMethod:function(e,t){var r=b[e],n=w(e,0,"hex")
|
||
return n.create=function(n,i,o){return i||o?new B(e,t,n).bytepad([i,o],r):C["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},E(n,w,e,t)}},{name:"kmac",padding:h,bits:y,createMethod:function(e,t){var r=b[e],n=S(e,0,"hex")
|
||
return n.create=function(n,i,o){return new N(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},E(n,S,e,t)}}],C={},A=[],T=0;T<x.length;++T)for(var I=x[T],P=I.bits,M=0;M<P.length;++M){var R=I.name+"_"+P[M]
|
||
if(A.push(R),C[R]=I.createMethod(P[M],I.padding),"sha3"!==I.name){var O=I.name+P[M]
|
||
A.push(O),C[O]=C[R]}}function B(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3
|
||
for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){B.call(this,e,t,r)}B.prototype.update=function(e){if(!this.finalized){var t,r=void 0===e?"undefined":n(e)
|
||
if("string"!==r){if("object"!==r)throw i
|
||
if(null===e)throw i
|
||
if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e)
|
||
else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw i
|
||
t=!0}for(var o,a,s=this.blocks,u=this.byteCount,c=e.length,f=this.blockCount,h=0,p=this.s;h<c;){if(this.reset)for(this.reset=!1,s[0]=this.block,o=1;o<f+1;++o)s[o]=0
|
||
if(t)for(o=this.start;h<c&&o<u;++h)s[o>>2]|=e[h]<<d[3&o++]
|
||
else for(o=this.start;h<c&&o<u;++h)(a=e.charCodeAt(h))<128?s[o>>2]|=a<<d[3&o++]:a<2048?(s[o>>2]|=(192|a>>6)<<d[3&o++],s[o>>2]|=(128|63&a)<<d[3&o++]):a<55296||a>=57344?(s[o>>2]|=(224|a>>12)<<d[3&o++],s[o>>2]|=(128|a>>6&63)<<d[3&o++],s[o>>2]|=(128|63&a)<<d[3&o++]):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++h)),s[o>>2]|=(240|a>>18)<<d[3&o++],s[o>>2]|=(128|a>>12&63)<<d[3&o++],s[o>>2]|=(128|a>>6&63)<<d[3&o++],s[o>>2]|=(128|63&a)<<d[3&o++])
|
||
if(this.lastByteIndex=o,o>=u){for(this.start=o-u,this.block=s[f],o=0;o<f;++o)p[o]^=s[o]
|
||
j(p),this.reset=!0}else this.start=o}return this}},B.prototype.encode=function(e,t){var r=255&e,n=1,i=[r]
|
||
for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n
|
||
return t?i.push(n):i.unshift(n),this.update(i),i.length},B.prototype.encodeString=function(e){var t,r=void 0===e?"undefined":n(e)
|
||
if("string"!==r){if("object"!==r)throw i
|
||
if(null===e)throw i
|
||
if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e)
|
||
else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw i
|
||
t=!0}var o=0,a=e.length
|
||
if(t)o=a
|
||
else for(var s=0;s<e.length;++s){var u=e.charCodeAt(s)
|
||
u<128?o+=1:u<2048?o+=2:u<55296||u>=57344?o+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++s)),o+=4)}return o+=this.encode(8*o),this.update(e),o},B.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n])
|
||
var i=t-r%t,o=[]
|
||
return o.length=i,this.update(o),this},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0
|
||
var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s
|
||
if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0
|
||
for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t]
|
||
j(n)}},B.prototype.toString=B.prototype.hex=function(){this.finalize()
|
||
for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<t&&a<n;++o,++a)e=r[o],s+=f[e>>4&15]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15]
|
||
a%t==0&&(j(r),o=0)}return i&&(e=r[o],s+=f[e>>4&15]+f[15&e],i>1&&(s+=f[e>>12&15]+f[e>>8&15]),i>2&&(s+=f[e>>20&15]+f[e>>16&15])),s},B.prototype.arrayBuffer=function(){this.finalize()
|
||
var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3
|
||
e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s)
|
||
for(var u=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)u[a]=r[o]
|
||
a%t==0&&j(r)}return i&&(u[o]=r[o],e=e.slice(0,s)),e},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.digest=B.prototype.array=function(){this.finalize()
|
||
for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,u=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255
|
||
s%r==0&&j(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},N.prototype=new B,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)}
|
||
var j=function(e){var t,r,n,i,o,a,s,u,c,l,f,h,d,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P,M,R,O,B,N,j,L,D,U,F,z,q,V,H,K,W,G,Y,Q,X,$,J,Z,ee,te,re,ne,ie,oe,ae,se,ue,ce,le
|
||
for(n=0;n<48;n+=2){i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|c>>>31),r=o^(c<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(l<<1|f>>>31),r=s^(f<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=c^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=f^(o<<1|i>>>31)
|
||
e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],y=e[1],G=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,P=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,H=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,j=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,Q=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30
|
||
te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,D=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,B=e[44]<<29|e[45]>>>3,x=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,Z=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18
|
||
e[0]=m^~g&v,e[1]=y^~b&_,e[10]=x^~A&I,e[11]=C^~T&P,e[20]=N^~L&U,e[21]=j^~D&F,e[30]=K^~G&Q,e[31]=W^~Y&X,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~v&w,e[3]=b^~_&S,e[12]=A^~I&M,e[13]=T^~P&R,e[22]=L^~U&z,e[23]=D^~F&q,e[32]=G^~Q&$,e[33]=Y^~X&J,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=v^~w&E,e[5]=_^~S&k,e[14]=I^~M&O,e[15]=P^~R&B,e[24]=U^~z&V,e[25]=F^~q&H,e[34]=Q^~$&Z,e[35]=X^~J&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le
|
||
e[6]=w^~E&m,e[7]=S^~k&y,e[16]=M^~O&x,e[17]=R^~B&C,e[26]=z^~V&N,e[27]=q^~H&j,e[36]=$^~Z&K,e[37]=J^~ee&W,e[46]=se^~ce&te,e[47]=ue^~le&re,e[8]=E^~m&g,e[9]=k^~y&b,e[18]=O^~x&A,e[19]=B^~C&T,e[28]=V^~N&L,e[29]=H^~j&D,e[38]=Z^~K&G,e[39]=ee^~W&Y,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=p[n],e[1]^=p[n+1]}}
|
||
if(u)t.exports=C
|
||
else{for(T=0;T<A.length;++T)a[A[T]]=C[A[T]]
|
||
c&&define(function(){return C})}})()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:124}],483:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("blakejs"),i=e("./utils").toCallback,o={init:n.blake2bInit,update:n.blake2bUpdate,digest:n.blake2bFinal},a={init:n.blake2sInit,update:n.blake2sUpdate,digest:n.blake2sFinal},s=function(e,t){return i(function(n){var i=t.init(e,null)
|
||
return t.update(i,n),r.from(t.digest(i))})}
|
||
t.exports=function(e){for(var t=0;t<64;t++)e[45569+t]=s(t+1,o)
|
||
for(var r=0;r<32;r++)e[45633+r]=s(r+1,a)}}).call(this,e("buffer").Buffer)},{"./utils":487,blakejs:49,buffer:110}],484:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("nodeify"),i=function(){if(self.crypto)return self.crypto.subtle||self.crypto.webkitSubtle
|
||
if(self.msCrypto)return self.msCrypto.subtle}()
|
||
function o(e){if(!i)throw new Error("Please use a browser with webcrypto support")
|
||
return function(t,o){var a=i.digest({name:e},t)
|
||
if("function"!=typeof a.then)return a.onerror=function(){o(new Error("hashing data using "+e))},void(a.oncomplete=function(e){o(null,e.target.result)})
|
||
n(a.then(function(e){return r.from(new Uint8Array(e))}),o)}}t.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,e("buffer").Buffer)},{buffer:110,nodeify:534}],485:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("js-sha3"),i=e("murmurhash3js"),o=e("./utils"),a=e("./crypto-sha1-2"),s=o.toCallback,u=o.toBuf,c=o.fromString,l=o.fromNumberTo32BitBuf
|
||
t.exports={sha1:a.sha1,sha2256:a.sha2256,sha2512:a.sha2512,sha3512:s(u(n.sha3_512)),sha3384:s(u(n.sha3_384)),sha3256:s(u(n.sha3_256)),sha3224:s(u(n.sha3_224)),shake128:s(u(n.shake_128,256)),shake256:s(u(n.shake_256,512)),keccak224:s(u(n.keccak_224)),keccak256:s(u(n.keccak_256)),keccak384:s(u(n.keccak_384)),keccak512:s(u(n.keccak_512)),murmur3128:s(u(c(i.x64.hash128))),murmur332:s(l(c(i.x86.hash32))),addBlake:e("./blake"),dblSha2256:function(e,t){a.sha2256(e,function(e,n){e&&t(e),a.sha2256(r.from(n),t)})}}}).call(this,e("buffer").Buffer)},{"./blake":483,"./crypto-sha1-2":484,"./utils":487,buffer:110,"js-sha3":482,murmurhash3js:488}],486:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("multihashes"),i=e("./crypto")
|
||
function o(e,t,r,i){if("function"==typeof r&&(i=r,r=void 0),!i)throw new Error("Missing callback")
|
||
o.digest(e,t,r,function(e,o){if(e)return i(e)
|
||
i(null,n.encode(o,t,r))})}t.exports=o,o.Buffer=r,o.multihash=n,o.digest=function(e,t,r,n){if("function"==typeof r&&(n=r,r=void 0),!n)throw new Error("Missing callback")
|
||
var i=n
|
||
r&&(i=function(e,t){if(e)return n(e)
|
||
n(null,t.slice(0,r))})
|
||
var a=void 0
|
||
try{a=o.createHash(t)}catch(e){return i(e)}a(e,i)},o.createHash=function(e){if(e=n.coerceCode(e),!o.functions[e])throw new Error("multihash function "+e+" not yet supported")
|
||
return o.functions[e]},o.functions={17:i.sha1,18:i.sha2256,19:i.sha2512,20:i.sha3512,21:i.sha3384,22:i.sha3256,23:i.sha3224,24:i.shake128,25:i.shake256,26:i.keccak224,27:i.keccak256,28:i.keccak384,29:i.keccak512,34:i.murmur3128,35:i.murmur332,86:i.dblSha2256},i.addBlake(o.functions)}).call(this,e("buffer").Buffer)},{"./crypto":485,buffer:110,multihashes:481}],487:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("async/setImmediate")
|
||
r.toCallback=function(e){return function(t,r){var i=function(e,t){return n(function(){r(e,t)})},o=void 0
|
||
try{o=e(t)}catch(e){return void i(e)}i(null,o)}},r.toBuf=function(e,r){return function(n){var i=e(n,r)
|
||
return t.from(i,"hex")}},r.fromString=function(e,r){return function(n){var i=t.isBuffer(n)?n.toString():n
|
||
return e(i,r)}},r.fromNumberTo32BitBuf=function(e,r){return function(n){for(var i=e(n,r),o=new Array(4),a=0;a<4;a++)o[a]=255&i,i>>=8
|
||
return t.from(o)}}}).call(this,e("buffer").Buffer)},{"async/setImmediate":31,buffer:110}],488:[function(e,t,r){"use strict"
|
||
t.exports=e("./lib/murmurHash3js")},{"./lib/murmurHash3js":489}],489:[function(e,t,r){"use strict";(function(e,n){var i={version:"3.0.1",x86:{},x64:{}}
|
||
function o(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}function a(e,t){return e<<t|e>>>32-t}function s(e){return e=o(e^=e>>>16,2246822507),e=o(e^=e>>>13,3266489909),e^=e>>>16}function u(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]]
|
||
var r=[0,0,0,0]
|
||
return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function c(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]]
|
||
var r=[0,0,0,0]
|
||
return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function l(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function f(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function h(e,t){return[e[0]^t[0],e[1]^t[1]]}function d(e){return e=h(e=c(e=h(e=c(e=h(e,[0,e[0]>>>1]),[4283543511,3981806797]),[0,e[0]>>>1]),[3301882366,444984403]),[0,e[0]>>>1])}i.x86.hash32=function(e,t){e=e||"",t=t||0
|
||
for(var r=e.length%4,n=e.length-r,i=t,u=0,c=3432918353,l=461845907,f=0;f<n;f+=4)i=o(i=a(i^=u=o(u=a(u=o(u=255&e.charCodeAt(f)|(255&e.charCodeAt(f+1))<<8|(255&e.charCodeAt(f+2))<<16|(255&e.charCodeAt(f+3))<<24,c),15),l),13),5)+3864292196
|
||
switch(u=0,r){case 3:u^=(255&e.charCodeAt(f+2))<<16
|
||
case 2:u^=(255&e.charCodeAt(f+1))<<8
|
||
case 1:i^=u=o(u=a(u=o(u^=255&e.charCodeAt(f),c),15),l)}return(i=s(i^=e.length))>>>0},i.x86.hash128=function(e,t){e=e||"",t=t||0
|
||
for(var r=e.length%16,n=e.length-r,i=t,u=t,c=t,l=t,f=0,h=0,d=0,p=0,m=597399067,y=2869860233,g=951274213,b=2716044179,v=0;v<n;v+=16)f=255&e.charCodeAt(v)|(255&e.charCodeAt(v+1))<<8|(255&e.charCodeAt(v+2))<<16|(255&e.charCodeAt(v+3))<<24,h=255&e.charCodeAt(v+4)|(255&e.charCodeAt(v+5))<<8|(255&e.charCodeAt(v+6))<<16|(255&e.charCodeAt(v+7))<<24,d=255&e.charCodeAt(v+8)|(255&e.charCodeAt(v+9))<<8|(255&e.charCodeAt(v+10))<<16|(255&e.charCodeAt(v+11))<<24,p=255&e.charCodeAt(v+12)|(255&e.charCodeAt(v+13))<<8|(255&e.charCodeAt(v+14))<<16|(255&e.charCodeAt(v+15))<<24,i=a(i^=f=o(f=a(f=o(f,m),15),y),19),i=o(i+=u,5)+1444728091,u=a(u^=h=o(h=a(h=o(h,y),16),g),17),u=o(u+=c,5)+197830471,c=a(c^=d=o(d=a(d=o(d,g),17),b),15),c=o(c+=l,5)+2530024501,l=a(l^=p=o(p=a(p=o(p,b),18),m),13),l=o(l+=i,5)+850148119
|
||
switch(f=0,h=0,d=0,p=0,r){case 15:p^=e.charCodeAt(v+14)<<16
|
||
case 14:p^=e.charCodeAt(v+13)<<8
|
||
case 13:l^=p=o(p=a(p=o(p^=e.charCodeAt(v+12),b),18),m)
|
||
case 12:d^=e.charCodeAt(v+11)<<24
|
||
case 11:d^=e.charCodeAt(v+10)<<16
|
||
case 10:d^=e.charCodeAt(v+9)<<8
|
||
case 9:c^=d=o(d=a(d=o(d^=e.charCodeAt(v+8),g),17),b)
|
||
case 8:h^=e.charCodeAt(v+7)<<24
|
||
case 7:h^=e.charCodeAt(v+6)<<16
|
||
case 6:h^=e.charCodeAt(v+5)<<8
|
||
case 5:u^=h=o(h=a(h=o(h^=e.charCodeAt(v+4),y),16),g)
|
||
case 4:f^=e.charCodeAt(v+3)<<24
|
||
case 3:f^=e.charCodeAt(v+2)<<16
|
||
case 2:f^=e.charCodeAt(v+1)<<8
|
||
case 1:i^=f=o(f=a(f=o(f^=e.charCodeAt(v),m),15),y)}return i^=e.length,i+=u^=e.length,i+=c^=e.length,u+=i+=l^=e.length,c+=i,l+=i,i=s(i),i+=u=s(u),i+=c=s(c),u+=i+=l=s(l),c+=i,l+=i,("00000000"+(i>>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)+("00000000"+(l>>>0).toString(16)).slice(-8)},i.x64.hash128=function(e,t){e=e||"",t=t||0
|
||
for(var r=e.length%16,n=e.length-r,i=[0,t],o=[0,t],a=[0,0],s=[0,0],p=[2277735313,289559509],m=[1291169091,658871167],y=0;y<n;y+=16)a=[255&e.charCodeAt(y+4)|(255&e.charCodeAt(y+5))<<8|(255&e.charCodeAt(y+6))<<16|(255&e.charCodeAt(y+7))<<24,255&e.charCodeAt(y)|(255&e.charCodeAt(y+1))<<8|(255&e.charCodeAt(y+2))<<16|(255&e.charCodeAt(y+3))<<24],s=[255&e.charCodeAt(y+12)|(255&e.charCodeAt(y+13))<<8|(255&e.charCodeAt(y+14))<<16|(255&e.charCodeAt(y+15))<<24,255&e.charCodeAt(y+8)|(255&e.charCodeAt(y+9))<<8|(255&e.charCodeAt(y+10))<<16|(255&e.charCodeAt(y+11))<<24],i=u(c(i=u(i=l(i=h(i,a=c(a=l(a=c(a,p),31),m)),27),o),[0,5]),[0,1390208809]),o=u(c(o=u(o=l(o=h(o,s=c(s=l(s=c(s,m),33),p)),31),i),[0,5]),[0,944331445])
|
||
switch(a=[0,0],s=[0,0],r){case 15:s=h(s,f([0,e.charCodeAt(y+14)],48))
|
||
case 14:s=h(s,f([0,e.charCodeAt(y+13)],40))
|
||
case 13:s=h(s,f([0,e.charCodeAt(y+12)],32))
|
||
case 12:s=h(s,f([0,e.charCodeAt(y+11)],24))
|
||
case 11:s=h(s,f([0,e.charCodeAt(y+10)],16))
|
||
case 10:s=h(s,f([0,e.charCodeAt(y+9)],8))
|
||
case 9:o=h(o,s=c(s=l(s=c(s=h(s,[0,e.charCodeAt(y+8)]),m),33),p))
|
||
case 8:a=h(a,f([0,e.charCodeAt(y+7)],56))
|
||
case 7:a=h(a,f([0,e.charCodeAt(y+6)],48))
|
||
case 6:a=h(a,f([0,e.charCodeAt(y+5)],40))
|
||
case 5:a=h(a,f([0,e.charCodeAt(y+4)],32))
|
||
case 4:a=h(a,f([0,e.charCodeAt(y+3)],24))
|
||
case 3:a=h(a,f([0,e.charCodeAt(y+2)],16))
|
||
case 2:a=h(a,f([0,e.charCodeAt(y+1)],8))
|
||
case 1:i=h(i,a=c(a=l(a=c(a=h(a,[0,e.charCodeAt(y)]),p),31),m))}return i=h(i,[0,e.length]),o=u(o=h(o,[0,e.length]),i=u(i,o)),i=d(i),o=u(o=d(o),i=u(i,o)),("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},void 0!==r?(void 0!==t&&t.exports&&(r=t.exports=i),r.murmurHash3=i):"function"==typeof define&&define.amd?define([],function(){return i}):(i._murmurHash3=e.murmurHash3,i.noConflict=function(){return e.murmurHash3=i._murmurHash3,i._murmurHash3=void 0,i.noConflict=void 0,i},e.murmurHash3=i)})(void 0)},{}],490:[function(e,t,r){"use strict"
|
||
var n=e("through2"),i=e("split2"),o=e("os").EOL,a=e("json-stringify-safe")
|
||
function s(e){return(e=e||{}).strict=!1!==e.strict,i(function(t){try{if(t)return JSON.parse(t)}catch(r){e.strict&&this.emit("error",new Error("Could not parse row "+t.slice(0,50)+"..."))}},e)}t.exports=s,t.exports.serialize=t.exports.stringify=function(e){return n.obj(e,function(e,t,r){r(null,a(e)+o)})},t.exports.parse=s},{"json-stringify-safe":384,os:121,split2:631,through2:655}],491:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
function i(e,t){n.cipher.registerAlgorithm(e,function(){return new n.aes.Algorithm(e,t)})}e("./cipher"),e("./cipherModes"),e("./util"),t.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(e,t,r,n){var i=m({key:e,output:r,decrypt:!1,mode:n})
|
||
return i.start(t),i},n.aes.createEncryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!1,mode:t})},n.aes.startDecrypting=function(e,t,r,n){var i=m({key:e,output:r,decrypt:!0,mode:n})
|
||
return i.start(t),i},n.aes.createDecryptionCipher=function(e,t){return m({key:e,output:null,decrypt:!0,mode:t})},n.aes.Algorithm=function(e,t){l||h()
|
||
var r=this
|
||
r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return p(r._w,e,t,!1)},decrypt:function(e,t){return p(r._w,e,t,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t,r=e.key
|
||
if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){t=r,r=n.util.createBuffer()
|
||
for(var i=0;i<t.length;++i)r.putByte(t[i])}}else r=n.util.createBuffer(r)
|
||
if(!n.util.isArray(r)){t=r,r=[]
|
||
var o=t.length()
|
||
if(16===o||24===o||32===o){o>>>=2
|
||
for(i=0;i<o;++i)r.push(t.getInt32())}}if(!n.util.isArray(r)||4!==r.length&&6!==r.length&&8!==r.length)throw new Error("Invalid key parameter.")
|
||
var a=this.mode.name,s=-1!==["CFB","OFB","CTR","GCM"].indexOf(a)
|
||
this._w=d(r,e.decrypt&&!s),this._init=!0}},n.aes._expandKey=function(e,t){return l||h(),d(e,t)},n.aes._updateBlock=p,i("AES-ECB",n.cipher.modes.ecb),i("AES-CBC",n.cipher.modes.cbc),i("AES-CFB",n.cipher.modes.cfb),i("AES-OFB",n.cipher.modes.ofb),i("AES-CTR",n.cipher.modes.ctr),i("AES-GCM",n.cipher.modes.gcm)
|
||
var o,a,s,u,c,l=!1,f=4
|
||
function h(){l=!0,s=[0,1,2,4,8,16,32,64,128,27,54]
|
||
for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283
|
||
o=new Array(256),a=new Array(256),u=new Array(4),c=new Array(4)
|
||
for(t=0;t<4;++t)u[t]=new Array(256),c[t]=new Array(256)
|
||
var r,n,i,f,h,d,p,m=0,y=0
|
||
for(t=0;t<256;++t){f=(f=y^y<<1^y<<2^y<<3^y<<4)>>8^255&f^99,o[m]=f,a[f]=m,d=(h=e[f])<<24^f<<16^f<<8^f^h,p=((r=e[m])^(n=e[r])^(i=e[n]))<<24^(m^i)<<16^(m^n^i)<<8^m^r^i
|
||
for(var g=0;g<4;++g)u[g][m]=d,c[g][f]=p,d=d<<24|d>>>8,p=p<<24|p>>>8
|
||
0===m?m=y=1:(m=r^e[e[e[r^i]]],y^=e[e[y]])}}function d(e,t){for(var r,n=e.slice(0),i=1,a=n.length,u=f*(a+6+1),l=a;l<u;++l)r=n[l-1],l%a==0?(r=o[r>>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^s[i]<<24,i++):a>6&&l%a==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[l]=n[l-a]^r
|
||
if(t){for(var h,d=c[0],p=c[1],m=c[2],y=c[3],g=n.slice(0),b=(l=0,(u=n.length)-f);l<u;l+=f,b-=f)if(0===l||l===u-f)g[l]=n[b],g[l+1]=n[b+3],g[l+2]=n[b+2],g[l+3]=n[b+1]
|
||
else for(var v=0;v<f;++v)h=n[b+v],g[l+(3&-v)]=d[o[h>>>24]]^p[o[h>>>16&255]]^m[o[h>>>8&255]]^y[o[255&h]]
|
||
n=g}return n}function p(e,t,r,n){var i,s,l,f,h,d,p,m,y,g,b,v,_=e.length/4-1
|
||
n?(i=c[0],s=c[1],l=c[2],f=c[3],h=a):(i=u[0],s=u[1],l=u[2],f=u[3],h=o),d=t[0]^e[0],p=t[n?3:1]^e[1],m=t[2]^e[2],y=t[n?1:3]^e[3]
|
||
for(var w=3,S=1;S<_;++S)g=i[d>>>24]^s[p>>>16&255]^l[m>>>8&255]^f[255&y]^e[++w],b=i[p>>>24]^s[m>>>16&255]^l[y>>>8&255]^f[255&d]^e[++w],v=i[m>>>24]^s[y>>>16&255]^l[d>>>8&255]^f[255&p]^e[++w],y=i[y>>>24]^s[d>>>16&255]^l[p>>>8&255]^f[255&m]^e[++w],d=g,p=b,m=v
|
||
r[0]=h[d>>>24]<<24^h[p>>>16&255]<<16^h[m>>>8&255]<<8^h[255&y]^e[++w],r[n?3:1]=h[p>>>24]<<24^h[m>>>16&255]<<16^h[y>>>8&255]<<8^h[255&d]^e[++w],r[2]=h[m>>>24]<<24^h[y>>>16&255]<<16^h[d>>>8&255]<<8^h[255&p]^e[++w],r[n?1:3]=h[y>>>24]<<24^h[d>>>16&255]<<16^h[p>>>8&255]<<8^h[255&m]^e[++w]}function m(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start
|
||
return t.start=function(e,r){var o=null
|
||
r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},{"./cipher":495,"./cipherModes":496,"./forge":500,"./util":532}],492:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./aes"),e("./tls")
|
||
var i=t.exports=n.tls
|
||
function o(e,t,r){var o=t.entity===n.tls.ConnectionEnd.client
|
||
e.read.cipherState={init:!1,cipher:n.cipher.createDecipher("AES-CBC",o?r.keys.server_write_key:r.keys.client_write_key),iv:o?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:n.cipher.createCipher("AES-CBC",o?r.keys.client_write_key:r.keys.server_write_key),iv:o?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=c,e.write.cipherFunction=a,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=i.hmac_sha1}function a(e,t){var r,o=!1,a=t.macFunction(t.macKey,t.sequenceNumber,e)
|
||
e.fragment.putBytes(a),t.updateSequenceNumber(),r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:n.random.getBytesSync(16),t.cipherState.init=!0
|
||
var u=t.cipherState.cipher
|
||
return u.start({iv:r}),e.version.minor>=i.Versions.TLS_1_1.minor&&u.output.putBytes(r),u.update(e.fragment),u.finish(s)&&(e.fragment=u.output,e.length=e.fragment.length(),o=!0),o}function s(e,t,r){if(!r){var n=e-t.length()%e
|
||
t.fillWithByte(n-1,n)}return!0}function u(e,t,r){var n=!0
|
||
if(r){for(var i=t.length(),o=t.last(),a=i-1-o;a<i-1;++a)n=n&&t.at(a)==o
|
||
n&&t.truncate(o+1)}return n}i.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:o},i.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,e.cipher_type=i.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=i.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:o}
|
||
function c(e,t){var r,o=!1
|
||
0,r=e.version.minor===i.Versions.TLS_1_0.minor?t.cipherState.init?null:t.cipherState.iv:e.fragment.getBytes(16),t.cipherState.init=!0
|
||
var a=t.cipherState.cipher
|
||
a.start({iv:r}),a.update(e.fragment),o=a.finish(u)
|
||
var s=t.macLength,c=n.random.getBytesSync(s),l=a.output.length()
|
||
l>=s?(e.fragment=a.output.getBytes(l-s),c=a.output.getBytes(s)):e.fragment=a.output.getBytes(),e.fragment=n.util.createBuffer(e.fragment),e.length=e.fragment.length()
|
||
var f=t.macFunction(t.macKey,t.sequenceNumber,e)
|
||
return t.updateSequenceNumber(),o=function(e,t,r){var i=n.hmac.create()
|
||
return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),t===r}(t.macKey,c,f)&&o}},{"./aes":491,"./forge":500,"./tls":531}],493:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./forge")
|
||
e("./util"),e("./oids")
|
||
var o=t.exports=i.asn1=i.asn1||{}
|
||
function a(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.")
|
||
throw n.available=e.length(),n.remaining=t,n.requested=r,n}}o.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},o.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},o.create=function(e,t,r,n,a){if(i.util.isArray(n)){for(var s=[],u=0;u<n.length;++u)void 0!==n[u]&&s.push(n[u])
|
||
n=s}var c={tagClass:e,type:t,constructed:r,composed:r||i.util.isArray(n),value:n}
|
||
return a&&"bitStringContents"in a&&(c.bitStringContents=a.bitStringContents,c.original=o.copy(c)),c},o.copy=function(e,t){var r
|
||
if(i.util.isArray(e)){r=[]
|
||
for(var n=0;n<e.length;++n)r.push(o.copy(e[n],t))
|
||
return r}return"string"==typeof e?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:o.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)},o.equals=function(e,t,r){if(i.util.isArray(e)){if(!i.util.isArray(t))return!1
|
||
if(e.length!==t.length)return!1
|
||
for(var a=0;a<e.length;++a)if(!o.equals(e[a],t[a]))return!1
|
||
return!0}if((void 0===e?"undefined":n(e))!==(void 0===t?"undefined":n(t)))return!1
|
||
if("string"==typeof e)return e===t
|
||
var s=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&o.equals(e.value,t.value)
|
||
return r&&r.includeBitStringContents&&(s=s&&e.bitStringContents===t.bitStringContents),s},o.getBerValueLength=function(e){var t=e.getByte()
|
||
if(128!==t)return 128&t?e.getInt((127&t)<<3):t}
|
||
var s=function(e,t){var r=e.getByte()
|
||
if(t--,128!==r){var n
|
||
if(128&r){var i=127&r
|
||
a(e,t,i),n=e.getInt(i<<3)}else n=r
|
||
if(n<0)throw new Error("Negative length: "+n)
|
||
return n}}
|
||
o.fromDer=function(e,t){return void 0===t&&(t={strict:!0,decodeBitStrings:!0}),"boolean"==typeof t&&(t={strict:t,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"string"==typeof e&&(e=i.util.createBuffer(e)),function e(t,r,n,i){var u
|
||
a(t,r,2)
|
||
var c=t.getByte()
|
||
r--
|
||
var l=192&c
|
||
var f=31&c
|
||
u=t.length()
|
||
var h=s(t,r)
|
||
r-=u-t.length()
|
||
if(void 0!==h&&h>r){if(i.strict){var d=new Error("Too few bytes to read ASN.1 value.")
|
||
throw d.available=t.length(),d.remaining=r,d.requested=h,d}h=r}var p
|
||
var m
|
||
var y=32==(32&c)
|
||
if(y)if(p=[],void 0===h)for(;;){if(a(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2
|
||
break}u=t.length(),p.push(e(t,r,n+1,i)),r-=u-t.length()}else for(;h>0;)u=t.length(),p.push(e(t,h,n+1,i)),r-=u-t.length(),h-=u-t.length()
|
||
void 0===p&&l===o.Class.UNIVERSAL&&f===o.Type.BITSTRING&&(m=t.bytes(h))
|
||
if(void 0===p&&i.decodeBitStrings&&l===o.Class.UNIVERSAL&&f===o.Type.BITSTRING&&h>1){var g=t.read,b=r,v=0
|
||
if(f===o.Type.BITSTRING&&(a(t,r,1),v=t.getByte(),r--),0===v)try{u=t.length()
|
||
var _={verbose:i.verbose,strict:!0,decodeBitStrings:!0},w=e(t,r,n+1,_),S=u-t.length()
|
||
r-=S,f==o.Type.BITSTRING&&S++
|
||
var E=w.tagClass
|
||
S!==h||E!==o.Class.UNIVERSAL&&E!==o.Class.CONTEXT_SPECIFIC||(p=[w])}catch(e){}void 0===p&&(t.read=g,r=b)}if(void 0===p){if(void 0===h){if(i.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.")
|
||
h=r}if(f===o.Type.BMPSTRING)for(p="";h>0;h-=2)a(t,r,2),p+=String.fromCharCode(t.getInt16()),r-=2
|
||
else p=t.getBytes(h)}var k=void 0===m?null:{bitStringContents:m}
|
||
return o.create(l,f,y,p,k)}(e,e.length(),0,t)},o.toDer=function(e){var t=i.util.createBuffer(),r=e.tagClass|e.type,n=i.util.createBuffer(),a=!1
|
||
if("bitStringContents"in e&&(a=!0,e.original&&(a=o.equals(e,e.original))),a)n.putBytes(e.bitStringContents)
|
||
else if(e.composed){e.constructed?r|=32:n.putByte(0)
|
||
for(var s=0;s<e.value.length;++s)void 0!==e.value[s]&&n.putBuffer(o.toDer(e.value[s]))}else if(e.type===o.Type.BMPSTRING)for(s=0;s<e.value.length;++s)n.putInt16(e.value.charCodeAt(s))
|
||
else e.type===o.Type.INTEGER&&e.value.length>1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?n.putBytes(e.value.substr(1)):n.putBytes(e.value)
|
||
if(t.putByte(r),n.length()<=127)t.putByte(127&n.length())
|
||
else{var u=n.length(),c=""
|
||
do{c+=String.fromCharCode(255&u),u>>>=8}while(u>0)
|
||
t.putByte(128|c.length)
|
||
for(s=c.length-1;s>=0;--s)t.putByte(c.charCodeAt(s))}return t.putBuffer(n),t},o.oidToDer=function(e){var t,r,n,o,a=e.split("."),s=i.util.createBuffer()
|
||
s.putByte(40*parseInt(a[0],10)+parseInt(a[1],10))
|
||
for(var u=2;u<a.length;++u){t=!0,r=[],n=parseInt(a[u],10)
|
||
do{o=127&n,n>>>=7,t||(o|=128),r.push(o),t=!1}while(n>0)
|
||
for(var c=r.length-1;c>=0;--c)s.putByte(r[c])}return s},o.derToOid=function(e){var t
|
||
"string"==typeof e&&(e=i.util.createBuffer(e))
|
||
var r=e.getByte()
|
||
t=Math.floor(r/40)+"."+r%40
|
||
for(var n=0;e.length()>0;)n<<=7,128&(r=e.getByte())?n+=127&r:(t+="."+(n+r),n=0)
|
||
return t},o.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10)
|
||
r=r>=50?1900+r:2e3+r
|
||
var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),s=0
|
||
if(e.length>11){var u=e.charAt(10),c=10
|
||
"+"!==u&&"-"!==u&&(s=parseInt(e.substr(10,2),10),c+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,s,0),c&&("+"===(u=e.charAt(c))||"-"===u)){var l=60*parseInt(e.substr(c+1,2),10)+parseInt(e.substr(c+4,2),10)
|
||
l*=6e4,"+"===u?t.setTime(+t-l):t.setTime(+t+l)}return t},o.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),a=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),u=0,c=0,l=!1
|
||
"Z"===e.charAt(e.length-1)&&(l=!0)
|
||
var f=e.length-5,h=e.charAt(f)
|
||
"+"!==h&&"-"!==h||(c=60*parseInt(e.substr(f+1,2),10)+parseInt(e.substr(f+4,2),10),c*=6e4,"+"===h&&(c*=-1),l=!0)
|
||
return"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),l?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,s,u),t.setTime(+t+c)):(t.setFullYear(r,n,i),t.setHours(o,a,s,u)),t},o.dateToUtcTime=function(e){if("string"==typeof e)return e
|
||
var t="",r=[]
|
||
r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds())
|
||
for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n]
|
||
return t+="Z"},o.dateToGeneralizedTime=function(e){if("string"==typeof e)return e
|
||
var t="",r=[]
|
||
r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds())
|
||
for(var n=0;n<r.length;++n)r[n].length<2&&(t+="0"),t+=r[n]
|
||
return t+="Z"},o.integerToDer=function(e){var t=i.util.createBuffer()
|
||
if(e>=-128&&e<128)return t.putSignedInt(e,8)
|
||
if(e>=-32768&&e<32768)return t.putSignedInt(e,16)
|
||
if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24)
|
||
if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32)
|
||
var r=new Error("Integer too large; max is 32-bits.")
|
||
throw r.integer=e,r},o.derToInteger=function(e){"string"==typeof e&&(e=i.util.createBuffer(e))
|
||
var t=8*e.length()
|
||
if(t>32)throw new Error("Integer too large; max is 32-bits.")
|
||
return e.getSignedInt(t)},o.validate=function(e,t,r,n){var a=!1
|
||
if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)n&&(e.tagClass!==t.tagClass&&n.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&n.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'))
|
||
else if(e.constructed===t.constructed||void 0===t.constructed){if(a=!0,t.value&&i.util.isArray(t.value))for(var s=0,u=0;a&&u<t.value.length;++u)a=t.value[u].optional||!1,e.value[s]&&((a=o.validate(e.value[s],t.value[u],r,n))?++s:t.value[u].optional&&(a=!0)),!a&&n&&n.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"')
|
||
if(a&&r)if(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)if(e.bitStringContents.length<2)r[t.captureBitStringValue]=""
|
||
else{if(0!==e.bitStringContents.charCodeAt(0))throw new Error("captureBitStringValue only supported for zero unused bits")
|
||
r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}else n&&n.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"')
|
||
return a}
|
||
var u=/[^\\u0000-\\u00ff]/
|
||
o.prettyPrint=function(e,t,r){var n=""
|
||
t=t||0,r=r||2,t>0&&(n+="\n")
|
||
for(var a="",s=0;s<t*r;++s)a+=" "
|
||
switch(n+=a+"Tag: ",e.tagClass){case o.Class.UNIVERSAL:n+="Universal:"
|
||
break
|
||
case o.Class.APPLICATION:n+="Application:"
|
||
break
|
||
case o.Class.CONTEXT_SPECIFIC:n+="Context-Specific:"
|
||
break
|
||
case o.Class.PRIVATE:n+="Private:"}if(e.tagClass===o.Class.UNIVERSAL)switch(n+=e.type,e.type){case o.Type.NONE:n+=" (None)"
|
||
break
|
||
case o.Type.BOOLEAN:n+=" (Boolean)"
|
||
break
|
||
case o.Type.INTEGER:n+=" (Integer)"
|
||
break
|
||
case o.Type.BITSTRING:n+=" (Bit string)"
|
||
break
|
||
case o.Type.OCTETSTRING:n+=" (Octet string)"
|
||
break
|
||
case o.Type.NULL:n+=" (Null)"
|
||
break
|
||
case o.Type.OID:n+=" (Object Identifier)"
|
||
break
|
||
case o.Type.ODESC:n+=" (Object Descriptor)"
|
||
break
|
||
case o.Type.EXTERNAL:n+=" (External or Instance of)"
|
||
break
|
||
case o.Type.REAL:n+=" (Real)"
|
||
break
|
||
case o.Type.ENUMERATED:n+=" (Enumerated)"
|
||
break
|
||
case o.Type.EMBEDDED:n+=" (Embedded PDV)"
|
||
break
|
||
case o.Type.UTF8:n+=" (UTF8)"
|
||
break
|
||
case o.Type.ROID:n+=" (Relative Object Identifier)"
|
||
break
|
||
case o.Type.SEQUENCE:n+=" (Sequence)"
|
||
break
|
||
case o.Type.SET:n+=" (Set)"
|
||
break
|
||
case o.Type.PRINTABLESTRING:n+=" (Printable String)"
|
||
break
|
||
case o.Type.IA5String:n+=" (IA5String (ASCII))"
|
||
break
|
||
case o.Type.UTCTIME:n+=" (UTC time)"
|
||
break
|
||
case o.Type.GENERALIZEDTIME:n+=" (Generalized time)"
|
||
break
|
||
case o.Type.BMPSTRING:n+=" (BMP String)"}else n+=e.type
|
||
if(n+="\n",n+=a+"Constructed: "+e.constructed+"\n",e.composed){var c=0,l=""
|
||
for(s=0;s<e.value.length;++s)void 0!==e.value[s]&&(c+=1,l+=o.prettyPrint(e.value[s],t+1,r),s+1<e.value.length&&(l+=","))
|
||
n+=a+"Sub values: "+c+l}else{if(n+=a+"Value: ",e.type===o.Type.OID){var f=o.derToOid(e.value)
|
||
n+=f,i.pki&&i.pki.oids&&f in i.pki.oids&&(n+=" ("+i.pki.oids[f]+") ")}if(e.type===o.Type.INTEGER)try{n+=o.derToInteger(e.value)}catch(t){n+="0x"+i.util.bytesToHex(e.value)}else if(e.type===o.Type.BITSTRING){if(e.value.length>1?n+="0x"+i.util.bytesToHex(e.value.slice(1)):n+="(none)",e.value.length>0){var h=e.value.charCodeAt(0)
|
||
1==h?n+=" (1 unused bit shown)":h>1&&(n+=" ("+h+" unused bits shown)")}}else e.type===o.Type.OCTETSTRING?(u.test(e.value)||(n+="("+e.value+") "),n+="0x"+i.util.bytesToHex(e.value)):e.type===o.Type.UTF8?n+=i.util.decodeUtf8(e.value):e.type===o.Type.PRINTABLESTRING||e.type===o.Type.IA5String?n+=e.value:u.test(e.value)?n+="0x"+i.util.bytesToHex(e.value):0===e.value.length?n+="[null]":n+=e.value}return n}},{"./forge":500,"./oids":511,"./util":532}],494:[function(e,t,r){(function(e){"use strict"
|
||
var r={}
|
||
t.exports=r
|
||
var n={}
|
||
r.encode=function(e,t,r){if("string"!=typeof t)throw new TypeError('"alphabet" must be a string.')
|
||
if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.')
|
||
var n=""
|
||
if(e instanceof Uint8Array){var i=0,o=t.length,a=t.charAt(0),s=[0]
|
||
for(i=0;i<e.length;++i){for(var u=0,c=e[i];u<s.length;++u)c+=s[u]<<8,s[u]=c%o,c=c/o|0
|
||
for(;c>0;)s.push(c%o),c=c/o|0}for(i=0;0===e[i]&&i<e.length-1;++i)n+=a
|
||
for(i=s.length-1;i>=0;--i)n+=t[s[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0]
|
||
for(r=0;r<e.length();++r){for(var a=0,s=e.at(r);a<o.length;++a)s+=o[a]<<8,o[a]=s%n,s=s/n|0
|
||
for(;s>0;)o.push(s%n),s=s/n|0}var u=""
|
||
for(r=0;0===e.at(r)&&r<e.length()-1;++r)u+=i
|
||
for(r=o.length-1;r>=0;--r)u+=t[o[r]]
|
||
return u}(e,t)
|
||
if(r){var l=new RegExp(".{1,"+r+"}","g")
|
||
n=n.match(l).join("\r\n")}return n},r.decode=function(t,r){if("string"!=typeof t)throw new TypeError('"input" must be a string.')
|
||
if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.')
|
||
var i=n[r]
|
||
if(!i){i=n[r]=[]
|
||
for(var o=0;o<r.length;++o)i[r.charCodeAt(o)]=o}t=t.replace(/\s/g,"")
|
||
var a=r.length,s=r.charAt(0),u=[0]
|
||
for(o=0;o<t.length;o++){var c=i[t.charCodeAt(o)]
|
||
if(void 0===c)return
|
||
for(var l=0,f=c;l<u.length;++l)f+=u[l]*a,u[l]=255&f,f>>=8
|
||
for(;f>0;)u.push(255&f),f>>=8}for(var h=0;t[h]===s&&h<t.length-1;++h)u.push(0)
|
||
return void 0!==e?e.from(u.reverse()):new Uint8Array(u.reverse())}}).call(this,e("buffer").Buffer)},{buffer:109}],495:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util"),t.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e
|
||
if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e)
|
||
return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e
|
||
if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e)
|
||
return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null}
|
||
var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)}
|
||
i.prototype.start=function(e){e=e||{}
|
||
var t={}
|
||
for(var r in e)t[r]=e[r]
|
||
t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)})
|
||
var t={}
|
||
return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t))&&(this._finish=!0,this.update(),!(this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))&&!(this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},{"./forge":500,"./util":532}],496:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util"),n.cipher=n.cipher||{}
|
||
var i=t.exports=n.cipher.modes=n.cipher.modes||{}
|
||
function o(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e
|
||
e=n.util.createBuffer()
|
||
for(var r=0;r<t.length;++r)e.putByte(t[r])}return n.util.isArray(e)||(e=[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()]),e}function a(e){e[e.length-1]=e[e.length-1]+1&4294967295}function s(e){return[e/4294967296|0,4294967295&e]}i.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.ecb.prototype.start=function(e){},i.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0
|
||
for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32()
|
||
this.cipher.encrypt(this._inBlock,this._outBlock)
|
||
for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0
|
||
for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32()
|
||
this.cipher.decrypt(this._inBlock,this._outBlock)
|
||
for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])},i.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length()
|
||
return e.fillWithByte(r,r),!0},i.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1
|
||
var r=e.length(),n=e.at(r-1)
|
||
return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.")
|
||
this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.")
|
||
this._iv=o(e.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0
|
||
for(var n=0;n<this._ints;++n)this._inBlock[n]=this._prev[n]^e.getInt32()
|
||
this.cipher.encrypt(this._inBlock,this._outBlock)
|
||
for(n=0;n<this._ints;++n)t.putInt32(this._outBlock[n])
|
||
this._prev=this._outBlock},i.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0
|
||
for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32()
|
||
this.cipher.decrypt(this._inBlock,this._outBlock)
|
||
for(n=0;n<this._ints;++n)t.putInt32(this._prev[n]^this._outBlock[n])
|
||
this._prev=this._inBlock.slice(0)},i.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length()
|
||
return e.fillWithByte(r,r),!0},i.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1
|
||
var r=e.length(),n=e.at(r-1)
|
||
return!(n>this.blockSize<<2)&&(e.truncate(n),!0)},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.")
|
||
this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length()
|
||
if(0===n)return!0
|
||
if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i])
|
||
else{var o=(this.blockSize-n)%this.blockSize
|
||
o>0&&(o=this.blockSize-o),this._partialOutput.clear()
|
||
for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i])
|
||
if(o>0)e.read-=this.blockSize
|
||
else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i]
|
||
if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0
|
||
t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length()
|
||
if(0===n)return!0
|
||
if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i])
|
||
else{var o=(this.blockSize-n)%this.blockSize
|
||
o>0&&(o=this.blockSize-o),this._partialOutput.clear()
|
||
for(i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i])
|
||
if(o>0)e.read-=this.blockSize
|
||
else for(i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i]
|
||
if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0
|
||
t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.")
|
||
this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length()
|
||
if(0===e.length())return!0
|
||
if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i]
|
||
else{var o=(this.blockSize-n)%this.blockSize
|
||
o>0&&(o=this.blockSize-o),this._partialOutput.clear()
|
||
for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i])
|
||
if(o>0)e.read-=this.blockSize
|
||
else for(i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i]
|
||
if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0
|
||
t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.")
|
||
this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length()
|
||
if(0===n)return!0
|
||
if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i])
|
||
else{var o=(this.blockSize-n)%this.blockSize
|
||
o>0&&(o=this.blockSize-o),this._partialOutput.clear()
|
||
for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i])
|
||
if(o>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0
|
||
t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}a(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.")
|
||
var t,r=n.util.createBuffer(e.iv)
|
||
if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.")
|
||
this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits)
|
||
var i=r.length()
|
||
if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1]
|
||
else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])
|
||
this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),a(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=s(8*t.length())
|
||
var o=t.length()%this.blockSize
|
||
for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length()
|
||
if(0===n)return!0
|
||
if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^=e.getInt32())
|
||
this._cipherLength+=this.blockSize}else{var o=(this.blockSize-n)%this.blockSize
|
||
o>0&&(o=this.blockSize-o),this._partialOutput.clear()
|
||
for(i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i])
|
||
if(0===o||r){if(r){var s=n%this.blockSize
|
||
this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize
|
||
for(i=0;i<this._ints;++i)this._outBlock[i]=this._partialOutput.getInt32()
|
||
this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0
|
||
t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),a(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length()
|
||
if(n<this.blockSize&&!(r&&n>0))return!0
|
||
this.cipher.encrypt(this._inBlock,this._outBlock),a(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock)
|
||
for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]^this._hashBlock[i])
|
||
n<this.blockSize?this._cipherLength+=n%this.blockSize:this._cipherLength+=this.blockSize},i.gcm.prototype.afterFinish=function(e,t){var r=!0
|
||
t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=n.util.createBuffer()
|
||
var i=this._aDataLength.concat(s(8*this._cipherLength))
|
||
this._s=this.ghash(this._hashSubkey,this._s,i)
|
||
var o=[]
|
||
this.cipher.encrypt(this._j0,o)
|
||
for(var a=0;a<this._ints;++a)this.tag.putInt32(this._s[a]^o[a])
|
||
return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},i.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],n=t.slice(0),i=0;i<128;++i){e[i/32|0]&1<<31-i%32&&(r[0]^=n[0],r[1]^=n[1],r[2]^=n[2],r[3]^=n[3]),this.pow(n,n)}return r}
|
||
i.gcm.prototype.pow=function(e,t){for(var r=1&e[3],n=3;n>0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31
|
||
t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n]
|
||
t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),a=0;a<i;++a){var s=[0,0,0,0],u=(n-1-a%n)*t
|
||
s[a/n|0]=1<<t-1<<u,o[a]=this.generateSubHashTable(this.multiply(s,e),t)}return o},i.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,n=r>>>1,i=new Array(r)
|
||
i[n]=e.slice(0)
|
||
for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1
|
||
for(o=2;o<n;){for(var a=1;a<o;++a){var s=i[o],u=i[a]
|
||
i[o+a]=[s[0]^u[0],s[1]^u[1],s[2]^u[2],s[3]^u[3]]}o*=2}for(i[0]=[0,0,0,0],o=n+1;o<r;++o){var c=i[o^n]
|
||
i[o]=[e[0]^c[0],e[1]^c[1],e[2]^c[2],e[3]^c[3]]}return i}},{"./forge":500,"./util":532}],497:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
t.exports=n.debug=n.debug||{},n.debug.storage={},n.debug.get=function(e,t){var r
|
||
return void 0===e?r=n.debug.storage:e in n.debug.storage&&(r=void 0===t?n.debug.storage[e]:n.debug.storage[e][t]),r},n.debug.set=function(e,t,r){e in n.debug.storage||(n.debug.storage[e]={}),n.debug.storage[e][t]=r},n.debug.clear=function(e,t){void 0===e?n.debug.storage={}:e in n.debug.storage&&(void 0===t?delete n.debug.storage[e]:delete n.debug.storage[e][t])}},{"./forge":500}],498:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
function i(e,t){n.cipher.registerAlgorithm(e,function(){return new n.des.Algorithm(e,t)})}e("./cipher"),e("./cipherModes"),e("./util"),t.exports=n.des=n.des||{},n.des.startEncrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!1,mode:n||(null===t?"ECB":"CBC")})
|
||
return i.start(t),i},n.des.createEncryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!1,mode:t})},n.des.startDecrypting=function(e,t,r,n){var i=p({key:e,output:r,decrypt:!0,mode:n||(null===t?"ECB":"CBC")})
|
||
return i.start(t),i},n.des.createDecryptionCipher=function(e,t){return p({key:e,output:null,decrypt:!0,mode:t})},n.des.Algorithm=function(e,t){var r=this
|
||
r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return d(r._keys,e,t,!1)},decrypt:function(e,t){return d(r._keys,e,t,!0)}}}),r._init=!1},n.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=n.util.createBuffer(e.key)
|
||
if(0===this.name.indexOf("3DES")&&24!==t.length())throw new Error("Invalid Triple-DES key size: "+8*t.length())
|
||
this._keys=function(e){for(var t,r=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],o=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],a=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],f=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],h=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],m=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],y=e.length()>8?3:1,g=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,_=0;_<y;_++){var w=e.getInt32(),S=e.getInt32()
|
||
w^=(t=252645135&(w>>>4^S))<<4,w^=t=65535&((S^=t)>>>-16^w),w^=(t=858993459&(w>>>2^(S^=t<<-16)))<<2,w^=t=65535&((S^=t)>>>-16^w),w^=(t=1431655765&(w>>>1^(S^=t<<-16)))<<1,w^=t=16711935&((S^=t)>>>8^w),t=(w^=(t=1431655765&(w>>>1^(S^=t<<8)))<<1)<<8|(S^=t)>>>20&240,w=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=t
|
||
for(var E=0;E<b.length;++E){b[E]?(w=w<<2|w>>>26,S=S<<2|S>>>26):(w=w<<1|w>>>27,S=S<<1|S>>>27)
|
||
var k=r[(w&=-15)>>>28]|n[w>>>24&15]|i[w>>>20&15]|o[w>>>16&15]|a[w>>>12&15]|s[w>>>8&15]|u[w>>>4&15],x=c[(S&=-15)>>>28]|l[S>>>24&15]|f[S>>>20&15]|h[S>>>16&15]|d[S>>>12&15]|p[S>>>8&15]|m[S>>>4&15]
|
||
t=65535&(x>>>16^k),g[v++]=k^t,g[v++]=x^t<<16}}return g}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr)
|
||
var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],a=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],s=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],c=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],l=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696]
|
||
function d(e,t,r,n){var i,d,p=32===e.length?3:9
|
||
i=3===p?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2]
|
||
var m=t[0],y=t[1]
|
||
m^=(d=252645135&(m>>>4^y))<<4,m^=(d=65535&(m>>>16^(y^=d)))<<16,m^=d=858993459&((y^=d)>>>2^m),m^=d=16711935&((y^=d<<2)>>>8^m),m=(m^=(d=1431655765&(m>>>1^(y^=d<<8)))<<1)<<1|m>>>31,y=(y^=d)<<1|y>>>31
|
||
for(var g=0;g<p;g+=3){for(var b=i[g+1],v=i[g+2],_=i[g];_!=b;_+=v){var w=y^e[_],S=(y>>>4|y<<28)^e[_+1]
|
||
d=m,m=y,y=d^(a[w>>>24&63]|u[w>>>16&63]|l[w>>>8&63]|h[63&w]|o[S>>>24&63]|s[S>>>16&63]|c[S>>>8&63]|f[63&S])}d=m,m=y,y=d}y=y>>>1|y<<31,y^=d=1431655765&((m=m>>>1|m<<31)>>>1^y),y^=(d=16711935&(y>>>8^(m^=d<<1)))<<8,y^=(d=858993459&(y>>>2^(m^=d)))<<2,y^=d=65535&((m^=d)>>>16^y),y^=d=252645135&((m^=d<<16)>>>4^y),m^=d<<4,r[0]=m,r[1]=y}function p(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start
|
||
return t.start=function(e,r){var o=null
|
||
r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},{"./cipher":495,"./cipherModes":496,"./forge":500,"./util":532}],499:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("./forge")
|
||
if(e("./jsbn"),e("./random"),e("./sha512"),e("./util"),void 0===i)var i=n.jsbn.BigInteger
|
||
var o=n.util.ByteBuffer,a=void 0===r?Uint8Array:r
|
||
n.pki=n.pki||{},t.exports=n.pki.ed25519=n.ed25519=n.ed25519||{}
|
||
var s=n.ed25519
|
||
function u(e){var t=e.message
|
||
if(t instanceof Uint8Array)return t
|
||
var n=e.encoding
|
||
if(void 0===t){if(!e.md)throw new TypeError('"options.message" or "options.md" not specified.')
|
||
t=e.md.digest().getBytes(),n="binary"}if("string"==typeof t&&!n)throw new TypeError('"options.encoding" must be "binary" or "utf8".')
|
||
if("string"==typeof t){if(void 0!==r)return new r(t,n)
|
||
t=new o(t,n)}else if(!(t instanceof o))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.')
|
||
for(var i=new a(t.length()),s=0;s<i.length;++s)i[s]=t.at(s)
|
||
return i}s.constants={},s.constants.PUBLIC_KEY_BYTE_LENGTH=32,s.constants.PRIVATE_KEY_BYTE_LENGTH=64,s.constants.SEED_BYTE_LENGTH=32,s.constants.SIGN_BYTE_LENGTH=64,s.constants.HASH_BYTE_LENGTH=64,s.generateKeyPair=function(e){var t=(e=e||{}).seed
|
||
if(void 0===t)t=n.random.getBytesSync(s.constants.SEED_BYTE_LENGTH)
|
||
else if("string"==typeof t){if(t.length!==s.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+s.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.')
|
||
t=u({message:t,encoding:"binary"})
|
||
for(var r=new a(s.constants.PUBLIC_KEY_BYTE_LENGTH),i=new a(s.constants.PRIVATE_KEY_BYTE_LENGTH),o=0;o<32;++o)i[o]=t[o]
|
||
return function(e,t){var r,n=[R(),R(),R(),R()],i=g(t,32)
|
||
for(i[0]&=248,i[31]&=127,i[31]|=64,T(n,i),S(e,n),r=0;r<32;++r)t[r+32]=e[r]}(r,i),{publicKey:r,privateKey:i}},s.publicKeyFromPrivateKey=function(e){var t=u({message:(e=e||{}).privateKey,encoding:"binary"})
|
||
if(t.length!==s.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+s.constants.PRIVATE_KEY_BYTE_LENGTH)
|
||
for(var r=new a(s.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n<r.length;++n)r[n]=t[32+n]
|
||
return r},s.sign=function(e){var t=u(e=e||{}),r=u({message:e.privateKey,encoding:"binary"})
|
||
if(r.length!==s.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+s.constants.PRIVATE_KEY_BYTE_LENGTH)
|
||
var n=new a(s.constants.SIGN_BYTE_LENGTH+t.length);(function(e,t,r,n){var i,o,a=new Float64Array(64),s=[R(),R(),R(),R()],u=g(n,32)
|
||
u[0]&=248,u[31]&=127,u[31]|=64
|
||
var c=r+64
|
||
for(i=0;i<r;++i)e[64+i]=t[i]
|
||
for(i=0;i<32;++i)e[32+i]=u[32+i]
|
||
var l=g(e.subarray(32),r+32)
|
||
for(v(l),T(s,l),S(e,s),i=32;i<64;++i)e[i]=n[i]
|
||
var f=g(e,r+64)
|
||
for(v(f),i=32;i<64;++i)a[i]=0
|
||
for(i=0;i<32;++i)a[i]=l[i]
|
||
for(i=0;i<32;++i)for(o=0;o<32;o++)a[i+o]+=f[i]*u[o]
|
||
b(e.subarray(32),a)})(n,t,t.length,r)
|
||
for(var i=new a(s.constants.SIGN_BYTE_LENGTH),o=0;o<i.length;++o)i[o]=n[o]
|
||
return i},s.verify=function(e){var t=u(e=e||{})
|
||
if(void 0===e.signature)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.')
|
||
var r=u({message:e.signature,encoding:"binary"})
|
||
if(r.length!==s.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+s.constants.SIGN_BYTE_LENGTH)
|
||
var n=u({message:e.publicKey,encoding:"binary"})
|
||
if(n.length!==s.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+s.constants.PUBLIC_KEY_BYTE_LENGTH)
|
||
var i,o=new a(s.constants.SIGN_BYTE_LENGTH+t.length),h=new a(s.constants.SIGN_BYTE_LENGTH+t.length)
|
||
for(i=0;i<s.constants.SIGN_BYTE_LENGTH;++i)o[i]=r[i]
|
||
for(i=0;i<t.length;++i)o[i+s.constants.SIGN_BYTE_LENGTH]=t[i]
|
||
return function(e,t,r,n){var i,o=new a(32),s=[R(),R(),R(),R()],u=[R(),R(),R(),R()]
|
||
if(-1,r<64)return-1
|
||
if(function(e,t){var r=R(),n=R(),i=R(),o=R(),a=R(),s=R(),u=R()
|
||
I(e[2],l),function(e,t){var r
|
||
for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8)
|
||
e[15]&=32767}(e[1],t),N(i,e[1]),j(o,i,f),B(i,i,e[2]),O(o,e[2],o),N(a,o),N(s,a),j(u,s,a),j(r,u,i),j(r,r,o),function(e,t){var r,n=R()
|
||
for(r=0;r<16;++r)n[r]=t[r]
|
||
for(r=250;r>=0;--r)N(n,n),1!==r&&j(n,n,t)
|
||
for(r=0;r<16;++r)e[r]=n[r]}(r,r),j(r,r,i),j(r,r,o),j(r,r,o),j(e[0],r,o),N(n,e[0]),j(n,n,o),k(n,i)&&j(e[0],e[0],y)
|
||
if(N(n,e[0]),j(n,n,o),k(n,i))return-1
|
||
C(e[0])===t[31]>>7&&B(e[0],c,e[0])
|
||
return j(e[3],e[0],e[1]),0}(u,n))return-1
|
||
for(i=0;i<r;++i)e[i]=t[i]
|
||
for(i=0;i<32;++i)e[i+32]=n[i]
|
||
var h=g(e,r)
|
||
if(v(h),A(s,u,h),T(u,t.subarray(32)),_(s,u),S(o,s),r-=64,x(t,0,o,0)){for(i=0;i<r;++i)e[i]=0
|
||
return-1}for(i=0;i<r;++i)e[i]=t[i+64]
|
||
return r}(h,o,o.length,n)>=0}
|
||
var c=R(),l=R([1]),f=R([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=R([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=R([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=R([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),y=R([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139])
|
||
function g(e,t){var i=n.md.sha512.create(),u=new o(e)
|
||
i.update(u.getBytes(t),"binary")
|
||
var c=i.digest().getBytes()
|
||
if(void 0!==r)return new r(c,"binary")
|
||
for(var l=new a(s.constants.HASH_BYTE_LENGTH),f=0;f<64;++f)l[f]=c.charCodeAt(f)
|
||
return l}function b(e,t){var r,n,i,o
|
||
for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*m[i-(n-32)],r=t[i]+128>>8,t[i]-=256*r
|
||
t[i]+=r,t[n]=0}for(r=0,i=0;i<32;++i)t[i]+=r-(t[31]>>4)*m[i],r=t[i]>>8,t[i]&=255
|
||
for(i=0;i<32;++i)t[i]-=r*m[i]
|
||
for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function v(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0
|
||
b(e,t)}function _(e,t){var r=R(),n=R(),i=R(),o=R(),a=R(),s=R(),u=R(),c=R(),l=R()
|
||
B(r,e[1],e[0]),B(l,t[1],t[0]),j(r,r,l),O(n,e[0],e[1]),O(l,t[0],t[1]),j(n,n,l),j(i,e[3],t[3]),j(i,i,h),j(o,e[2],t[2]),O(o,o,o),B(a,n,r),B(s,o,i),O(u,o,i),O(c,n,r),j(e[0],a,s),j(e[1],c,u),j(e[2],u,s),j(e[3],a,c)}function w(e,t,r){for(var n=0;n<4;++n)M(e[n],t[n],r)}function S(e,t){var r=R(),n=R(),i=R();(function(e,t){var r,n=R()
|
||
for(r=0;r<16;++r)n[r]=t[r]
|
||
for(r=253;r>=0;--r)N(n,n),2!==r&&4!==r&&j(n,n,t)
|
||
for(r=0;r<16;++r)e[r]=n[r]})(i,t[2]),j(r,t[0],i),j(n,t[1],i),E(e,n),e[31]^=C(r)<<7}function E(e,t){var r,n,i,o=R(),a=R()
|
||
for(r=0;r<16;++r)a[r]=t[r]
|
||
for(P(a),P(a),P(a),n=0;n<2;++n){for(o[0]=a[0]-65517,r=1;r<15;++r)o[r]=a[r]-65535-(o[r-1]>>16&1),o[r-1]&=65535
|
||
o[15]=a[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,M(a,o,1-i)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function k(e,t){var r=new a(32),n=new a(32)
|
||
return E(r,e),E(n,t),x(r,0,n,0)}function x(e,t,r,n){return function(e,t,r,n,i){var o,a=0
|
||
for(o=0;o<i;++o)a|=e[t+o]^r[n+o]
|
||
return(1&a-1>>>8)-1}(e,t,r,n,32)}function C(e){var t=new a(32)
|
||
return E(t,e),1&t[0]}function A(e,t,r){var n,i
|
||
for(I(e[0],c),I(e[1],l),I(e[2],l),I(e[3],c),i=255;i>=0;--i)w(e,t,n=r[i/8|0]>>(7&i)&1),_(t,e),_(e,e),w(e,t,n)}function T(e,t){var r=[R(),R(),R(),R()]
|
||
I(r[0],d),I(r[1],p),I(r[2],l),j(r[3],d,p),A(e,r,t)}function I(e,t){var r
|
||
for(r=0;r<16;r++)e[r]=0|t[r]}function P(e){var t,r,n=1
|
||
for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n
|
||
e[0]+=n-1+37*(n-1)}function M(e,t,r){for(var n,i=~(r-1),o=0;o<16;++o)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function R(e){var t,r=new Float64Array(16)
|
||
if(e)for(t=0;t<e.length;++t)r[t]=e[t]
|
||
return r}function O(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]+r[n]}function B(e,t,r){for(var n=0;n<16;++n)e[n]=t[n]-r[n]}function N(e,t){j(e,t,t)}function j(e,t,r){var n,i,o=0,a=0,s=0,u=0,c=0,l=0,f=0,h=0,d=0,p=0,m=0,y=0,g=0,b=0,v=0,_=0,w=0,S=0,E=0,k=0,x=0,C=0,A=0,T=0,I=0,P=0,M=0,R=0,O=0,B=0,N=0,j=r[0],L=r[1],D=r[2],U=r[3],F=r[4],z=r[5],q=r[6],V=r[7],H=r[8],K=r[9],W=r[10],G=r[11],Y=r[12],Q=r[13],X=r[14],$=r[15]
|
||
o+=(n=t[0])*j,a+=n*L,s+=n*D,u+=n*U,c+=n*F,l+=n*z,f+=n*q,h+=n*V,d+=n*H,p+=n*K,m+=n*W,y+=n*G,g+=n*Y,b+=n*Q,v+=n*X,_+=n*$,a+=(n=t[1])*j,s+=n*L,u+=n*D,c+=n*U,l+=n*F,f+=n*z,h+=n*q,d+=n*V,p+=n*H,m+=n*K,y+=n*W,g+=n*G,b+=n*Y,v+=n*Q,_+=n*X,w+=n*$,s+=(n=t[2])*j,u+=n*L,c+=n*D,l+=n*U,f+=n*F,h+=n*z,d+=n*q,p+=n*V,m+=n*H,y+=n*K,g+=n*W,b+=n*G,v+=n*Y,_+=n*Q,w+=n*X,S+=n*$,u+=(n=t[3])*j,c+=n*L,l+=n*D,f+=n*U,h+=n*F,d+=n*z,p+=n*q,m+=n*V
|
||
y+=n*H,g+=n*K,b+=n*W,v+=n*G,_+=n*Y,w+=n*Q,S+=n*X,E+=n*$,c+=(n=t[4])*j,l+=n*L,f+=n*D,h+=n*U,d+=n*F,p+=n*z,m+=n*q,y+=n*V,g+=n*H,b+=n*K,v+=n*W,_+=n*G,w+=n*Y,S+=n*Q,E+=n*X,k+=n*$,l+=(n=t[5])*j,f+=n*L,h+=n*D,d+=n*U,p+=n*F,m+=n*z,y+=n*q,g+=n*V,b+=n*H,v+=n*K,_+=n*W,w+=n*G,S+=n*Y,E+=n*Q,k+=n*X,x+=n*$,f+=(n=t[6])*j,h+=n*L,d+=n*D,p+=n*U,m+=n*F,y+=n*z,g+=n*q,b+=n*V,v+=n*H,_+=n*K,w+=n*W,S+=n*G,E+=n*Y,k+=n*Q,x+=n*X,C+=n*$
|
||
h+=(n=t[7])*j,d+=n*L,p+=n*D,m+=n*U,y+=n*F,g+=n*z,b+=n*q,v+=n*V,_+=n*H,w+=n*K,S+=n*W,E+=n*G,k+=n*Y,x+=n*Q,C+=n*X,A+=n*$,d+=(n=t[8])*j,p+=n*L,m+=n*D,y+=n*U,g+=n*F,b+=n*z,v+=n*q,_+=n*V,w+=n*H,S+=n*K,E+=n*W,k+=n*G,x+=n*Y,C+=n*Q,A+=n*X,T+=n*$,p+=(n=t[9])*j,m+=n*L,y+=n*D,g+=n*U,b+=n*F,v+=n*z,_+=n*q,w+=n*V,S+=n*H,E+=n*K,k+=n*W,x+=n*G,C+=n*Y,A+=n*Q,T+=n*X,I+=n*$,m+=(n=t[10])*j,y+=n*L,g+=n*D,b+=n*U,v+=n*F,_+=n*z,w+=n*q,S+=n*V,E+=n*H
|
||
k+=n*K,x+=n*W,C+=n*G,A+=n*Y,T+=n*Q,I+=n*X,P+=n*$,y+=(n=t[11])*j,g+=n*L,b+=n*D,v+=n*U,_+=n*F,w+=n*z,S+=n*q,E+=n*V,k+=n*H,x+=n*K,C+=n*W,A+=n*G,T+=n*Y,I+=n*Q,P+=n*X,M+=n*$,g+=(n=t[12])*j,b+=n*L,v+=n*D,_+=n*U,w+=n*F,S+=n*z,E+=n*q,k+=n*V,x+=n*H,C+=n*K,A+=n*W,T+=n*G,I+=n*Y,P+=n*Q,M+=n*X,R+=n*$,b+=(n=t[13])*j,v+=n*L,_+=n*D,w+=n*U,S+=n*F,E+=n*z,k+=n*q,x+=n*V,C+=n*H,A+=n*K,T+=n*W,I+=n*G,P+=n*Y,M+=n*Q,R+=n*X,O+=n*$,v+=(n=t[14])*j
|
||
_+=n*L,w+=n*D,S+=n*U,E+=n*F,k+=n*z,x+=n*q,C+=n*V,A+=n*H,T+=n*K,I+=n*W,P+=n*G,M+=n*Y,R+=n*Q,O+=n*X,B+=n*$,_+=(n=t[15])*j,a+=38*(S+=n*D),s+=38*(E+=n*U),u+=38*(k+=n*F),c+=38*(x+=n*z),l+=38*(C+=n*q),f+=38*(A+=n*V),h+=38*(T+=n*H),d+=38*(I+=n*K),p+=38*(P+=n*W),m+=38*(M+=n*G),y+=38*(R+=n*Y),g+=38*(O+=n*Q),b+=38*(B+=n*X),v+=38*(N+=n*$),o=(n=(o+=38*(w+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536))
|
||
c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s
|
||
e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=m,e[11]=y,e[12]=g,e[13]=b,e[14]=v,e[15]=_}}).call(this,e("buffer").Buffer)},{"./forge":500,"./jsbn":503,"./random":523,"./sha512":528,"./util":532,buffer:109}],500:[function(e,t,r){"use strict"
|
||
t.exports={options:{usePureJavaScript:!1}}},{}],501:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./md"),e("./util"),(t.exports=n.hmac=n.hmac||{}).create=function(){var e=null,t=null,r=null,i=null,o={start:function(o,a){if(null!==o)if("string"==typeof o){if(!((o=o.toLowerCase())in n.md.algorithms))throw new Error('Unknown hash algorithm "'+o+'"')
|
||
t=n.md.algorithms[o].create()}else t=o
|
||
if(null===a)a=e
|
||
else{if("string"==typeof a)a=n.util.createBuffer(a)
|
||
else if(n.util.isArray(a)){var s=a
|
||
a=n.util.createBuffer()
|
||
for(var u=0;u<s.length;++u)a.putByte(s[u])}var c=a.length()
|
||
c>t.blockLength&&(t.start(),t.update(a.bytes()),a=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),c=a.length()
|
||
for(u=0;u<c;++u){s=a.at(u)
|
||
r.putByte(54^s),i.putByte(92^s)}if(c<t.blockLength)for(s=t.blockLength-c,u=0;u<s;++u)r.putByte(54),i.putByte(92)
|
||
e=a,r=r.bytes(),i=i.bytes()}t.start(),t.update(r)},update:function(e){t.update(e)},getMac:function(){var e=t.digest().bytes()
|
||
return t.start(),t.update(i),t.update(e),t.digest()}}
|
||
return o.digest=o.getMac,o}},{"./forge":500,"./md":507,"./util":532}],502:[function(e,t,r){"use strict"
|
||
t.exports=e("./forge"),e("./aes"),e("./aesCipherSuites"),e("./asn1"),e("./cipher"),e("./debug"),e("./des"),e("./ed25519"),e("./hmac"),e("./kem"),e("./log"),e("./md.all"),e("./mgf1"),e("./pbkdf2"),e("./pem"),e("./pkcs1"),e("./pkcs12"),e("./pkcs7"),e("./pki"),e("./prime"),e("./prng"),e("./pss"),e("./random"),e("./rc2"),e("./ssh"),e("./task"),e("./tls"),e("./util")},{"./aes":491,"./aesCipherSuites":492,"./asn1":493,"./cipher":495,"./debug":497,"./des":498,"./ed25519":499,"./forge":500,"./hmac":501,"./kem":504,"./log":505,"./md.all":506,"./mgf1":510,"./pbkdf2":513,"./pem":514,"./pkcs1":515,"./pkcs12":516,"./pkcs7":517,"./pki":519,"./prime":520,"./prng":521,"./pss":522,"./random":523,"./rc2":524,"./ssh":529,"./task":530,"./tls":531,"./util":532}],503:[function(e,t,r){"use strict"
|
||
var n,i=e("./forge")
|
||
t.exports=i.jsbn=i.jsbn||{}
|
||
function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function a(){return new o(null)}function s(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this.data[e],c=this.data[e++]>>14,l=s*u+c*a
|
||
i=((u=a*u+((16383&l)<<14)+r.data[n]+i)>>28)+(l>>14)+s*c,r.data[n++]=268435455&u}return i}i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=s,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this.data[e],c=this.data[e++]>>15,l=s*u+c*a
|
||
i=((u=a*u+((32767&l)<<15)+r.data[n]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this.data[e++]+r.data[n]+i
|
||
i=Math.floor(a/67108864),r.data[n++]=67108863&a}return i},n=26):(o.prototype.am=s,n=28),o.prototype.DB=n,o.prototype.DM=(1<<n)-1,o.prototype.DV=1<<n
|
||
o.prototype.FV=Math.pow(2,52),o.prototype.F1=52-n,o.prototype.F2=2*n-52
|
||
var u,c,l="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array
|
||
for(u="0".charCodeAt(0),c=0;c<=9;++c)f[u++]=c
|
||
for(u="a".charCodeAt(0),c=10;c<36;++c)f[u++]=c
|
||
for(u="A".charCodeAt(0),c=10;c<36;++c)f[u++]=c
|
||
function h(e){return l.charAt(e)}function d(e,t){var r=f[e.charCodeAt(t)]
|
||
return null==r?-1:r}function p(e){var t=a()
|
||
return t.fromInt(e),t}function m(e){var t,r=1
|
||
return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function y(e){this.m=e}function g(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function b(e,t){return e&t}function v(e,t){return e|t}function _(e,t){return e^t}function w(e,t){return e&~t}function S(e){if(0==e)return-1
|
||
var t=0
|
||
return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function E(e){for(var t=0;0!=e;)e&=e-1,++t
|
||
return t}function k(){}function x(e){return e}function C(e){this.r2=a(),this.q3=a(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}y.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},y.prototype.revert=function(e){return e},y.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},g.prototype.convert=function(e){var t=a()
|
||
return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},g.prototype.revert=function(e){var t=a()
|
||
return e.copyTo(t),this.reduce(t),t},g.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0
|
||
for(var t=0;t<this.m.t;++t){var r=32767&e.data[t],n=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM
|
||
for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},g.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},g.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t]
|
||
e.t=this.t,e.s=this.s},o.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},o.prototype.fromString=function(e,t){var r
|
||
if(16==t)r=4
|
||
else if(8==t)r=3
|
||
else if(256==t)r=8
|
||
else if(2==t)r=1
|
||
else if(32==t)r=5
|
||
else{if(4!=t)return void this.fromRadix(e,t)
|
||
r=2}this.t=0,this.s=0
|
||
for(var n=e.length,i=!1,a=0;--n>=0;){var s=8==r?255&e[n]:d(e,n)
|
||
s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==a?this.data[this.t++]=s:a+r>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this.data[this.t++]=s>>this.DB-a):this.data[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&o.ZERO.subTo(this,this)},o.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(e,t){var r
|
||
for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r]
|
||
for(r=e-1;r>=0;--r)t.data[r]=0
|
||
t.t=this.t+e,t.s=this.s},o.prototype.drShiftTo=function(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r]
|
||
t.t=Math.max(this.t-e,0),t.s=this.s},o.prototype.lShiftTo=function(e,t){var r,n=e%this.DB,i=this.DB-n,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<n&this.DM
|
||
for(r=this.t-1;r>=0;--r)t.data[r+a+1]=this.data[r]>>i|s,s=(this.data[r]&o)<<n
|
||
for(r=a-1;r>=0;--r)t.data[r]=0
|
||
t.data[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s
|
||
var r=Math.floor(e/this.DB)
|
||
if(r>=this.t)t.t=0
|
||
else{var n=e%this.DB,i=this.DB-n,o=(1<<n)-1
|
||
t.data[0]=this.data[r]>>n
|
||
for(var a=r+1;a<this.t;++a)t.data[a-r-1]|=(this.data[a]&o)<<i,t.data[a-r]=this.data[a]>>n
|
||
n>0&&(t.data[this.t-r-1]|=(this.s&o)<<i),t.t=this.t-r,t.clamp()}},o.prototype.subTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]-e.data[r],t.data[r++]=n&this.DM,n>>=this.DB
|
||
if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB
|
||
n+=this.s}else{for(n+=this.s;r<e.t;)n-=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB
|
||
n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},o.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t
|
||
for(t.t=i+n.t;--i>=0;)t.data[i]=0
|
||
for(i=0;i<n.t;++i)t.data[i+r.t]=r.am(0,n.data[i],t,i,0,r.t)
|
||
t.s=0,t.clamp(),this.s!=e.s&&o.ZERO.subTo(t,t)},o.prototype.squareTo=function(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0
|
||
for(r=0;r<t.t-1;++r){var n=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},o.prototype.divRemTo=function(e,t,r){var n=e.abs()
|
||
if(!(n.t<=0)){var i=this.abs()
|
||
if(i.t<n.t)return null!=t&&t.fromInt(0),void(null!=r&&this.copyTo(r))
|
||
null==r&&(r=a())
|
||
var s=a(),u=this.s,c=e.s,l=this.DB-m(n.data[n.t-1])
|
||
l>0?(n.lShiftTo(l,s),i.lShiftTo(l,r)):(n.copyTo(s),i.copyTo(r))
|
||
var f=s.t,h=s.data[f-1]
|
||
if(0!=h){var d=h*(1<<this.F1)+(f>1?s.data[f-2]>>this.F2:0),p=this.FV/d,y=(1<<this.F1)/d,g=1<<this.F2,b=r.t,v=b-f,_=null==t?a():t
|
||
for(s.dlShiftTo(v,_),r.compareTo(_)>=0&&(r.data[r.t++]=1,r.subTo(_,r)),o.ONE.dlShiftTo(f,_),_.subTo(s,s);s.t<f;)s.data[s.t++]=0
|
||
for(;--v>=0;){var w=r.data[--b]==h?this.DM:Math.floor(r.data[b]*p+(r.data[b-1]+g)*y)
|
||
if((r.data[b]+=s.am(0,w,r,v,0,f))<w)for(s.dlShiftTo(v,_),r.subTo(_,r);r.data[b]<--w;)r.subTo(_,r)}null!=t&&(r.drShiftTo(f,t),u!=c&&o.ZERO.subTo(t,t)),r.t=f,r.clamp(),l>0&&r.rShiftTo(l,r),u<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0
|
||
var e=this.data[0]
|
||
if(0==(1&e))return 0
|
||
var t=3&e
|
||
return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE
|
||
var r=a(),n=a(),i=t.convert(this),s=m(e)-1
|
||
for(i.copyTo(r);--s>=0;)if(t.sqrTo(r,n),(e&1<<s)>0)t.mulTo(n,i,r)
|
||
else{var u=r
|
||
r=n,n=u}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e)
|
||
var t
|
||
if(16==e)t=4
|
||
else if(8==e)t=3
|
||
else if(2==e)t=1
|
||
else if(32==e)t=5
|
||
else{if(4!=e)return this.toRadix(e)
|
||
t=2}var r,n=(1<<t)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%t
|
||
if(a-- >0)for(s<this.DB&&(r=this.data[a]>>s)>0&&(i=!0,o=h(r));a>=0;)s<t?(r=(this.data[a]&(1<<s)-1)<<t-s,r|=this.data[--a]>>(s+=this.DB-t)):(r=this.data[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=h(r))
|
||
return i?o:"0"},o.prototype.negate=function(){var e=a()
|
||
return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s
|
||
if(0!=t)return t
|
||
var r=this.t
|
||
if(0!=(t=r-e.t))return this.s<0?-t:t
|
||
for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t
|
||
return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+m(this.data[this.t-1]^this.s&this.DM)}
|
||
o.prototype.mod=function(e){var t=a()
|
||
return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r
|
||
return r=e<256||t.isEven()?new y(t):new g(t),this.exp(e,r)},o.ZERO=p(0),o.ONE=p(1),k.prototype.convert=x,k.prototype.revert=x,k.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},k.prototype.sqrTo=function(e,t){e.squareTo(t)},C.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m)
|
||
if(e.compareTo(this.m)<0)return e
|
||
var t=a()
|
||
return e.copyTo(t),this.reduce(t),t},C.prototype.revert=function(e){return e},C.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1)
|
||
for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},C.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},C.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)}
|
||
var A=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],T=(1<<26)/A[A.length-1]
|
||
o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0"
|
||
var t=this.chunkSize(e),r=Math.pow(e,t),n=p(r),i=a(),o=a(),s=""
|
||
for(this.divRemTo(n,i,o);i.signum()>0;)s=(r+o.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,o)
|
||
return o.intValue().toString(e)+s},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10)
|
||
for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,a=0,s=0,u=0;u<e.length;++u){var c=d(e,u)
|
||
c<0?"-"==e.charAt(u)&&0==this.signum()&&(i=!0):(s=t*s+c,++a>=r&&(this.dMultiply(n),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1)
|
||
else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this)
|
||
else{var n=new Array,i=7&e
|
||
n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}},o.prototype.bitwiseTo=function(e,t,r){var n,i,o=Math.min(e.t,this.t)
|
||
for(n=0;n<o;++n)r.data[n]=t(this.data[n],e.data[n])
|
||
if(e.t<this.t){for(i=e.s&this.DM,n=o;n<this.t;++n)r.data[n]=t(this.data[n],i)
|
||
r.t=this.t}else{for(i=this.s&this.DM,n=o;n<e.t;++n)r.data[n]=t(i,e.data[n])
|
||
r.t=e.t}r.s=t(this.s,e.s),r.clamp()},o.prototype.changeBit=function(e,t){var r=o.ONE.shiftLeft(e)
|
||
return this.bitwiseTo(r,t,r),r},o.prototype.addTo=function(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this.data[r]+e.data[r],t.data[r++]=n&this.DM,n>>=this.DB
|
||
if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this.data[r],t.data[r++]=n&this.DM,n>>=this.DB
|
||
n+=this.s}else{for(n+=this.s;r<e.t;)n+=e.data[r],t.data[r++]=n&this.DM,n>>=this.DB
|
||
n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0
|
||
for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t)
|
||
for(r.s=0,r.t=i;i>0;)r.data[--i]=0
|
||
for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t)
|
||
for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i)
|
||
r.clamp()},o.prototype.multiplyUpperTo=function(e,t,r){--t
|
||
var n=r.t=this.t+e.t-t
|
||
for(r.s=0;--n>=0;)r.data[n]=0
|
||
for(n=Math.max(t-this.t,0);n<e.t;++n)r.data[this.t+n-t]=this.am(t-n,e.data[n],r,0,0,this.t+n-t)
|
||
r.clamp(),r.drShiftTo(1,r)},o.prototype.modInt=function(e){if(e<=0)return 0
|
||
var t=this.DV%e,r=this.s<0?e-1:0
|
||
if(this.t>0)if(0==t)r=this.data[0]%e
|
||
else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e
|
||
return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit()
|
||
if(r<=0)return!1
|
||
for(var n,i=t.shiftRight(r),a={nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(256*Math.random())}},s=0;s<e;++s){do{n=new o(this.bitLength(),a)}while(n.compareTo(o.ONE)<=0||n.compareTo(t)>=0)
|
||
var u=n.modPow(i,this)
|
||
if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(t)){for(var c=1;c++<r&&0!=u.compareTo(t);)if(0==(u=u.modPowInt(2,this)).compareTo(o.ONE))return!1
|
||
if(0!=u.compareTo(t))return!1}}return!0},o.prototype.clone=function(){var e=a()
|
||
return this.copyTo(e),e},o.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this.data[0]-this.DV
|
||
if(0==this.t)return-1}else{if(1==this.t)return this.data[0]
|
||
if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]},o.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array
|
||
t[0]=this.s
|
||
var r,n=this.DB-e*this.DB%8,i=0
|
||
if(e-- >0)for(n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);e>=0;)n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r)
|
||
return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=a()
|
||
return this.bitwiseTo(e,b,t),t},o.prototype.or=function(e){var t=a()
|
||
return this.bitwiseTo(e,v,t),t},o.prototype.xor=function(e){var t=a()
|
||
return this.bitwiseTo(e,_,t),t},o.prototype.andNot=function(e){var t=a()
|
||
return this.bitwiseTo(e,w,t),t},o.prototype.not=function(){for(var e=a(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t]
|
||
return e.t=this.t,e.s=~this.s,e},o.prototype.shiftLeft=function(e){var t=a()
|
||
return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},o.prototype.shiftRight=function(e){var t=a()
|
||
return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},o.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this.data[e])return e*this.DB+S(this.data[e])
|
||
return this.s<0?this.t*this.DB:-1}
|
||
o.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=E(this.data[r]^t)
|
||
return e},o.prototype.testBit=function(e){var t=Math.floor(e/this.DB)
|
||
return t>=this.t?0!=this.s:0!=(this.data[t]&1<<e%this.DB)},o.prototype.setBit=function(e){return this.changeBit(e,v)},o.prototype.clearBit=function(e){return this.changeBit(e,w)},o.prototype.flipBit=function(e){return this.changeBit(e,_)},o.prototype.add=function(e){var t=a()
|
||
return this.addTo(e,t),t},o.prototype.subtract=function(e){var t=a()
|
||
return this.subTo(e,t),t},o.prototype.multiply=function(e){var t=a()
|
||
return this.multiplyTo(e,t),t},o.prototype.divide=function(e){var t=a()
|
||
return this.divRemTo(e,t,null),t},o.prototype.remainder=function(e){var t=a()
|
||
return this.divRemTo(e,null,t),t},o.prototype.divideAndRemainder=function(e){var t=a(),r=a()
|
||
return this.divRemTo(e,t,r),new Array(t,r)},o.prototype.modPow=function(e,t){var r,n,i=e.bitLength(),o=p(1)
|
||
if(i<=0)return o
|
||
r=i<18?1:i<48?3:i<144?4:i<768?5:6,n=i<8?new y(t):t.isEven()?new C(t):new g(t)
|
||
var s=new Array,u=3,c=r-1,l=(1<<r)-1
|
||
if(s[1]=n.convert(this),r>1){var f=a()
|
||
for(n.sqrTo(s[1],f);u<=l;)s[u]=a(),n.mulTo(f,s[u-2],s[u]),u+=2}var h,d,b=e.t-1,v=!0,_=a()
|
||
for(i=m(e.data[b])-1;b>=0;){for(i>=c?h=e.data[b]>>i-c&l:(h=(e.data[b]&(1<<i+1)-1)<<c-i,b>0&&(h|=e.data[b-1]>>this.DB+i-c)),u=r;0==(1&h);)h>>=1,--u
|
||
if((i-=u)<0&&(i+=this.DB,--b),v)s[h].copyTo(o),v=!1
|
||
else{for(;u>1;)n.sqrTo(o,_),n.sqrTo(_,o),u-=2
|
||
u>0?n.sqrTo(o,_):(d=o,o=_,_=d),n.mulTo(_,s[h],o)}for(;b>=0&&0==(e.data[b]&1<<i);)n.sqrTo(o,_),d=o,o=_,_=d,--i<0&&(i=this.DB-1,--b)}return n.revert(o)},o.prototype.modInverse=function(e){var t=e.isEven()
|
||
if(this.isEven()&&t||0==e.signum())return o.ZERO
|
||
for(var r=e.clone(),n=this.clone(),i=p(1),a=p(0),s=p(0),u=p(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),t?(i.isEven()&&a.isEven()||(i.addTo(this,i),a.subTo(e,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a)
|
||
for(;n.isEven();)n.rShiftTo(1,n),t?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u)
|
||
r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(s,i),a.subTo(u,a)):(n.subTo(r,n),t&&s.subTo(i,s),u.subTo(a,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},o.prototype.pow=function(e){return this.exp(e,new k)},o.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone()
|
||
if(t.compareTo(r)<0){var n=t
|
||
t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit()
|
||
if(o<0)return t
|
||
for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r))
|
||
return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(e){var t,r=this.abs()
|
||
if(1==r.t&&r.data[0]<=A[A.length-1]){for(t=0;t<A.length;++t)if(r.data[0]==A[t])return!0
|
||
return!1}if(r.isEven())return!1
|
||
for(t=1;t<A.length;){for(var n=A[t],i=t+1;i<A.length&&n<T;)n*=A[i++]
|
||
for(n=r.modInt(n);t<i;)if(n%A[t++]==0)return!1}return r.millerRabin(e)}},{"./forge":500}],504:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util"),e("./random"),e("./jsbn"),t.exports=n.kem=n.kem||{}
|
||
var i=n.jsbn.BigInteger
|
||
function o(e,t,r,i){e.generate=function(e,o){for(var a=new n.util.ByteBuffer,s=Math.ceil(o/i)+r,u=new n.util.ByteBuffer,c=r;c<s;++c){u.putInt32(c),t.start(),t.update(e+u.getBytes())
|
||
var l=t.digest()
|
||
a.putBytes(l.getBytes(i))}return a.truncate(a.length()-o),a.getBytes()}}n.kem.rsa={},n.kem.rsa.create=function(e,t){var r=(t=t||{}).prng||n.random,o={encrypt:function(t,o){var a,s=Math.ceil(t.n.bitLength()/8)
|
||
do{a=new i(n.util.bytesToHex(r.getBytesSync(s)),16).mod(t.n)}while(a.equals(i.ZERO))
|
||
var u=s-(a=n.util.hexToBytes(a.toString(16))).length
|
||
return u>0&&(a=n.util.fillString(String.fromCharCode(0),u)+a),{encapsulation:t.encrypt(a,"NONE"),key:e.generate(a,o)}},decrypt:function(t,r,n){var i=t.decrypt(r,"NONE")
|
||
return e.generate(i,n)}}
|
||
return o},n.kem.kdf1=function(e,t){o(this,e,0,t||e.digestLength)},n.kem.kdf2=function(e,t){o(this,e,1,t||e.digestLength)}},{"./forge":500,"./jsbn":503,"./random":523,"./util":532}],505:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util"),t.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"]
|
||
var i={},o=[],a=null
|
||
n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8
|
||
for(var s=0;s<n.log.levels.length;++s){var u=n.log.levels[s]
|
||
i[u]={index:s,name:u.toUpperCase()}}n.log.logMessage=function(e){for(var t=i[e.level].index,r=0;r<o.length;++r){var a=o[r]
|
||
if(a.flags&n.log.NO_LEVEL_CHECK)a.f(e)
|
||
else t<=i[a.level].index&&a.f(a,e)}},n.log.prepareStandard=function(e){"standard"in e||(e.standard=i[e.level].name+" ["+e.category+"] "+e.message)},n.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message]
|
||
t=t.concat([]||e.arguments),e.full=n.util.format.apply(this,t)}},n.log.prepareStandardFull=function(e){"standardFull"in e||(n.log.prepareStandard(e),e.standardFull=e.standard)}
|
||
var c=["error","warning","info","debug","verbose"]
|
||
for(s=0;s<c.length;++s)(function(e){n.log[e]=function(t,r){var i=Array.prototype.slice.call(arguments).slice(2),o={timestamp:new Date,level:e,category:t,message:r,arguments:i}
|
||
n.log.logMessage(o)}})(c[s])
|
||
if(n.log.makeLogger=function(e){var t={flags:0,f:e}
|
||
return n.log.setLevel(t,"none"),t},n.log.setLevel=function(e,t){var r=!1
|
||
if(e&&!(e.flags&n.log.LEVEL_LOCKED))for(var i=0;i<n.log.levels.length;++i){if(t==n.log.levels[i]){e.level=t,r=!0
|
||
break}}return r},n.log.lock=function(e,t){void 0===t||t?e.flags|=n.log.LEVEL_LOCKED:e.flags&=~n.log.LEVEL_LOCKED},n.log.addLogger=function(e){o.push(e)},"undefined"!=typeof console&&"log"in console){var l
|
||
if(console.error&&console.warn&&console.info&&console.debug){var f={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},h=function(e,t){n.log.prepareStandard(t)
|
||
var r=f[t.level],i=[t.standard]
|
||
i=i.concat(t.arguments.slice()),r.apply(console,i)}
|
||
l=n.log.makeLogger(h)}else{h=function(e,t){n.log.prepareStandardFull(t),console.log(t.standardFull)}
|
||
l=n.log.makeLogger(h)}n.log.setLevel(l,"debug"),n.log.addLogger(l),a=l}else console={log:function(){}}
|
||
if(null!==a){var d=n.util.getQueryVariables()
|
||
if("console.level"in d&&n.log.setLevel(a,d["console.level"].slice(-1)[0]),"console.lock"in d)"true"==d["console.lock"].slice(-1)[0]&&n.log.lock(a)}n.log.consoleLogger=a},{"./forge":500,"./util":532}],506:[function(e,t,r){"use strict"
|
||
t.exports=e("./md"),e("./md5"),e("./sha1"),e("./sha256"),e("./sha512")},{"./md":507,"./md5":508,"./sha1":526,"./sha256":527,"./sha512":528}],507:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
t.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},{"./forge":500}],508:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./md"),e("./util")
|
||
var i=t.exports=n.md5=n.md5||{}
|
||
n.md.md5=n.md.algorithms.md5=i,i.create=function(){c||function(){o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],s=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],u=new Array(64)
|
||
for(var e=0;e<64;++e)u[e]=Math.floor(4294967296*Math.abs(Math.sin(e+1)))
|
||
c=!0}()
|
||
var e=null,t=n.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[]
|
||
for(var r=i.messageLengthSize/4,o=0;o<r;++o)i.fullMessageLength.push(0)
|
||
return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},i}}
|
||
return i.start(),i.update=function(o,a){"utf8"===a&&(o=n.util.encodeUtf8(o))
|
||
var s=o.length
|
||
i.messageLength+=s,s=[s/4294967296>>>0,s>>>0]
|
||
for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=s[1],s[1]=s[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,s[0]=s[1]/4294967296>>>0
|
||
return t.putBytes(o),l(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=n.util.createBuffer()
|
||
a.putBytes(t.bytes())
|
||
var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1
|
||
a.putBytes(o.substr(0,i.blockLength-s))
|
||
for(var u,c=0,f=i.fullMessageLength.length-1;f>=0;--f)c=(u=8*i.fullMessageLength[f]+c)/4294967296>>>0,a.putInt32Le(u>>>0)
|
||
var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3}
|
||
l(h,r,a)
|
||
var d=n.util.createBuffer()
|
||
return d.putInt32Le(h.h0),d.putInt32Le(h.h1),d.putInt32Le(h.h2),d.putInt32Le(h.h3),d},i}
|
||
var o=null,a=null,s=null,u=null,c=!1
|
||
function l(e,t,r){for(var n,i,o,c,l,f,h,d=r.length();d>=64;){for(i=e.h0,o=e.h1,c=e.h2,l=e.h3,h=0;h<16;++h)t[h]=r.getInt32Le(),n=i+(l^o&(c^l))+u[h]+t[h],i=l,l=c,c=o,o+=n<<(f=s[h])|n>>>32-f
|
||
for(;h<32;++h)n=i+(c^l&(o^c))+u[h]+t[a[h]],i=l,l=c,c=o,o+=n<<(f=s[h])|n>>>32-f
|
||
for(;h<48;++h)n=i+(o^c^l)+u[h]+t[a[h]],i=l,l=c,c=o,o+=n<<(f=s[h])|n>>>32-f
|
||
for(;h<64;++h)n=i+(c^(o|~l))+u[h]+t[a[h]],i=l,l=c,c=o,o+=n<<(f=s[h])|n>>>32-f
|
||
e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+c|0,e.h3=e.h3+l|0,d-=64}}},{"./forge":500,"./md":507,"./util":532}],509:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./mgf1"),t.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},{"./forge":500,"./mgf1":510}],510:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util"),n.mgf=n.mgf||{},(t.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(e){return{generate:function(t,r){for(var i=new n.util.ByteBuffer,o=Math.ceil(r/e.digestLength),a=0;a<o;a++){var s=new n.util.ByteBuffer
|
||
s.putInt32(a),e.start(),e.update(t+s.getBytes()),i.putBuffer(e.digest())}return i.truncate(i.length()-r),i.getBytes()}}}},{"./forge":500,"./util":532}],511:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
n.pki=n.pki||{}
|
||
var i=t.exports=n.pki.oids=n.oids=n.oids||{}
|
||
function o(e,t){i[e]=t,i[t]=e}function a(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword")
|
||
o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName")
|
||
o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),a("2.5.29.1","authorityKeyIdentifier"),a("2.5.29.2","keyAttributes"),a("2.5.29.3","certificatePolicies"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.5","policyMapping"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.7","subjectAltName"),a("2.5.29.8","issuerAltName"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.10","basicConstraints"),a("2.5.29.11","nameConstraints"),a("2.5.29.12","policyConstraints"),a("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate")
|
||
a("2.5.29.25","cRLDistributionPoints"),a("2.5.29.26","issuingDistributionPoint"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},{"./forge":500}],512:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
if(e("./aes"),e("./asn1"),e("./des"),e("./md"),e("./oids"),e("./pbkdf2"),e("./pem"),e("./random"),e("./rc2"),e("./rsa"),e("./util"),void 0===i)var i=n.jsbn.BigInteger
|
||
var o=n.asn1,a=n.pki=n.pki||{}
|
||
t.exports=a.pbe=n.pbe=n.pbe||{}
|
||
var s=a.oids,u={name:"EncryptedPrivateKeyInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},c={name:"PBES2Algorithms",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},l={name:"pkcs-12PbeParams",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:o.Class.UNIVERSAL,type:o.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"iterations"}]}
|
||
function f(e,t){return e.start().update(t).digest().getBytes()}function h(e){var t
|
||
if(e){if(!(t=a.oids[o.derToOid(e)])){var r=new Error("Unsupported PRF OID.")
|
||
throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}}else t="hmacWithSHA1"
|
||
return d(t)}function d(e){var t=n.md
|
||
switch(e){case"hmacWithSHA224":t=n.md.sha512
|
||
case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase()
|
||
break
|
||
default:var r=new Error("Unsupported PRF algorithm.")
|
||
throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!(t&&e in t))throw new Error("Unknown hash algorithm: "+e)
|
||
return t[e].create()}a.encryptPrivateKeyInfo=function(e,t,r){(r=r||{}).saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1"
|
||
var i,u,c,l=n.random.getBytesSync(r.saltSize),f=r.count,h=o.integerToDer(f)
|
||
if(0===r.algorithm.indexOf("aes")||"des"===r.algorithm){var p,m,y
|
||
switch(r.algorithm){case"aes128":i=16,p=16,m=s["aes128-CBC"],y=n.aes.createEncryptionCipher
|
||
break
|
||
case"aes192":i=24,p=16,m=s["aes192-CBC"],y=n.aes.createEncryptionCipher
|
||
break
|
||
case"aes256":i=32,p=16,m=s["aes256-CBC"],y=n.aes.createEncryptionCipher
|
||
break
|
||
case"des":i=8,p=8,m=s.desCBC,y=n.des.createEncryptionCipher
|
||
break
|
||
default:throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S}var g="hmacWith"+r.prfAlgorithm.toUpperCase(),b=d(g),v=n.pkcs5.pbkdf2(t,l,f,i,b),_=n.random.getBytesSync(p);(E=y(v)).start(_),E.update(o.toDer(e)),E.finish(),c=E.output.getBytes()
|
||
var w=function(e,t,r,i){var s=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,t.getBytes())])
|
||
"hmacWithSHA1"!==i&&s.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,n.util.hexToBytes(r.toString(16))),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.oids[i]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]))
|
||
return s}(l,h,i,g)
|
||
u=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.pkcs5PBES2).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s.pkcs5PBKDF2).getBytes()),w]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(m).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,_)])])])}else{var S
|
||
if("3des"!==r.algorithm)throw(S=new Error("Cannot encrypt private key. Unknown encryption algorithm.")).algorithm=r.algorithm,S
|
||
i=24
|
||
var E,k=new n.util.ByteBuffer(l)
|
||
v=a.pbe.generatePkcs12Key(t,k,1,f,i),_=a.pbe.generatePkcs12Key(t,k,2,f,i);(E=n.des.createEncryptionCipher(v)).start(_),E.update(o.toDer(e)),E.finish(),c=E.output.getBytes(),u=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,l),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,h.getBytes())])])}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[u,o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,c)])},a.decryptPrivateKeyInfo=function(e,t){var r=null,i={},s=[]
|
||
if(!o.validate(e,u,i,s)){var c=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")
|
||
throw c.errors=s,c}var l=o.derToOid(i.encryptionOid),f=a.pbe.getCipher(l,i.encryptionParams,t),h=n.util.createBuffer(i.encryptedData)
|
||
return f.update(h),f.finish()&&(r=o.fromDer(f.output)),r},a.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:o.toDer(e).getBytes()}
|
||
return n.pem.encode(r,{maxline:t})},a.encryptedPrivateKeyFromPem=function(e){var t=n.pem.decode(e)[0]
|
||
if("ENCRYPTED PRIVATE KEY"!==t.type){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".')
|
||
throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.")
|
||
return o.fromDer(t.body)},a.encryptRsaPrivateKey=function(e,t,r){if(!(r=r||{}).legacy){var i=a.wrapRsaPrivateKey(a.privateKeyToAsn1(e))
|
||
return i=a.encryptPrivateKeyInfo(i,t,r),a.encryptedPrivateKeyToPem(i)}var s,u,c,l
|
||
switch(r.algorithm){case"aes128":s="AES-128-CBC",c=16,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher
|
||
break
|
||
case"aes192":s="AES-192-CBC",c=24,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher
|
||
break
|
||
case"aes256":s="AES-256-CBC",c=32,u=n.random.getBytesSync(16),l=n.aes.createEncryptionCipher
|
||
break
|
||
case"3des":s="DES-EDE3-CBC",c=24,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher
|
||
break
|
||
case"des":s="DES-CBC",c=8,u=n.random.getBytesSync(8),l=n.des.createEncryptionCipher
|
||
break
|
||
default:var f=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".')
|
||
throw f.algorithm=r.algorithm,f}var h=l(n.pbe.opensslDeriveBytes(t,u.substr(0,8),c))
|
||
h.start(u),h.update(o.toDer(a.privateKeyToAsn1(e))),h.finish()
|
||
var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:s,parameters:n.util.bytesToHex(u).toUpperCase()},body:h.output.getBytes()}
|
||
return n.pem.encode(d)},a.decryptRsaPrivateKey=function(e,t){var r=null,i=n.pem.decode(e)[0]
|
||
if("ENCRYPTED PRIVATE KEY"!==i.type&&"PRIVATE KEY"!==i.type&&"RSA PRIVATE KEY"!==i.type)throw(c=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".')).headerType=c,c
|
||
if(i.procType&&"ENCRYPTED"===i.procType.type){var s,u
|
||
switch(i.dekInfo.algorithm){case"DES-CBC":s=8,u=n.des.createDecryptionCipher
|
||
break
|
||
case"DES-EDE3-CBC":s=24,u=n.des.createDecryptionCipher
|
||
break
|
||
case"AES-128-CBC":s=16,u=n.aes.createDecryptionCipher
|
||
break
|
||
case"AES-192-CBC":s=24,u=n.aes.createDecryptionCipher
|
||
break
|
||
case"AES-256-CBC":s=32,u=n.aes.createDecryptionCipher
|
||
break
|
||
case"RC2-40-CBC":s=5,u=function(e){return n.rc2.createDecryptionCipher(e,40)}
|
||
break
|
||
case"RC2-64-CBC":s=8,u=function(e){return n.rc2.createDecryptionCipher(e,64)}
|
||
break
|
||
case"RC2-128-CBC":s=16,u=function(e){return n.rc2.createDecryptionCipher(e,128)}
|
||
break
|
||
default:var c
|
||
throw(c=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".')).algorithm=i.dekInfo.algorithm,c}var l=n.util.hexToBytes(i.dekInfo.parameters),f=u(n.pbe.opensslDeriveBytes(t,l.substr(0,8),s))
|
||
if(f.start(l),f.update(n.util.createBuffer(i.body)),!f.finish())return r
|
||
r=f.output.getBytes()}else r=i.body
|
||
return null!==(r="ENCRYPTED PRIVATE KEY"===i.type?a.decryptPrivateKeyInfo(o.fromDer(r),t):o.fromDer(r))&&(r=a.privateKeyFromAsn1(r)),r},a.pbe.generatePkcs12Key=function(e,t,r,i,o,a){var s,u
|
||
if(void 0===a||null===a){if(!("sha1"in n.md))throw new Error('"sha1" hash algorithm unavailable.')
|
||
a=n.md.sha1.create()}var c=a.digestLength,l=a.blockLength,f=new n.util.ByteBuffer,h=new n.util.ByteBuffer
|
||
if(null!==e&&void 0!==e){for(u=0;u<e.length;u++)h.putInt16(e.charCodeAt(u))
|
||
h.putInt16(0)}var d=h.length(),p=t.length(),m=new n.util.ByteBuffer
|
||
m.fillWithByte(r,l)
|
||
var y=l*Math.ceil(p/l),g=new n.util.ByteBuffer
|
||
for(u=0;u<y;u++)g.putByte(t.at(u%p))
|
||
var b=l*Math.ceil(d/l),v=new n.util.ByteBuffer
|
||
for(u=0;u<b;u++)v.putByte(h.at(u%d))
|
||
var _=g
|
||
_.putBuffer(v)
|
||
for(var w=Math.ceil(o/c),S=1;S<=w;S++){var E=new n.util.ByteBuffer
|
||
E.putBytes(m.bytes()),E.putBytes(_.bytes())
|
||
for(var k=0;k<i;k++)a.start(),a.update(E.getBytes()),E=a.digest()
|
||
var x=new n.util.ByteBuffer
|
||
for(u=0;u<l;u++)x.putByte(E.at(u%c))
|
||
var C=Math.ceil(p/l)+Math.ceil(d/l),A=new n.util.ByteBuffer
|
||
for(s=0;s<C;s++){var T=new n.util.ByteBuffer(_.getBytes(l)),I=511
|
||
for(u=x.length()-1;u>=0;u--)I>>=8,I+=x.at(u)+T.at(u),T.setAt(u,255&I)
|
||
A.putBuffer(T)}_=A,f.putBuffer(E)}return f.truncate(f.length()-o),f},a.pbe.getCipher=function(e,t,r){switch(e){case a.oids.pkcs5PBES2:return a.pbe.getCipherForPBES2(e,t,r)
|
||
case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case a.oids["pbewithSHAAnd40BitRC2-CBC"]:return a.pbe.getCipherForPKCS12PBE(e,t,r)
|
||
default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.")
|
||
throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},a.pbe.getCipherForPBES2=function(e,t,r){var i,s={},u=[]
|
||
if(!o.validate(t,c,s,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i
|
||
if((e=o.derToOid(s.kdfOid))!==a.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i
|
||
if((e=o.derToOid(s.encOid))!==a.oids["aes128-CBC"]&&e!==a.oids["aes192-CBC"]&&e!==a.oids["aes256-CBC"]&&e!==a.oids["des-EDE3-CBC"]&&e!==a.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i
|
||
var l,f,d=s.kdfSalt,p=n.util.createBuffer(s.kdfIterationCount)
|
||
switch(p=p.getInt(p.length()<<3),a.oids[e]){case"aes128-CBC":l=16,f=n.aes.createDecryptionCipher
|
||
break
|
||
case"aes192-CBC":l=24,f=n.aes.createDecryptionCipher
|
||
break
|
||
case"aes256-CBC":l=32,f=n.aes.createDecryptionCipher
|
||
break
|
||
case"des-EDE3-CBC":l=24,f=n.des.createDecryptionCipher
|
||
break
|
||
case"desCBC":l=8,f=n.des.createDecryptionCipher}var m=h(s.prfOid),y=n.pkcs5.pbkdf2(r,d,p,l,m),g=s.encIv,b=f(y)
|
||
return b.start(g),b},a.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},s=[]
|
||
if(!o.validate(t,l,i,s))throw(m=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=s,m
|
||
var u,c,f,d=n.util.createBuffer(i.salt),p=n.util.createBuffer(i.iterations)
|
||
switch(p=p.getInt(p.length()<<3),e){case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,c=8,f=n.des.startDecrypting
|
||
break
|
||
case a.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,c=8,f=function(e,t){var r=n.rc2.createDecryptionCipher(e,40)
|
||
return r.start(t,null),r}
|
||
break
|
||
default:var m
|
||
throw(m=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,m}var y=h(i.prfOid),g=a.pbe.generatePkcs12Key(r,d,1,p,u,y)
|
||
return y.start(),f(g,a.pbe.generatePkcs12Key(r,d,2,p,c,y))},a.pbe.opensslDeriveBytes=function(e,t,r,i){if(void 0===i||null===i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.')
|
||
i=n.md.md5.create()}null===t&&(t="")
|
||
for(var o=[f(i,e+t)],a=16,s=1;a<r;++s,a+=16)o.push(f(i,o[s-1]+e+t))
|
||
return o.join("").substr(0,r)}},{"./aes":491,"./asn1":493,"./des":498,"./forge":500,"./md":507,"./oids":511,"./pbkdf2":513,"./pem":514,"./random":523,"./rc2":524,"./rsa":525,"./util":532}],513:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./forge")
|
||
e("./hmac"),e("./md"),e("./util")
|
||
var o,a=i.pkcs5=i.pkcs5||{}
|
||
i.util.isNodejs&&!i.options.usePureJavaScript&&(o=e("crypto")),t.exports=i.pbkdf2=a.pbkdf2=function(e,t,a,s,u,c){if("function"==typeof u&&(c=u,u=null),i.util.isNodejs&&!i.options.usePureJavaScript&&o.pbkdf2&&(null===u||"object"!==(void 0===u?"undefined":n(u)))&&(o.pbkdf2Sync.length>4||!u||"sha1"===u))return"string"!=typeof u&&(u="sha1"),e=new r(e,"binary"),t=new r(t,"binary"),c?4===o.pbkdf2Sync.length?o.pbkdf2(e,t,a,s,function(e,t){if(e)return c(e)
|
||
c(null,t.toString("binary"))}):o.pbkdf2(e,t,a,s,u,function(e,t){if(e)return c(e)
|
||
c(null,t.toString("binary"))}):4===o.pbkdf2Sync.length?o.pbkdf2Sync(e,t,a,s).toString("binary"):o.pbkdf2Sync(e,t,a,s,u).toString("binary")
|
||
if(void 0!==u&&null!==u||(u="sha1"),"string"==typeof u){if(!(u in i.md.algorithms))throw new Error("Unknown hash algorithm: "+u)
|
||
u=i.md[u].create()}var l=u.digestLength
|
||
if(s>4294967295*l){var f=new Error("Derived key is too long.")
|
||
if(c)return c(f)
|
||
throw f}var h=Math.ceil(s/l),d=s-(h-1)*l,p=i.hmac.create()
|
||
p.start(u,e)
|
||
var m,y,g,b=""
|
||
if(!c){for(var v=1;v<=h;++v){p.start(null,null),p.update(t),p.update(i.util.int32ToBytes(v)),m=g=p.digest().getBytes()
|
||
for(var _=2;_<=a;++_)p.start(null,null),p.update(g),y=p.digest().getBytes(),m=i.util.xorBytes(m,y,l),g=y
|
||
b+=v<h?m:m.substr(0,d)}return b}v=1
|
||
function w(){if(v>h)return c(null,b)
|
||
p.start(null,null),p.update(t),p.update(i.util.int32ToBytes(v)),m=g=p.digest().getBytes(),_=2,S()}function S(){if(_<=a)return p.start(null,null),p.update(g),y=p.digest().getBytes(),m=i.util.xorBytes(m,y,l),g=y,++_,i.util.setImmediate(S)
|
||
b+=v<h?m:m.substr(0,d),++v,w()}w()}}).call(this,e("buffer").Buffer)},{"./forge":500,"./hmac":501,"./md":507,"./util":532,buffer:109,crypto:109}],514:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util")
|
||
var i=t.exports=n.pem=n.pem||{}
|
||
function o(e){for(var t=e.name+": ",r=[],n=function(e,t){return" "+t},i=0;i<e.values.length;++i)r.push(e.values[i].replace(/^(\S+\r\n)/,n))
|
||
t+=r.join(",")+"\r\n"
|
||
var o=0,a=-1
|
||
for(i=0;i<t.length;++i,++o)if(o>65&&-1!==a){var s=t[a]
|
||
","===s?(++a,t=t.substr(0,a)+"\r\n "+t.substr(a)):t=t.substr(0,a)+"\r\n"+s+t.substr(a+1),o=i-a-1,a=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(a=i)
|
||
return t}function a(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{}
|
||
var r,i="-----BEGIN "+e.type+"-----\r\n"
|
||
if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var a=0;a<e.headers.length;++a)i+=o(e.headers[a])
|
||
return e.procType&&(i+="\r\n"),i+=n.util.encode64(e.body,t.maxline||64)+"\r\n",i+="-----END "+e.type+"-----\r\n"},i.decode=function(e){for(var t,r=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,o=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,s=/\r?\n/;t=i.exec(e);){var u={type:t[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:n.util.decode64(t[3])}
|
||
if(r.push(u),t[2]){for(var c=t[2].split(s),l=0;t&&l<c.length;){for(var f=c[l].replace(/\s+$/,""),h=l+1;h<c.length;++h){var d=c[h]
|
||
if(!/\s/.test(d[0]))break
|
||
f+=d,l=h}if(t=f.match(o)){for(var p={name:t[1],values:[]},m=t[2].split(","),y=0;y<m.length;++y)p.values.push(a(m[y]))
|
||
if(u.procType)if(u.contentDomain||"Content-Domain"!==p.name)if(u.dekInfo||"DEK-Info"!==p.name)u.headers.push(p)
|
||
else{if(0===p.values.length)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.')
|
||
u.dekInfo={algorithm:m[0],parameters:m[1]||null}}else u.contentDomain=m[0]||""
|
||
else{if("Proc-Type"!==p.name)throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".')
|
||
if(2!==p.values.length)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.')
|
||
u.procType={version:m[0],type:m[1]}}}++l}if("ENCRYPTED"===u.procType&&!u.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(0===r.length)throw new Error("Invalid PEM formatted message.")
|
||
return r}},{"./forge":500,"./util":532}],515:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util"),e("./random"),e("./sha1")
|
||
var i=t.exports=n.pkcs1=n.pkcs1||{}
|
||
function o(e,t,r){r||(r=n.md.sha1.create())
|
||
for(var i="",o=Math.ceil(t/r.digestLength),a=0;a<o;++a){var s=String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)
|
||
r.start(),r.update(e+s),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,a,s,u
|
||
"string"==typeof r?(i=r,a=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,a=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),s?s.start():s=n.md.sha1.create(),u||(u=s)
|
||
var c=Math.ceil(e.n.bitLength()/8),l=c-2*s.digestLength-2
|
||
if(t.length>l)throw(y=new Error("RSAES-OAEP input message length is too long.")).length=t.length,y.maxLength=l,y
|
||
i||(i=""),s.update(i,"raw")
|
||
for(var f=s.digest(),h="",d=l-t.length,p=0;p<d;p++)h+="\0"
|
||
var m=f.getBytes()+h+""+t
|
||
if(a){if(a.length!==s.digestLength){var y
|
||
throw(y=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.")).seedLength=a.length,y.digestLength=s.digestLength,y}}else a=n.random.getBytes(s.digestLength)
|
||
var g=o(a,c-s.digestLength-1,u),b=n.util.xorBytes(m,g,m.length),v=o(b,s.digestLength,u)
|
||
return"\0"+n.util.xorBytes(a,v,a.length)+b},i.decode_rsa_oaep=function(e,t,r){var i,a,s
|
||
"string"==typeof r?(i=r,a=arguments[3]||void 0):r&&(i=r.label||void 0,a=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md))
|
||
var u=Math.ceil(e.n.bitLength()/8)
|
||
if(t.length!==u)throw(g=new Error("RSAES-OAEP encoded message length is invalid.")).length=t.length,g.expectedLength=u,g
|
||
if(void 0===a?a=n.md.sha1.create():a.start(),s||(s=a),u<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.")
|
||
i||(i=""),a.update(i,"raw")
|
||
for(var c=a.digest().getBytes(),l=t.charAt(0),f=t.substring(1,a.digestLength+1),h=t.substring(1+a.digestLength),d=o(h,a.digestLength,s),p=o(n.util.xorBytes(f,d,f.length),u-a.digestLength-1,s),m=n.util.xorBytes(h,p,h.length),y=m.substring(0,a.digestLength),g="\0"!==l,b=0;b<a.digestLength;++b)g|=c.charAt(b)!==y.charAt(b)
|
||
for(var v=1,_=a.digestLength,w=a.digestLength;w<m.length;w++){var S=m.charCodeAt(w)
|
||
g|=S&(v?65534:0),_+=v&=1&S^1}if(g||1!==m.charCodeAt(_))throw new Error("Invalid RSAES-OAEP padding.")
|
||
return m.substring(_+1)}},{"./forge":500,"./random":523,"./sha1":526,"./util":532}],516:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./asn1"),e("./hmac"),e("./oids"),e("./pkcs7asn1"),e("./pbe"),e("./random"),e("./rsa"),e("./sha1"),e("./util"),e("./x509")
|
||
var i=n.asn1,o=n.pki,a=t.exports=n.pkcs12=n.pkcs12||{},s={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},u={name:"PFX",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},s,{name:"PFX.macData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:i.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},c={name:"SafeBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},l={name:"Attribute",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,capture:"values"}]},f={name:"CertBag",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:i.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:i.Class.UNIVERSAL,type:i.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]}
|
||
function h(e,t,r,n){for(var i=[],o=0;o<e.length;o++)for(var a=0;a<e[o].safeBags.length;a++){var s=e[o].safeBags[a]
|
||
void 0!==n&&s.type!==n||(null!==t?void 0!==s.attributes[t]&&s.attributes[t].indexOf(r)>=0&&i.push(s):i.push(s))}return i}function d(e){if(e.composed||e.constructed){for(var t=n.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value)
|
||
e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function p(e,t){var r={},a=[]
|
||
if(!i.validate(e,n.pkcs7.asn1.encryptedDataValidator,r,a))throw(s=new Error("Cannot read EncryptedContentInfo.")).errors=a,s
|
||
var s,u=i.derToOid(r.contentType)
|
||
if(u!==o.oids.data)throw(s=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.")).oid=u,s
|
||
u=i.derToOid(r.encAlgorithm)
|
||
var c=o.pbe.getCipher(u,r.encParameter,t),l=d(r.encryptedContentAsn1),f=n.util.createBuffer(l.value)
|
||
if(c.update(f),!c.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.")
|
||
return c.output.getBytes()}function m(e,t,r){if(!t&&0===e.length)return[]
|
||
if((e=i.fromDer(e,t)).tagClass!==i.Class.UNIVERSAL||e.type!==i.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.")
|
||
for(var n=[],a=0;a<e.value.length;a++){var s=e.value[a],u={},l=[]
|
||
if(!i.validate(s,c,u,l))throw(g=new Error("Cannot read SafeBag.")).errors=l,g
|
||
var h,d,p={type:i.derToOid(u.bagId),attributes:y(u.bagAttributes)}
|
||
n.push(p)
|
||
var m=u.bagValue.value[0]
|
||
switch(p.type){case o.oids.pkcs8ShroudedKeyBag:if(null===(m=o.decryptPrivateKeyInfo(m,r)))throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?")
|
||
case o.oids.keyBag:try{p.key=o.privateKeyFromAsn1(m)}catch(e){p.key=null,p.asn1=m}continue
|
||
case o.oids.certBag:h=f,d=function(){if(i.derToOid(u.certId)!==o.oids.x509Certificate){var e=new Error("Unsupported certificate type, only X.509 supported.")
|
||
throw e.oid=i.derToOid(u.certId),e}var r=i.fromDer(u.cert,t)
|
||
try{p.cert=o.certificateFromAsn1(r,!0)}catch(e){p.cert=null,p.asn1=r}}
|
||
break
|
||
default:var g
|
||
throw(g=new Error("Unsupported PKCS#12 SafeBag type.")).oid=p.type,g}if(void 0!==h&&!i.validate(m,h,u,l))throw(g=new Error("Cannot read PKCS#12 "+h.name)).errors=l,g
|
||
d()}return n}function y(e){var t={}
|
||
if(void 0!==e)for(var r=0;r<e.length;++r){var n={},a=[]
|
||
if(!i.validate(e[r],l,n,a)){var s=new Error("Cannot read PKCS#12 BagAttribute.")
|
||
throw s.errors=a,s}var u=i.derToOid(n.oid)
|
||
if(void 0!==o.oids[u]){t[o.oids[u]]=[]
|
||
for(var c=0;c<n.values.length;++c)t[o.oids[u]].push(n.values[c].value)}}return t}a.pkcs12FromAsn1=function(e,t,r){"string"==typeof t?(r=t,t=!0):void 0===t&&(t=!0)
|
||
var c={}
|
||
if(!i.validate(e,u,c,[]))throw(l=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.")).errors=l,l
|
||
var l,f={version:c.version.charCodeAt(0),safeContents:[],getBags:function(e){var t,r={}
|
||
return"localKeyId"in e?t=e.localKeyId:"localKeyIdHex"in e&&(t=n.util.hexToBytes(e.localKeyIdHex)),void 0===t&&!("friendlyName"in e)&&"bagType"in e&&(r[e.bagType]=h(f.safeContents,null,null,e.bagType)),void 0!==t&&(r.localKeyId=h(f.safeContents,"localKeyId",t,e.bagType)),"friendlyName"in e&&(r.friendlyName=h(f.safeContents,"friendlyName",e.friendlyName,e.bagType)),r},getBagsByFriendlyName:function(e,t){return h(f.safeContents,"friendlyName",e,t)},getBagsByLocalKeyId:function(e,t){return h(f.safeContents,"localKeyId",e,t)}}
|
||
if(3!==c.version.charCodeAt(0))throw(l=new Error("PKCS#12 PFX of version other than 3 not supported.")).version=c.version.charCodeAt(0),l
|
||
if(i.derToOid(c.contentType)!==o.oids.data)throw(l=new Error("Only PKCS#12 PFX in password integrity mode supported.")).oid=i.derToOid(c.contentType),l
|
||
var y=c.content.value[0]
|
||
if(y.tagClass!==i.Class.UNIVERSAL||y.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.")
|
||
if(y=d(y),c.mac){var g=null,b=0,v=i.derToOid(c.macAlgorithm)
|
||
switch(v){case o.oids.sha1:g=n.md.sha1.create(),b=20
|
||
break
|
||
case o.oids.sha256:g=n.md.sha256.create(),b=32
|
||
break
|
||
case o.oids.sha384:g=n.md.sha384.create(),b=48
|
||
break
|
||
case o.oids.sha512:g=n.md.sha512.create(),b=64
|
||
break
|
||
case o.oids.md5:g=n.md.md5.create(),b=16}if(null===g)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+v)
|
||
var _=new n.util.ByteBuffer(c.macSalt),w="macIterations"in c?parseInt(n.util.bytesToHex(c.macIterations),16):1,S=a.generateKey(r,_,3,w,b,g),E=n.hmac.create()
|
||
if(E.start(g,S),E.update(y.value),E.getMac().getBytes()!==c.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return function(e,t,r,n){if((t=i.fromDer(t,r)).tagClass!==i.Class.UNIVERSAL||t.type!==i.Type.SEQUENCE||!0!==t.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo")
|
||
for(var a=0;a<t.value.length;a++){var u=t.value[a],c={},l=[]
|
||
if(!i.validate(u,s,c,l)){var f=new Error("Cannot read ContentInfo.")
|
||
throw f.errors=l,f}var h={encrypted:!1},y=null,g=c.content.value[0]
|
||
switch(i.derToOid(c.contentType)){case o.oids.data:if(g.tagClass!==i.Class.UNIVERSAL||g.type!==i.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.")
|
||
y=d(g).value
|
||
break
|
||
case o.oids.encryptedData:y=p(g,n),h.encrypted=!0
|
||
break
|
||
default:var f=new Error("Unsupported PKCS#12 contentType.")
|
||
throw f.contentType=i.derToOid(c.contentType),f}h.safeBags=m(y,r,n),e.safeContents.push(h)}}(f,y.value,t,r),f},a.toPkcs12Asn1=function(e,t,r,s){(s=s||{}).saltSize=s.saltSize||8,s.count=s.count||2048,s.algorithm=s.algorithm||s.encAlgorithm||"aes128","useMac"in s||(s.useMac=!0),"localKeyId"in s||(s.localKeyId=null),"generateLocalKeyId"in s||(s.generateLocalKeyId=!0)
|
||
var u,c=s.localKeyId
|
||
if(null!==c)c=n.util.hexToBytes(c)
|
||
else if(s.generateLocalKeyId)if(t){var l=n.util.isArray(t)?t[0]:t
|
||
"string"==typeof l&&(l=o.certificateFromPem(l)),(A=n.md.sha1.create()).update(i.toDer(o.certificateToAsn1(l)).getBytes()),c=A.digest().getBytes()}else c=n.random.getBytes(20)
|
||
var f=[]
|
||
null!==c&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.localKeyId).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,c)])])),"friendlyName"in s&&f.push(i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.friendlyName).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SET,!0,[i.create(i.Class.UNIVERSAL,i.Type.BMPSTRING,!1,s.friendlyName)])])),f.length>0&&(u=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,f))
|
||
var h=[],d=[]
|
||
null!==t&&(d=n.util.isArray(t)?t:[t])
|
||
for(var p=[],m=0;m<d.length;++m){"string"==typeof(t=d[m])&&(t=o.certificateFromPem(t))
|
||
var y=0===m?u:void 0,g=o.certificateToAsn1(t),b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.certBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.x509Certificate).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(g).getBytes())])])]),y])
|
||
p.push(b)}if(p.length>0){var v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,p),_=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(v).getBytes())])])
|
||
h.push(_)}var w=null
|
||
if(null!==e){var S=o.wrapRsaPrivateKey(o.privateKeyToAsn1(e))
|
||
w=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[S]),u]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[o.encryptPrivateKeyInfo(S,r,s)]),u])
|
||
var E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[w]),k=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])])
|
||
h.push(k)}var x,C=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,h)
|
||
if(s.useMac){var A=n.md.sha1.create(),T=new n.util.ByteBuffer(n.random.getBytes(s.saltSize)),I=s.count,P=(e=a.generateKey(r,T,3,I,20),n.hmac.create())
|
||
P.start(A,e),P.update(i.toDer(C).getBytes())
|
||
var M=P.getMac()
|
||
x=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,M.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,T.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(I).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(o.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(C).getBytes())])]),x])},a.generateKey=n.pbe.generatePkcs12Key},{"./asn1":493,"./forge":500,"./hmac":501,"./oids":511,"./pbe":512,"./pkcs7asn1":518,"./random":523,"./rsa":525,"./sha1":526,"./util":532,"./x509":533}],517:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./forge")
|
||
e("./aes"),e("./asn1"),e("./des"),e("./oids"),e("./pem"),e("./pkcs7asn1"),e("./random"),e("./util"),e("./x509")
|
||
var o=i.asn1,a=t.exports=i.pkcs7=i.pkcs7||{}
|
||
function s(e){var t={},r=[]
|
||
if(!o.validate(e,a.asn1.recipientInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.")
|
||
throw n.errors=r,n}return{version:t.version.charCodeAt(0),issuer:i.pki.RDNAttributesAsArray(t.issuer),serialNumber:i.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:o.derToOid(t.encAlgorithm),parameter:t.encParameter.value,content:t.encKey}}}function u(e){var t=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(e.version).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:e.issuer}),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,i.util.hexToBytes(e.serialNumber))]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.digestAlgorithm).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")])])
|
||
if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.signatureAlgorithm).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")])),t.value.push(o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=o.create(o.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n<e.unauthenticatedAttributes.length;++n){var a=e.unauthenticatedAttributes[n]
|
||
r.values.push(c(a))}t.value.push(r)}return t}function c(e){var t
|
||
if(e.type===i.pki.oids.contentType)t=o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.value).getBytes())
|
||
else if(e.type===i.pki.oids.messageDigest)t=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,e.value.bytes())
|
||
else if(e.type===i.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),n=new Date("2050-01-01T00:00:00Z"),a=e.value
|
||
if("string"==typeof a){var s=Date.parse(a)
|
||
a=isNaN(s)?13===a.length?o.utcTimeToDate(a):o.generalizedTimeToDate(a):new Date(s)}t=a>=r&&a<n?o.create(o.Class.UNIVERSAL,o.Type.UTCTIME,!1,o.dateToUtcTime(a)):o.create(o.Class.UNIVERSAL,o.Type.GENERALIZEDTIME,!1,o.dateToGeneralizedTime(a))}return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.type).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SET,!0,[t])])}function l(e,t,r){var n={}
|
||
if(!o.validate(t,r,n,[])){var a=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.")
|
||
throw a.errors=a,a}if(o.derToOid(n.contentType)!==i.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.")
|
||
if(n.encryptedContent){var s=""
|
||
if(i.util.isArray(n.encryptedContent))for(var u=0;u<n.encryptedContent.length;++u){if(n.encryptedContent[u].type!==o.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.")
|
||
s+=n.encryptedContent[u].value}else s=n.encryptedContent
|
||
e.encryptedContent={algorithm:o.derToOid(n.encAlgorithm),parameter:i.util.createBuffer(n.encParameter.value),content:i.util.createBuffer(s)}}if(n.content){s=""
|
||
if(i.util.isArray(n.content))for(u=0;u<n.content.length;++u){if(n.content[u].type!==o.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.")
|
||
s+=n.content[u].value}else s=n.content
|
||
e.content=i.util.createBuffer(s)}return e.version=n.version.charCodeAt(0),e.rawCapture=n,n}function f(e){if(void 0===e.encryptedContent.key)throw new Error("Symmetric key not available.")
|
||
if(void 0===e.content){var t
|
||
switch(e.encryptedContent.algorithm){case i.pki.oids["aes128-CBC"]:case i.pki.oids["aes192-CBC"]:case i.pki.oids["aes256-CBC"]:t=i.aes.createDecryptionCipher(e.encryptedContent.key)
|
||
break
|
||
case i.pki.oids.desCBC:case i.pki.oids["des-EDE3-CBC"]:t=i.des.createDecryptionCipher(e.encryptedContent.key)
|
||
break
|
||
default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.")
|
||
e.content=t.output}}a.messageFromPem=function(e){var t=i.pem.decode(e)[0]
|
||
if("PKCS7"!==t.type){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".')
|
||
throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.")
|
||
var n=o.fromDer(t.body)
|
||
return a.messageFromAsn1(n)},a.messageToPem=function(e,t){var r={type:"PKCS7",body:o.toDer(e.toAsn1()).getBytes()}
|
||
return i.pem.encode(r,{maxline:t})},a.messageFromAsn1=function(e){var t={},r=[]
|
||
if(!o.validate(e,a.asn1.contentInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.")
|
||
throw n.errors=r,n}var s,u=o.derToOid(t.contentType)
|
||
switch(u){case i.pki.oids.envelopedData:s=a.createEnvelopedData()
|
||
break
|
||
case i.pki.oids.encryptedData:s=a.createEncryptedData()
|
||
break
|
||
case i.pki.oids.signedData:s=a.createSignedData()
|
||
break
|
||
default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+u+" is not (yet) supported.")}return s.fromAsn1(t.content.value[0]),s},a.createSignedData=function(){var e=null
|
||
return e={type:i.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(t){if(l(e,t,a.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var r=e.rawCapture.certificates.value,n=0;n<r.length;++n)e.certificates.push(i.pki.certificateFromAsn1(r[n]))},toAsn1:function(){e.contentInfo||e.sign()
|
||
for(var t=[],r=0;r<e.certificates.length;++r)t.push(i.pki.certificateToAsn1(e.certificates[r]))
|
||
var n=[],a=o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(e.version).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])])
|
||
return t.length>0&&a.value[0].value.push(o.create(o.Class.CONTEXT_SPECIFIC,0,!0,t)),n.length>0&&a.value[0].value.push(o.create(o.Class.CONTEXT_SPECIFIC,1,!0,n)),a.value[0].value.push(o.create(o.Class.UNIVERSAL,o.Type.SET,!0,e.signerInfos)),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.type).getBytes()),a])},addSigner:function(t){var r=t.issuer,n=t.serialNumber
|
||
if(t.certificate){var o=t.certificate
|
||
"string"==typeof o&&(o=i.pki.certificateFromPem(o)),r=o.issuer.attributes,n=o.serialNumber}var a=t.key
|
||
if(!a)throw new Error("Could not add PKCS#7 signer; no private key specified.")
|
||
"string"==typeof a&&(a=i.pki.privateKeyFromPem(a))
|
||
var s=t.digestAlgorithm||i.pki.oids.sha1
|
||
switch(s){case i.pki.oids.sha1:case i.pki.oids.sha256:case i.pki.oids.sha384:case i.pki.oids.sha512:case i.pki.oids.md5:break
|
||
default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+s)}var u=t.authenticatedAttributes||[]
|
||
if(u.length>0){for(var c=!1,l=!1,f=0;f<u.length;++f){var h=u[f]
|
||
if(c||h.type!==i.pki.oids.contentType){if(l||h.type!==i.pki.oids.messageDigest);else if(l=!0,c)break}else if(c=!0,l)break}if(!c||!l)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:a,version:1,issuer:r,serialNumber:n,digestAlgorithm:s,signatureAlgorithm:i.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(){var t
|
||
"object"===n(e.content)&&null!==e.contentInfo||(e.contentInfo=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(i.pki.oids.data).getBytes())]),"content"in e&&(e.content instanceof i.util.ByteBuffer?t=e.content.bytes():"string"==typeof e.content&&(t=i.util.encodeUtf8(e.content)),e.contentInfo.value.push(o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,t)]))))
|
||
0!==e.signers.length&&function(t){if(e.contentInfo.value.length<2)throw new Error("Could not sign PKCS#7 message; there is no content to sign.")
|
||
var r=o.derToOid(e.contentInfo.value[0].value),n=e.contentInfo.value[1]
|
||
n=n.value[0]
|
||
var a=o.toDer(n)
|
||
for(var s in a.getByte(),o.getBerValueLength(a),a=a.getBytes(),t)t[s].start().update(a)
|
||
for(var l=new Date,f=0;f<e.signers.length;++f){var h=e.signers[f]
|
||
if(0===h.authenticatedAttributes.length){if(r!==i.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[])
|
||
for(var d=o.create(o.Class.UNIVERSAL,o.Type.SET,!0,[]),p=0;p<h.authenticatedAttributes.length;++p){var m=h.authenticatedAttributes[p]
|
||
m.type===i.pki.oids.messageDigest?m.value=t[h.digestAlgorithm].digest():m.type===i.pki.oids.signingTime&&(m.value||(m.value=l)),d.value.push(c(m)),h.authenticatedAttributesAsn1.value.push(c(m))}a=o.toDer(d).getBytes(),h.md.start().update(a)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=function(e){for(var t=[],r=0;r<e.length;++r)t.push(u(e[r]))
|
||
return t}(e.signers)}(function(){for(var t={},r=0;r<e.signers.length;++r){var n=e.signers[r],a=n.digestAlgorithm
|
||
a in t||(t[a]=i.md[i.pki.oids[a]].create()),0===n.authenticatedAttributes.length?n.md=t[a]:n.md=i.md[i.pki.oids[a]].create()}for(var a in e.digestAlgorithmIdentifiers=[],t)e.digestAlgorithmIdentifiers.push(o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]))
|
||
return t}())},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(t){"string"==typeof t&&(t=i.pki.certificateFromPem(t)),e.certificates.push(t)},addCertificateRevokationList:function(e){throw new Error("PKCS#7 CRL support not yet implemented.")}}},a.createEncryptedData=function(){var e=null
|
||
return e={type:i.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(t){l(e,t,a.asn1.encryptedDataValidator)},decrypt:function(t){void 0!==t&&(e.encryptedContent.key=t),f(e)}}},a.createEnvelopedData=function(){var e=null
|
||
return e={type:i.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:i.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=l(e,t,a.asn1.envelopedDataValidator)
|
||
e.recipients=function(e){for(var t=[],r=0;r<e.length;++r)t.push(s(e[r]))
|
||
return t}(r.recipientInfos.value)},toAsn1:function(){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.type).getBytes()),o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(e.version).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SET,!0,function(e){for(var t=[],r=0;r<e.length;++r)t.push((n=e[r],o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(n.version).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[i.pki.distinguishedNameToAsn1({attributes:n.issuer}),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,i.util.hexToBytes(n.serialNumber))]),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(n.encryptedContent.algorithm).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")]),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,n.encryptedContent.content)])))
|
||
var n
|
||
return t}(e.recipients)),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,(t=e.encryptedContent,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(i.pki.oids.data).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(t.algorithm).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,t.parameter.getBytes())]),o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,t.content.getBytes())])]))])])])
|
||
var t},findRecipient:function(t){for(var r=t.issuer.attributes,n=0;n<e.recipients.length;++n){var i=e.recipients[n],o=i.issuer
|
||
if(i.serialNumber===t.serialNumber&&o.length===r.length){for(var a=!0,s=0;s<r.length;++s)if(o[s].type!==r[s].type||o[s].value!==r[s].value){a=!1
|
||
break}if(a)return i}}return null},decrypt:function(t,r){if(void 0===e.encryptedContent.key&&void 0!==t&&void 0!==r)switch(t.encryptedContent.algorithm){case i.pki.oids.rsaEncryption:case i.pki.oids.desCBC:var n=r.decrypt(t.encryptedContent.content)
|
||
e.encryptedContent.key=i.util.createBuffer(n)
|
||
break
|
||
default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}f(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:i.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(void 0===e.encryptedContent.content){var n,o,a
|
||
switch(r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key,r){case i.pki.oids["aes128-CBC"]:n=16,o=16,a=i.aes.createEncryptionCipher
|
||
break
|
||
case i.pki.oids["aes192-CBC"]:n=24,o=16,a=i.aes.createEncryptionCipher
|
||
break
|
||
case i.pki.oids["aes256-CBC"]:n=32,o=16,a=i.aes.createEncryptionCipher
|
||
break
|
||
case i.pki.oids["des-EDE3-CBC"]:n=24,o=8,a=i.des.createEncryptionCipher
|
||
break
|
||
default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(void 0===t)t=i.util.createBuffer(i.random.getBytes(n))
|
||
else if(t.length()!=n)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+n+".")
|
||
e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=i.util.createBuffer(i.random.getBytes(o))
|
||
var s=a(t)
|
||
if(s.start(e.encryptedContent.parameter.copy()),s.update(e.content),!s.finish())throw new Error("Symmetric encryption failed.")
|
||
e.encryptedContent.content=s.output}for(var u=0;u<e.recipients.length;++u){var c=e.recipients[u]
|
||
if(void 0===c.encryptedContent.content)switch(c.encryptedContent.algorithm){case i.pki.oids.rsaEncryption:c.encryptedContent.content=c.encryptedContent.key.encrypt(e.encryptedContent.key.data)
|
||
break
|
||
default:throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}}}}},{"./aes":491,"./asn1":493,"./des":498,"./forge":500,"./oids":511,"./pem":514,"./pkcs7asn1":518,"./random":523,"./util":532,"./x509":533}],518:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./asn1"),e("./util")
|
||
var i=n.asn1,o=t.exports=n.pkcs7asn1=n.pkcs7asn1||{}
|
||
n.pkcs7=n.pkcs7||{},n.pkcs7.asn1=o
|
||
var a={name:"ContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]}
|
||
o.contentInfoValidator=a
|
||
var s={name:"EncryptedContentInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]}
|
||
o.envelopedDataValidator={name:"EnvelopedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(s)},o.encryptedDataValidator={name:"EncryptedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"}].concat(s)}
|
||
var u={name:"SignerInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]}
|
||
o.signedDataValidator={name:"SignedData",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},a,{name:"SignedData.Certificates",tagClass:i.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:i.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:i.Class.UNIVERSAL,type:i.Type.SET,capture:"signerInfos",optional:!0,value:[u]}]},o.recipientInfoValidator={name:"RecipientInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:i.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}},{"./asn1":493,"./forge":500,"./util":532}],519:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./asn1"),e("./oids"),e("./pbe"),e("./pem"),e("./pbkdf2"),e("./pkcs12"),e("./pss"),e("./rsa"),e("./util"),e("./x509")
|
||
var i=n.asn1,o=t.exports=n.pki=n.pki||{}
|
||
o.pemToDer=function(e){var t=n.pem.decode(e)[0]
|
||
if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert PEM to DER; PEM is encrypted.")
|
||
return n.util.createBuffer(t.body)},o.privateKeyFromPem=function(e){var t=n.pem.decode(e)[0]
|
||
if("PRIVATE KEY"!==t.type&&"RSA PRIVATE KEY"!==t.type){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".')
|
||
throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert private key from PEM; PEM is encrypted.")
|
||
var a=i.fromDer(t.body)
|
||
return o.privateKeyFromAsn1(a)},o.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:i.toDer(o.privateKeyToAsn1(e)).getBytes()}
|
||
return n.pem.encode(r,{maxline:t})},o.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:i.toDer(e).getBytes()}
|
||
return n.pem.encode(r,{maxline:t})}},{"./asn1":493,"./forge":500,"./oids":511,"./pbe":512,"./pbkdf2":513,"./pem":514,"./pkcs12":516,"./pss":522,"./rsa":525,"./util":532,"./x509":533}],520:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util"),e("./jsbn"),e("./random"),function(){if(n.prime)t.exports=n.prime
|
||
else{var e=t.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new r(null)
|
||
o.fromInt(30)
|
||
var a=function(e,t){return e|t}
|
||
e.generateProbablePrime=function(e,t,i){"function"==typeof t&&(i=t,t={})
|
||
var o=(t=t||{}).algorithm||"PRIMEINC"
|
||
"string"==typeof o&&(o={name:o}),o.options=o.options||{}
|
||
var a=t.prng||n.random,c={nextBytes:function(e){for(var t=a.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}}
|
||
if("PRIMEINC"===o.name)return function(e,t,i,o){if("workers"in i)return function(e,t,i,o){if("undefined"==typeof Worker)return s(e,t,i,o)
|
||
var a=u(e,t),c=i.workers,l=i.workLoad||100,f=30*l/8,h=i.workerScript||"forge/prime.worker.js"
|
||
if(-1===c)return n.util.estimateCores(function(e,t){e&&(t=2),c=t-1,d()})
|
||
function d(){c=Math.max(1,c)
|
||
for(var n=[],i=0;i<c;++i)n[i]=new Worker(h)
|
||
for(var i=0;i<c;++i)n[i].addEventListener("message",d)
|
||
var s=!1
|
||
function d(i){if(!s){0
|
||
var c=i.data
|
||
if(c.found){for(var h=0;h<n.length;++h)n[h].terminate()
|
||
return s=!0,o(null,new r(c.prime,16))}a.bitLength()>e&&(a=u(e,t))
|
||
var d=a.toString(16)
|
||
i.target.postMessage({hex:d,workLoad:l}),a.dAddOffset(f,0)}}}d()}(e,t,i,o)
|
||
return s(e,t,i,o)}(e,c,o.options,i)
|
||
throw new Error("Invalid prime generation algorithm: "+o.name)}}function s(e,t,r,o){var a=u(e,t),s=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(a.bitLength())
|
||
"millerRabinTests"in r&&(s=r.millerRabinTests)
|
||
var c=10
|
||
"maxBlockTime"in r&&(c=r.maxBlockTime),function e(t,r,o,a,s,c,l){var f=+new Date
|
||
do{if(t.bitLength()>r&&(t=u(r,o)),t.isProbablePrime(s))return l(null,t)
|
||
t.dAddOffset(i[a++%8],0)}while(c<0||+new Date-f<c)
|
||
n.util.setImmediate(function(){e(t,r,o,a,s,c,l)})}(a,e,t,0,s,c,o)}function u(e,t){var n=new r(e,t),i=e-1
|
||
return n.testBit(i)||n.bitwiseTo(r.ONE.shiftLeft(i),a,n),n.dAddOffset(31-n.mod(o).byteValue(),0),n}}()},{"./forge":500,"./jsbn":503,"./random":523,"./util":532}],521:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util")
|
||
var i=null
|
||
!n.util.isNodejs||n.options.usePureJavaScript||r.versions["node-webkit"]||(i=e("crypto")),(t.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),a=0;a<32;++a)o[a]=r.create()
|
||
function s(){if(t.pools[0].messageLength>=32)return u()
|
||
var e=32-t.pools[0].messageLength<<5
|
||
t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1
|
||
var e=t.plugin.md.create()
|
||
e.update(t.keyBytes)
|
||
for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1
|
||
t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes)
|
||
var i=e.digest().getBytes()
|
||
t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function c(e){var t=null
|
||
if("undefined"!=typeof window){var r=window.crypto||window.msCrypto
|
||
r&&r.getRandomValues&&(t=function(e){return r.getRandomValues(e)})}var i=n.util.createBuffer()
|
||
if(t)for(;i.length()<e;){var o=Math.max(1,Math.min(e-i.length(),65536)/4),a=new Uint32Array(Math.floor(o))
|
||
try{t(a)
|
||
for(var s=0;s<a.length;++s)i.putInt32(a[s])}catch(e){if(!("undefined"!=typeof QuotaExceededError&&e instanceof QuotaExceededError))throw e}}if(i.length()<e)for(var u,c,l,f=Math.floor(65536*Math.random());i.length()<e;){c=16807*(65535&f),c+=(32767&(u=16807*(f>>16)))<<16,f=4294967295&(c=(2147483647&(c+=u>>15))+(c>>31))
|
||
for(s=0;s<3;++s)l=f>>>(s<<3),l^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&l))}return i.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e)
|
||
var i=t.plugin.cipher,o=t.plugin.increment,a=t.plugin.formatKey,s=t.plugin.formatSeed,c=n.util.createBuffer()
|
||
t.key=null,function l(f){if(f)return r(f)
|
||
if(c.length()>=e)return r(null,c.getBytes(e))
|
||
t.generated>1048575&&(t.key=null)
|
||
if(null===t.key)return n.util.nextTick(function(){(function(e){if(t.pools[0].messageLength>=32)return u(),e()
|
||
var r=32-t.pools[0].messageLength<<5
|
||
t.seedFile(r,function(r,n){if(r)return e(r)
|
||
t.collect(n),u(),e()})})(l)})
|
||
var h=i(t.key,t.seed)
|
||
t.generated+=h.length
|
||
c.putBytes(h)
|
||
t.key=a(i(t.key,o(t.seed)))
|
||
t.seed=s(i(t.key,t.seed))
|
||
n.util.setImmediate(l)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,a=t.plugin.formatSeed
|
||
t.key=null
|
||
for(var u=n.util.createBuffer();u.length()<e;){t.generated>1048575&&(t.key=null),null===t.key&&s()
|
||
var c=r(t.key,t.seed)
|
||
t.generated+=c.length,u.putBytes(c),t.key=o(r(t.key,i(t.seed))),t.seed=a(r(t.key,t.seed))}return u.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,function(e,r){if(e)return t(e)
|
||
t(null,r.toString())})},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,c(e))}catch(e){t(e)}},t.seedFileSync=c),t.collect=function(e){for(var r=e.length,n=0;n<r;++n)t.pools[t.pool].update(e.substr(n,1)),t.pool=31===t.pool?0:t.pool+1},t.collectInt=function(e,r){for(var n="",i=0;i<r;i+=8)n+=String.fromCharCode(e>>i&255)
|
||
t.collect(n)},t.registerWorker=function(e){if(e===self)t.seedFile=function(e,t){self.addEventListener("message",function e(r){var n=r.data
|
||
n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:e}}})}
|
||
else{e.addEventListener("message",function(r){var n=r.data
|
||
n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})})})}},t}}).call(this,e("_process"))},{"./forge":500,"./util":532,_process:124,crypto:109}],522:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./random"),e("./util"),(t.exports=n.pss=n.pss||{}).create=function(e){3===arguments.length&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]})
|
||
var t,r=e.md,i=e.mgf,o=r.digestLength,a=e.salt||null
|
||
if("string"==typeof a&&(a=n.util.createBuffer(a)),"saltLength"in e)t=e.saltLength
|
||
else{if(null===a)throw new Error("Salt length not specified or specific salt not given.")
|
||
t=a.length()}if(null!==a&&a.length()!==t)throw new Error("Given salt length does not match length of given salt.")
|
||
var s=e.prng||n.random,u={encode:function(e,u){var c,l,f=u-1,h=Math.ceil(f/8),d=e.digest().getBytes()
|
||
if(h<o+t+2)throw new Error("Message is too long to encrypt.")
|
||
l=null===a?s.getBytesSync(t):a.bytes()
|
||
var p=new n.util.ByteBuffer
|
||
p.fillWithByte(0,8),p.putBytes(d),p.putBytes(l),r.start(),r.update(p.getBytes())
|
||
var m=r.digest().getBytes(),y=new n.util.ByteBuffer
|
||
y.fillWithByte(0,h-t-o-2),y.putByte(1),y.putBytes(l)
|
||
var g=y.getBytes(),b=h-o-1,v=i.generate(m,b),_=""
|
||
for(c=0;c<b;c++)_+=String.fromCharCode(g.charCodeAt(c)^v.charCodeAt(c))
|
||
var w=65280>>8*h-f&255
|
||
return(_=String.fromCharCode(_.charCodeAt(0)&~w)+_.substr(1))+m+String.fromCharCode(188)},verify:function(e,a,s){var u,c=s-1,l=Math.ceil(c/8)
|
||
if(a=a.substr(-l),l<o+t+2)throw new Error("Inconsistent parameters to PSS signature verification.")
|
||
if(188!==a.charCodeAt(l-1))throw new Error("Encoded message does not end in 0xBC.")
|
||
var f=l-o-1,h=a.substr(0,f),d=a.substr(f,o),p=65280>>8*l-c&255
|
||
if(0!=(h.charCodeAt(0)&p))throw new Error("Bits beyond keysize not zero as expected.")
|
||
var m=i.generate(d,f),y=""
|
||
for(u=0;u<f;u++)y+=String.fromCharCode(h.charCodeAt(u)^m.charCodeAt(u))
|
||
y=String.fromCharCode(y.charCodeAt(0)&~p)+y.substr(1)
|
||
var g=l-o-t-2
|
||
for(u=0;u<g;u++)if(0!==y.charCodeAt(u))throw new Error("Leftmost octets not zero as expected")
|
||
if(1!==y.charCodeAt(g))throw new Error("Inconsistent PSS signature, 0x01 marker not found")
|
||
var b=y.substr(-t),v=new n.util.ByteBuffer
|
||
return v.fillWithByte(0,8),v.putBytes(e),v.putBytes(b),r.start(),r.update(v.getBytes()),d===r.digest().getBytes()}}
|
||
return u}},{"./forge":500,"./random":523,"./util":532}],523:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./aes"),e("./sha256"),e("./prng"),e("./util"),n.random&&n.random.getBytes?t.exports=n.random:function(e){var r={},i=new Array(4),o=n.util.createBuffer()
|
||
function a(){var e=n.prng.create(r)
|
||
return e.getBytes=function(t,r){return e.generate(t,r)},e.getBytesSync=function(t){return e.generate(t)},e}r.formatKey=function(e){var t=n.util.createBuffer(e)
|
||
return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),n.aes._expandKey(e,!1)},r.formatSeed=function(e){var t=n.util.createBuffer(e)
|
||
return(e=new Array(4))[0]=t.getInt32(),e[1]=t.getInt32(),e[2]=t.getInt32(),e[3]=t.getInt32(),e},r.cipher=function(e,t){return n.aes._updateBlock(e,t,i,!1),o.putInt32(i[0]),o.putInt32(i[1]),o.putInt32(i[2]),o.putInt32(i[3]),o.getBytes()},r.increment=function(e){return++e[3],e},r.md=n.md.sha256
|
||
var s=a(),u=null
|
||
if("undefined"!=typeof window){var c=window.crypto||window.msCrypto
|
||
c&&c.getRandomValues&&(u=function(e){return c.getRandomValues(e)})}if(n.options.usePureJavaScript||!n.util.isNodejs&&!u){if("undefined"==typeof window||window.document,s.collectInt(+new Date,32),"undefined"!=typeof navigator){var l=""
|
||
for(var f in navigator)try{"string"==typeof navigator[f]&&(l+=navigator[f])}catch(e){}s.collect(l),l=null}e&&(e().mousemove(function(e){s.collectInt(e.clientX,16),s.collectInt(e.clientY,16)}),e().keypress(function(e){s.collectInt(e.charCode,8)}))}if(n.random)for(var f in s)n.random[f]=s[f]
|
||
else n.random=s
|
||
n.random.createInstance=a,t.exports=n.random}("undefined"!=typeof jQuery?jQuery:null)},{"./aes":491,"./forge":500,"./prng":521,"./sha256":527,"./util":532}],524:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./util")
|
||
var i=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],o=[1,2,3,5]
|
||
t.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128
|
||
var r,o=e,a=e.length(),s=t,u=Math.ceil(s/8),c=255>>(7&s)
|
||
for(r=a;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-a)&255])
|
||
for(o.setAt(128-u,i[o.at(128-u)&c]),r=127-u;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+u)])
|
||
return o}
|
||
var a=function(e,t,r){var i,a,s,u,c=!1,l=null,f=null,h=null,d=[]
|
||
for(e=n.rc2.expandKey(e,t),s=0;s<64;s++)d.push(e.getInt16Le())
|
||
r?(i=function(e){for(s=0;s<4;s++)e[s]+=d[u]+(e[(s+3)%4]&e[(s+2)%4])+(~e[(s+3)%4]&e[(s+1)%4]),e[s]=(t=e[s])<<(r=o[s])&65535|(65535&t)>>16-r,u++
|
||
var t,r},a=function(e){for(s=0;s<4;s++)e[s]+=d[63&e[(s+3)%4]]}):(i=function(e){for(s=3;s>=0;s--)e[s]=(65535&(t=e[s]))>>(r=o[s])|t<<16-r&65535,e[s]-=d[u]+(e[(s+3)%4]&e[(s+2)%4])+(~e[(s+3)%4]&e[(s+1)%4]),u--
|
||
var t,r},a=function(e){for(s=3;s>=0;s--)e[s]-=d[63&e[(s+3)%4]]})
|
||
var p=function(e){var t=[]
|
||
for(s=0;s<4;s++){var n=l.getInt16Le()
|
||
null!==h&&(r?n^=h.getInt16Le():h.putInt16Le(n)),t.push(65535&n)}u=r?0:63
|
||
for(var i=0;i<e.length;i++)for(var o=0;o<e[i][0];o++)e[i][1](t)
|
||
for(s=0;s<4;s++)null!==h&&(r?h.putInt16Le(t[s]):t[s]^=h.getInt16Le()),f.putInt16Le(t[s])},m=null
|
||
return m={start:function(e,t){e&&"string"==typeof e&&(e=n.util.createBuffer(e)),c=!1,l=n.util.createBuffer(),f=t||new n.util.createBuffer,h=e,m.output=f},update:function(e){for(c||l.putBuffer(e);l.length()>=8;)p([[5,i],[1,a],[6,i],[1,a],[5,i]])},finish:function(e){var t=!0
|
||
if(r)if(e)t=e(8,l,!r)
|
||
else{var n=8===l.length()?8:8-l.length()
|
||
l.fillWithByte(n,n)}if(t&&(c=!0,m.update()),!r&&(t=0===l.length()))if(e)t=e(8,f,!r)
|
||
else{var i=f.length(),o=f.at(i-1)
|
||
o>i?t=!1:f.truncate(o)}return t}}}
|
||
n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128)
|
||
return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return a(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128)
|
||
return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return a(e,t,!1)}},{"./forge":500,"./util":532}],525:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./forge")
|
||
if(e("./asn1"),e("./jsbn"),e("./oids"),e("./pkcs1"),e("./prime"),e("./random"),e("./util"),void 0===o)var o=i.jsbn.BigInteger
|
||
var a=i.asn1
|
||
i.pki=i.pki||{},t.exports=i.pki.rsa=i.rsa=i.rsa||{}
|
||
var s=i.pki,u=[6,4,2,4,2,4,6,2],c={name:"PrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:a.Class.UNIVERSAL,type:a.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},h=i.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:a.Class.UNIVERSAL,type:a.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:a.Class.UNIVERSAL,type:a.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},d=function(e){var t
|
||
if(!(e.algorithm in s.oids)){var r=new Error("Unknown message digest algorithm.")
|
||
throw r.algorithm=e.algorithm,r}t=s.oids[e.algorithm]
|
||
var n=a.oidToDer(t).getBytes(),i=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[]),o=a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[])
|
||
o.value.push(a.create(a.Class.UNIVERSAL,a.Type.OID,!1,n)),o.value.push(a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,""))
|
||
var u=a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,e.digest().getBytes())
|
||
return i.value.push(o),i.value.push(u),a.toDer(i).getBytes()},p=function(e,t,r){if(r)return e.modPow(t.e,t.n)
|
||
if(!t.p||!t.q)return e.modPow(t.d,t.n)
|
||
var n
|
||
t.dP||(t.dP=t.d.mod(t.p.subtract(o.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(o.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p))
|
||
do{n=new o(i.util.bytesToHex(i.random.getBytes(t.n.bitLength()/8)),16)}while(n.compareTo(t.n)>=0||!n.gcd(t.n).equals(o.ONE))
|
||
for(var a=(e=e.multiply(n.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(s)<0;)a=a.add(t.p)
|
||
var u=a.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s)
|
||
return u=u.multiply(n.modInverse(t.n)).mod(t.n)}
|
||
function m(e,t,r){var n=i.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8)
|
||
if(e.length>o-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.")
|
||
throw a.length=e.length,a.max=o-11,a}n.putByte(0),n.putByte(r)
|
||
var s,u=o-3-e.length
|
||
if(0===r||1===r){s=0===r?0:255
|
||
for(var c=0;c<u;++c)n.putByte(s)}else for(;u>0;){var l=0,f=i.random.getBytes(u)
|
||
for(c=0;c<u;++c)0===(s=f.charCodeAt(c))?++l:n.putByte(s)
|
||
u=l}return n.putByte(0),n.putBytes(e),n}function y(e,t,r,n){var o=Math.ceil(t.n.bitLength()/8),a=i.util.createBuffer(e),s=a.getByte(),u=a.getByte()
|
||
if(0!==s||r&&0!==u&&1!==u||!r&&2!=u||r&&0===u&&void 0===n)throw new Error("Encryption block is invalid.")
|
||
var c=0
|
||
if(0===u){c=o-3-n
|
||
for(var l=0;l<c;++l)if(0!==a.getByte())throw new Error("Encryption block is invalid.")}else if(1===u)for(c=0;a.length()>1;){if(255!==a.getByte()){--a.read
|
||
break}++c}else if(2===u)for(c=0;a.length()>1;){if(0===a.getByte()){--a.read
|
||
break}++c}if(0!==a.getByte()||c!==o-3-a.length())throw new Error("Encryption block is invalid.")
|
||
return a.getBytes()}function g(e){var t=e.toString(16)
|
||
t[0]>="8"&&(t="00"+t)
|
||
var r=i.util.hexToBytes(t)
|
||
return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function b(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function v(e){return"undefined"!=typeof window&&"object"===n(window.crypto)&&"object"===n(window.crypto.subtle)&&"function"==typeof window.crypto.subtle[e]}function _(e){return"undefined"!=typeof window&&"object"===n(window.msCrypto)&&"object"===n(window.msCrypto.subtle)&&"function"==typeof window.msCrypto.subtle[e]}function w(e){for(var t=i.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),n=0;n<t.length;++n)r[n]=t.charCodeAt(n)
|
||
return r}s.rsa.encrypt=function(e,t,r){var n,a=r,s=Math.ceil(t.n.bitLength()/8)
|
||
!1!==r&&!0!==r?(a=2===r,n=m(e,t,r)):(n=i.util.createBuffer()).putBytes(e)
|
||
for(var u=new o(n.toHex(),16),c=p(u,t,a).toString(16),l=i.util.createBuffer(),f=s-Math.ceil(c.length/2);f>0;)l.putByte(0),--f
|
||
return l.putBytes(i.util.hexToBytes(c)),l.getBytes()},s.rsa.decrypt=function(e,t,r,n){var a=Math.ceil(t.n.bitLength()/8)
|
||
if(e.length!==a){var s=new Error("Encrypted message length is invalid.")
|
||
throw s.length=e.length,s.expected=a,s}var u=new o(i.util.createBuffer(e).toHex(),16)
|
||
if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.")
|
||
for(var c=p(u,t,r).toString(16),l=i.util.createBuffer(),f=a-Math.ceil(c.length/2);f>0;)l.putByte(0),--f
|
||
return l.putBytes(i.util.hexToBytes(c)),!1!==n?y(l.getBytes(),t,r):l.getBytes()},s.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048
|
||
var n,a=(r=r||{}).prng||i.random,s={nextBytes:function(e){for(var t=a.getBytesSync(e.length),r=0;r<e.length;++r)e[r]=t.charCodeAt(r)}},u=r.algorithm||"PRIMEINC"
|
||
if("PRIMEINC"!==u)throw new Error("Invalid key generation algorithm: "+u)
|
||
return(n={algorithm:u,state:0,bits:e,rng:s,eInt:t||65537,e:new o(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(n.eInt),n},s.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC")
|
||
var r=new o(null)
|
||
r.fromInt(30)
|
||
for(var n,i=0,a=function(e,t){return e|t},c=+new Date,l=0;null===e.keys&&(t<=0||l<t);){if(0===e.state){var f=null===e.p?e.pBits:e.qBits,h=f-1
|
||
0===e.pqState?(e.num=new o(f,e.rng),e.num.testBit(h)||e.num.bitwiseTo(o.ONE.shiftLeft(h),a,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),i=0,++e.pqState):1===e.pqState?e.num.bitLength()>f?e.pqState=0:e.num.isProbablePrime(b(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(u[i++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(o.ONE).gcd(e.e).compareTo(o.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state
|
||
else if(2===e.state)e.p1=e.p.subtract(o.ONE),e.q1=e.q.subtract(o.ONE),e.phi=e.p1.multiply(e.q1),++e.state
|
||
else if(3===e.state)0===e.phi.gcd(e.e).compareTo(o.ONE)?++e.state:(e.p=null,e.q=null,e.state=0)
|
||
else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0)
|
||
else if(5===e.state){var d=e.e.modInverse(e.phi)
|
||
e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)}}l+=(n=+new Date)-c,c=n}return null!==e.keys},s.rsa.generateKeyPair=function(e,t,r,u){if(1===arguments.length?"object"===(void 0===e?"undefined":n(e))?(r=e,e=void 0):"function"==typeof e&&(u=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(u=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,u=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(u=r,r=void 0):(u=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!i.options.usePureJavaScript&&u&&e>=256&&e<=16384&&(65537===t||3===t)){if(v("generateKey")&&v("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:w(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(e){return window.crypto.subtle.exportKey("pkcs8",e.privateKey)}).then(void 0,function(e){u(e)}).then(function(e){if(e){var t=s.privateKeyFromAsn1(a.fromDer(i.util.createBuffer(e)))
|
||
u(null,{privateKey:t,publicKey:s.setRsaPublicKey(t.n,t.e)})}})
|
||
if(_("generateKey")&&_("exportKey")){var c=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:w(t),hash:{name:"SHA-256"}},!0,["sign","verify"])
|
||
return c.oncomplete=function(e){var t=e.target.result,r=window.msCrypto.subtle.exportKey("pkcs8",t.privateKey)
|
||
r.oncomplete=function(e){var t=e.target.result,r=s.privateKeyFromAsn1(a.fromDer(i.util.createBuffer(t)))
|
||
u(null,{privateKey:r,publicKey:s.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){u(e)}},void(c.onerror=function(e){u(e)})}}var l=s.rsa.createKeyPairGenerationState(e,t,r)
|
||
if(!u)return s.rsa.stepKeyPairGenerationState(l,0),l.keys;(function(e,t,r){"function"==typeof t&&(r=t,t={})
|
||
var n={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}}
|
||
"prng"in t&&(n.prng=t.prng)
|
||
function a(){u(e.pBits,function(t,n){return t?r(t):(e.p=n,null!==e.q?c(t,e.q):void u(e.qBits,c))})}function u(e,t){i.prime.generateProbablePrime(e,n,t)}function c(t,n){if(t)return r(t)
|
||
if(e.q=n,e.p.compareTo(e.q)<0){var i=e.p
|
||
e.p=e.q,e.q=i}if(0!==e.p.subtract(o.ONE).gcd(e.e).compareTo(o.ONE))return e.p=null,void a()
|
||
if(0!==e.q.subtract(o.ONE).gcd(e.e).compareTo(o.ONE))return e.q=null,void u(e.qBits,c)
|
||
if(e.p1=e.p.subtract(o.ONE),e.q1=e.q.subtract(o.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(o.ONE))return e.p=e.q=null,void a()
|
||
if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void u(e.qBits,c)
|
||
var l=e.e.modInverse(e.phi)
|
||
e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}a()})(l,r,u)},s.setRsaPublicKey=s.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,n){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return m(e,t,2).getBytes()}}
|
||
else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return i.pkcs1.encode_rsa_oaep(t,e,n)}}
|
||
else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}}
|
||
else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".')
|
||
var o=t.encode(e,r,!0)
|
||
return s.rsa.encrypt(o,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=y(t,r,!0),e===a.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===(t=y(t,r,!0))}})
|
||
var i=s.rsa.decrypt(t,r,!0,!1)
|
||
return n.verify(e,i,r.n.bitLength())}}
|
||
return r},s.setRsaPrivateKey=s.rsa.setPrivateKey=function(e,t,r,n,o,a,u,c){var l={n:e,e:t,d:r,p:n,q:o,dP:a,dQ:u,qInv:c,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5")
|
||
var n=s.rsa.decrypt(e,l,!1,!1)
|
||
if("RSAES-PKCS1-V1_5"===t)t={decode:y}
|
||
else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return i.pkcs1.decode_rsa_oaep(t,e,r)}}
|
||
else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".')
|
||
t={decode:function(e){return e}}}return t.decode(n,l,!1)},sign:function(e,t){var r=!1
|
||
"string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:d},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1)
|
||
var n=t.encode(e,l.n.bitLength())
|
||
return s.rsa.encrypt(n,l,r)}}
|
||
return l},s.wrapRsaPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(e).getBytes())])},s.privateKeyFromAsn1=function(e){var t,r,n,u,f,h,d,p,m={},y=[]
|
||
if(a.validate(e,c,m,y)&&(e=a.fromDer(i.util.createBuffer(m.privateKey))),m={},y=[],!a.validate(e,l,m,y)){var g=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.")
|
||
throw g.errors=y,g}return t=i.util.createBuffer(m.privateKeyModulus).toHex(),r=i.util.createBuffer(m.privateKeyPublicExponent).toHex(),n=i.util.createBuffer(m.privateKeyPrivateExponent).toHex(),u=i.util.createBuffer(m.privateKeyPrime1).toHex(),f=i.util.createBuffer(m.privateKeyPrime2).toHex(),h=i.util.createBuffer(m.privateKeyExponent1).toHex(),d=i.util.createBuffer(m.privateKeyExponent2).toHex(),p=i.util.createBuffer(m.privateKeyCoefficient).toHex(),s.setRsaPrivateKey(new o(t,16),new o(r,16),new o(n,16),new o(u,16),new o(f,16),new o(h,16),new o(d,16),new o(p,16))},s.privateKeyToAsn1=s.privateKeyToRSAPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.e)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.d)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.p)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.q)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.dP)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.dQ)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.qInv))])},s.publicKeyFromAsn1=function(e){var t={},r=[]
|
||
if(a.validate(e,h,t,r)){var n,u=a.derToOid(t.publicKeyOid)
|
||
if(u!==s.oids.rsaEncryption)throw(n=new Error("Cannot read public key. Unknown OID.")).oid=u,n
|
||
e=t.rsaPublicKey}if(r=[],!a.validate(e,f,t,r))throw(n=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,n
|
||
var c=i.util.createBuffer(t.publicKeyModulus).toHex(),l=i.util.createBuffer(t.publicKeyExponent).toHex()
|
||
return s.setRsaPublicKey(new o(c,16),new o(l,16))},s.publicKeyToAsn1=s.publicKeyToSubjectPublicKeyInfo=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,[s.publicKeyToRSAPublicKey(e)])])},s.publicKeyToRSAPublicKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,g(e.e))])}},{"./asn1":493,"./forge":500,"./jsbn":503,"./oids":511,"./pkcs1":515,"./prime":520,"./random":523,"./util":532}],526:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./md"),e("./util")
|
||
var i=t.exports=n.sha1=n.sha1||{}
|
||
n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){a||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),a=!0)
|
||
var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[]
|
||
for(var r=i.messageLengthSize/4,o=0;o<r;++o)i.fullMessageLength.push(0)
|
||
return t=n.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i}}
|
||
return i.start(),i.update=function(o,a){"utf8"===a&&(o=n.util.encodeUtf8(o))
|
||
var u=o.length
|
||
i.messageLength+=u,u=[u/4294967296>>>0,u>>>0]
|
||
for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=u[1],u[1]=u[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,u[0]=u[1]/4294967296>>>0
|
||
return t.putBytes(o),s(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=n.util.createBuffer()
|
||
a.putBytes(t.bytes())
|
||
var u,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1
|
||
a.putBytes(o.substr(0,i.blockLength-c))
|
||
for(var l=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)l+=(u=8*i.fullMessageLength[f+1])/4294967296>>>0,a.putInt32(l>>>0),l=u>>>0
|
||
a.putInt32(l)
|
||
var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4}
|
||
s(h,r,a)
|
||
var d=n.util.createBuffer()
|
||
return d.putInt32(h.h0),d.putInt32(h.h1),d.putInt32(h.h2),d.putInt32(h.h3),d.putInt32(h.h4),d},i}
|
||
var o=null,a=!1
|
||
function s(e,t,r){for(var n,i,o,a,s,u,c,l=r.length();l>=64;){for(i=e.h0,o=e.h1,a=e.h2,s=e.h3,u=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,n=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n
|
||
for(;c<20;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n
|
||
for(;c<32;++c)n=(n=t[c-3]^t[c-8]^t[c-14]^t[c-16])<<1|n>>>31,t[c]=n,n=(i<<5|i>>>27)+(o^a^s)+u+1859775393+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n
|
||
for(;c<40;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o^a^s)+u+1859775393+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n
|
||
for(;c<60;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o&a|s&(o^a))+u+2400959708+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n
|
||
for(;c<80;++c)n=(n=t[c-6]^t[c-16]^t[c-28]^t[c-32])<<2|n>>>30,t[c]=n,n=(i<<5|i>>>27)+(o^a^s)+u+3395469782+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n
|
||
e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+a|0,e.h3=e.h3+s|0,e.h4=e.h4+u|0,l-=64}}},{"./forge":500,"./md":507,"./util":532}],527:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./md"),e("./util")
|
||
var i=t.exports=n.sha256=n.sha256||{}
|
||
n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){a||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=!0)
|
||
var e=null,t=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[]
|
||
for(var r=i.messageLengthSize/4,o=0;o<r;++o)i.fullMessageLength.push(0)
|
||
return t=n.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i}}
|
||
return i.start(),i.update=function(o,a){"utf8"===a&&(o=n.util.encodeUtf8(o))
|
||
var s=o.length
|
||
i.messageLength+=s,s=[s/4294967296>>>0,s>>>0]
|
||
for(var c=i.fullMessageLength.length-1;c>=0;--c)i.fullMessageLength[c]+=s[1],s[1]=s[0]+(i.fullMessageLength[c]/4294967296>>>0),i.fullMessageLength[c]=i.fullMessageLength[c]>>>0,s[0]=s[1]/4294967296>>>0
|
||
return t.putBytes(o),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=n.util.createBuffer()
|
||
a.putBytes(t.bytes())
|
||
var s,c=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1
|
||
a.putBytes(o.substr(0,i.blockLength-c))
|
||
for(var l=8*i.fullMessageLength[0],f=0;f<i.fullMessageLength.length-1;++f)l+=(s=8*i.fullMessageLength[f+1])/4294967296>>>0,a.putInt32(l>>>0),l=s>>>0
|
||
a.putInt32(l)
|
||
var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7}
|
||
u(h,r,a)
|
||
var d=n.util.createBuffer()
|
||
return d.putInt32(h.h0),d.putInt32(h.h1),d.putInt32(h.h2),d.putInt32(h.h3),d.putInt32(h.h4),d.putInt32(h.h5),d.putInt32(h.h6),d.putInt32(h.h7),d},i}
|
||
var o=null,a=!1,s=null
|
||
function u(e,t,r){for(var n,i,o,a,u,c,l,f,h,d,p,m,y,g=r.length();g>=64;){for(u=0;u<16;++u)t[u]=r.getInt32()
|
||
for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0
|
||
for(c=e.h0,l=e.h1,f=e.h2,h=e.h3,d=e.h4,p=e.h5,m=e.h6,y=e.h7,u=0;u<64;++u)o=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),a=c&l|f&(c^l),n=y+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(m^d&(p^m))+s[u]+t[u],y=m,m=p,p=d,d=h+n>>>0,h=f,f=l,l=c,c=n+(i=o+a)>>>0
|
||
e.h0=e.h0+c|0,e.h1=e.h1+l|0,e.h2=e.h2+f|0,e.h3=e.h3+h|0,e.h4=e.h4+d|0,e.h5=e.h5+p|0,e.h6=e.h6+m|0,e.h7=e.h7+y|0,g-=64}}},{"./forge":500,"./md":507,"./util":532}],528:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./md"),e("./util")
|
||
var i=t.exports=n.sha512=n.sha512||{}
|
||
n.md.sha512=n.md.algorithms.sha512=i
|
||
var o=n.sha384=n.sha512.sha384=n.sha512.sha384||{}
|
||
o.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=o,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(e){if(s||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),128),u=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],(c={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],c["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],c["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],c["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],s=!0),void 0===e&&(e="SHA-512"),!(e in c))throw new Error("Invalid SHA-512 algorithm: "+e)
|
||
for(var t=c[e],r=null,i=n.util.createBuffer(),o=new Array(80),f=0;f<80;++f)o[f]=new Array(2)
|
||
var h=64
|
||
switch(e){case"SHA-384":h=48
|
||
break
|
||
case"SHA-512/256":h=32
|
||
break
|
||
case"SHA-512/224":h=28}var d={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:h,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){d.messageLength=0,d.fullMessageLength=d.messageLength128=[]
|
||
for(var e=d.messageLengthSize/4,o=0;o<e;++o)d.fullMessageLength.push(0)
|
||
i=n.util.createBuffer(),r=new Array(t.length)
|
||
for(o=0;o<t.length;++o)r[o]=t[o].slice(0)
|
||
return d}}
|
||
return d.start(),d.update=function(e,t){"utf8"===t&&(e=n.util.encodeUtf8(e))
|
||
var a=e.length
|
||
d.messageLength+=a,a=[a/4294967296>>>0,a>>>0]
|
||
for(var s=d.fullMessageLength.length-1;s>=0;--s)d.fullMessageLength[s]+=a[1],a[1]=a[0]+(d.fullMessageLength[s]/4294967296>>>0),d.fullMessageLength[s]=d.fullMessageLength[s]>>>0,a[0]=a[1]/4294967296>>>0
|
||
return i.putBytes(e),l(r,o,i),(i.read>2048||0===i.length())&&i.compact(),d},d.digest=function(){var t=n.util.createBuffer()
|
||
t.putBytes(i.bytes())
|
||
var s,u=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1
|
||
t.putBytes(a.substr(0,d.blockLength-u))
|
||
for(var c=8*d.fullMessageLength[0],f=0;f<d.fullMessageLength.length-1;++f)c+=(s=8*d.fullMessageLength[f+1])/4294967296>>>0,t.putInt32(c>>>0),c=s>>>0
|
||
t.putInt32(c)
|
||
var h=new Array(r.length)
|
||
for(f=0;f<r.length;++f)h[f]=r[f].slice(0)
|
||
l(h,o,t)
|
||
var p,m=n.util.createBuffer()
|
||
p="SHA-512"===e?h.length:"SHA-384"===e?h.length-2:h.length-4
|
||
for(f=0;f<p;++f)m.putInt32(h[f][0]),f===p-1&&"SHA-512/224"===e||m.putInt32(h[f][1])
|
||
return m},d}
|
||
var a=null,s=!1,u=null,c=null
|
||
function l(e,t,r){for(var n,i,o,a,s,c,l,f,h,d,p,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P,M,R,O,B,N,j,L=r.length();L>=128;){for(P=0;P<16;++P)t[P][0]=r.getInt32()>>>0,t[P][1]=r.getInt32()>>>0
|
||
for(;P<80;++P)n=(((M=(O=t[P-2])[0])>>>19|(R=O[1])<<13)^(R>>>29|M<<3)^M>>>6)>>>0,i=((M<<13|R>>>19)^(R<<3|M>>>29)^(M<<26|R>>>6))>>>0,o=(((M=(N=t[P-15])[0])>>>1|(R=N[1])<<31)^(M>>>8|R<<24)^M>>>7)>>>0,a=((M<<31|R>>>1)^(M<<24|R>>>8)^(M<<25|R>>>7))>>>0,B=t[P-7],j=t[P-16],R=i+B[1]+a+j[1],t[P][0]=n+B[0]+o+j[0]+(R/4294967296>>>0)>>>0,t[P][1]=R>>>0
|
||
for(p=e[0][0],m=e[0][1],y=e[1][0],g=e[1][1],b=e[2][0],v=e[2][1],_=e[3][0],w=e[3][1],S=e[4][0],E=e[4][1],k=e[5][0],x=e[5][1],C=e[6][0],A=e[6][1],T=e[7][0],I=e[7][1],P=0;P<80;++P)l=((S>>>14|E<<18)^(S>>>18|E<<14)^(E>>>9|S<<23))>>>0,f=(C^S&(k^C))>>>0,s=((p>>>28|m<<4)^(m>>>2|p<<30)^(m>>>7|p<<25))>>>0,c=((p<<4|m>>>28)^(m<<30|p>>>2)^(m<<25|p>>>7))>>>0,h=(p&y|b&(p^y))>>>0,d=(m&g|v&(m^g))>>>0,R=I+(((S<<18|E>>>14)^(S<<14|E>>>18)^(E<<23|S>>>9))>>>0)+((A^E&(x^A))>>>0)+u[P][1]+t[P][1],n=T+l+f+u[P][0]+t[P][0]+(R/4294967296>>>0)>>>0,i=R>>>0,o=s+h+((R=c+d)/4294967296>>>0)>>>0,a=R>>>0,T=C,I=A,C=k,A=x,k=S,x=E,S=_+n+((R=w+i)/4294967296>>>0)>>>0,E=R>>>0,_=b,w=v,b=y,v=g,y=p,g=m,p=n+o+((R=i+a)/4294967296>>>0)>>>0,m=R>>>0
|
||
R=e[0][1]+m,e[0][0]=e[0][0]+p+(R/4294967296>>>0)>>>0,e[0][1]=R>>>0,R=e[1][1]+g,e[1][0]=e[1][0]+y+(R/4294967296>>>0)>>>0,e[1][1]=R>>>0,R=e[2][1]+v,e[2][0]=e[2][0]+b+(R/4294967296>>>0)>>>0,e[2][1]=R>>>0,R=e[3][1]+w,e[3][0]=e[3][0]+_+(R/4294967296>>>0)>>>0,e[3][1]=R>>>0,R=e[4][1]+E,e[4][0]=e[4][0]+S+(R/4294967296>>>0)>>>0,e[4][1]=R>>>0,R=e[5][1]+x,e[5][0]=e[5][0]+k+(R/4294967296>>>0)>>>0,e[5][1]=R>>>0,R=e[6][1]+A,e[6][0]=e[6][0]+C+(R/4294967296>>>0)>>>0,e[6][1]=R>>>0,R=e[7][1]+I,e[7][0]=e[7][0]+T+(R/4294967296>>>0)>>>0,e[7][1]=R>>>0,L-=128}}},{"./forge":500,"./md":507,"./util":532}],529:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./aes"),e("./hmac"),e("./md5"),e("./sha1"),e("./util")
|
||
var i=t.exports=n.ssh=n.ssh||{}
|
||
function o(e,t){var r=t.toString(16)
|
||
r[0]>="8"&&(r="00"+r)
|
||
var i=n.util.hexToBytes(r)
|
||
e.putInt32(i.length),e.putBytes(i)}function a(e,t){e.putInt32(t.length),e.putString(t)}function s(){for(var e=n.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r])
|
||
return e.digest()}i.privateKeyToPutty=function(e,t,r){r=r||""
|
||
var i=""===(t=t||"")?"none":"aes256-cbc",u="PuTTY-User-Key-File-2: ssh-rsa\r\n"
|
||
u+="Encryption: "+i+"\r\n",u+="Comment: "+r+"\r\n"
|
||
var c=n.util.createBuffer()
|
||
a(c,"ssh-rsa"),o(c,e.e),o(c,e.n)
|
||
var l=n.util.encode64(c.bytes(),64),f=Math.floor(l.length/66)+1
|
||
u+="Public-Lines: "+f+"\r\n",u+=l
|
||
var h,d=n.util.createBuffer()
|
||
if(o(d,e.d),o(d,e.p),o(d,e.q),o(d,e.qInv),t){var p=d.length()+16-1
|
||
p-=p%16
|
||
var m=s(d.bytes())
|
||
m.truncate(m.length()-p+d.length()),d.putBuffer(m)
|
||
var y=n.util.createBuffer()
|
||
y.putBuffer(s("\0\0\0\0",t)),y.putBuffer(s("\0\0\0",t))
|
||
var g=n.aes.createEncryptionCipher(y.truncate(8),"CBC")
|
||
g.start(n.util.createBuffer().fillWithByte(0,16)),g.update(d.copy()),g.finish()
|
||
var b=g.output
|
||
b.truncate(16),h=n.util.encode64(b.bytes(),64)}else h=n.util.encode64(d.bytes(),64)
|
||
u+="\r\nPrivate-Lines: "+(f=Math.floor(h.length/66)+1)+"\r\n",u+=h
|
||
var v=s("putty-private-key-file-mac-key",t),_=n.util.createBuffer()
|
||
a(_,"ssh-rsa"),a(_,i),a(_,r),_.putInt32(c.length()),_.putBuffer(c),_.putInt32(d.length()),_.putBuffer(d)
|
||
var w=n.hmac.create()
|
||
return w.start("sha1",v),w.update(_.bytes()),u+="\r\nPrivate-MAC: "+w.digest().toHex()+"\r\n"},i.publicKeyToOpenSSH=function(e,t){t=t||""
|
||
var r=n.util.createBuffer()
|
||
return a(r,"ssh-rsa"),o(r,e.e),o(r,e.n),"ssh-rsa "+n.util.encode64(r.bytes())+" "+t},i.privateKeyToOpenSSH=function(e,t){return t?n.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):n.pki.privateKeyToPem(e)},i.getPublicKeyFingerprint=function(e,t){var r=(t=t||{}).md||n.md.md5.create(),i=n.util.createBuffer()
|
||
a(i,"ssh-rsa"),o(i,e.e),o(i,e.n),r.start(),r.update(i.getBytes())
|
||
var s=r.digest()
|
||
if("hex"===t.encoding){var u=s.toHex()
|
||
return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return s.getBytes()
|
||
if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')
|
||
return s}},{"./aes":491,"./forge":500,"./hmac":501,"./md5":508,"./sha1":526,"./util":532}],530:[function(e,t,r){"use strict"
|
||
var n=e("./forge")
|
||
e("./debug"),e("./log"),e("./util")
|
||
var i="forge.task",o={},a=0
|
||
n.debug.set(i,"tasks",o)
|
||
var s={}
|
||
n.debug.set(i,"queues",s)
|
||
var u="ready",c="running",l="blocked",f="sleeping",h="done",d="error",p={ready:{}}
|
||
p.ready.stop=u,p.ready.start=c,p.ready.cancel=h,p.ready.fail=d,p.running={},p.running.stop=u,p.running.start=c,p.running.block=l,p.running.unblock=c,p.running.sleep=f,p.running.wakeup=c,p.running.cancel=h,p.running.fail=d,p.blocked={},p.blocked.stop=l,p.blocked.start=l,p.blocked.block=l,p.blocked.unblock=l,p.blocked.sleep=l,p.blocked.wakeup=l,p.blocked.cancel=h,p.blocked.fail=d,p.sleeping={},p.sleeping.stop=f,p.sleeping.start=f,p.sleeping.block=f,p.sleeping.unblock=f,p.sleeping.sleep=f,p.sleeping.wakeup=f,p.sleeping.cancel=h,p.sleeping.fail=d,p.done={},p.done.stop=h,p.done.start=h,p.done.block=h,p.done.unblock=h,p.done.sleep=h,p.done.wakeup=h,p.done.cancel=h,p.done.fail=d,p.error={},p.error.stop=d,p.error.start=d,p.error.block=d,p.error.unblock=d,p.error.sleep=d,p.error.wakeup=d,p.error.cancel=d,p.error.fail=d
|
||
var m=function(e){this.id=-1,this.name=e.name||"?",this.parent=e.parent||null,this.run=e.run,this.subtasks=[],this.error=!1,this.state=u,this.blocks=0,this.timeoutId=null,this.swapTime=null,this.userData=null,this.id=a++,o[this.id]=this}
|
||
m.prototype.debug=function(e){e=e||"",n.log.debug(i,e,"[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",s)},m.prototype.next=function(e,t){"function"==typeof e&&(t=e,e=this.name)
|
||
var r=new m({run:t,name:e,parent:this})
|
||
return r.state=c,r.type=this.type,r.successCallback=this.successCallback||null,r.failureCallback=this.failureCallback||null,this.subtasks.push(r),this},m.prototype.parallel=function(e,t){return n.util.isArray(e)&&(t=e,e=this.name),this.next(e,function(r){var i=r
|
||
i.block(t.length)
|
||
for(var o=function(e,r){n.task.start({type:e,run:function(e){t[r](e)},success:function(e){i.unblock()},failure:function(e){i.unblock()}})},a=0;a<t.length;a++){o(e+"__parallel-"+r.id+"-"+a,a)}})},m.prototype.stop=function(){this.state=p[this.state].stop},m.prototype.start=function(){this.error=!1,this.state=p[this.state].start,this.state===c&&(this.start=new Date,this.run(this),y(this,0))},m.prototype.block=function(e){e=void 0===e?1:e,this.blocks+=e,this.blocks>0&&(this.state=p[this.state].block)},m.prototype.unblock=function(e){return e=void 0===e?1:e,this.blocks-=e,0===this.blocks&&this.state!==h&&(this.state=c,y(this,0)),this.blocks},m.prototype.sleep=function(e){e=void 0===e?0:e,this.state=p[this.state].sleep
|
||
var t=this
|
||
this.timeoutId=setTimeout(function(){t.timeoutId=null,t.state=c,y(t,0)},e)},m.prototype.wait=function(e){e.wait(this)},m.prototype.wakeup=function(){this.state===f&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state=c,y(this,0))},m.prototype.cancel=function(){this.state=p[this.state].cancel,this.permitsNeeded=0,null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null),this.subtasks=[]},m.prototype.fail=function(e){if(this.error=!0,g(this,!0),e)e.error=this.error,e.swapTime=this.swapTime,e.userData=this.userData,y(e,0)
|
||
else{if(null!==this.parent){for(var t=this.parent;null!==t.parent;)t.error=this.error,t.swapTime=this.swapTime,t.userData=this.userData,t=t.parent
|
||
g(t,!0)}this.failureCallback&&this.failureCallback(this)}}
|
||
var y=function e(t,r){var n=r>30||+new Date-t.swapTime>20,i=function(r){if(r++,t.state===c)if(n&&(t.swapTime=+new Date),t.subtasks.length>0){var i=t.subtasks.shift()
|
||
i.error=t.error,i.swapTime=t.swapTime,i.userData=t.userData,i.run(i),i.error||e(i,r)}else g(t),t.error||null!==t.parent&&(t.parent.error=t.error,t.parent.swapTime=t.swapTime,t.parent.userData=t.userData,e(t.parent,r))}
|
||
n?setTimeout(i,0):i(r)},g=function(e,t){e.state=h,delete o[e.id],null===e.parent&&(e.type in s?0===s[e.type].length?n.log.error(i,"[%s][%s] task queue empty [%s]",e.id,e.name,e.type):s[e.type][0]!==e?n.log.error(i,"[%s][%s] task not first in queue [%s]",e.id,e.name,e.type):(s[e.type].shift(),0===s[e.type].length?delete s[e.type]:s[e.type][0].start()):n.log.error(i,"[%s][%s] task queue missing [%s]",e.id,e.name,e.type),t||(e.error&&e.failureCallback?e.failureCallback(e):!e.error&&e.successCallback&&e.successCallback(e)))}
|
||
t.exports=n.task=n.task||{},n.task.start=function(e){var t=new m({run:e.run,name:e.name||"?"})
|
||
t.type=e.type,t.successCallback=e.success||null,t.failureCallback=e.failure||null,t.type in s?s[e.type].push(t):(s[t.type]=[t],function(e){e.error=!1,e.state=p[e.state].start,setTimeout(function(){e.state===c&&(e.swapTime=+new Date,e.run(e),y(e,0))},0)}(t))},n.task.cancel=function(e){e in s&&(s[e]=[s[e][0]])},n.task.createCondition=function(){var e={tasks:{},wait:function(t){t.id in e.tasks||(t.block(),e.tasks[t.id]=t)},notify:function(){var t=e.tasks
|
||
for(var r in e.tasks={},t)t[r].unblock()}}
|
||
return e}},{"./debug":497,"./forge":500,"./log":505,"./util":532}],531:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./forge")
|
||
e("./asn1"),e("./hmac"),e("./md5"),e("./pem"),e("./pki"),e("./random"),e("./sha1"),e("./util")
|
||
var o=function(e,t,r,n){var o=i.util.createBuffer(),a=e.length>>1,s=a+(1&e.length),u=e.substr(0,s),c=e.substr(a,s),l=i.util.createBuffer(),f=i.hmac.create()
|
||
r=t+r
|
||
var h=Math.ceil(n/16),d=Math.ceil(n/20)
|
||
f.start("MD5",u)
|
||
var p=i.util.createBuffer()
|
||
l.putBytes(r)
|
||
for(var m=0;m<h;++m)f.start(null,null),f.update(l.getBytes()),l.putBuffer(f.digest()),f.start(null,null),f.update(l.bytes()+r),p.putBuffer(f.digest())
|
||
f.start("SHA1",c)
|
||
var y=i.util.createBuffer()
|
||
l.clear(),l.putBytes(r)
|
||
for(m=0;m<d;++m)f.start(null,null),f.update(l.getBytes()),l.putBuffer(f.digest()),f.start(null,null),f.update(l.bytes()+r),y.putBuffer(f.digest())
|
||
return o.putBytes(i.util.xorBytes(p.getBytes(),y.getBytes(),n)),o},a=function(e,t,r){var n=!1
|
||
try{var o=e.deflate(t.fragment.getBytes())
|
||
t.fragment=i.util.createBuffer(o),t.length=o.length,n=!0}catch(e){}return n},s=function(e,t,r){var n=!1
|
||
try{var o=e.inflate(t.fragment.getBytes())
|
||
t.fragment=i.util.createBuffer(o),t.length=o.length,n=!0}catch(e){}return n},u=function(e,t){var r=0
|
||
switch(t){case 1:r=e.getByte()
|
||
break
|
||
case 2:r=e.getInt16()
|
||
break
|
||
case 3:r=e.getInt24()
|
||
break
|
||
case 4:r=e.getInt32()}return i.util.createBuffer(e.getBytes(r))},c=function(e,t,r){e.putInt(r.length(),t<<3),e.putBuffer(r)},l={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}}}
|
||
l.SupportedVersions=[l.Versions.TLS_1_1,l.Versions.TLS_1_0],l.Version=l.SupportedVersions[0],l.MaxFragment=15360,l.ConnectionEnd={server:0,client:1},l.PRFAlgorithm={tls_prf_sha256:0},l.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},l.CipherType={stream:0,block:1,aead:2},l.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},l.CompressionMethod={none:0,deflate:1},l.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},l.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},l.Alert={},l.Alert.Level={warning:1,fatal:2},l.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},l.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},l.CipherSuites={},l.getCipherSuite=function(e){var t=null
|
||
for(var r in l.CipherSuites){var n=l.CipherSuites[r]
|
||
if(n.id[0]===e.charCodeAt(0)&&n.id[1]===e.charCodeAt(1)){t=n
|
||
break}}return t},l.handleUnexpected=function(e,t){!e.open&&e.entity===l.ConnectionEnd.client||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unexpected_message}})},l.handleHelloRequest=function(e,t,r){!e.handshaking&&e.handshakes>0&&(l.queue(e,l.createAlert(e,{level:l.Alert.Level.warning,description:l.Alert.Description.no_renegotiation})),l.flush(e)),e.process()},l.parseHelloMessage=function(e,t,r){var n=null,o=e.entity===l.ConnectionEnd.client
|
||
if(r<38)e.error(e,{message:o?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}})
|
||
else{var a=t.fragment,s=a.length()
|
||
if(n={version:{major:a.getByte(),minor:a.getByte()},random:i.util.createBuffer(a.getBytes(32)),session_id:u(a,1),extensions:[]},o?(n.cipher_suite=a.getBytes(2),n.compression_method=a.getByte()):(n.cipher_suites=u(a,2),n.compression_methods=u(a,1)),(s=r-(s-a.length()))>0){for(var c=u(a,2);c.length()>0;)n.extensions.push({type:[c.getByte(),c.getByte()],data:u(c,2)})
|
||
if(!o)for(var f=0;f<n.extensions.length;++f){var h=n.extensions[f]
|
||
if(0===h.type[0]&&0===h.type[1])for(var d=u(h.data,2);d.length()>0;){if(0!==d.getByte())break
|
||
e.session.extensions.server_name.serverNameList.push(u(d,2).getBytes())}}}if(e.session.version&&(n.version.major!==e.session.version.major||n.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}})
|
||
if(o)e.session.cipherSuite=l.getCipherSuite(n.cipher_suite)
|
||
else for(var p=i.util.createBuffer(n.cipher_suites.bytes());p.length()>0&&(e.session.cipherSuite=l.getCipherSuite(p.getBytes(2)),null===e.session.cipherSuite););if(null===e.session.cipherSuite)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure},cipherSuite:i.util.bytesToHex(n.cipher_suite)})
|
||
e.session.compressionMethod=o?n.compression_method:l.CompressionMethod.none}return n},l.createSecurityParameters=function(e,t){var r=e.entity===l.ConnectionEnd.client,n=t.random.bytes(),i=r?e.session.sp.client_random:n,o=r?n:l.createRandom().getBytes()
|
||
e.session.sp={entity:e.entity,prf_algorithm:l.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:o}},l.handleServerHello=function(e,t,r){var n=l.parseHelloMessage(e,t,r)
|
||
if(!e.fail){if(!(n.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}})
|
||
e.version.minor=n.version.minor,e.session.version=e.version
|
||
var i=n.session_id.bytes()
|
||
i.length>0&&i===e.session.id?(e.expect=m,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=f,e.session.resuming=!1,l.createSecurityParameters(e,n)),e.session.id=i,e.process()}},l.handleClientHello=function(e,t,r){var n=l.parseHelloMessage(e,t,r)
|
||
if(!e.fail){var o=n.session_id.bytes(),a=null
|
||
if(e.sessionCache&&(null===(a=e.sessionCache.getSession(o))?o="":(a.version.major!==n.version.major||a.version.minor>n.version.minor)&&(a=null,o="")),0===o.length&&(o=i.random.getBytes(32)),e.session.id=o,e.session.clientHelloVersion=n.version,e.session.sp={},a)e.version=e.session.version=a.version,e.session.sp=a.sp
|
||
else{for(var s,u=1;u<l.SupportedVersions.length&&!((s=l.SupportedVersions[u]).minor<=n.version.minor);++u);e.version={major:s.major,minor:s.minor},e.session.version=e.version}null!==a?(e.expect=S,e.session.resuming=!0,e.session.sp.client_random=n.random.bytes()):(e.expect=!1!==e.verifyClient?v:_,e.session.resuming=!1,l.createSecurityParameters(e,n)),e.open=!0,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createServerHello(e)})),e.session.resuming?(l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.pending=l.createConnectionState(e),e.state.current.write=e.state.pending.write,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)}))):(l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificate(e)})),e.fail||(l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createServerKeyExchange(e)})),!1!==e.verifyClient&&l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificateRequest(e)})),l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createServerHelloDone(e)})))),l.flush(e),e.process()}},l.handleCertificate=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}})
|
||
var n,o,a=t.fragment,s={certificate_list:u(a,3)},c=[]
|
||
try{for(;s.certificate_list.length()>0;)n=u(s.certificate_list,3),o=i.asn1.fromDer(n),n=i.pki.certificateFromAsn1(o,!0),c.push(n)}catch(t){return e.error(e,{message:"Could not parse certificate list.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate}})}var f=e.entity===l.ConnectionEnd.client
|
||
!f&&!0!==e.verifyClient||0!==c.length?0===c.length?e.expect=f?h:_:(f?e.session.serverCertificate=c[0]:e.session.clientCertificate=c[0],l.verifyCertificateChain(e,c)&&(e.expect=f?h:_)):e.error(e,{message:f?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}}),e.process()},l.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}})
|
||
e.expect=d,e.process()},l.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unsupported_certificate}})
|
||
var n=t.fragment,o={enc_pre_master_secret:u(n,2).getBytes()},a=null
|
||
if(e.getPrivateKey)try{a=e.getPrivateKey(e,e.session.serverCertificate),a=i.pki.privateKeyFromPem(a)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}})}if(null===a)return e.error(e,{message:"No private key set.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}})
|
||
try{var s=e.session.sp
|
||
s.pre_master_secret=a.decrypt(o.enc_pre_master_secret)
|
||
var c=e.session.clientHelloVersion
|
||
if(c.major!==s.pre_master_secret.charCodeAt(0)||c.minor!==s.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(e){s.pre_master_secret=i.random.getBytes(48)}e.expect=S,null!==e.session.clientCertificate&&(e.expect=w),e.process()},l.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}})
|
||
var n=t.fragment,i={certificate_types:u(n,1),certificate_authorities:u(n,2)}
|
||
e.session.certificateRequest=i,e.expect=p,e.process()},l.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}})
|
||
var n=t.fragment
|
||
n.read-=4
|
||
var o=n.bytes()
|
||
n.read+=4
|
||
var a={signature:u(n,2).getBytes()},s=i.util.createBuffer()
|
||
s.putBuffer(e.session.md5.digest()),s.putBuffer(e.session.sha1.digest()),s=s.getBytes()
|
||
try{if(!e.session.clientCertificate.publicKey.verify(s,a.signature,"NONE"))throw new Error("CertificateVerify signature does not match.")
|
||
e.session.md5.update(o),e.session.sha1.update(o)}catch(t){return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.handshake_failure}})}e.expect=S,e.process()},l.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.record_overflow}})
|
||
if(null===e.serverCertificate){var o={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.insufficient_security}},a=e.verify(e,o.alert.description,0,[])
|
||
if(!0!==a)return(a||0===a)&&("object"!==(void 0===a?"undefined":n(a))||i.util.isArray(a)?"number"==typeof a&&(o.alert.description=a):(a.message&&(o.message=a.message),a.alert&&(o.alert.description=a.alert))),e.error(e,o)}null!==e.session.certificateRequest&&(t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificate(e)}),l.queue(e,t)),t=l.createRecord(e,{type:l.ContentType.handshake,data:l.createClientKeyExchange(e)}),l.queue(e,t),e.expect=b
|
||
var s=function(e,t){null!==e.session.certificateRequest&&null!==e.session.clientCertificate&&l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createCertificateVerify(e,t)})),l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.pending=l.createConnectionState(e),e.state.current.write=e.state.pending.write,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)})),e.expect=m,l.flush(e),e.process()}
|
||
if(null===e.session.certificateRequest||null===e.session.clientCertificate)return s(e,null)
|
||
l.getClientSignature(e,s)},l.handleChangeCipherSpec=function(e,t){if(1!==t.fragment.getByte())return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.illegal_parameter}})
|
||
var r=e.entity===l.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=l.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?y:E,e.process()},l.handleFinished=function(e,t,r){var n=t.fragment
|
||
n.read-=4
|
||
var a=n.bytes()
|
||
n.read+=4
|
||
var s=t.fragment.getBytes();(n=i.util.createBuffer()).putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest())
|
||
var u=e.entity===l.ConnectionEnd.client,c=u?"server finished":"client finished",f=e.session.sp
|
||
if((n=o(f.master_secret,c,n.getBytes(),12)).getBytes()!==s)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decrypt_error}})
|
||
e.session.md5.update(a),e.session.sha1.update(a),(e.session.resuming&&u||!e.session.resuming&&!u)&&(l.queue(e,l.createRecord(e,{type:l.ContentType.change_cipher_spec,data:l.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,l.queue(e,l.createRecord(e,{type:l.ContentType.handshake,data:l.createFinished(e)}))),e.expect=u?g:k,e.handshaking=!1,++e.handshakes,e.peerCertificate=u?e.session.serverCertificate:e.session.clientCertificate,l.flush(e),e.isConnected=!0,e.connected(e),e.process()},l.handleAlert=function(e,t){var r,n=t.fragment,i={level:n.getByte(),description:n.getByte()}
|
||
switch(i.description){case l.Alert.Description.close_notify:r="Connection closed."
|
||
break
|
||
case l.Alert.Description.unexpected_message:r="Unexpected message."
|
||
break
|
||
case l.Alert.Description.bad_record_mac:r="Bad record MAC."
|
||
break
|
||
case l.Alert.Description.decryption_failed:r="Decryption failed."
|
||
break
|
||
case l.Alert.Description.record_overflow:r="Record overflow."
|
||
break
|
||
case l.Alert.Description.decompression_failure:r="Decompression failed."
|
||
break
|
||
case l.Alert.Description.handshake_failure:r="Handshake failure."
|
||
break
|
||
case l.Alert.Description.bad_certificate:r="Bad certificate."
|
||
break
|
||
case l.Alert.Description.unsupported_certificate:r="Unsupported certificate."
|
||
break
|
||
case l.Alert.Description.certificate_revoked:r="Certificate revoked."
|
||
break
|
||
case l.Alert.Description.certificate_expired:r="Certificate expired."
|
||
break
|
||
case l.Alert.Description.certificate_unknown:r="Certificate unknown."
|
||
break
|
||
case l.Alert.Description.illegal_parameter:r="Illegal parameter."
|
||
break
|
||
case l.Alert.Description.unknown_ca:r="Unknown certificate authority."
|
||
break
|
||
case l.Alert.Description.access_denied:r="Access denied."
|
||
break
|
||
case l.Alert.Description.decode_error:r="Decode error."
|
||
break
|
||
case l.Alert.Description.decrypt_error:r="Decrypt error."
|
||
break
|
||
case l.Alert.Description.export_restriction:r="Export restriction."
|
||
break
|
||
case l.Alert.Description.protocol_version:r="Unsupported protocol version."
|
||
break
|
||
case l.Alert.Description.insufficient_security:r="Insufficient security."
|
||
break
|
||
case l.Alert.Description.internal_error:r="Internal error."
|
||
break
|
||
case l.Alert.Description.user_canceled:r="User canceled."
|
||
break
|
||
case l.Alert.Description.no_renegotiation:r="Renegotiation not supported."
|
||
break
|
||
default:r="Unknown error."}if(i.description===l.Alert.Description.close_notify)return e.close()
|
||
e.error(e,{message:r,send:!1,origin:e.entity===l.ConnectionEnd.client?"server":"client",alert:i}),e.process()},l.handleHandshake=function(e,t){var r=t.fragment,n=r.getByte(),o=r.getInt24()
|
||
if(o>r.length())return e.fragmented=t,t.fragment=i.util.createBuffer(),r.read-=4,e.process()
|
||
e.fragmented=null,r.read-=4
|
||
var a=r.bytes(o+4)
|
||
r.read+=4,n in U[e.entity][e.expect]?(e.entity!==l.ConnectionEnd.server||e.open||e.fail||(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:i.md.md5.create(),sha1:i.md.sha1.create()}),n!==l.HandshakeType.hello_request&&n!==l.HandshakeType.certificate_verify&&n!==l.HandshakeType.finished&&(e.session.md5.update(a),e.session.sha1.update(a)),U[e.entity][e.expect][n](e,t,o)):l.handleUnexpected(e,t)},l.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},l.handleHeartbeat=function(e,t){var r=t.fragment,n=r.getByte(),o=r.getInt16(),a=r.getBytes(o)
|
||
if(n===l.HeartbeatMessageType.heartbeat_request){if(e.handshaking||o>a.length)return e.process()
|
||
l.queue(e,l.createRecord(e,{type:l.ContentType.heartbeat,data:l.createHeartbeat(l.HeartbeatMessageType.heartbeat_response,a)})),l.flush(e)}else if(n===l.HeartbeatMessageType.heartbeat_response){if(a!==e.expectedHeartbeatPayload)return e.process()
|
||
e.heartbeatReceived&&e.heartbeatReceived(e,i.util.createBuffer(a))}e.process()}
|
||
var f=1,h=2,d=3,p=4,m=5,y=6,g=7,b=8,v=1,_=2,w=3,S=4,E=5,k=6,x=l.handleUnexpected,C=l.handleChangeCipherSpec,A=l.handleAlert,T=l.handleHandshake,I=l.handleApplicationData,P=l.handleHeartbeat,M=[]
|
||
M[l.ConnectionEnd.client]=[[x,A,T,x,P],[x,A,T,x,P],[x,A,T,x,P],[x,A,T,x,P],[x,A,T,x,P],[C,A,x,x,P],[x,A,T,x,P],[x,A,T,I,P],[x,A,T,x,P]],M[l.ConnectionEnd.server]=[[x,A,T,x,P],[x,A,T,x,P],[x,A,T,x,P],[x,A,T,x,P],[C,A,x,x,P],[x,A,T,x,P],[x,A,T,I,P],[x,A,T,x,P]]
|
||
var R=l.handleHelloRequest,O=l.handleServerHello,B=l.handleCertificate,N=l.handleServerKeyExchange,j=l.handleCertificateRequest,L=l.handleServerHelloDone,D=l.handleFinished,U=[]
|
||
U[l.ConnectionEnd.client]=[[x,x,O,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[R,x,x,x,x,x,x,x,x,x,x,B,N,j,L,x,x,x,x,x,x],[R,x,x,x,x,x,x,x,x,x,x,x,N,j,L,x,x,x,x,x,x],[R,x,x,x,x,x,x,x,x,x,x,x,x,j,L,x,x,x,x,x,x],[R,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x],[R,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[R,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,D],[R,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[R,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x]]
|
||
var F=l.handleClientHello,z=l.handleClientKeyExchange,q=l.handleCertificateVerify
|
||
U[l.ConnectionEnd.server]=[[x,F,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,B,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,z,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,q,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,D],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x],[x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x]],l.generateKeys=function(e,t){var r=o,n=t.client_random+t.server_random
|
||
e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random
|
||
var i=2*t.mac_key_length+2*t.enc_key_length,a=e.version.major===l.Versions.TLS_1_0.major&&e.version.minor===l.Versions.TLS_1_0.minor
|
||
a&&(i+=2*t.fixed_iv_length)
|
||
var s=r(t.master_secret,"key expansion",n,i),u={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)}
|
||
return a&&(u.client_write_IV=s.getBytes(t.fixed_iv_length),u.server_write_IV=s.getBytes(t.fixed_iv_length)),u},l.createConnectionState=function(e){var t=e.entity===l.ConnectionEnd.client,r=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){4294967295===e.sequenceNumber[1]?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}}
|
||
return e},n={read:r(),write:r()}
|
||
if(n.read.update=function(e,t){return n.read.cipherFunction(t,n.read)?n.read.compressFunction(e,t,n.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_record_mac}}),!e.fail},n.write.update=function(e,t){return n.write.compressFunction(e,t,n.write)?n.write.cipherFunction(t,n.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}),!e.fail},e.session){var i=e.session.sp
|
||
switch(e.session.cipherSuite.initSecurityParameters(i),i.keys=l.generateKeys(e,i),n.read.macKey=t?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=t?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,i),i.compression_algorithm){case l.CompressionMethod.none:break
|
||
case l.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=a
|
||
break
|
||
default:throw new Error("Unsupported compression algorithm.")}}return n},l.createRandom=function(){var e=new Date,t=+e+6e4*e.getTimezoneOffset(),r=i.util.createBuffer()
|
||
return r.putInt32(t),r.putBytes(i.random.getBytes(28)),r},l.createRecord=function(e,t){return t.data?{type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data}:null},l.createAlert=function(e,t){var r=i.util.createBuffer()
|
||
return r.putByte(t.level),r.putByte(t.description),l.createRecord(e,{type:l.ContentType.alert,data:r})},l.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor}
|
||
for(var t=i.util.createBuffer(),r=0;r<e.cipherSuites.length;++r){var n=e.cipherSuites[r]
|
||
t.putByte(n.id[0]),t.putByte(n.id[1])}var o=t.length(),a=i.util.createBuffer()
|
||
a.putByte(l.CompressionMethod.none)
|
||
var s=a.length(),u=i.util.createBuffer()
|
||
if(e.virtualHost){var f=i.util.createBuffer()
|
||
f.putByte(0),f.putByte(0)
|
||
var h=i.util.createBuffer()
|
||
h.putByte(0),c(h,2,i.util.createBuffer(e.virtualHost))
|
||
var d=i.util.createBuffer()
|
||
c(d,2,h),c(f,2,d),u.putBuffer(f)}var p=u.length()
|
||
p>0&&(p+=2)
|
||
var m=e.session.id,y=m.length+1+2+4+28+2+o+1+s+p,g=i.util.createBuffer()
|
||
return g.putByte(l.HandshakeType.client_hello),g.putInt24(y),g.putByte(e.version.major),g.putByte(e.version.minor),g.putBytes(e.session.sp.client_random),c(g,1,i.util.createBuffer(m)),c(g,2,t),c(g,1,a),p>0&&c(g,2,u),g},l.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,n=i.util.createBuffer()
|
||
return n.putByte(l.HandshakeType.server_hello),n.putInt24(r),n.putByte(e.version.major),n.putByte(e.version.minor),n.putBytes(e.session.sp.server_random),c(n,1,i.util.createBuffer(t)),n.putByte(e.session.cipherSuite.id[0]),n.putByte(e.session.cipherSuite.id[1]),n.putByte(e.session.compressionMethod),n},l.createCertificate=function(e){var t,r=e.entity===l.ConnectionEnd.client,n=null
|
||
e.getCertificate&&(t=r?e.session.certificateRequest:e.session.extensions.server_name.serverNameList,n=e.getCertificate(e,t))
|
||
var o=i.util.createBuffer()
|
||
if(null!==n)try{i.util.isArray(n)||(n=[n])
|
||
for(var a=null,s=0;s<n.length;++s){var u=i.pem.decode(n[s])[0]
|
||
if("CERTIFICATE"!==u.type&&"X509 CERTIFICATE"!==u.type&&"TRUSTED CERTIFICATE"!==u.type){var f=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".')
|
||
throw f.headerType=u.type,f}if(u.procType&&"ENCRYPTED"===u.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.")
|
||
var h=i.util.createBuffer(u.body)
|
||
null===a&&(a=i.asn1.fromDer(h.bytes(),!1))
|
||
var d=i.util.createBuffer()
|
||
c(d,3,h),o.putBuffer(d)}n=i.pki.certificateFromAsn1(a),r?e.session.clientCertificate=n:e.session.serverCertificate=n}catch(t){return e.error(e,{message:"Could not send certificate list.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate}})}var p=3+o.length(),m=i.util.createBuffer()
|
||
return m.putByte(l.HandshakeType.certificate),m.putInt24(p),c(m,3,o),m},l.createClientKeyExchange=function(e){var t=i.util.createBuffer()
|
||
t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(i.random.getBytes(46))
|
||
var r=e.session.sp
|
||
r.pre_master_secret=t.getBytes()
|
||
var n=(t=e.session.serverCertificate.publicKey.encrypt(r.pre_master_secret)).length+2,o=i.util.createBuffer()
|
||
return o.putByte(l.HandshakeType.client_key_exchange),o.putInt24(n),o.putInt16(t.length),o.putBytes(t),o},l.createServerKeyExchange=function(e){var t=i.util.createBuffer()
|
||
return t},l.getClientSignature=function(e,t){var r=i.util.createBuffer()
|
||
r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(e,t,r){var n=null
|
||
if(e.getPrivateKey)try{n=e.getPrivateKey(e,e.session.clientCertificate),n=i.pki.privateKeyFromPem(n)}catch(t){e.error(e,{message:"Could not get private key.",cause:t,send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}})}null===n?e.error(e,{message:"No private key set.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.internal_error}}):t=n.sign(t,null),r(e,t)},e.getSignature(e,r,t)},l.createCertificateVerify=function(e,t){var r=t.length+2,n=i.util.createBuffer()
|
||
return n.putByte(l.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(t.length),n.putBytes(t),n},l.createCertificateRequest=function(e){var t=i.util.createBuffer()
|
||
t.putByte(1)
|
||
var r=i.util.createBuffer()
|
||
for(var n in e.caStore.certs){var o=e.caStore.certs[n],a=i.pki.distinguishedNameToAsn1(o.subject),s=i.asn1.toDer(a)
|
||
r.putInt16(s.length()),r.putBuffer(s)}var u=1+t.length()+2+r.length(),f=i.util.createBuffer()
|
||
return f.putByte(l.HandshakeType.certificate_request),f.putInt24(u),c(f,1,t),c(f,2,r),f},l.createServerHelloDone=function(e){var t=i.util.createBuffer()
|
||
return t.putByte(l.HandshakeType.server_hello_done),t.putInt24(0),t},l.createChangeCipherSpec=function(){var e=i.util.createBuffer()
|
||
return e.putByte(1),e},l.createFinished=function(e){var t=i.util.createBuffer()
|
||
t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest())
|
||
var r=e.entity===l.ConnectionEnd.client,n=e.session.sp,a=r?"client finished":"server finished"
|
||
t=o(n.master_secret,a,t.getBytes(),12)
|
||
var s=i.util.createBuffer()
|
||
return s.putByte(l.HandshakeType.finished),s.putInt24(t.length()),s.putBuffer(t),s},l.createHeartbeat=function(e,t,r){void 0===r&&(r=t.length)
|
||
var n=i.util.createBuffer()
|
||
n.putByte(e),n.putInt16(r),n.putBytes(t)
|
||
var o=n.length(),a=Math.max(16,o-r-3)
|
||
return n.putBytes(i.random.getBytes(a)),n},l.queue=function(e,t){if(t&&(0!==t.fragment.length()||t.type!==l.ContentType.handshake&&t.type!==l.ContentType.alert&&t.type!==l.ContentType.change_cipher_spec)){if(t.type===l.ContentType.handshake){var r=t.fragment.bytes()
|
||
e.session.md5.update(r),e.session.sha1.update(r),r=null}var n
|
||
if(t.fragment.length()<=l.MaxFragment)n=[t]
|
||
else{n=[]
|
||
for(var o=t.fragment.bytes();o.length>l.MaxFragment;)n.push(l.createRecord(e,{type:t.type,data:i.util.createBuffer(o.slice(0,l.MaxFragment))})),o=o.slice(l.MaxFragment)
|
||
o.length>0&&n.push(l.createRecord(e,{type:t.type,data:i.util.createBuffer(o)}))}for(var a=0;a<n.length&&!e.fail;++a){var s=n[a]
|
||
e.state.current.write.update(e,s)&&e.records.push(s)}}},l.flush=function(e){for(var t=0;t<e.records.length;++t){var r=e.records[t]
|
||
e.tlsData.putByte(r.type),e.tlsData.putByte(r.version.major),e.tlsData.putByte(r.version.minor),e.tlsData.putInt16(r.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)}
|
||
var V=function(e){switch(e){case!0:return!0
|
||
case i.pki.certificateError.bad_certificate:return l.Alert.Description.bad_certificate
|
||
case i.pki.certificateError.unsupported_certificate:return l.Alert.Description.unsupported_certificate
|
||
case i.pki.certificateError.certificate_revoked:return l.Alert.Description.certificate_revoked
|
||
case i.pki.certificateError.certificate_expired:return l.Alert.Description.certificate_expired
|
||
case i.pki.certificateError.certificate_unknown:return l.Alert.Description.certificate_unknown
|
||
case i.pki.certificateError.unknown_ca:return l.Alert.Description.unknown_ca
|
||
default:return l.Alert.Description.bad_certificate}}
|
||
for(var H in l.verifyCertificateChain=function(e,t){try{i.pki.verifyCertificateChain(e.caStore,t,function(t,r,o){V(t)
|
||
var a=e.verify(e,t,r,o)
|
||
if(!0!==a){if("object"===(void 0===a?"undefined":n(a))&&!i.util.isArray(a)){var s=new Error("The application rejected the certificate.")
|
||
throw s.send=!0,s.alert={level:l.Alert.Level.fatal,description:l.Alert.Description.bad_certificate},a.message&&(s.message=a.message),a.alert&&(s.alert.description=a.alert),s}a!==t&&(a=function(e){switch(e){case!0:return!0
|
||
case l.Alert.Description.bad_certificate:return i.pki.certificateError.bad_certificate
|
||
case l.Alert.Description.unsupported_certificate:return i.pki.certificateError.unsupported_certificate
|
||
case l.Alert.Description.certificate_revoked:return i.pki.certificateError.certificate_revoked
|
||
case l.Alert.Description.certificate_expired:return i.pki.certificateError.certificate_expired
|
||
case l.Alert.Description.certificate_unknown:return i.pki.certificateError.certificate_unknown
|
||
case l.Alert.Description.unknown_ca:return i.pki.certificateError.unknown_ca
|
||
default:return i.pki.certificateError.bad_certificate}}(a))}return a})}catch(t){var r=t;("object"!==(void 0===r?"undefined":n(r))||i.util.isArray(r))&&(r={send:!0,alert:{level:l.Alert.Level.fatal,description:V(t)}}),"send"in r||(r.send=!0),"alert"in r||(r.alert={level:l.Alert.Level.fatal,description:V(r.error)}),e.error(e,r)}return!e.fail},l.createSessionCache=function(e,t){var r=null
|
||
if(e&&e.getSession&&e.setSession&&e.order)r=e
|
||
else{for(var n in(r={}).cache=e||{},r.capacity=Math.max(t||100,1),r.order=[],e)r.order.length<=t?r.order.push(n):delete e[n]
|
||
r.getSession=function(e){var t=null,n=null
|
||
if(e?n=i.util.bytesToHex(e):r.order.length>0&&(n=r.order[0]),null!==n&&n in r.cache)for(var o in t=r.cache[n],delete r.cache[n],r.order)if(r.order[o]===n){r.order.splice(o,1)
|
||
break}return t},r.setSession=function(e,t){if(r.order.length===r.capacity){var n=r.order.shift()
|
||
delete r.cache[n]}n=i.util.bytesToHex(e)
|
||
r.order.push(n),r.cache[n]=t}}return r},l.createConnection=function(e){var t=null
|
||
t=e.caStore?i.util.isArray(e.caStore)?i.pki.createCaStore(e.caStore):e.caStore:i.pki.createCaStore()
|
||
var r=e.cipherSuites||null
|
||
if(null===r)for(var n in r=[],l.CipherSuites)r.push(l.CipherSuites[n])
|
||
var o=e.server?l.ConnectionEnd.server:l.ConnectionEnd.client,a=e.sessionCache?l.createSessionCache(e.sessionCache):null,s={version:{major:l.Version.major,minor:l.Version.minor},entity:o,sessionId:e.sessionId,caStore:t,sessionCache:a,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(e,t,r,n){return t},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:i.util.createBuffer(),tlsData:i.util.createBuffer(),data:i.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(t,r){r.origin=r.origin||(t.entity===l.ConnectionEnd.client?"client":"server"),r.send&&(l.queue(t,l.createAlert(t,r.alert)),l.flush(t))
|
||
var n=!1!==r.fatal
|
||
n&&(t.fail=!0),e.error(t,r),n&&t.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null,reset:function(e){s.version={major:l.Version.major,minor:l.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=(s.entity,l.ConnectionEnd.client,0),s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(e||void 0===e),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=l.createConnectionState(s)}}
|
||
s.reset()
|
||
return s.handshake=function(e){if(s.entity!==l.ConnectionEnd.client)s.error(s,{message:"Cannot initiate handshake as a server.",fatal:!1})
|
||
else if(s.handshaking)s.error(s,{message:"Handshake already in progress.",fatal:!1})
|
||
else{s.fail&&!s.open&&0===s.handshakes&&(s.fail=!1),s.handshaking=!0
|
||
var t=null;(e=e||"").length>0&&(s.sessionCache&&(t=s.sessionCache.getSession(e)),null===t&&(e="")),0===e.length&&s.sessionCache&&null!==(t=s.sessionCache.getSession())&&(e=t.id),s.session={id:e,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:i.md.md5.create(),sha1:i.md.sha1.create()},t&&(s.version=t.version,s.session.sp=t.sp),s.session.sp.client_random=l.createRandom().getBytes(),s.open=!0,l.queue(s,l.createRecord(s,{type:l.ContentType.handshake,data:l.createClientHello(s)})),l.flush(s)}},s.process=function(e){var t=0
|
||
return e&&s.input.putBytes(e),s.fail||(null!==s.record&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),null===s.record&&(t=function(e){var t=0,r=e.input,n=r.length()
|
||
if(n<5)t=5-n
|
||
else{e.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:i.util.createBuffer(),ready:!1}
|
||
var o=e.record.version.major===e.version.major
|
||
o&&e.session&&e.session.version&&(o=e.record.version.minor===e.version.minor),o||e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.protocol_version}})}return t}(s)),s.fail||null===s.record||s.record.ready||(t=function(e){var t=0,r=e.input,n=r.length()
|
||
n<e.record.length?t=e.record.length-n:(e.record.fragment.putBytes(r.getBytes(e.record.length)),r.compact(),e.state.current.read.update(e,e.record)&&(null!==e.fragmented&&(e.fragmented.type===e.record.type?(e.fragmented.fragment.putBuffer(e.record.fragment),e.record=e.fragmented):e.error(e,{message:"Invalid fragmented record.",send:!0,alert:{level:l.Alert.Level.fatal,description:l.Alert.Description.unexpected_message}})),e.record.ready=!0))
|
||
return t}(s)),!s.fail&&null!==s.record&&s.record.ready&&function(e,t){var r=t.type-l.ContentType.change_cipher_spec,n=M[e.entity][e.expect]
|
||
r in n?n[r](e,t):l.handleUnexpected(e,t)}(s,s.record)),t},s.prepare=function(e){return l.queue(s,l.createRecord(s,{type:l.ContentType.application_data,data:i.util.createBuffer(e)})),l.flush(s)},s.prepareHeartbeatRequest=function(e,t){return e instanceof i.util.ByteBuffer&&(e=e.bytes()),void 0===t&&(t=e.length),s.expectedHeartbeatPayload=e,l.queue(s,l.createRecord(s,{type:l.ContentType.heartbeat,data:l.createHeartbeat(l.HeartbeatMessageType.heartbeat_request,e,t)})),l.flush(s)},s.close=function(e){if(!s.fail&&s.sessionCache&&s.session){var t={id:s.session.id,version:s.session.version,sp:s.session.sp}
|
||
t.sp.keys=null,s.sessionCache.setSession(t.id,t)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,l.queue(s,l.createAlert(s,{level:l.Alert.Level.warning,description:l.Alert.Description.close_notify})),l.flush(s)),s.closed(s)),s.reset(e)},s},t.exports=i.tls=i.tls||{},l)"function"!=typeof l[H]&&(i.tls[H]=l[H])
|
||
i.tls.prf_tls1=o,i.tls.hmac_sha1=function(e,t,r){var n=i.hmac.create()
|
||
n.start("SHA1",e)
|
||
var o=i.util.createBuffer()
|
||
return o.putInt32(t[0]),o.putInt32(t[1]),o.putByte(r.type),o.putByte(r.version.major),o.putByte(r.version.minor),o.putInt16(r.length),o.putBytes(r.fragment.bytes()),n.update(o.getBytes()),n.digest().getBytes()},i.tls.createSessionCache=l.createSessionCache,i.tls.createConnection=l.createConnection},{"./asn1":493,"./forge":500,"./hmac":501,"./md5":508,"./pem":514,"./pki":519,"./random":523,"./sha1":526,"./util":532}],532:[function(e,t,r){(function(r,n){"use strict"
|
||
var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./forge"),a=e("./baseN"),s=t.exports=o.util=o.util||{}
|
||
function u(e){if(8!==e&&16!==e&&24!==e&&32!==e)throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}function c(e){if(this.data="",this.read=0,"string"==typeof e)this.data=e
|
||
else if(s.isArrayBuffer(e)||s.isArrayBufferView(e))if(void 0!==n&&e instanceof n)this.data=e.toString("binary")
|
||
else{var t=new Uint8Array(e)
|
||
try{this.data=String.fromCharCode.apply(null,t)}catch(e){for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof c||"object"===(void 0===e?"undefined":i(e))&&"string"==typeof e.data&&"number"==typeof e.read)&&(this.data=e.data,this.read=e.read)
|
||
this._constructedStringLength=0}(function(){if(void 0!==r&&r.nextTick)return s.nextTick=r.nextTick,void("function"==typeof setImmediate?s.setImmediate=setImmediate:s.setImmediate=s.nextTick)
|
||
if("function"==typeof setImmediate)return s.setImmediate=function(){return setImmediate.apply(void 0,arguments)},void(s.nextTick=function(e){return setImmediate(e)})
|
||
if(s.setImmediate=function(e){setTimeout(e,0)},"undefined"!=typeof window&&"function"==typeof window.postMessage){var e="forge.setImmediate",t=[]
|
||
s.setImmediate=function(r){t.push(r),1===t.length&&window.postMessage(e,"*")},window.addEventListener("message",function(r){if(r.source===window&&r.data===e){r.stopPropagation()
|
||
var n=t.slice()
|
||
t.length=0,n.forEach(function(e){e()})}},!0)}if("undefined"!=typeof MutationObserver){var n=Date.now(),i=!0,o=document.createElement("div")
|
||
t=[]
|
||
new MutationObserver(function(){var e=t.slice()
|
||
t.length=0,e.forEach(function(e){e()})}).observe(o,{attributes:!0})
|
||
var a=s.setImmediate
|
||
s.setImmediate=function(e){Date.now()-n>15?(n=Date.now(),a(e)):(t.push(e),1===t.length&&o.setAttribute("a",i=!i))}}s.nextTick=s.setImmediate})(),s.isNodejs=void 0!==r&&r.versions&&r.versions.node,s.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},s.isArrayBufferView=function(e){return e&&s.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},s.ByteBuffer=c,s.ByteStringBuffer=c
|
||
s.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},s.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},s.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},s.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},s.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e)
|
||
for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e)
|
||
return this.data=r,this._optimizeConstructedString(t),this},s.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},s.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(s.encodeUtf8(e))},s.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},s.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},s.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},s.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},s.ByteStringBuffer.prototype.putInt=function(e,t){u(t)
|
||
var r=""
|
||
do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0)
|
||
return this.putBytes(r)},s.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},s.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},s.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},s.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1)
|
||
return this.read+=2,e},s.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)
|
||
return this.read+=3,e},s.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3)
|
||
return this.read+=4,e},s.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8
|
||
return this.read+=2,e},s.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16
|
||
return this.read+=3,e},s.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24
|
||
return this.read+=4,e},s.ByteStringBuffer.prototype.getInt=function(e){u(e)
|
||
var t=0
|
||
do{t=(t<<8)+this.data.charCodeAt(this.read++),e-=8}while(e>0)
|
||
return t},s.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2
|
||
return t>=r&&(t-=r<<1),t},s.ByteStringBuffer.prototype.getBytes=function(e){var t
|
||
return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},s.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},s.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)}
|
||
s.ByteStringBuffer.prototype.copy=function(){var e=s.createBuffer(this.data)
|
||
return e.read=this.read,e},s.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},s.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},s.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e)
|
||
return this.data=this.data.substr(this.read,t),this.read=0,this},s.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t)
|
||
r<16&&(e+="0"),e+=r.toString(16)}return e},s.ByteStringBuffer.prototype.toString=function(){return s.decodeUtf8(this.bytes())},s.DataBuffer=function(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024
|
||
var r=s.isArrayBuffer(e),n=s.isArrayBufferView(e)
|
||
if(r||n)return this.data=r?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength),void(this.write="writeOffset"in t?t.writeOffset:this.data.byteLength)
|
||
this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==e&&void 0!==e&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)},s.DataBuffer.prototype.length=function(){return this.write-this.read},s.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},s.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this
|
||
t=Math.max(t||this.growSize,e)
|
||
var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t)
|
||
return n.set(r),this.data=new DataView(n.buffer),this},s.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},s.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t)
|
||
for(var r=0;r<t;++r)this.data.setUint8(e)
|
||
return this},s.DataBuffer.prototype.putBytes=function(e,t){if(s.isArrayBufferView(e)){var r=(n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)).byteLength-n.byteOffset
|
||
return this.accommodate(r),new Uint8Array(this.data.buffer,this.write).set(n),this.write+=r,this}if(s.isArrayBuffer(e)){var n=new Uint8Array(e)
|
||
return this.accommodate(n.byteLength),new Uint8Array(this.data.buffer).set(n,this.write),this.write+=n.byteLength,this}if(e instanceof s.DataBuffer||"object"===(void 0===e?"undefined":i(e))&&"number"==typeof e.read&&"number"==typeof e.write&&s.isArrayBufferView(e.data)){n=new Uint8Array(e.data.byteLength,e.read,e.length())
|
||
return this.accommodate(n.byteLength),new Uint8Array(e.data.byteLength,this.write).set(n),this.write+=n.byteLength,this}if(e instanceof s.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary","string"==typeof e){var o
|
||
if("hex"===t)return this.accommodate(Math.ceil(e.length/2)),o=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.hex.decode(e,o,this.write),this
|
||
if("base64"===t)return this.accommodate(3*Math.ceil(e.length/4)),o=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.base64.decode(e,o,this.write),this
|
||
if("utf8"===t&&(e=s.encodeUtf8(e),t="binary"),"binary"===t||"raw"===t)return this.accommodate(e.length),o=new Uint8Array(this.data.buffer,this.write),this.write+=s.binary.raw.decode(o),this
|
||
if("utf16"===t)return this.accommodate(2*e.length),o=new Uint16Array(this.data.buffer,this.write),this.write+=s.text.utf16.encode(o),this
|
||
throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)},s.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},s.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},s.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},s.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},s.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},s.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},s.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},s.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},s.DataBuffer.prototype.putInt=function(e,t){u(t),this.accommodate(t/8)
|
||
do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0)
|
||
return this},s.DataBuffer.prototype.putSignedInt=function(e,t){return u(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},s.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},s.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read)
|
||
return this.read+=2,e},s.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2)
|
||
return this.read+=3,e},s.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read)
|
||
return this.read+=4,e},s.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0)
|
||
return this.read+=2,e},s.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8
|
||
return this.read+=3,e},s.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0)
|
||
return this.read+=4,e}
|
||
s.DataBuffer.prototype.getInt=function(e){u(e)
|
||
var t=0
|
||
do{t=(t<<8)+this.data.getInt8(this.read++),e-=8}while(e>0)
|
||
return t},s.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2
|
||
return t>=r&&(t-=r<<1),t},s.DataBuffer.prototype.getBytes=function(e){var t
|
||
return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},s.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},s.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},s.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},s.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},s.DataBuffer.prototype.copy=function(){return new s.DataBuffer(this)},s.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength)
|
||
t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},s.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},s.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},s.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t)
|
||
r<16&&(e+="0"),e+=r.toString(16)}return e},s.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length())
|
||
if("binary"===(e=e||"utf8")||"raw"===e)return s.binary.raw.encode(t)
|
||
if("hex"===e)return s.binary.hex.encode(t)
|
||
if("base64"===e)return s.binary.base64.encode(t)
|
||
if("utf8"===e)return s.text.utf8.decode(t)
|
||
if("utf16"===e)return s.text.utf16.decode(t)
|
||
throw new Error("Invalid encoding: "+e)},s.createBuffer=function(e,t){return t=t||"raw",void 0!==e&&"utf8"===t&&(e=s.encodeUtf8(e)),new s.ByteBuffer(e)},s.fillString=function(e,t){for(var r="";t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e)
|
||
return r},s.xorBytes=function(e,t,r){for(var n="",i="",o="",a=0,s=0;r>0;--r,++a)i=e.charCodeAt(a)^t.charCodeAt(a),s>=10&&(n+=o,o="",s=0),o+=String.fromCharCode(i),++s
|
||
return n+=o},s.hexToBytes=function(e){var t="",r=0
|
||
for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16))
|
||
return t},s.bytesToHex=function(e){return s.createBuffer(e).toHex()},s.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)}
|
||
var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],h="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
||
s.encode64=function(e,t){for(var r,n,i,o="",a="",s=0;s<e.length;)r=e.charCodeAt(s++),n=e.charCodeAt(s++),i=e.charCodeAt(s++),o+=l.charAt(r>>2),o+=l.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=l.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":l.charAt(63&i)),t&&o.length>t&&(a+=o.substr(0,t)+"\r\n",o=o.substr(t))
|
||
return a+=o},s.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")
|
||
for(var t,r,n,i,o="",a=0;a<e.length;)t=f[e.charCodeAt(a++)-43],r=f[e.charCodeAt(a++)-43],n=f[e.charCodeAt(a++)-43],i=f[e.charCodeAt(a++)-43],o+=String.fromCharCode(t<<2|r>>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i)))
|
||
return o},s.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},s.decodeUtf8=function(e){return decodeURIComponent(escape(e))},s.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:a.encode,decode:a.decode}},s.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},s.binary.raw.decode=function(e,t,r){var n=t
|
||
n||(n=new Uint8Array(e.length))
|
||
for(var i=r=r||0,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o)
|
||
return t?i-r:n},s.binary.hex.encode=s.bytesToHex,s.binary.hex.decode=function(e,t,r){var n=t
|
||
n||(n=new Uint8Array(Math.ceil(e.length/2)))
|
||
var i=0,o=r=r||0
|
||
for(1&e.length&&(i=1,n[o++]=parseInt(e[0],16));i<e.length;i+=2)n[o++]=parseInt(e.substr(i,2),16)
|
||
return t?o-r:n},s.binary.base64.encode=function(e,t){for(var r,n,i,o="",a="",s=0;s<e.byteLength;)r=e[s++],n=e[s++],i=e[s++],o+=l.charAt(r>>2),o+=l.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=l.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":l.charAt(63&i)),t&&o.length>t&&(a+=o.substr(0,t)+"\r\n",o=o.substr(t))
|
||
return a+=o},s.binary.base64.decode=function(e,t,r){var n,i,o,a,s=t
|
||
s||(s=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")
|
||
for(var u=0,c=r=r||0;u<e.length;)n=f[e.charCodeAt(u++)-43],i=f[e.charCodeAt(u++)-43],o=f[e.charCodeAt(u++)-43],a=f[e.charCodeAt(u++)-43],s[c++]=n<<2|i>>4,64!==o&&(s[c++]=(15&i)<<4|o>>2,64!==a&&(s[c++]=(3&o)<<6|a))
|
||
return t?c-r:s.subarray(0,c)},s.binary.base58.encode=function(e,t){return s.binary.baseN.encode(e,h,t)},s.binary.base58.decode=function(e,t){return s.binary.baseN.decode(e,h,t)},s.text={utf8:{},utf16:{}},s.text.utf8.encode=function(e,t,r){e=s.encodeUtf8(e)
|
||
var n=t
|
||
n||(n=new Uint8Array(e.length))
|
||
for(var i=r=r||0,o=0;o<e.length;++o)n[i++]=e.charCodeAt(o)
|
||
return t?i-r:n},s.text.utf8.decode=function(e){return s.decodeUtf8(String.fromCharCode.apply(null,e))},s.text.utf16.encode=function(e,t,r){var n=t
|
||
n||(n=new Uint8Array(2*e.length))
|
||
for(var i=new Uint16Array(n.buffer),o=r=r||0,a=r,s=0;s<e.length;++s)i[a++]=e.charCodeAt(s),o+=2
|
||
return t?o-r:n},s.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},s.deflate=function(e,t,r){if(t=s.decode64(e.deflate(s.encode64(t)).rval),r){var n=2
|
||
32&t.charCodeAt(1)&&(n=6),t=t.substring(n,t.length-4)}return t},s.inflate=function(e,t,r){var n=e.inflate(s.encode64(t)).rval
|
||
return null===n?null:s.decode64(n)}
|
||
var d=function(e,t,r){if(!e)throw new Error("WebStorage not available.")
|
||
var n
|
||
if(null===r?n=e.removeItem(t):(r=s.encode64(JSON.stringify(r)),n=e.setItem(t,r)),void 0!==n&&!0!==n.rval){var i=new Error(n.error.message)
|
||
throw i.id=n.error.id,i.name=n.error.name,i}},p=function(e,t){if(!e)throw new Error("WebStorage not available.")
|
||
var r=e.getItem(t)
|
||
if(e.init)if(null===r.rval){if(r.error){var n=new Error(r.error.message)
|
||
throw n.id=r.error.id,n.name=r.error.name,n}r=null}else r=r.rval
|
||
return null!==r&&(r=JSON.parse(s.decode64(r))),r},m=function(e,t,r,n){var i=p(e,t)
|
||
null===i&&(i={}),i[r]=n,d(e,t,i)},y=function(e,t,r){var n=p(e,t)
|
||
return null!==n&&(n=r in n?n[r]:null),n},g=function(e,t,r){var n=p(e,t)
|
||
if(null!==n&&r in n){delete n[r]
|
||
var i=!0
|
||
for(var o in n){i=!1
|
||
break}i&&(n=null),d(e,t,n)}},b=function(e,t){d(e,t,null)},v=function(e,t,r){var n,i=null
|
||
void 0===r&&(r=["web","flash"])
|
||
var o=!1,a=null
|
||
for(var s in r){n=r[s]
|
||
try{if("flash"===n||"both"===n){if(null===t[0])throw new Error("Flash local storage not available.")
|
||
i=e.apply(this,t),o="flash"===n}"web"!==n&&"both"!==n||(t[0]=localStorage,i=e.apply(this,t),o=!0)}catch(e){a=e}if(o)break}if(!o)throw a
|
||
return i}
|
||
s.setItem=function(e,t,r,n,i){v(m,arguments,i)},s.getItem=function(e,t,r,n){return v(y,arguments,n)},s.removeItem=function(e,t,r,n){v(g,arguments,n)},s.clearItems=function(e,t,r){v(b,arguments,r)},s.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g
|
||
t.lastIndex=0
|
||
var r=t.exec(e),n=null===r?null:{full:e,scheme:r[1],host:r[2],port:r[3],path:r[4]}
|
||
return n&&(n.fullHost=n.host,n.port?80!==n.port&&"http"===n.scheme?n.fullHost+=":"+n.port:443!==n.port&&"https"===n.scheme&&(n.fullHost+=":"+n.port):"http"===n.scheme?n.port=80:"https"===n.scheme&&(n.port=443),n.full=n.scheme+"://"+n.fullHost),n}
|
||
var _=null
|
||
s.getQueryVariables=function(e){var t,r=function(e){for(var t={},r=e.split("&"),n=0;n<r.length;n++){var i,o,a=r[n].indexOf("=")
|
||
a>0?(i=r[n].substring(0,a),o=r[n].substring(a+1)):(i=r[n],o=null),i in t||(t[i]=[]),i in Object.prototype||null===o||t[i].push(unescape(o))}return t}
|
||
return void 0===e?(null===_&&(_="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=_):t=r(e),t},s.parseFragment=function(e){var t=e,r="",n=e.indexOf("?")
|
||
n>0&&(t=e.substring(0,n),r=e.substring(n+1))
|
||
var i=t.split("/")
|
||
return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:s.getQueryVariables(r)}},s.makeRequest=function(e){var t=s.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n
|
||
return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e)
|
||
return n?n[n.length-1]:t}}
|
||
return r},s.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e
|
||
var n=jQuery.param(t||{})
|
||
return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},s.setPath=function(e,t,r){if("object"===(void 0===e?"undefined":i(e))&&null!==e)for(var n=0,o=t.length;n<o;){var a=t[n++]
|
||
if(n==o)e[a]=r
|
||
else{var s=a in e;(!s||s&&"object"!==i(e[a])||s&&null===e[a])&&(e[a]={}),e=e[a]}}},s.getPath=function(e,t,r){for(var n=0,o=t.length,a=!0;a&&n<o&&"object"===(void 0===e?"undefined":i(e))&&null!==e;){var s=t[n++];(a=s in e)&&(e=e[s])}return a?e:r},s.deletePath=function(e,t){if("object"===(void 0===e?"undefined":i(e))&&null!==e)for(var r=0,n=t.length;r<n;){var o=t[r++]
|
||
if(r==n)delete e[o]
|
||
else{if(!(o in e)||"object"!==i(e[o])||null===e[o])break
|
||
e=e[o]}}},s.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1
|
||
return!0},s.format=function(e){for(var t,r,n=/%./g,i=0,o=[],a=0;t=n.exec(e);){(r=e.substring(a,n.lastIndex-2)).length>0&&o.push(r),a=n.lastIndex
|
||
var s=t[0][1]
|
||
switch(s){case"s":case"o":i<arguments.length?o.push(arguments[1+i++]):o.push("<?>")
|
||
break
|
||
case"%":o.push("%")
|
||
break
|
||
default:o.push("<%"+s+"?>")}}return o.push(e.substring(a)),o.join("")},s.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,a=void 0===r?",":r,s=void 0===n?".":n,u=i<0?"-":"",c=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",l=c.length>3?c.length%3:0
|
||
return u+(l?c.substr(0,l)+s:"")+c.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+s)+(o?a+Math.abs(i-c).toFixed(o).slice(2):"")},s.formatSize=function(e){return e=e>=1073741824?s.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?s.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?s.formatNumber(e/1024,0)+" KiB":s.formatNumber(e,0)+" bytes"},s.bytesFromIP=function(e){return-1!==e.indexOf(".")?s.bytesFromIPv4(e):-1!==e.indexOf(":")?s.bytesFromIPv6(e):null},s.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null
|
||
for(var t=s.createBuffer(),r=0;r<e.length;++r){var n=parseInt(e[r],10)
|
||
if(isNaN(n))return null
|
||
t.putByte(n)}return t.getBytes()},s.bytesFromIPv6=function(e){for(var t=0,r=2*(8-(e=e.split(":").filter(function(e){return 0===e.length&&++t,!0})).length+t),n=s.createBuffer(),i=0;i<8;++i)if(e[i]&&0!==e[i].length){var o=s.hexToBytes(e[i])
|
||
o.length<2&&n.putByte(0),n.putBytes(o)}else n.fillWithByte(0,r),r=0
|
||
return n.getBytes()},s.bytesToIP=function(e){return 4===e.length?s.bytesToIPv4(e):16===e.length?s.bytesToIPv6(e):null},s.bytesToIPv4=function(e){if(4!==e.length)return null
|
||
for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r))
|
||
return t.join(".")},s.bytesToIPv6=function(e){if(16!==e.length)return null
|
||
for(var t=[],r=[],n=0,i=0;i<e.length;i+=2){for(var o=s.bytesToHex(e[i]+e[i+1]);"0"===o[0]&&"0"!==o;)o=o.substr(1)
|
||
if("0"===o){var a=r[r.length-1],u=t.length
|
||
a&&u===a.end+1?(a.end=u,a.end-a.start>r[n].end-r[n].start&&(n=r.length-1)):r.push({start:u,end:u})}t.push(o)}if(r.length>0){var c=r[n]
|
||
c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),0===c.start&&t.unshift(""),7===c.end&&t.push(""))}return t.join(":")},s.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in s&&!e.update)return t(null,s.cores)
|
||
if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return s.cores=navigator.hardwareConcurrency,t(null,s.cores)
|
||
if("undefined"==typeof Worker)return s.cores=1,t(null,s.cores)
|
||
if("undefined"==typeof Blob)return s.cores=2,t(null,s.cores)
|
||
var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(e){for(var t=Date.now(),r=t+4;Date.now()<r;);self.postMessage({st:t,et:r})})}.toString(),")()"],{type:"application/javascript"}));(function e(n,i,o){if(0===i){var a=Math.floor(n.reduce(function(e,t){return e+t},0)/n.length)
|
||
return s.cores=Math.max(1,a),URL.revokeObjectURL(r),t(null,s.cores)}(function(e,t){for(var n=[],i=[],o=0;o<e;++o){var a=new Worker(r)
|
||
a.addEventListener("message",function(r){if(i.push(r.data),i.length===e){for(var o=0;o<e;++o)n[o].terminate()
|
||
t(null,i)}}),n.push(a)}for(var o=0;o<e;++o)n[o].postMessage(o)})(o,function(t,r){n.push(function(e,t){for(var r=[],n=0;n<e;++n)for(var i=t[n],o=r[n]=[],a=0;a<e;++a)if(n!==a){var s=t[a];(i.st>s.st&&i.st<s.et||s.st>i.st&&s.st<i.et)&&o.push(a)}return r.reduce(function(e,t){return Math.max(e,t.length)},0)}(o,r)),e(n,i-1,o)})})([],5,16)}}).call(this,e("_process"),e("buffer").Buffer)},{"./baseN":494,"./forge":500,_process:124,buffer:109}],533:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./forge")
|
||
e("./aes"),e("./asn1"),e("./des"),e("./md"),e("./mgf"),e("./oids"),e("./pem"),e("./pss"),e("./rsa"),e("./util")
|
||
var o=i.asn1,a=t.exports=i.pki=i.pki||{},s=a.oids,u={}
|
||
u.CN=s.commonName,u.commonName="CN",u.C=s.countryName,u.countryName="C",u.L=s.localityName,u.localityName="L",u.ST=s.stateOrProvinceName,u.stateOrProvinceName="ST",u.O=s.organizationName,u.organizationName="O",u.OU=s.organizationalUnitName,u.organizationalUnitName="OU",u.E=s.emailAddress,u.emailAddress="E"
|
||
var c=i.pki.rsa.publicKeyValidator,l={name:"Certificate",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:o.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:o.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:o.Class.UNIVERSAL,type:o.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:o.Class.UNIVERSAL,type:o.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:o.Class.UNIVERSAL,type:o.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:o.Class.UNIVERSAL,type:o.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},c,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:o.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:o.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:o.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:o.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},f={name:"rsapss",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:o.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:o.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:o.Class.UNIVERSAL,type:o.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:o.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:o.Class.UNIVERSAL,type:o.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:o.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:o.Class.UNIVERSAL,type:o.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},h={name:"CertificationRequestInfo",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:o.Class.UNIVERSAL,type:o.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},c,{name:"CertificationRequestInfo.attributes",tagClass:o.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:o.Class.UNIVERSAL,type:o.Type.SET,constructed:!0}]}]}]},d={name:"CertificationRequest",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[h,{name:"CertificationRequest.signatureAlgorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:o.Class.UNIVERSAL,type:o.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:o.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:o.Class.UNIVERSAL,type:o.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]}
|
||
function p(e,t){"string"==typeof t&&(t={shortName:t})
|
||
for(var r,n=null,i=0;null===n&&i<e.attributes.length;++i)r=e.attributes[i],t.type&&t.type===r.type?n=r:t.name&&t.name===r.name?n=r:t.shortName&&t.shortName===r.shortName&&(n=r)
|
||
return n}a.RDNAttributesAsArray=function(e,t){for(var r,n,i,a=[],c=0;c<e.value.length;++c){r=e.value[c]
|
||
for(var l=0;l<r.value.length;++l)i={},n=r.value[l],i.type=o.derToOid(n.value[0].value),i.value=n.value[1].value,i.valueTagClass=n.value[1].type,i.type in s&&(i.name=s[i.type],i.name in u&&(i.shortName=u[i.name])),t&&(t.update(i.type),t.update(i.value)),a.push(i)}return a},a.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var n=e[r],i=o.derToOid(n.value[0].value),c=n.value[1].value,l=0;l<c.length;++l){var f={}
|
||
if(f.type=i,f.value=c[l].value,f.valueTagClass=c[l].type,f.type in s&&(f.name=s[f.type],f.name in u&&(f.shortName=u[f.name])),f.type===s.extensionRequest){f.extensions=[]
|
||
for(var h=0;h<f.value.length;++h)f.extensions.push(a.certificateExtensionFromAsn1(f.value[h]))}t.push(f)}return t}
|
||
var m=function(e,t,r){var n={}
|
||
if(e!==s["RSASSA-PSS"])return n
|
||
r&&(n={hash:{algorithmOid:s.sha1},mgf:{algorithmOid:s.mgf1,hash:{algorithmOid:s.sha1}},saltLength:20})
|
||
var i={},a=[]
|
||
if(!o.validate(t,f,i,a)){var u=new Error("Cannot read RSASSA-PSS parameter block.")
|
||
throw u.errors=a,u}return void 0!==i.hashOid&&(n.hash=n.hash||{},n.hash.algorithmOid=o.derToOid(i.hashOid)),void 0!==i.maskGenOid&&(n.mgf=n.mgf||{},n.mgf.algorithmOid=o.derToOid(i.maskGenOid),n.mgf.hash=n.mgf.hash||{},n.mgf.hash.algorithmOid=o.derToOid(i.maskGenHashOid)),void 0!==i.saltLength&&(n.saltLength=i.saltLength.charCodeAt(0)),n}
|
||
function y(e){for(var t,r,n=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),a=e.attributes,s=0;s<a.length;++s){var u=(t=a[s]).value,c=o.Type.PRINTABLESTRING
|
||
"valueTagClass"in t&&(c=t.valueTagClass)===o.Type.UTF8&&(u=i.util.encodeUtf8(u)),r=o.create(o.Class.UNIVERSAL,o.Type.SET,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(t.type).getBytes()),o.create(o.Class.UNIVERSAL,c,!1,u)])]),n.value.push(r)}return n}function g(e){for(var t,r=0;r<e.length;++r){if(void 0===(t=e[r]).name&&(t.type&&t.type in a.oids?t.name=a.oids[t.type]:t.shortName&&t.shortName in u&&(t.name=a.oids[u[t.shortName]])),void 0===t.type){if(!(t.name&&t.name in a.oids))throw(i=new Error("Attribute type not specified.")).attribute=t,i
|
||
t.type=a.oids[t.name]}if(void 0===t.shortName&&t.name&&t.name in u&&(t.shortName=u[t.name]),t.type===s.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=o.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[]
|
||
for(var n=0;n<t.extensions.length;++n)t.value.push(a.certificateExtensionToAsn1(b(t.extensions[n])))}var i
|
||
if(void 0===t.value)throw(i=new Error("Attribute value not specified.")).attribute=t,i}}function b(e,t){if(t=t||{},void 0===e.name&&e.id&&e.id in a.oids&&(e.name=a.oids[e.id]),void 0===e.id){if(!(e.name&&e.name in a.oids))throw(w=new Error("Extension ID not specified.")).extension=e,w
|
||
e.id=a.oids[e.name]}if(void 0!==e.value)return e
|
||
if("keyUsage"===e.name){var r=0,n=0,u=0
|
||
e.digitalSignature&&(n|=128,r=7),e.nonRepudiation&&(n|=64,r=6),e.keyEncipherment&&(n|=32,r=5),e.dataEncipherment&&(n|=16,r=4),e.keyAgreement&&(n|=8,r=3),e.keyCertSign&&(n|=4,r=2),e.cRLSign&&(n|=2,r=1),e.encipherOnly&&(n|=1,r=0),e.decipherOnly&&(u|=128,r=7)
|
||
var c=String.fromCharCode(r)
|
||
0!==u?c+=String.fromCharCode(n)+String.fromCharCode(u):0!==n&&(c+=String.fromCharCode(n)),e.value=o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,c)}else if("basicConstraints"===e.name)e.value=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(o.create(o.Class.UNIVERSAL,o.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(e.pathLenConstraint).getBytes()))
|
||
else if("extKeyUsage"===e.name){e.value=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[])
|
||
var l=e.value.value
|
||
for(var f in e)!0===e[f]&&(f in s?l.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(s[f]).getBytes())):-1!==f.indexOf(".")&&l.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(f).getBytes())))}else if("nsCertType"===e.name){r=0,n=0
|
||
e.client&&(n|=128,r=7),e.server&&(n|=64,r=6),e.email&&(n|=32,r=5),e.objsign&&(n|=16,r=4),e.reserved&&(n|=8,r=3),e.sslCA&&(n|=4,r=2),e.emailCA&&(n|=2,r=1),e.objCA&&(n|=1,r=0)
|
||
c=String.fromCharCode(r)
|
||
0!==n&&(c+=String.fromCharCode(n)),e.value=o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,c)}else if("subjectAltName"===e.name||"issuerAltName"===e.name){e.value=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[])
|
||
for(var h=0;h<e.altNames.length;++h){c=(b=e.altNames[h]).value
|
||
if(7===b.type&&b.ip){if(null===(c=i.util.bytesFromIP(b.ip)))throw(w=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,w}else 8===b.type&&(c=b.oid?o.oidToDer(o.oidToDer(b.oid)):o.oidToDer(c))
|
||
e.value.value.push(o.create(o.Class.CONTEXT_SPECIFIC,b.type,!1,c))}}else if("subjectKeyIdentifier"===e.name&&t.cert){var d=t.cert.generateSubjectKeyIdentifier()
|
||
e.subjectKeyIdentifier=d.toHex(),e.value=o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,d.getBytes())}else if("authorityKeyIdentifier"===e.name&&t.cert){e.value=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[])
|
||
l=e.value.value
|
||
if(e.keyIdentifier){var p=!0===e.keyIdentifier?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier
|
||
l.push(o.create(o.Class.CONTEXT_SPECIFIC,0,!1,p))}if(e.authorityCertIssuer){var m=[o.create(o.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===e.authorityCertIssuer?t.cert.issuer:e.authorityCertIssuer)])]
|
||
l.push(o.create(o.Class.CONTEXT_SPECIFIC,1,!0,m))}if(e.serialNumber){var g=i.util.hexToBytes(!0===e.serialNumber?t.cert.serialNumber:e.serialNumber)
|
||
l.push(o.create(o.Class.CONTEXT_SPECIFIC,2,!1,g))}}else if("cRLDistributionPoints"===e.name){e.value=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[])
|
||
l=e.value.value
|
||
var b,v=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[]),_=o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[])
|
||
for(h=0;h<e.altNames.length;++h){c=(b=e.altNames[h]).value
|
||
if(7===b.type&&b.ip){if(null===(c=i.util.bytesFromIP(b.ip)))throw(w=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.')).extension=e,w}else 8===b.type&&(c=b.oid?o.oidToDer(o.oidToDer(b.oid)):o.oidToDer(c))
|
||
_.value.push(o.create(o.Class.CONTEXT_SPECIFIC,b.type,!1,c))}v.value.push(o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[_])),l.push(v)}var w
|
||
if(void 0===e.value)throw(w=new Error("Extension value not specified.")).extension=e,w
|
||
return e}function v(e,t){switch(e){case s["RSASSA-PSS"]:var r=[]
|
||
return void 0!==t.hash.algorithmOid&&r.push(o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(t.hash.algorithmOid).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")])])),void 0!==t.mgf.algorithmOid&&r.push(o.create(o.Class.CONTEXT_SPECIFIC,1,!0,[o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(t.mgf.algorithmOid).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(t.mgf.hash.algorithmOid).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")])])])),void 0!==t.saltLength&&r.push(o.create(o.Class.CONTEXT_SPECIFIC,2,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(t.saltLength).getBytes())])),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,r)
|
||
default:return o.create(o.Class.UNIVERSAL,o.Type.NULL,!1,"")}}a.certificateFromPem=function(e,t,r){var n=i.pem.decode(e)[0]
|
||
if("CERTIFICATE"!==n.type&&"X509 CERTIFICATE"!==n.type&&"TRUSTED CERTIFICATE"!==n.type){var s=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".')
|
||
throw s.headerType=n.type,s}if(n.procType&&"ENCRYPTED"===n.procType.type)throw new Error("Could not convert certificate from PEM; PEM is encrypted.")
|
||
var u=o.fromDer(n.body,r)
|
||
return a.certificateFromAsn1(u,t)},a.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:o.toDer(a.certificateToAsn1(e)).getBytes()}
|
||
return i.pem.encode(r,{maxline:t})},a.publicKeyFromPem=function(e){var t=i.pem.decode(e)[0]
|
||
if("PUBLIC KEY"!==t.type&&"RSA PUBLIC KEY"!==t.type){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".')
|
||
throw r.headerType=t.type,r}if(t.procType&&"ENCRYPTED"===t.procType.type)throw new Error("Could not convert public key from PEM; PEM is encrypted.")
|
||
var n=o.fromDer(t.body)
|
||
return a.publicKeyFromAsn1(n)},a.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:o.toDer(a.publicKeyToAsn1(e)).getBytes()}
|
||
return i.pem.encode(r,{maxline:t})},a.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:o.toDer(a.publicKeyToRSAPublicKey(e)).getBytes()}
|
||
return i.pem.encode(r,{maxline:t})},a.getPublicKeyFingerprint=function(e,t){var r,n=(t=t||{}).md||i.md.sha1.create()
|
||
switch(t.type||"RSAPublicKey"){case"RSAPublicKey":r=o.toDer(a.publicKeyToRSAPublicKey(e)).getBytes()
|
||
break
|
||
case"SubjectPublicKeyInfo":r=o.toDer(a.publicKeyToAsn1(e)).getBytes()
|
||
break
|
||
default:throw new Error('Unknown fingerprint type "'+t.type+'".')}n.start(),n.update(r)
|
||
var s=n.digest()
|
||
if("hex"===t.encoding){var u=s.toHex()
|
||
return t.delimiter?u.match(/.{2}/g).join(t.delimiter):u}if("binary"===t.encoding)return s.getBytes()
|
||
if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')
|
||
return s},a.certificationRequestFromPem=function(e,t,r){var n=i.pem.decode(e)[0]
|
||
if("CERTIFICATE REQUEST"!==n.type){var s=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".')
|
||
throw s.headerType=n.type,s}if(n.procType&&"ENCRYPTED"===n.procType.type)throw new Error("Could not convert certification request from PEM; PEM is encrypted.")
|
||
var u=o.fromDer(n.body,r)
|
||
return a.certificationRequestFromAsn1(u,t)},a.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:o.toDer(a.certificationRequestToAsn1(e)).getBytes()}
|
||
return i.pem.encode(r,{maxline:t})},a.createCertificate=function(){var e={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}}
|
||
return e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return p(e.issuer,t)},e.issuer.addField=function(t){g([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){g(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){g(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)b(t[r],{cert:e})
|
||
e.extensions=t},e.getExtension=function(t){"string"==typeof t&&(t={name:t})
|
||
for(var r,n=null,i=0;null===n&&i<e.extensions.length;++i)r=e.extensions[i],t.id&&r.id===t.id?n=r:t.name&&r.name===t.name&&(n=r)
|
||
return n},e.sign=function(t,r){e.md=r||i.md.sha1.create()
|
||
var n=s[e.md.algorithm+"WithRSAEncryption"]
|
||
if(!n){var u=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.")
|
||
throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=n,e.tbsCertificate=a.getTBSCertificate(e)
|
||
var c=o.toDer(e.tbsCertificate)
|
||
e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1
|
||
if(!e.issued(t)){var n=t.issuer,u=e.subject
|
||
throw(m=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.")).expectedIssuer=n.attributes,m.actualIssuer=u.attributes,m}var c=t.md
|
||
if(null===c){if(t.signatureOid in s)switch(s[t.signatureOid]){case"sha1WithRSAEncryption":c=i.md.sha1.create()
|
||
break
|
||
case"md5WithRSAEncryption":c=i.md.md5.create()
|
||
break
|
||
case"sha256WithRSAEncryption":c=i.md.sha256.create()
|
||
break
|
||
case"sha384WithRSAEncryption":c=i.md.sha384.create()
|
||
break
|
||
case"sha512WithRSAEncryption":c=i.md.sha512.create()
|
||
break
|
||
case"RSASSA-PSS":c=i.md.sha256.create()}if(null===c)throw(m=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=t.signatureOid,m
|
||
var l=t.tbsCertificate||a.getTBSCertificate(t),f=o.toDer(l)
|
||
c.update(f.getBytes())}if(null!==c){var h
|
||
switch(t.signatureOid){case s.sha1WithRSAEncryption:h=void 0
|
||
break
|
||
case s["RSASSA-PSS"]:var d,p,m
|
||
if(void 0===(d=s[t.signatureParameters.mgf.hash.algorithmOid])||void 0===i.md[d])throw(m=new Error("Unsupported MGF hash function.")).oid=t.signatureParameters.mgf.hash.algorithmOid,m.name=d,m
|
||
if(void 0===(p=s[t.signatureParameters.mgf.algorithmOid])||void 0===i.mgf[p])throw(m=new Error("Unsupported MGF function.")).oid=t.signatureParameters.mgf.algorithmOid,m.name=p,m
|
||
if(p=i.mgf[p].create(i.md[d].create()),void 0===(d=s[t.signatureParameters.hash.algorithmOid])||void 0===i.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:t.signatureParameters.hash.algorithmOid,name:d}
|
||
h=i.pss.create(i.md[d].create(),p,t.signatureParameters.saltLength)}r=e.publicKey.verify(c.digest().getBytes(),t.signature,h)}return r},e.isIssuer=function(t){var r=!1,n=e.issuer,i=t.subject
|
||
if(n.hash&&i.hash)r=n.hash===i.hash
|
||
else if(n.attributes.length===i.attributes.length){var o,a
|
||
r=!0
|
||
for(var s=0;r&&s<n.attributes.length;++s)o=n.attributes[s],a=i.attributes[s],o.type===a.type&&o.value===a.value||(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return a.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=s.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var n=e.extensions[r]
|
||
if(n.id===t){var o=e.generateSubjectKeyIdentifier().getBytes()
|
||
return i.util.hexToBytes(n.subjectKeyIdentifier)===o}}return!1},e},a.certificateFromAsn1=function(e,t){var r={},n=[]
|
||
if(!o.validate(e,l,r,n))throw(h=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.")).errors=n,h
|
||
if(o.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.")
|
||
var u=a.createCertificate()
|
||
u.version=r.certVersion?r.certVersion.charCodeAt(0):0
|
||
var c=i.util.createBuffer(r.certSerialNumber)
|
||
u.serialNumber=c.toHex(),u.signatureOid=i.asn1.derToOid(r.certSignatureOid),u.signatureParameters=m(u.signatureOid,r.certSignatureParams,!0),u.siginfo.algorithmOid=i.asn1.derToOid(r.certinfoSignatureOid),u.siginfo.parameters=m(u.siginfo.algorithmOid,r.certinfoSignatureParams,!1),u.signature=r.certSignature
|
||
var f=[]
|
||
if(void 0!==r.certValidity1UTCTime&&f.push(o.utcTimeToDate(r.certValidity1UTCTime)),void 0!==r.certValidity2GeneralizedTime&&f.push(o.generalizedTimeToDate(r.certValidity2GeneralizedTime)),void 0!==r.certValidity3UTCTime&&f.push(o.utcTimeToDate(r.certValidity3UTCTime)),void 0!==r.certValidity4GeneralizedTime&&f.push(o.generalizedTimeToDate(r.certValidity4GeneralizedTime)),f.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.")
|
||
if(f.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.")
|
||
if(u.validity.notBefore=f[0],u.validity.notAfter=f[1],u.tbsCertificate=r.tbsCertificate,t){var h
|
||
if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=i.md.sha1.create()
|
||
break
|
||
case"md5WithRSAEncryption":u.md=i.md.md5.create()
|
||
break
|
||
case"sha256WithRSAEncryption":u.md=i.md.sha256.create()
|
||
break
|
||
case"sha384WithRSAEncryption":u.md=i.md.sha384.create()
|
||
break
|
||
case"sha512WithRSAEncryption":u.md=i.md.sha512.create()
|
||
break
|
||
case"RSASSA-PSS":u.md=i.md.sha256.create()}if(null===u.md)throw(h=new Error("Could not compute certificate digest. Unknown signature OID.")).signatureOid=u.signatureOid,h
|
||
var d=o.toDer(u.tbsCertificate)
|
||
u.md.update(d.getBytes())}var y=i.md.sha1.create()
|
||
u.issuer.getField=function(e){return p(u.issuer,e)},u.issuer.addField=function(e){g([e]),u.issuer.attributes.push(e)},u.issuer.attributes=a.RDNAttributesAsArray(r.certIssuer,y),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=y.digest().toHex()
|
||
var b=i.md.sha1.create()
|
||
return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=a.RDNAttributesAsArray(r.certSubject,b),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=b.digest().toHex(),r.certExtensions?u.extensions=a.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},a.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var n=e.value[r],i=0;i<n.value.length;++i)t.push(a.certificateExtensionFromAsn1(n.value[i]))
|
||
return t},a.certificateExtensionFromAsn1=function(e){var t={}
|
||
if(t.id=o.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===o.Type.BOOLEAN?(t.critical=0!==e.value[1].value.charCodeAt(0),t.value=e.value[2].value):t.value=e.value[1].value,t.id in s)if(t.name=s[t.id],"keyUsage"===t.name){var r=0,n=0;(u=o.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1),n=u.value.length>2?u.value.charCodeAt(2):0),t.digitalSignature=128==(128&r),t.nonRepudiation=64==(64&r),t.keyEncipherment=32==(32&r),t.dataEncipherment=16==(16&r),t.keyAgreement=8==(8&r),t.keyCertSign=4==(4&r),t.cRLSign=2==(2&r),t.encipherOnly=1==(1&r),t.decipherOnly=128==(128&n)}else if("basicConstraints"===t.name){(u=o.fromDer(t.value)).value.length>0&&u.value[0].type===o.Type.BOOLEAN?t.cA=0!==u.value[0].value.charCodeAt(0):t.cA=!1
|
||
var a=null
|
||
u.value.length>0&&u.value[0].type===o.Type.INTEGER?a=u.value[0].value:u.value.length>1&&(a=u.value[1].value),null!==a&&(t.pathLenConstraint=o.derToInteger(a))}else if("extKeyUsage"===t.name)for(var u=o.fromDer(t.value),c=0;c<u.value.length;++c){var l=o.derToOid(u.value[c].value)
|
||
l in s?t[s[l]]=!0:t[l]=!0}else if("nsCertType"===t.name){r=0;(u=o.fromDer(t.value)).value.length>1&&(r=u.value.charCodeAt(1)),t.client=128==(128&r),t.server=64==(64&r),t.email=32==(32&r),t.objsign=16==(16&r),t.reserved=8==(8&r),t.sslCA=4==(4&r),t.emailCA=2==(2&r),t.objCA=1==(1&r)}else if("subjectAltName"===t.name||"issuerAltName"===t.name){var f
|
||
t.altNames=[]
|
||
u=o.fromDer(t.value)
|
||
for(var h=0;h<u.value.length;++h){var d={type:(f=u.value[h]).type,value:f.value}
|
||
switch(t.altNames.push(d),f.type){case 1:case 2:case 6:break
|
||
case 7:d.ip=i.util.bytesToIP(f.value)
|
||
break
|
||
case 8:d.oid=o.derToOid(f.value)}}}else if("subjectKeyIdentifier"===t.name){u=o.fromDer(t.value)
|
||
t.subjectKeyIdentifier=i.util.bytesToHex(u.value)}return t},a.certificationRequestFromAsn1=function(e,t){var r={},n=[]
|
||
if(!o.validate(e,d,r,n))throw(c=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.")).errors=n,c
|
||
if(o.derToOid(r.publicKeyOid)!==a.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.")
|
||
var u=a.createCertificationRequest()
|
||
if(u.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,u.signatureOid=i.asn1.derToOid(r.csrSignatureOid),u.signatureParameters=m(u.signatureOid,r.csrSignatureParams,!0),u.siginfo.algorithmOid=i.asn1.derToOid(r.csrSignatureOid),u.siginfo.parameters=m(u.siginfo.algorithmOid,r.csrSignatureParams,!1),u.signature=r.csrSignature,u.certificationRequestInfo=r.certificationRequestInfo,t){var c
|
||
if(u.md=null,u.signatureOid in s)switch(s[u.signatureOid]){case"sha1WithRSAEncryption":u.md=i.md.sha1.create()
|
||
break
|
||
case"md5WithRSAEncryption":u.md=i.md.md5.create()
|
||
break
|
||
case"sha256WithRSAEncryption":u.md=i.md.sha256.create()
|
||
break
|
||
case"sha384WithRSAEncryption":u.md=i.md.sha384.create()
|
||
break
|
||
case"sha512WithRSAEncryption":u.md=i.md.sha512.create()
|
||
break
|
||
case"RSASSA-PSS":u.md=i.md.sha256.create()}if(null===u.md)throw(c=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=u.signatureOid,c
|
||
var l=o.toDer(u.certificationRequestInfo)
|
||
u.md.update(l.getBytes())}var f=i.md.sha1.create()
|
||
return u.subject.getField=function(e){return p(u.subject,e)},u.subject.addField=function(e){g([e]),u.subject.attributes.push(e)},u.subject.attributes=a.RDNAttributesAsArray(r.certificationRequestInfoSubject,f),u.subject.hash=f.digest().toHex(),u.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),u.getAttribute=function(e){return p(u,e)},u.addAttribute=function(e){g([e]),u.attributes.push(e)},u.attributes=a.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),u},a.createCertificationRequest=function(){var e={version:0,signatureOid:null,signature:null,siginfo:{}}
|
||
return e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return p(e.subject,t)},e.subject.addField=function(t){g([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return p(e,t)},e.addAttribute=function(t){g([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){g(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){g(t),e.attributes=t},e.sign=function(t,r){e.md=r||i.md.sha1.create()
|
||
var n=s[e.md.algorithm+"WithRSAEncryption"]
|
||
if(!n){var u=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.")
|
||
throw u.algorithm=e.md.algorithm,u}e.signatureOid=e.siginfo.algorithmOid=n,e.certificationRequestInfo=a.getCertificationRequestInfo(e)
|
||
var c=o.toDer(e.certificationRequestInfo)
|
||
e.md.update(c.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md
|
||
if(null===r){if(e.signatureOid in s)switch(s[e.signatureOid]){case"sha1WithRSAEncryption":r=i.md.sha1.create()
|
||
break
|
||
case"md5WithRSAEncryption":r=i.md.md5.create()
|
||
break
|
||
case"sha256WithRSAEncryption":r=i.md.sha256.create()
|
||
break
|
||
case"sha384WithRSAEncryption":r=i.md.sha384.create()
|
||
break
|
||
case"sha512WithRSAEncryption":r=i.md.sha512.create()
|
||
break
|
||
case"RSASSA-PSS":r=i.md.sha256.create()}if(null===r)throw(h=new Error("Could not compute certification request digest. Unknown signature OID.")).signatureOid=e.signatureOid,h
|
||
var n=e.certificationRequestInfo||a.getCertificationRequestInfo(e),u=o.toDer(n)
|
||
r.update(u.getBytes())}if(null!==r){var c
|
||
switch(e.signatureOid){case s.sha1WithRSAEncryption:break
|
||
case s["RSASSA-PSS"]:var l,f,h
|
||
if(void 0===(l=s[e.signatureParameters.mgf.hash.algorithmOid])||void 0===i.md[l])throw(h=new Error("Unsupported MGF hash function.")).oid=e.signatureParameters.mgf.hash.algorithmOid,h.name=l,h
|
||
if(void 0===(f=s[e.signatureParameters.mgf.algorithmOid])||void 0===i.mgf[f])throw(h=new Error("Unsupported MGF function.")).oid=e.signatureParameters.mgf.algorithmOid,h.name=f,h
|
||
if(f=i.mgf[f].create(i.md[l].create()),void 0===(l=s[e.signatureParameters.hash.algorithmOid])||void 0===i.md[l])throw(h=new Error("Unsupported RSASSA-PSS hash function.")).oid=e.signatureParameters.hash.algorithmOid,h.name=l,h
|
||
c=i.pss.create(i.md[l].create(),f,e.signatureParameters.saltLength)}t=e.publicKey.verify(r.digest().getBytes(),e.signature,c)}return t},e},a.getTBSCertificate=function(e){var t=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(e.version).getBytes())]),o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,i.util.hexToBytes(e.serialNumber)),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.siginfo.algorithmOid).getBytes()),v(e.siginfo.algorithmOid,e.siginfo.parameters)]),y(e.issuer),o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.UTCTIME,!1,o.dateToUtcTime(e.validity.notBefore)),o.create(o.Class.UNIVERSAL,o.Type.UTCTIME,!1,o.dateToUtcTime(e.validity.notAfter))]),y(e.subject),a.publicKeyToAsn1(e.publicKey)])
|
||
return e.issuer.uniqueId&&t.value.push(o.create(o.Class.CONTEXT_SPECIFIC,1,!0,[o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,String.fromCharCode(0)+e.issuer.uniqueId)])),e.subject.uniqueId&&t.value.push(o.create(o.Class.CONTEXT_SPECIFIC,2,!0,[o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,String.fromCharCode(0)+e.subject.uniqueId)])),e.extensions.length>0&&t.value.push(a.certificateExtensionsToAsn1(e.extensions)),t},a.getCertificationRequestInfo=function(e){return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.INTEGER,!1,o.integerToDer(e.version).getBytes()),y(e.subject),a.publicKeyToAsn1(e.publicKey),function(e){var t=o.create(o.Class.CONTEXT_SPECIFIC,0,!0,[])
|
||
if(0===e.attributes.length)return t
|
||
for(var r=e.attributes,n=0;n<r.length;++n){var a=r[n],s=a.value,u=o.Type.UTF8
|
||
"valueTagClass"in a&&(u=a.valueTagClass),u===o.Type.UTF8&&(s=i.util.encodeUtf8(s))
|
||
var c=!1
|
||
"valueConstructed"in a&&(c=a.valueConstructed)
|
||
var l=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(a.type).getBytes()),o.create(o.Class.UNIVERSAL,o.Type.SET,!0,[o.create(o.Class.UNIVERSAL,u,c,s)])])
|
||
t.value.push(l)}return t}(e)])},a.distinguishedNameToAsn1=function(e){return y(e)},a.certificateToAsn1=function(e){var t=e.tbsCertificate||a.getTBSCertificate(e)
|
||
return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[t,o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.certificateExtensionsToAsn1=function(e){var t=o.create(o.Class.CONTEXT_SPECIFIC,3,!0,[]),r=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[])
|
||
t.value.push(r)
|
||
for(var n=0;n<e.length;++n)r.value.push(a.certificateExtensionToAsn1(e[n]))
|
||
return t},a.certificateExtensionToAsn1=function(e){var t=o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[])
|
||
t.value.push(o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.id).getBytes())),e.critical&&t.value.push(o.create(o.Class.UNIVERSAL,o.Type.BOOLEAN,!1,String.fromCharCode(255)))
|
||
var r=e.value
|
||
return"string"!=typeof e.value&&(r=o.toDer(r).getBytes()),t.value.push(o.create(o.Class.UNIVERSAL,o.Type.OCTETSTRING,!1,r)),t},a.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||a.getCertificationRequestInfo(e)
|
||
return o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[t,o.create(o.Class.UNIVERSAL,o.Type.SEQUENCE,!0,[o.create(o.Class.UNIVERSAL,o.Type.OID,!1,o.oidToDer(e.signatureOid).getBytes()),v(e.signatureOid,e.signatureParameters)]),o.create(o.Class.UNIVERSAL,o.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},a.createCaStore=function(e){var t={certs:{}}
|
||
function r(e){return n(e),t.certs[e.hash]||null}function n(e){if(!e.hash){var t=i.md.sha1.create()
|
||
e.attributes=a.RDNAttributesAsArray(y(e),t),e.hash=t.digest().toHex()}}if(t.getIssuer=function(e){return r(e.issuer)},t.addCertificate=function(e){if("string"==typeof e&&(e=i.pki.certificateFromPem(e)),n(e.subject),!t.hasCertificate(e))if(e.subject.hash in t.certs){var r=t.certs[e.subject.hash]
|
||
i.util.isArray(r)||(r=[r]),r.push(e),t.certs[e.subject.hash]=r}else t.certs[e.subject.hash]=e},t.hasCertificate=function(e){"string"==typeof e&&(e=i.pki.certificateFromPem(e))
|
||
var t=r(e.subject)
|
||
if(!t)return!1
|
||
i.util.isArray(t)||(t=[t])
|
||
for(var n=o.toDer(a.certificateToAsn1(e)).getBytes(),s=0;s<t.length;++s){if(n===o.toDer(a.certificateToAsn1(t[s])).getBytes())return!0}return!1},t.listAllCertificates=function(){var e=[]
|
||
for(var r in t.certs)if(t.certs.hasOwnProperty(r)){var n=t.certs[r]
|
||
if(i.util.isArray(n))for(var o=0;o<n.length;++o)e.push(n[o])
|
||
else e.push(n)}return e},t.removeCertificate=function(e){var s
|
||
if("string"==typeof e&&(e=i.pki.certificateFromPem(e)),n(e.subject),!t.hasCertificate(e))return null
|
||
var u=r(e.subject)
|
||
if(!i.util.isArray(u))return s=t.certs[e.subject.hash],delete t.certs[e.subject.hash],s
|
||
for(var c=o.toDer(a.certificateToAsn1(e)).getBytes(),l=0;l<u.length;++l){c===o.toDer(a.certificateToAsn1(u[l])).getBytes()&&(s=u[l],u.splice(l,1))}return 0===u.length&&delete t.certs[e.subject.hash],s},e)for(var s=0;s<e.length;++s){var u=e[s]
|
||
t.addCertificate(u)}return t},a.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},a.verifyCertificateChain=function(e,t,r){var o=(t=t.slice(0)).slice(0),s=new Date,u=!0,c=null,l=0
|
||
do{var f=t.shift(),h=null,d=!1
|
||
if((s<f.validity.notBefore||s>f.validity.notAfter)&&(c={message:"Certificate is not valid yet or has expired.",error:a.certificateError.certificate_expired,notBefore:f.validity.notBefore,notAfter:f.validity.notAfter,now:s}),null===c){if(null===(h=t[0]||e.getIssuer(f))&&f.isIssuer(f)&&(d=!0,h=f),h){var p=h
|
||
i.util.isArray(p)||(p=[p])
|
||
for(var m=!1;!m&&p.length>0;){h=p.shift()
|
||
try{m=h.verify(f)}catch(e){}}m||(c={message:"Certificate signature is invalid.",error:a.certificateError.bad_certificate})}null!==c||h&&!d||e.hasCertificate(f)||(c={message:"Certificate is not trusted.",error:a.certificateError.unknown_ca})}if(null===c&&h&&!f.isIssuer(h)&&(c={message:"Certificate issuer is invalid.",error:a.certificateError.bad_certificate}),null===c)for(var y={keyUsage:!0,basicConstraints:!0},g=0;null===c&&g<f.extensions.length;++g){var b=f.extensions[g]
|
||
!b.critical||b.name in y||(c={message:"Certificate has an unsupported critical extension.",error:a.certificateError.unsupported_certificate})}if(null===c&&(!u||0===t.length&&(!h||d))){var v=f.getExtension("basicConstraints"),_=f.getExtension("keyUsage")
|
||
if(null!==_&&(_.keyCertSign&&null!==v||(c={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:a.certificateError.bad_certificate})),null!==c||null===v||v.cA||(c={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:a.certificateError.bad_certificate}),null===c&&null!==_&&"pathLenConstraint"in v)l-1>v.pathLenConstraint&&(c={message:"Certificate basicConstraints pathLenConstraint violated.",error:a.certificateError.bad_certificate})}var w=null===c||c.error,S=r?r(w,l,o):w
|
||
if(!0!==S)throw!0===w&&(c={message:"The application rejected the certificate.",error:a.certificateError.bad_certificate}),(S||0===S)&&("object"!==(void 0===S?"undefined":n(S))||i.util.isArray(S)?"string"==typeof S&&(c.error=S):(S.message&&(c.message=S.message),S.error&&(c.error=S.error))),c
|
||
c=null,u=!1,++l}while(t.length>0)
|
||
return!0}},{"./aes":491,"./asn1":493,"./des":498,"./forge":500,"./md":507,"./mgf":509,"./oids":511,"./pem":514,"./pss":522,"./rsa":525,"./util":532}],534:[function(e,t,r){(function(r){"use strict"
|
||
var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("promise"),a=e("is-promise")
|
||
function s(e,t){return"function"!=typeof t?e:e.then(function(e){n(function(){t(null,e)})},function(e){n(function(){t(e)})})}function u(e){return s(this,e)}function c(e){if(e&&a(e)){e.nodeify=u
|
||
var t=e.then
|
||
return e.then=function(){return c(t.apply(this,arguments))},e}"function"==typeof e?e.prototype.nodeify=u:o.prototype.nodeify=u}function l(e){if(!(this instanceof l))return new l(e)
|
||
o.call(this,e),c(this)}n="function"==typeof setImmediate?setImmediate:"object"===(void 0===r?"undefined":i(r))&&r&&r.nextTick?r.nextTick:function(e){setTimeout(e,0)},t.exports=s,s.extend=c,s.Promise=l,l.prototype=Object.create(o.prototype),l.prototype.constructor=l}).call(this,e("_process"))},{_process:124,"is-promise":380,promise:541}],535:[function(e,t,r){"use strict"
|
||
var n=e("wrappy")
|
||
function i(e){var t=function t(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))}
|
||
return t.called=!1,t}function o(e){var t=function t(){if(t.called)throw new Error(t.onceError)
|
||
return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`"
|
||
return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(i),t.exports.strict=n(o),i.proto=i(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})})},{wrappy:665}],536:[function(e,t,r){(function(n){"use strict"
|
||
var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var a=e("multihashes"),s=e("libp2p-crypto"),u=e("assert"),c=e("async/waterfall"),l=function(){function e(t,r,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),u(n.isBuffer(t),"invalid id provided"),r&&i&&u(r.public.bytes.equals(i.bytes),"inconsistent arguments"),this._id=t,this._idB58String=a.toB58String(this.id),this._privKey=r,this._pubKey=i}return o(e,[{key:"marshalPubKey",value:function(){if(this.pubKey)return s.keys.marshalPublicKey(this.pubKey)}},{key:"marshalPrivKey",value:function(){if(this.privKey)return s.keys.marshalPrivateKey(this.privKey)}},{key:"toPrint",value:function(){return this.toJSON()}},{key:"toJSON",value:function(){return{id:this.toB58String(),privKey:f(this.marshalPrivKey()),pubKey:f(this.marshalPubKey())}}},{key:"toHexString",value:function(){return a.toHexString(this.id)}},{key:"toBytes",value:function(){return this.id}},{key:"toB58String",value:function(){return this._idB58String}},{key:"isEqual",value:function(e){if(n.isBuffer(e))return this.id.equals(e)
|
||
if(e.id)return this.id.equals(e.id)
|
||
throw new Error("not valid Id")}},{key:"isValid",value:function(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}},{key:"id",get:function(){return this._id},set:function(e){throw new Error("Id is immutable")}},{key:"privKey",get:function(){return this._privKey},set:function(e){this._privKey=e}},{key:"pubKey",get:function(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0},set:function(e){this._pubKey=e}}]),e}()
|
||
function f(e){if(e)return e.toString("base64")}(r=t.exports=l).create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,c([function(t){return s.keys.generateKeyPair("RSA",e.bits,t)},function(e,t){return e.public.hash(function(r,n){t(r,n,e)})}],function(e,r,n){if(e)return t(e)
|
||
t(null,new l(r,n))})},r.createFromHexString=function(e){return new l(a.fromHexString(e))},r.createFromBytes=function(e){return new l(e)},r.createFromB58String=function(e){return new l(a.fromB58String(e))},r.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required")
|
||
var r=void 0
|
||
try{var i=e
|
||
if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer")
|
||
r=s.keys.unmarshalPublicKey(i)}catch(e){return t(e)}r.hash(function(e,n){if(e)return t(e)
|
||
t(null,new l(n,null,r))})},r.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required")
|
||
var r=e
|
||
try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}c([function(e){return s.keys.unmarshalPrivateKey(r,e)},function(e,t){return e.public.hash(function(r,n){t(r,n,e)})}],function(e,r,n){if(e)return t(e)
|
||
t(null,new l(r,n,n.public))})},r.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required")
|
||
var r=void 0,i=void 0,o=void 0,u=void 0
|
||
try{r=a.fromB58String(e.id),i=e.privKey&&n.from(e.privKey,"base64"),o=e.pubKey&&n.from(e.pubKey,"base64"),u=o&&s.keys.unmarshalPublicKey(o)}catch(e){return t(e)}i?c([function(e){return s.keys.unmarshalPrivateKey(i,e)},function(e,t){return e.public.hash(function(r,n){t(r,n,e)})},function(e,t,r){u?u.hash(function(n,i){r(n,e,t,i)}):r(null,e,t)}],function(e,n,i,o){return e?t(e):u&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new l(r,i,u))}):t(null,new l(r,null,u))},r.isPeerId=function(e){return Boolean("object"===(void 0===e?"undefined":i(e))&&e._id&&e._idB58String)}}).call(this,e("buffer").Buffer)},{assert:107,"async/waterfall":32,buffer:110,"libp2p-crypto":409,multihashes:481}],537:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var o=e("peer-id"),a=e("./utils").ensureMultiaddr,s=e("./multiaddr-set"),u=e("assert"),c=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),u(t,"Missing peerId. Use Peer.create(cb) to create one"),this.id=t,this.multiaddrs=new s,this.protocols=new Set,this._connectedMultiaddr=void 0}return i(e,[{key:"connect",value:function(e){if(e=a(e),!this.multiaddrs.has(e)&&e.toString()!=="/ipfs/"+this.id.toB58String())throw new Error("can't be connected to missing multiaddr from set")
|
||
this._connectedMultiaddr=e}},{key:"disconnect",value:function(){this._connectedMultiaddr=void 0}},{key:"isConnected",value:function(){return this._connectedMultiaddr}}]),e}()
|
||
c.create=function(e,t){if("function"==typeof e)return t=e,e=null,void o.create(function(e,r){if(e)return t(e)
|
||
t(null,new c(r))})
|
||
"function"==typeof e.toJSON?t(null,new c(e)):o.createFromJSON(e,function(e,r){return t(e,new c(r))})},c.isPeerInfo=function(e){return Boolean("object"===(void 0===e?"undefined":n(e))&&e.id&&e.multiaddrs)},t.exports=c},{"./multiaddr-set":538,"./utils":539,assert:107,"peer-id":536}],538:[function(e,t,r){"use strict"
|
||
var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var i=e("./utils").ensureMultiaddr,o=e("lodash.uniqby"),a=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._multiaddrs=t||[],this._observedMultiaddrs=[]}return n(e,[{key:"add",value:function(e){e=i(e),this.has(e)||this._multiaddrs.push(e)}},{key:"addSafe",value:function(e){var t=this
|
||
e=i(e),this._observedMultiaddrs.some(function(r,n){if(r.equals(e))return t.add(e),t._observedMultiaddrs.splice(n,1),!0})||this._observedMultiaddrs.push(e)}},{key:"toArray",value:function(){return this._multiaddrs.slice()}},{key:"forEach",value:function(e){return this._multiaddrs.forEach(e)}},{key:"has",value:function(e){return e=i(e),this._multiaddrs.some(function(t){return t.equals(e)})}},{key:"delete",value:function(e){var t=this
|
||
e=i(e),this._multiaddrs.some(function(r,n){if(r.equals(e))return t._multiaddrs.splice(n,1),!0})}},{key:"replace",value:function(e,t){var r=this
|
||
Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.forEach(function(e){return r.delete(e)}),t.forEach(function(e){return r.add(e)})}},{key:"clear",value:function(){this._multiaddrs=[]}},{key:"distinct",value:function(){return o(this._multiaddrs,function(e){return[e.toOptions().port,e.toOptions().transport].join()})}},{key:"size",get:function(){return this._multiaddrs.length}}]),e}()
|
||
t.exports=a},{"./utils":539,"lodash.uniqby":427}],539:[function(e,t,r){"use strict"
|
||
var n=e("multiaddr")
|
||
t.exports={ensureMultiaddr:function(e){return n.isMultiaddr(e)?e:n(e)}}},{multiaddr:467}],540:[function(e,t,r){(function(e){"use strict"
|
||
!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports=function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function')
|
||
var o,a,s=arguments.length
|
||
switch(s){case 0:case 1:return e.nextTick(t)
|
||
case 2:return e.nextTick(function(){t.call(null,r)})
|
||
case 3:return e.nextTick(function(){t.call(null,r,n)})
|
||
case 4:return e.nextTick(function(){t.call(null,r,n,i)})
|
||
default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a]
|
||
return e.nextTick(function(){t.apply(null,o)})}}:t.exports=e.nextTick}).call(this,e("_process"))},{_process:124}],541:[function(e,t,r){(function(r){"use strict"
|
||
var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("is-promise")
|
||
n="function"==typeof setImediate?setImediate:"object"===(void 0===r?"undefined":i(r))&&r&&r.nextTick?r.nextTick:function(e){setTimeout(e,0)}
|
||
var a=[]
|
||
function s(e){if(!(this instanceof s))return"function"==typeof e?new s(e):(r=new s(function(e){t=e}),{resolver:t,promise:r})
|
||
var t,r,i,u=!1,c=!1,l=[],f=!1
|
||
function h(e){l.length?(f=!0,l.shift()(e||!1)):f=!1}this.then=function(e,t){return new s(function(r){l.push(function(o){var a=c?e:t
|
||
if("function"==typeof a){var s=function(){var e
|
||
try{e=a(i)}catch(e){return r.reject(e),h()}r.fulfill(e),h(!0)}
|
||
o?s():n(s)}else c?(r.fulfill(i),h(o)):(r.reject(i),h(o))}),u&&!f&&h()})},function(){function t(e){u||(u=!0,c=!1,i=e,h())}for(var r={fulfill:function e(r){u||(o(r)?r.then(e,t):(u=c=!0,i=r,h()))},reject:t},n=0;n<a.length;n++)a[n](this,r)
|
||
if("function"==typeof e)try{e(r)}catch(e){r.reject(e)}}()}t.exports=s,s.use=function(e){a.push(e)}}).call(this,e("_process"))},{_process:124,"is-promise":380}],542:[function(e,t,r){"use strict"
|
||
var n=function(e,t){return function(){var r=Array.prototype.slice.call(arguments),n=r.length-1,i=r&&r.length>0?r[n]:null
|
||
return("function"==typeof i?i:null)?e.apply(t,r):new Promise(function(n,i){r.push(function(e,t){if(e)return i(e)
|
||
n(t)}),e.apply(t,r)})}}
|
||
void 0===t&&(t={}),t.exports=function(e,t){t=t||{}
|
||
var r=Object.prototype.toString.call(e)
|
||
if("[object Object]"===r||"[object Array]"===r){var i=t.replace?e:{}
|
||
for(var o in e)e.hasOwnProperty(o)&&(i[o]=n(e[o]))
|
||
return i}return n(e,t.context||e)},void 0===r&&((void 0).promisify=t.exports)},{}],543:[function(e,t,r){"use strict"
|
||
var n=e("./parse"),i=e("./stringify")
|
||
t.exports=n,t.exports.parse=n,t.exports.stringify=i},{"./parse":544,"./stringify":545}],544:[function(e,t,r){"use strict"
|
||
var n=e("./tokenize"),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(e){for(var t={};e.length;)switch(e[0]){case"[":case",":e.shift()
|
||
var r=e.shift()
|
||
if("("===r&&(r=e.shift(),e.shift()),"="!==e[0])throw new Error("Unexpected token in field options: "+e[0])
|
||
if(e.shift(),"]"===e[0])throw new Error("Unexpected ] in field option")
|
||
t[r]=e.shift()
|
||
break
|
||
case"]":return e.shift(),t
|
||
default:throw new Error("Unexpected token in field options: "+e[0])}throw new Error("No closing tag for field options")},a=function(e){for(var t={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift())
|
||
break
|
||
case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])throw new Error("Unexpected token in map type: "+e[0])
|
||
if(e.shift(),t.map.from=e.shift(),","!==e[0])throw new Error("Unexpected token in map type: "+e[0])
|
||
if(e.shift(),t.map.to=e.shift(),">"!==e[0])throw new Error("Unexpected token in map type: "+e[0])
|
||
e.shift(),t.name=e.shift()
|
||
break
|
||
case"repeated":case"required":case"optional":var r=e.shift()
|
||
t.required="required"===r,t.repeated="repeated"===r,t.type=e.shift(),t.name=e.shift()
|
||
break
|
||
case"[":t.options=o(e)
|
||
break
|
||
case";":if(null===t.name)throw new Error("Missing field name")
|
||
if(null===t.type)throw new Error("Missing type in message field: "+t.name)
|
||
if(-1===t.tag)throw new Error("Missing tag number in message field: "+t.name)
|
||
return e.shift(),t
|
||
default:throw new Error("Unexpected token in message field: "+e[0])}throw new Error("No ; found for message field")},s=function(e){for(var t={enums:[],messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(a(e))
|
||
break
|
||
case"enum":t.enums.push(p(e))
|
||
break
|
||
case"message":t.messages.push(l(e))
|
||
break
|
||
case"extensions":t.extensions=c(e)
|
||
break
|
||
case"oneof":e.shift()
|
||
var r=e.shift()
|
||
if("{"!==e[0])throw new Error("Unexpected token in oneof: "+e[0])
|
||
for(e.shift();"}"!==e[0];){e.unshift("optional")
|
||
var n=a(e)
|
||
n.oneof=r,t.fields.push(n)}e.shift()
|
||
break
|
||
case"extend":t.extends.push(u(e))
|
||
break
|
||
case";":e.shift()
|
||
break
|
||
case"reserved":case"option":for(e.shift();";"!==e[0];)e.shift()
|
||
break
|
||
default:e.unshift("optional"),t.fields.push(a(e))}return t},u=function(e){return{name:e[1],message:l(e)}},c=function(e){e.shift()
|
||
var t=Number(e.shift())
|
||
if(isNaN(t))throw new Error("Invalid from in extensions definition")
|
||
if("to"!==e.shift())throw new Error("Expected keyword 'to' in extensions definition")
|
||
var r=e.shift()
|
||
if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition")
|
||
if(";"!==e.shift())throw new Error("Missing ; in extensions definition")
|
||
return{from:t,to:r}},l=function(e){e.shift()
|
||
var t=1,r=[],n={name:e.shift(),enums:[],extends:[],messages:[],fields:[]}
|
||
if("{"!==e[0])throw new Error("Expected { but found "+e[0])
|
||
for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)return e.shift(),r=s(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n
|
||
r.push(e.shift())}if(t)throw new Error("No closing tag for message")},f=function(e){e.shift()
|
||
var t=e.shift()
|
||
if(";"!==e[0])throw new Error("Expected ; but found "+e[0])
|
||
return e.shift(),t},h=function(e){if(e.shift(),"="!==e[0])throw new Error("Expected = but found "+e[0])
|
||
e.shift()
|
||
var t=e.shift()
|
||
switch(t){case'"proto2"':t=2
|
||
break
|
||
case'"proto3"':t=3
|
||
break
|
||
default:throw new Error("Expected protobuf syntax version but found "+t)}if(";"!==e[0])throw new Error("Expected ; but found "+e[0])
|
||
return e.shift(),t},d=function(e){if(e.length<4)throw new Error("Invalid enum value: "+e.slice(0,3).join(" "))
|
||
if("="!==e[1])throw new Error("Expected = but found "+e[1])
|
||
if(";"!==e[3]&&"["!==e[3])throw new Error("Expected ; or [ but found "+e[1])
|
||
var t=e.shift()
|
||
e.shift()
|
||
var r={value:null,options:{}}
|
||
return r.value=Number(e.shift()),"["===e[0]&&(r.options=o(e)),e.shift(),{name:t,val:r}},p=function(e){e.shift()
|
||
var t={},r={name:e.shift(),values:{},options:{}}
|
||
if("{"!==e[0])throw new Error("Expected { but found "+e[0])
|
||
for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),r
|
||
if("option"!==e[0]){var n=d(e)
|
||
r.values[n.name]=n.val}else t=m(e),r.options[t.name]=t.value}throw new Error("No closing tag for enum")},m=function(e){for(var t=null,r=null,n=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")};e.length;){if(";"===e[0])return e.shift(),{name:t,value:r}
|
||
switch(e[0]){case"option":e.shift()
|
||
var i="("===e[0]
|
||
if(i&&e.shift(),t=e.shift(),i){if(")"!==e[0])throw new Error("Expected ) but found "+e[0])
|
||
e.shift()}"."===e[0][0]&&(t+=e.shift())
|
||
break
|
||
case"=":if(e.shift(),null===t)throw new Error("Expected key for option with value: "+e[0])
|
||
if(r=n(e.shift()),"optimize_for"===t&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(r))throw new Error("Unexpected value for option optimize_for: "+r)
|
||
"{"===r&&(r=y(e))
|
||
break
|
||
default:throw new Error("Unexpected token in option: "+e[0])}}},y=function e(t){for(var r=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")},n={};t.length;){if("}"===t[0])return t.shift(),n
|
||
var i="("===t[0]
|
||
i&&t.shift()
|
||
var o=t.shift()
|
||
if(i){if(")"!==t[0])throw new Error("Expected ) but found "+t[0])
|
||
t.shift()}var a=null
|
||
switch(t[0]){case":":if(void 0!==n[o])throw new Error("Duplicate option map key "+o)
|
||
t.shift(),"{"===(a=r(t.shift()))&&(a=e(t)),n[o]=a,";"===t[0]&&t.shift()
|
||
break
|
||
case"{":if(t.shift(),a=e(t),void 0===n[o]&&(n[o]=[]),!Array.isArray(n[o]))throw new Error("Duplicate option map key "+o)
|
||
n[o].push(a)
|
||
break
|
||
default:throw new Error("Unexpected token in option map: "+t[0])}}throw new Error("No closing tag for option map")},g=function(e){e.shift()
|
||
var t=e.shift().replace(/^"+|"+$/gm,"")
|
||
if(";"!==e[0])throw new Error("Unexpected token: "+e[0]+'. Expected ";"')
|
||
return e.shift(),t},b=function(e){e.shift()
|
||
var t={name:e.shift(),methods:[],options:{}}
|
||
if("{"!==e[0])throw new Error("Expected { but found "+e[0])
|
||
for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t
|
||
switch(e[0]){case"option":var r=m(e)
|
||
if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name)
|
||
t.options[r.name]=r.value
|
||
break
|
||
case"rpc":t.methods.push(v(e))
|
||
break
|
||
default:throw new Error("Unexpected token in service: "+e[0])}}throw new Error("No closing tag for service")},v=function(e){e.shift()
|
||
var t={name:e.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}}
|
||
if("("!==e[0])throw new Error("Expected ( but found "+e[0])
|
||
if(e.shift(),"stream"===e[0]&&(e.shift(),t.client_streaming=!0),t.input_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0])
|
||
if(e.shift(),"returns"!==e[0])throw new Error("Expected returns but found "+e[0])
|
||
if(e.shift(),"("!==e[0])throw new Error("Expected ( but found "+e[0])
|
||
if(e.shift(),"stream"===e[0]&&(e.shift(),t.server_streaming=!0),t.output_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0])
|
||
if(e.shift(),";"===e[0])return e.shift(),t
|
||
if("{"!==e[0])throw new Error("Expected { but found "+e[0])
|
||
for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t
|
||
if("option"!==e[0])throw new Error("Unexpected token in rpc options: "+e[0])
|
||
var r=m(e)
|
||
if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name)
|
||
t.options[r.name]=r.value}throw new Error("No closing tag for rpc")}
|
||
t.exports=function(e){for(var t=n(e.toString()),r=0;r<t.length;r++){var o
|
||
if(/^("|')([^'"]*)$/.test(t[r]))for(o=1===t[r].length?r+1:r;o<t.length;o++)if(/^([^'"]*)("|')$/.test(t[o])){t=t.slice(0,r).concat(t.slice(r,o+1).join("")).concat(t.slice(o+1))
|
||
break}}for(var a={syntax:3,package:null,imports:[],enums:[],messages:[],options:{},extends:[]},s=!0;t.length;){switch(t[0]){case"package":a.package=f(t)
|
||
break
|
||
case"syntax":if(!s)throw new Error("Protobuf syntax version should be first thing in file")
|
||
a.syntax=h(t)
|
||
break
|
||
case"message":a.messages.push(l(t))
|
||
break
|
||
case"enum":a.enums.push(p(t))
|
||
break
|
||
case"option":var c=m(t)
|
||
if(a.options[c.name])throw new Error("Duplicate option "+c.name)
|
||
a.options[c.name]=c.value
|
||
break
|
||
case"import":a.imports.push(g(t))
|
||
break
|
||
case"extend":a.extends.push(u(t))
|
||
break
|
||
case"service":a.services||(a.services=[]),a.services.push(b(t))
|
||
break
|
||
default:throw new Error("Unexpected token: "+t[0])}s=!1}return a.extends.forEach(function(e){a.messages.forEach(function(t){t.name===e.name&&e.message.fields.forEach(function(e){if(!t.extensions||e.tag<t.extensions.from||e.tag>t.extensions.to)throw new Error(t.name+" does not declare "+e.tag+" as an extension number")
|
||
t.fields.push(e)})})}),a.messages.forEach(function(e){e.fields.forEach(function(t){var r,n,o,s
|
||
if(t.options&&"true"===t.options.packed&&-1===i.indexOf(t.type)){if(-1===t.type.indexOf(".")){if(e.enums&&e.enums.some(function(e){return e.name===t.type}))return}else{if((r=t.type.split(".")).length>2)throw new Error("what is this?")
|
||
if(n=r[0],o=r[1],a.messages.some(function(e){if(e.name===n)return s=e,e}),s&&s.enums&&s.enums.some(function(e){return e.name===o}))return}throw new Error("Fields of type "+t.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}})}),a}},{"./tokenize":546}],545:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(e,t){var r=e.repeated?"repeated":e.required?"required":"optional"
|
||
"map"===e.type&&(r="map<"+e.map.from+","+e.map.to+">"),e.oneof&&(r="")
|
||
var n=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",")
|
||
return n&&(n=" ["+n+"]"),t.push((r?r+" ":"")+("map"===e.map?"":e.type+" ")+e.name+" = "+e.tag+n+";"),t},o=function(e,t){t.push("enum "+e.name+" {"),e.options||(e.options={})
|
||
var r=s(e.options,[])
|
||
return r.length>1&&t.push(r.slice(0,-1)),Object.keys(e.values).map(function(r){var n=a(e.values[r])
|
||
t.push([r+" = "+n+";"])}),t.push("}",""),t},a=function(e,t){var r=Object.keys(e.options||{}).map(function(t){return t+" = "+e.options[t]}).join(",")
|
||
return r&&(r=" ["+r+"]"),e.value+r},s=function(e,t){var r=Object.keys(e)
|
||
return r.forEach(function(r){var i=e[r]
|
||
~r.indexOf(".")&&(r="("+r+")")
|
||
var o=void 0===i?"undefined":n(i)
|
||
"object"===o?(i=u(i,[])).length&&t.push("option "+r+" = {",i,"};"):("string"===o&&"optimize_for"!==r&&(i='"'+i+'"'),t.push("option "+r+" = "+i+";"))}),r.length>0&&t.push(""),t},u=function e(t,r){return Object.keys(t).forEach(function(i){var o=t[i],a=void 0===o?"undefined":n(o)
|
||
"object"===a?Array.isArray(o)?o.forEach(function(t){(t=e(t,[])).length&&r.push(i+" {",t,"}")}):(o=e(o,[])).length&&r.push(i+" {",o,"}"):("string"===a&&(o='"'+o+'"'),r.push(i+": "+o))}),r},c=function(e,t){var r="rpc "+e.name+"("
|
||
e.client_streaming&&(r+="stream "),r+=e.input_type+") returns (",e.server_streaming&&(r+="stream "),r+=e.output_type+")",e.options||(e.options={})
|
||
var n=s(e.options,[])
|
||
return n.length>1?t.push(r+" {",n.slice(0,-1),"}"):t.push(r+";"),t}
|
||
t.exports=function(e){var t=[]
|
||
return t.push('syntax = "proto'+e.syntax+'";',""),e.package&&t.push("package "+e.package+";",""),e.options||(e.options={}),s(e.options,t),e.enums||(e.enums=[]),e.enums.forEach(function(e){o(e,t)}),e.messages||(e.messages=[]),e.messages.forEach(function(e){(function e(t,r){r.push("message "+t.name+" {"),t.enums||(t.enums=[]),t.enums.forEach(function(e){r.push(o(e,[]))}),t.messages||(t.messages=[]),t.messages.forEach(function(t){r.push(e(t,[]))})
|
||
var n={}
|
||
return t.fields||(t.fields=[]),t.fields.forEach(function(e){e.oneof?(n[e.oneof]||(n[e.oneof]=[]),n[e.oneof].push(i(e,[]))):r.push(i(e,[]))}),Object.keys(n).forEach(function(e){n[e].unshift("oneof "+e+" {"),n[e].push("}"),r.push(n[e])}),r.push("}",""),r})(e,t)}),e.services&&e.services.forEach(function(e){(function(e,t){t.push("service "+e.name+" {"),e.options||(e.options={}),s(e.options,t),e.methods||(e.methods=[]),e.methods.forEach(function(e){t.push(c(e,[]))}),t.push("}","")})(e,t)}),t.map(function e(t){return function(r){return Array.isArray(r)?r.map(e(t+" ")).join("\n"):t+r}}("")).join("\n")}},{}],546:[function(e,t,r){"use strict"
|
||
t.exports=function(e){var t,r=function(e){return e.trim()}
|
||
return e.replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map(function(e){var t=e.indexOf("//")
|
||
return t>-1?e.slice(0,t):e}).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((t=!1,function(e){return"/*"===e?(t=!0,!1):"*/"===e?(t=!1,!1):!t}))}},{}],547:[function(e,t,r){"use strict"
|
||
var n=e("varint"),i=e("./utils").defined
|
||
var o=function(e,t,r){switch(e){case 0:return n.decode(t,r),r+n.decode.bytes
|
||
case 1:return r+8
|
||
case 2:var i=n.decode(t,r)
|
||
return r+n.decode.bytes+i
|
||
case 3:case 4:throw new Error("Groups are not supported")
|
||
case 5:return r+4
|
||
default:throw new Error("Unknown wire type: "+e)}},a=function(e,t){if(e.map)return{}
|
||
if(e.repeated)return[]
|
||
switch(e.type){case"string":return null!=t?t:""
|
||
case"bool":return"true"===t
|
||
case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(t||0,10)
|
||
default:return null}}
|
||
t.exports=function(e,t,r){for(var s=[],u={},c=[],l=[],f=0;f<r.length;f++){var h=e.fields[f]
|
||
u[h.tag]=f
|
||
var d=h.options&&h.options.default,p=t(h.type,e.id,!1)
|
||
l[f]=[d,p&&p.values],e.fields[f].packed=h.repeated&&h.options&&h.options.packed&&"false"!==h.options.packed,h.required&&s.push(h.name),h.oneof&&c.push(h.name)}function m(e,t,r,i,o,a){var s=t.name
|
||
if(t.oneof)for(var u=Object.keys(r),l=0;l<u.length;l++)c.indexOf(u[l])>-1&&delete r[u[l]]
|
||
if(e.message){var f=n.decode(i,o)
|
||
o+=n.decode.bytes
|
||
var h=e.decode(i,o,o+f)
|
||
t.map?(r[s]=r[s]||{},r[s][h.key]=h.value):t.repeated?(r[s]=r[s]||[],r[s].push(h)):r[s]=h}else t.repeated?(r[s]=r[s]||[],r[s].push(e.decode(i,o))):r[s]=e.decode(i,o)
|
||
return o+=e.decode.bytes}return function t(f,h,d){if(null==h&&(h=0),null==d&&(d=f.length),!(d<=f.length&&h<=f.length))throw new Error("Decoded message is not valid")
|
||
for(var p,y=h,g={};;){if(d<=h){var b,v,_="",w=0
|
||
for(w=0;w<s.length;w++)if(_=s[w],!i(g[_]))throw new Error("Decoded message is not valid, missing required field: "+_)
|
||
for(w=0;w<r.length;w++)if(p=e.fields[w],v=l[w][0],b=l[w][1],_=p.name,!i(g[_])){var S=!1
|
||
if(p.oneof)for(var E=Object.keys(g),k=0;k<E.length;k++)if(c.indexOf(E[k])>-1){S=!0
|
||
break}S||(b?p.repeated?g[_]=[]:(v=v&&b[v]?b[v].value:b[Object.keys(b)[0]].value,g[_]=parseInt(v||0,10)):g[_]=a(p,v))}return t.bytes=h-y,g}var x=n.decode(f,h)
|
||
h+=n.decode.bytes
|
||
var C=u[x>>3]
|
||
if(null!=C){var A=r[C]
|
||
if((p=e.fields[C]).packed){var T=n.decode(f,h)
|
||
for(T+=h+=n.decode.bytes;h<T;)h=m(A,p,g,f,h)}else h=m(A,p,g,f,h)}else h=o(7&x,f,h)}}}},{"./utils":552,varint:662}],548:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("./utils").defined,i=e("varint")
|
||
t.exports=function(e,t,o,a,s){for(var u=Object.keys(a),c=o.length,l={},f=0;f<c;f++){l[f]={p:i.encode(e.fields[f].tag<<3|2),h:i.encode(e.fields[f].tag<<3|o[f].type)}
|
||
var h=e.fields[f]
|
||
e.fields[f].packed=h.repeated&&h.options&&h.options.packed&&"false"!==h.options.packed}function d(e,t,r,n,o,a){var s=0
|
||
if(!o)for(s=0;s<r.length;s++)e[t++]=r[s]
|
||
return n.message&&(i.encode(n.encodingLength(a),e,t),t+=i.encode.bytes),n.encode(a,e,t),t+n.encode.bytes}return function t(f,h,p){null==p&&(p=0),null==h&&(h=r.allocUnsafe(s(f)))
|
||
var m=p,y=Object.keys(f),g=0,b=!1
|
||
for(g=0;g<u.length;g++){var v=u[g],_=a[g]
|
||
if(y.indexOf(_)>-1){if(b)throw new Error("only one of the properties defined in oneof "+v+" can be set")
|
||
b=!0}}for(g=0;g<c;g++){var w=o[g],S=e.fields[g],E=f[S.name],k=0
|
||
if(n(E)){var x,C=l[g].p,A=l[g].h,T=S.packed
|
||
if(S.map){var I=Object.keys(E)
|
||
for(k=0;k<I.length;k++)I[k]={key:I[k],value:E[I[k]]}
|
||
E=I}if(T){var P=0
|
||
for(k=0;k<E.length;k++)n(E[k])&&(P+=w.encodingLength(E[k]))
|
||
if(P){for(k=0;k<A.length;k++)h[p++]=C[k]
|
||
i.encode(P,h,p),p+=i.encode.bytes}}if(S.repeated)for(k=0;k<E.length;k++)x=E[k],n(x)&&(p=d(h,p,A,w,T,x))
|
||
else p=d(h,p,A,w,T,E)}else if(S.required)throw new Error(S.name+" is required")}return t.bytes=p-m,h}}}).call(this,e("buffer").Buffer)},{"./utils":552,buffer:110,varint:662}],549:[function(e,t,r){"use strict"
|
||
var n=e("./utils").defined,i=e("varint")
|
||
t.exports=function(e,t,r){for(var o=Object.keys(r),a=t.length,s=new Array(a),u=0;u<e.fields.length;u++){s[u]=i.encodingLength(e.fields[u].tag<<3|t[u].type)
|
||
var c=e.fields[u]
|
||
e.fields[u].packed=c.repeated&&c.options&&c.options.packed&&"false"!==c.options.packed}return function(u){var c=0,l=0,f=0
|
||
for(l=0;l<o.length;l++){var h=o[l],d=r[h],p=!1
|
||
for(f=0;f<d.length;f++)if(n(u[d[f]])){if(p)throw new Error("only one of the properties defined in oneof "+h+" can be set")
|
||
p=!0}}for(l=0;l<a;l++){var m,y=t[l],g=e.fields[l],b=u[g.name],v=s[l]
|
||
if(n(b)){if(g.map){var _=Object.keys(b)
|
||
for(f=0;f<_.length;f++)_[f]={key:_[f],value:b[_[f]]}
|
||
b=_}if(g.packed){var w=0
|
||
for(f=0;f<b.length;f++)n(b[f])&&(w+=m=y.encodingLength(b[f]),y.message&&(w+=i.encodingLength(m)))
|
||
w&&(c+=v+w+i.encodingLength(w))}else if(g.repeated)for(f=0;f<b.length;f++)n(b[f])&&(c+=v+(m=y.encodingLength(b[f]))+(y.message?i.encodingLength(m):0))
|
||
else c+=v+(m=y.encodingLength(b))+(y.message?i.encodingLength(m):0)}else if(g.required)throw new Error(g.name+" is required")}return c}}},{"./utils":552,varint:662}],550:[function(e,t,r){"use strict"
|
||
var n,i=e("varint"),o=e("signed-varint"),a=e("safe-buffer").Buffer,s=function(e,t,r,n){return t.bytes=r.bytes=0,{type:e,encode:t,decode:r,encodingLength:n}}
|
||
r.make=s,r.bytes=(n=function(e){return a.isBuffer(e)?e.length:a.byteLength(e)},s(2,function e(t,r,o){var s=o,u=n(t)
|
||
return i.encode(u,r,o),o+=i.encode.bytes,a.isBuffer(t)?t.copy(r,o):r.write(t,o,u),e.bytes=(o+=u)-s,r},function e(t,r){var n=r,o=i.decode(t,r)
|
||
r+=i.decode.bytes
|
||
var a=t.slice(r,r+o)
|
||
return r+=a.length,e.bytes=r-n,a},function(e){var t=n(e)
|
||
return i.encodingLength(t)+t})),r.string=s(2,function e(t,r,n){var o=n,s=a.byteLength(t)
|
||
return i.encode(s,r,n,"utf-8"),n+=i.encode.bytes,r.write(t,n,s),e.bytes=(n+=s)-o,r},function e(t,r){var n=r,o=i.decode(t,r)
|
||
r+=i.decode.bytes
|
||
var a=t.toString("utf-8",r,r+o)
|
||
return e.bytes=(r+=o)-n,a},function(e){var t=a.byteLength(e)
|
||
return i.encodingLength(t)+t}),r.bool=s(0,function e(t,r,n){return r[n]=t?1:0,e.bytes=1,r},function e(t,r){var n=t[r]>0
|
||
return e.bytes=1,n},function(e){return 1}),r.int32=s(0,i.encode,function e(t,r){var n=i.decode(t,r)
|
||
return e.bytes=i.decode.bytes,n>2147483647?n-4294967296:n},function(e){return i.encodingLength(e<0?e+4294967296:e)}),r.int64=s(0,function e(t,r,n){if(t<0){var o=n+9
|
||
for(i.encode(-1*t,r,n),r[n+=i.encode.bytes-1]=128|r[n];n<o-1;)r[++n]=255
|
||
r[o]=1,e.bytes=10}else i.encode(t,r,n),e.bytes=i.encode.bytes
|
||
return r},function e(t,r){var n=i.decode(t,r)
|
||
if(n>=Math.pow(2,63)){for(var o=9;255===t[r+o-1];)o--
|
||
o=o||9
|
||
var s=a.allocUnsafe(o)
|
||
t.copy(s,0,r,r+o),s[o-1]=127&s[o-1],n=-1*i.decode(s,0),e.bytes=10}else e.bytes=i.decode.bytes
|
||
return n},function(e){return e<0?10:i.encodingLength(e)}),r.sint32=r.sint64=s(0,o.encode,o.decode,o.encodingLength),r.uint32=r.uint64=r.enum=r.varint=s(0,i.encode,i.decode,i.encodingLength),r.fixed64=r.sfixed64=s(1,function e(t,r,n){return t.copy(r,n),e.bytes=8,r},function e(t,r){var n=t.slice(r,r+8)
|
||
return e.bytes=8,n},function(e){return 8}),r.double=s(1,function e(t,r,n){return r.writeDoubleLE(t,n),e.bytes=8,r},function e(t,r){var n=t.readDoubleLE(r)
|
||
return e.bytes=8,n},function(e){return 8}),r.fixed32=s(5,function e(t,r,n){return r.writeUInt32LE(t,n),e.bytes=4,r},function e(t,r){var n=t.readUInt32LE(r)
|
||
return e.bytes=4,n},function(e){return 4}),r.sfixed32=s(5,function e(t,r,n){return r.writeInt32LE(t,n),e.bytes=4,r},function e(t,r){var n=t.readInt32LE(r)
|
||
return e.bytes=4,n},function(e){return 4}),r.float=s(5,function e(t,r,n){return r.writeFloatLE(t,n),e.bytes=4,r},function e(t,r){var n=t.readFloatLE(r)
|
||
return e.bytes=4,n},function(e){return 4})},{"safe-buffer":608,"signed-varint":630,varint:662}],551:[function(e,t,r){"use strict"
|
||
var n=e("./encodings"),i=e("./decode"),o=e("./encode"),a=e("./encoding-length"),s=e("varint")
|
||
t.exports=function(e,t){var r={},u={},c={};(function e(t,n){t.enums&&t.enums.forEach(function(t){t.id=n+(n?".":"")+t.name,u[t.id]=t,e(t,t.id)}),t.messages&&t.messages.forEach(function(i){i.id=n+(n?".":"")+i.name,r[i.id]=i,i.fields.forEach(function(e){if(e.map){var i="Map_"+e.map.from+"_"+e.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:e.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:e.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:n+(n?".":"")+i}
|
||
r[o.id]||(r[o.id]=o,t.messages.push(o)),e.type=i,e.repeated=!0}}),e(i,i.id)})})(e,"")
|
||
var l=function(e,t){e.messages.forEach(function(r){t[r.name]=f(r.name,e.id)}),e.enums.forEach(function(e){t[e.name]=function(e){if(!e)return null
|
||
var t={}
|
||
return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(e.values)}),t.type=2,t.message=!0,t.name=e.name
|
||
var r={}
|
||
e.fields.forEach(function(e){e.oneof&&(r[e.oneof]||(r[e.oneof]=[]),r[e.oneof].push(e.name))})
|
||
var n=e.fields.map(function(t){return f(t.type,e.id)}),s=a(e,n,r),u=o(e,f,n,r,s),c=i(e,f,n)
|
||
return u.bytes=c.bytes=0,t.buffer=!0,t.encode=u,t.decode=c,t.encodingLength=s,t},f=function(e,i,o){if(t&&t[e])return t[e]
|
||
if(n[e])return n[e]
|
||
var a,f,h=(i?i+"."+e:e).split(".").map(function(t,r,n){return n.slice(0,r).concat(e).join(".")}).reverse().reduce(function(e,t){return e||r[t]||u[t]},null)
|
||
if(!1===o)return h
|
||
if(!h)throw new Error("Could not resolve "+e)
|
||
return h.values?(a=h,f=Object.keys(a.values||[]).map(function(e){return parseInt(a.values[e].value,10)}),n.make(0,function e(t,r,n){if(!f.length||-1===f.indexOf(t))throw new Error("Invalid enum value: "+t)
|
||
return s.encode(t,r,n),e.bytes=s.encode.bytes,r},function e(t,r){var n=s.decode(t,r)
|
||
if(!f.length||-1===f.indexOf(n))throw new Error("Invalid enum value: "+n)
|
||
return e.bytes=s.decode.bytes,n},s.encodingLength)):c[h.id]||l(h,c[h.id]={})}
|
||
return(e.enums||[]).concat((e.messages||[]).map(function(e){return f(e.id)}))}},{"./decode":547,"./encode":548,"./encoding-length":549,"./encodings":550,varint:662}],552:[function(e,t,r){"use strict"
|
||
r.defined=function(e){return null!==e&&void 0!==e&&("number"!=typeof e||!isNaN(e))}},{}],553:[function(e,t,r){(function(r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("protocol-buffers-schema"),o=e("./compile")
|
||
t.exports=function(e,t){if(t||(t={}),!e)throw new Error("Pass in a .proto string or a protobuf-schema parsed object")
|
||
var a="object"!==(void 0===e?"undefined":n(e))||r.isBuffer(e)?i.parse(e):e,s=function(){var e=this
|
||
o(a,t.encodings||{}).forEach(function(t){e[t.name]=function(e){if(!e)return null
|
||
var t={}
|
||
return Object.keys(e).forEach(function(r){t[r]=e[r].value}),t}(t.values)||t})}
|
||
return s.prototype.toString=function(){return i.stringify(a)},s.prototype.toJSON=function(){return a},new s}}).call(this,{isBuffer:e("../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../ember-browserify/node_modules/is-buffer/index.js":119,"./compile":551,"protocol-buffers-schema":543}],554:[function(e,t,r){(function(r){"use strict"
|
||
"pseudomap"===r.env.npm_package_name&&"test"===r.env.npm_lifecycle_script&&(r.env.TEST_PSEUDOMAP="true"),"function"!=typeof Map||r.env.TEST_PSEUDOMAP?t.exports=e("./pseudomap"):t.exports=Map}).call(this,e("_process"))},{"./pseudomap":555,_process:124}],555:[function(e,t,r){"use strict"
|
||
var n=Object.prototype.hasOwnProperty
|
||
function i(e){if(!(this instanceof i))throw new TypeError("Constructor PseudoMap requires 'new'")
|
||
if(this.clear(),e)if(e instanceof i||"function"==typeof Map&&e instanceof Map)e.forEach(function(e,t){this.set(t,e)},this)
|
||
else{if(!Array.isArray(e))throw new TypeError("invalid argument")
|
||
e.forEach(function(e){this.set(e[0],e[1])},this)}}function o(e,t){return e===t||e!=e&&t!=t}function a(e,t){for(var r=0,i="_"+t,a=i;n.call(e,a);a=i+r++)if(o(e[a].key,t))return e[a]}t.exports=i,i.prototype.forEach=function(e,t){t=t||this,Object.keys(this._data).forEach(function(r){"size"!==r&&e.call(t,this._data[r].value,this._data[r].key)},this)},i.prototype.has=function(e){return!!a(this._data,e)},i.prototype.get=function(e){var t=a(this._data,e)
|
||
return t&&t.value},i.prototype.set=function(e,t){(function(e,t,r){for(var i=0,a="_"+t,s=a;n.call(e,s);s=a+i++)if(o(e[s].key,t))return void(e[s].value=r)
|
||
e.size++,e[s]=new function(e,t,r){this.key=e,this.value=t,this._index=r}(t,r,s)})(this._data,e,t)},i.prototype.delete=function(e){var t=a(this._data,e)
|
||
t&&(delete this._data[t._index],this._data.size--)},i.prototype.clear=function(){var e=Object.create(null)
|
||
e.size=0,Object.defineProperty(this,"_data",{value:e,enumerable:!1,configurable:!0,writable:!1})},Object.defineProperty(i.prototype,"size",{get:function(){return this._data.size},set:function(e){},enumerable:!0,configurable:!0}),i.prototype.values=i.prototype.keys=i.prototype.entries=function(){throw new Error("iterators are not implemented in this version")}},{}],556:[function(e,t,r){"use strict"
|
||
var n=e("./source"),i=e("./sink")
|
||
t.exports=function(){var e=n(),t=i()
|
||
return{source:e,sink:t,resolve:function(r){e.resolve(r.source),t.resolve(r.sink)}}}},{"./sink":558,"./source":559}],557:[function(e,t,r){"use strict"
|
||
r.source=e("./source"),r.through=e("./through"),r.sink=e("./sink"),r.duplex=e("./duplex")},{"./duplex":556,"./sink":558,"./source":559,"./through":560}],558:[function(e,t,r){"use strict"
|
||
t.exports=function(e){var t,r=!1
|
||
Math.random()
|
||
function n(n){if(!n)throw new Error("must be passed a readable")
|
||
t=n,r&&e(t)}return n.resolve=n.ready=n.start=function(i){return r=!0,e=i||e,t&&e(t),n},n}},{}],559:[function(e,t,r){"use strict"
|
||
t.exports=function(){var e,t,r,n,i=function(i,o){e?e(i,o):i?(n=i,r=o):t=o}
|
||
return i.resolve=function(i){if(e)throw new Error("already resolved")
|
||
if(!(e=i))throw new Error("no read cannot resolve!"+e)
|
||
t&&i(null,t),r&&i(n,r)},i.abort=function(e){i.resolve(function(t,r){r(e||!0)})},i}},{}],560:[function(e,t,r){"use strict"
|
||
t.exports=function(){var e,t,r,n,i
|
||
function o(o){return i?i(o):(e=o,function(e,i){t?t(e,i):(n=e,r=i)})}return o.resolve=function(o){if(i)throw new Error("already resolved")
|
||
if(!(i=o))throw new Error("resolve *must* be passed a transform stream")
|
||
e&&(t=i(e),r&&t(n,r))},o}},{}],561:[function(e,t,r){"use strict"
|
||
var n=e("./sources"),i=e("./sinks"),o=e("./throughs")
|
||
for(var a in(r=t.exports=e("./pull")).pull=r,n)r[a]=n[a]
|
||
for(var a in o)r[a]=o[a]
|
||
for(var a in i)r[a]=i[a]},{"./pull":562,"./sinks":567,"./sources":574,"./throughs":583}],562:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
t.exports=function e(t){var r=arguments.length
|
||
if("function"==typeof t&&1===t.length){for(var i=new Array(r),o=0;o<r;o++)i[o]=arguments[o]
|
||
return function(t){if(null==i)throw new TypeError("partial sink should only be called once!")
|
||
var n=i
|
||
switch(i=null,r){case 1:return e(t,n[0])
|
||
case 2:return e(t,n[0],n[1])
|
||
case 3:return e(t,n[0],n[1],n[2])
|
||
case 4:return e(t,n[0],n[1],n[2],n[3])
|
||
default:return n.unshift(t),e.apply(null,n)}}}var a=t
|
||
a&&"function"==typeof a.source&&(a=a.source)
|
||
for(o=1;o<r;o++){var s=arguments[o]
|
||
"function"==typeof s?a=s(a):s&&"object"===(void 0===s?"undefined":n(s))&&(s.sink(a),a=s.source)}return a}},{}],563:[function(e,t,r){"use strict"
|
||
var n=e("./reduce")
|
||
t.exports=function(e){return n(function(e,t){return e.push(t),e},[],e)}},{"./reduce":570}],564:[function(e,t,r){"use strict"
|
||
var n=e("./reduce")
|
||
t.exports=function(e){return n(function(e,t){return e+t},"",e)}},{"./reduce":570}],565:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){var r,n
|
||
function i(o){if(r=o,n)return i.abort();(function i(){for(var o=!0,a=!1;o;)if(a=!1,r(null,function(s,u){if(a=!0,s=s||n){if(o=!1,t)t(!0===s?null:s)
|
||
else if(s&&!0!==s)throw s}else e&&!1===e(u)||n?(o=!1,r(n||!0,t||function(){})):o||i()}),!a)return void(o=!1)})()}return i.abort=function(e,t){if("function"==typeof e&&(t=e,e=!0),n=e||!0,r)return r(n,t||function(){})},i}},{}],566:[function(e,t,r){"use strict"
|
||
function n(e){return e}var i=e("../util/prop"),o=e("./drain")
|
||
t.exports=function(e,t){var r=!1
|
||
return t?e=i(e)||n:(t=e,e=n),o(function(n){if(e(n))return r=!0,t(null,n),!1},function(e){r||t(!0===e?null:e,null)})}},{"../util/prop":590,"./drain":565}],567:[function(e,t,r){"use strict"
|
||
t.exports={drain:e("./drain"),onEnd:e("./on-end"),log:e("./log"),find:e("./find"),reduce:e("./reduce"),collect:e("./collect"),concat:e("./concat")}},{"./collect":563,"./concat":564,"./drain":565,"./find":566,"./log":568,"./on-end":569,"./reduce":570}],568:[function(e,t,r){"use strict"
|
||
var n=e("./drain")
|
||
t.exports=function(e){return n(function(e){console.log(e)},e)}},{"./drain":565}],569:[function(e,t,r){"use strict"
|
||
var n=e("./drain")
|
||
t.exports=function(e){return n(null,e)}},{"./drain":565}],570:[function(e,t,r){"use strict"
|
||
var n=e("./drain")
|
||
t.exports=function(e,t,r){r||(r=t,t=null)
|
||
var i=n(function(r){t=e(t,r)},function(e){r(e,t)})
|
||
return 2===arguments.length?function(e){e(null,function(n,o){if(n)return r(!0===n?null:n)
|
||
t=o,i(e)})}:i}},{"./drain":565}],571:[function(e,t,r){"use strict"
|
||
t.exports=function(e){var t=0
|
||
return e=e||1/0,function(r,n){return r?n&&n(r):t>e?n(!0):void n(null,t++)}}},{}],572:[function(e,t,r){"use strict"
|
||
t.exports=function(){return function(e,t){t(!0)}}},{}],573:[function(e,t,r){"use strict"
|
||
t.exports=function(e){return function(t,r){r(e)}}},{}],574:[function(e,t,r){"use strict"
|
||
t.exports={keys:e("./keys"),once:e("./once"),values:e("./values"),count:e("./count"),infinite:e("./infinite"),empty:e("./empty"),error:e("./error")}},{"./count":571,"./empty":572,"./error":573,"./infinite":575,"./keys":576,"./once":577,"./values":578}],575:[function(e,t,r){"use strict"
|
||
t.exports=function(e){return e=e||Math.random,function(t,r){return t?r&&r(t):r(null,e())}}},{}],576:[function(e,t,r){"use strict"
|
||
var n=e("./values")
|
||
t.exports=function(e){return n(Object.keys(e))}},{"./values":578}],577:[function(e,t,r){"use strict"
|
||
var n=e("../util/abort-cb")
|
||
t.exports=function(e,t){return function(r,i){if(r)return n(i,r,t)
|
||
if(null!=e){var o=e
|
||
e=null,i(null,o)}else i(!0)}}},{"../util/abort-cb":589}],578:[function(e,t,r){"use strict"
|
||
var n=e("../util/abort-cb")
|
||
t.exports=function(e,t){if(!e)return function(e,r){return e?n(r,e,t):r(!0)}
|
||
Array.isArray(e)||(e=Object.keys(e).map(function(t){return e[t]}))
|
||
var r=0
|
||
return function(i,o){if(i)return n(o,i,t)
|
||
r>=e.length?o(!0):o(null,e[r++])}}},{"../util/abort-cb":589}],579:[function(e,t,r){"use strict"
|
||
function n(e){return e}var i=e("../util/prop")
|
||
t.exports=function(e){if(!e)return n
|
||
e=i(e)
|
||
var t,r,o=!1
|
||
return function(n){return function i(a,s){if(r)return s(r)
|
||
a?(r=a,n(a,o?function(e){o?t=s:s(a)}:function(e){s(a)})):n(null,function(n,a){n?s(n):r?s(r):(o=!0,e(a,function(e,n){o=!1,r?(s(r),t(r)):e?i(e,s):s(null,n)}))})}}}},{"../util/prop":590}],580:[function(e,t,r){"use strict"
|
||
var n=e("../util/tester"),i=e("./filter")
|
||
t.exports=function(e){return e=n(e),i(function(t){return!e(t)})}},{"../util/tester":591,"./filter":581}],581:[function(e,t,r){"use strict"
|
||
var n=e("../util/tester")
|
||
t.exports=function(e){return e=n(e),function(t){return function r(n,i){for(var o,a=!0;a;)a=!1,o=!0,t(n,function(t,n){if(!t&&!e(n))return o?a=!0:r(t,i)
|
||
i(t,n)}),o=!1}}}},{"../util/tester":591}],582:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("../sources/values"),o=e("../sources/once")
|
||
t.exports=function(){return function(e){var t
|
||
return function(r,a){function s(){t(null,function(t,r){!0===t?u():t?e(!0,function(e){a(t)}):a(null,r)})}function u(){t=null,e(null,function(e,r){if(e)return a(e)
|
||
Array.isArray(r)||r&&"object"===(void 0===r?"undefined":n(r))?r=i(r):"function"!=typeof r&&(r=o(r)),t=r,s()})}r?t?t(r,function(t){e(t||r,a)}):e(r,a):t?s():u()}}}},{"../sources/once":577,"../sources/values":578}],583:[function(e,t,r){"use strict"
|
||
t.exports={map:e("./map"),asyncMap:e("./async-map"),filter:e("./filter"),filterNot:e("./filter-not"),through:e("./through"),take:e("./take"),unique:e("./unique"),nonUnique:e("./non-unique"),flatten:e("./flatten")}},{"./async-map":579,"./filter":581,"./filter-not":580,"./flatten":582,"./map":584,"./non-unique":585,"./take":586,"./through":587,"./unique":588}],584:[function(e,t,r){"use strict"
|
||
function n(e){return e}var i=e("../util/prop")
|
||
t.exports=function(e){return e?(e=i(e),function(t){return function(r,n){t(r,function(r,i){try{i=r?null:e(i)}catch(e){return t(e,function(){return n(e)})}n(r,i)})}}):n}},{"../util/prop":590}],585:[function(e,t,r){"use strict"
|
||
var n=e("./unique")
|
||
t.exports=function(e){return n(e,!0)}},{"./unique":588}],586:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){var r=(t=t||{}).last||!1,n=!1
|
||
if("number"==typeof e){r=!0
|
||
var i=e
|
||
e=function(){return--i}}return function(t){function i(e){t(!0,function(t){r=!1,e(t||!0)})}return function(o,a){n&&!o?r?i(a):a(n):(n=o)?t(n,a):t(null,function(t,o){(n=n||t)?a(n):e(o)?a(null,o):(n=!0,r?a(null,o):i(a))})}}}},{}],587:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t){var r=!1
|
||
function n(e){!r&&t&&(r=!0,t(!0===e?null:e))}return function(t){return function(r,i){return r&&n(r),t(r,function(t,r){t?n(t):e&&e(r),i(t,r)})}}}},{}],588:[function(e,t,r){"use strict"
|
||
function n(e){return e}var i=e("../util/prop"),o=e("./filter")
|
||
t.exports=function(e,t){e=i(e)||n
|
||
var r={}
|
||
return o(function(n){var i=e(n)
|
||
return r[i]?!!t:(r[i]=!0,!t)})}},{"../util/prop":590,"./filter":581}],589:[function(e,t,r){"use strict"
|
||
t.exports=function(e,t,r){e(t),r&&r(!0===t?null:t)}},{}],590:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
t.exports=function(e){return e&&("string"==typeof e?function(t){return t[e]}:"object"===(void 0===e?"undefined":n(e))&&"function"==typeof e.exec?function(t){var r=e.exec(t)
|
||
return r&&r[0]}:e)}},{}],591:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./prop")
|
||
function o(e){return e}t.exports=function(e){return"object"===(void 0===e?"undefined":n(e))&&"function"==typeof e.test?function(t){return e.test(t)}:i(e)||o}},{"./prop":590}],592:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("once"),i=e("end-of-stream"),o=e("fs"),a=function(){},s=/^v?\.0/.test(r.version),u=function(e){return"function"==typeof e},c=function(e,t,r,c){c=n(c)
|
||
var l=!1
|
||
e.on("close",function(){l=!0}),i(e,{readable:t,writable:r},function(e){if(e)return c(e)
|
||
l=!0,c()})
|
||
var f=!1
|
||
return function(t){if(!l&&!f)return f=!0,function(e){return!!s&&!!o&&(e instanceof(o.ReadStream||a)||e instanceof(o.WriteStream||a))&&u(e.close)}(e)?e.close(a):function(e){return e.setHeader&&u(e.abort)}(e)?e.abort():u(e.destroy)?e.destroy():void c(t||new Error("stream was destroyed"))}},l=function(e){e()},f=function(e,t){return e.pipe(t)}
|
||
t.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||a)&&t.pop()||a
|
||
if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum")
|
||
var n=t.map(function(i,o){var a=o<t.length-1
|
||
return c(i,a,o>0,function(t){e||(e=t),t&&n.forEach(l),a||(n.forEach(l),r(e))})})
|
||
return t.reduce(f)}}).call(this,e("_process"))},{_process:124,"end-of-stream":159,fs:109,once:535}],593:[function(e,t,r){"use strict"
|
||
var n=String.prototype.replace,i=/%20/g
|
||
t.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],594:[function(e,t,r){"use strict"
|
||
var n=e("./stringify"),i=e("./parse"),o=e("./formats")
|
||
t.exports={formats:o,parse:i,stringify:n}},{"./formats":593,"./parse":595,"./stringify":596}],595:[function(e,t,r){"use strict"
|
||
var n=e("./utils"),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,u=[]
|
||
if(s){if(!r.plainObjects&&i.call(Object.prototype,s)&&!r.allowPrototypes)return
|
||
u.push(s)}for(var c=0;null!==(a=o.exec(n))&&c<r.depth;){if(c+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return
|
||
u.push(a[1])}return a&&u.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,i=e.length-1;i>=0;--i){var o,a=e[i]
|
||
if("[]"===a)o=(o=[]).concat(n)
|
||
else{o=r.plainObjects?Object.create(null):{}
|
||
var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(s,10)
|
||
!isNaN(u)&&a!==s&&String(u)===s&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[])[u]=n:o[s]=n}n=o}return n}(u,t,r)}}
|
||
t.exports=function(e,t){var r=t?n.assign({},t):{}
|
||
if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.")
|
||
if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:o.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null===e||void 0===e)return r.plainObjects?Object.create(null):{}
|
||
for(var s="string"==typeof e?function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=n.split(t.delimiter,a),u=0;u<s.length;++u){var c,l,f=s[u],h=f.indexOf("]="),d=-1===h?f.indexOf("="):h+1;-1===d?(c=t.decoder(f,o.decoder),l=t.strictNullHandling?null:""):(c=t.decoder(f.slice(0,d),o.decoder),l=t.decoder(f.slice(d+1),o.decoder)),i.call(r,c)?r[c]=[].concat(r[c]).concat(l):r[c]=l}return r}(e,r):e,u=r.plainObjects?Object.create(null):{},c=Object.keys(s),l=0;l<c.length;++l){var f=c[l],h=a(f,s[f],r)
|
||
u=n.merge(u,h,r)}return n.compact(u)}},{"./utils":597}],596:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("./utils"),o=e("./formats"),a={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Date.prototype.toISOString,u={delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},c=function e(t,r,n,o,a,s,c,l,f,h,d,p){var m=t
|
||
if("function"==typeof c)m=c(r,m)
|
||
else if(m instanceof Date)m=h(m)
|
||
else if(null===m){if(o)return s&&!p?s(r,u.encoder):r
|
||
m=""}if("string"==typeof m||"number"==typeof m||"boolean"==typeof m||i.isBuffer(m))return s?[d(p?r:s(r,u.encoder))+"="+d(s(m,u.encoder))]:[d(r)+"="+d(String(m))]
|
||
var y,g=[]
|
||
if(void 0===m)return g
|
||
if(Array.isArray(c))y=c
|
||
else{var b=Object.keys(m)
|
||
y=l?b.sort(l):b}for(var v=0;v<y.length;++v){var _=y[v]
|
||
a&&null===m[_]||(g=Array.isArray(m)?g.concat(e(m[_],n(r,_),n,o,a,s,c,l,f,h,d,p)):g.concat(e(m[_],r+(f?"."+_:"["+_+"]"),n,o,a,s,c,l,f,h,d,p)))}return g}
|
||
t.exports=function(e,t){var r=e,s=t?i.assign({},t):{}
|
||
if(null!==s.encoder&&void 0!==s.encoder&&"function"!=typeof s.encoder)throw new TypeError("Encoder has to be a function.")
|
||
var l=void 0===s.delimiter?u.delimiter:s.delimiter,f="boolean"==typeof s.strictNullHandling?s.strictNullHandling:u.strictNullHandling,h="boolean"==typeof s.skipNulls?s.skipNulls:u.skipNulls,d="boolean"==typeof s.encode?s.encode:u.encode,p="function"==typeof s.encoder?s.encoder:u.encoder,m="function"==typeof s.sort?s.sort:null,y=void 0!==s.allowDots&&s.allowDots,g="function"==typeof s.serializeDate?s.serializeDate:u.serializeDate,b="boolean"==typeof s.encodeValuesOnly?s.encodeValuesOnly:u.encodeValuesOnly
|
||
if(void 0===s.format)s.format=o.default
|
||
else if(!Object.prototype.hasOwnProperty.call(o.formatters,s.format))throw new TypeError("Unknown format option provided.")
|
||
var v,_,w=o.formatters[s.format]
|
||
"function"==typeof s.filter?r=(_=s.filter)("",r):Array.isArray(s.filter)&&(v=_=s.filter)
|
||
var S,E=[]
|
||
if("object"!==(void 0===r?"undefined":n(r))||null===r)return""
|
||
S=s.arrayFormat in a?s.arrayFormat:"indices"in s?s.indices?"indices":"repeat":"indices"
|
||
var k=a[S]
|
||
v||(v=Object.keys(r)),m&&v.sort(m)
|
||
for(var x=0;x<v.length;++x){var C=v[x]
|
||
h&&null===r[C]||(E=E.concat(c(r[C],C,k,f,h,d?p:null,_,m,y,g,w,b)))}var A=E.join(l),T=!0===s.addQueryPrefix?"?":""
|
||
return A.length>0?T+A:""}},{"./formats":593,"./utils":597}],597:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=Object.prototype.hasOwnProperty,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase())
|
||
return e}()
|
||
r.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n])
|
||
return r},r.merge=function(e,t,o){if(!t)return e
|
||
if("object"!==(void 0===t?"undefined":n(t))){if(Array.isArray(e))e.push(t)
|
||
else{if("object"!==(void 0===e?"undefined":n(e)))return[e,t];(o.plainObjects||o.allowPrototypes||!i.call(Object.prototype,t))&&(e[t]=!0)}return e}if("object"!==(void 0===e?"undefined":n(e)))return[e].concat(t)
|
||
var a=e
|
||
return Array.isArray(e)&&!Array.isArray(t)&&(a=r.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(t)?(t.forEach(function(t,a){i.call(e,a)?e[a]&&"object"===n(e[a])?e[a]=r.merge(e[a],t,o):e.push(t):e[a]=t}),e):Object.keys(t).reduce(function(e,n){var a=t[n]
|
||
return i.call(e,n)?e[n]=r.merge(e[n],a,o):e[n]=a,e},a)},r.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},r.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},r.encode=function(e){if(0===e.length)return e
|
||
for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var i=t.charCodeAt(n)
|
||
45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?r+=t.charAt(n):i<128?r+=o[i]:i<2048?r+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?r+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(n+=1,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),r+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return r},r.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],i=0;i<t.length;++i)for(var o=t[i],a=o.obj[o.prop],s=Object.keys(a),u=0;u<s.length;++u){var c=s[u],l=a[c]
|
||
"object"===(void 0===l?"undefined":n(l))&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:c}),r.push(l))}return function(e){for(var t;e.length;){var r=e.pop()
|
||
if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],i=0;i<t.length;++i)void 0!==t[i]&&n.push(t[i])
|
||
r.obj[r.prop]=n}}return t}(t)},r.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},r.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}],598:[function(e,t,r){"use strict"
|
||
var n=Object.keys||function(e){var t=[]
|
||
for(var r in e)t.push(r)
|
||
return t}
|
||
t.exports=f
|
||
var i=e("process-nextick-args"),o=e("core-util-is")
|
||
o.inherits=e("inherits")
|
||
var a=e("./_stream_readable"),s=e("./_stream_writable")
|
||
o.inherits(f,a)
|
||
for(var u=n(s.prototype),c=0;c<u.length;c++){var l=u[c]
|
||
f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e)
|
||
a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||i(d,this)}function d(e){e.end()}},{"./_stream_readable":600,"./_stream_writable":602,"core-util-is":82,inherits:220,"process-nextick-args":540}],599:[function(e,t,r){"use strict"
|
||
t.exports=o
|
||
var n=e("./_stream_transform"),i=e("core-util-is")
|
||
function o(e){if(!(this instanceof o))return new o(e)
|
||
n.call(this,e)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":601,"core-util-is":82,inherits:220}],600:[function(e,t,r){(function(r){"use strict"
|
||
t.exports=y
|
||
var n,i=e("process-nextick-args"),o=e("isarray")
|
||
y.ReadableState=m
|
||
e("events").EventEmitter
|
||
var a,s=function(e,t){return e.listeners(t).length};(function(){try{a=e("stream")}catch(e){}finally{a||(a=e("events").EventEmitter)}})()
|
||
var u=e("buffer").Buffer,c=e("buffer-shims"),l=e("core-util-is")
|
||
l.inherits=e("inherits")
|
||
var f=e("util"),h=void 0
|
||
h=f&&f.debuglog?f.debuglog("stream"):function(){}
|
||
var d,p=e("./internal/streams/BufferList")
|
||
function m(t,r){n=n||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode)
|
||
var i=t.highWaterMark,o=this.objectMode?16:16384
|
||
this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=e("string_decoder/").StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function y(t){if(n=n||e("./_stream_duplex"),!(this instanceof y))return new y(t)
|
||
this._readableState=new m(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),a.call(this)}function g(e,t,r,n,o){var a=function(e,t){var r=null
|
||
u.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"))
|
||
return r}(t,r)
|
||
if(a)e.emit("error",a)
|
||
else if(null===r)t.reading=!1,function(e,t){if(t.ended)return
|
||
if(t.decoder){var r=t.decoder.end()
|
||
r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,_(e)}(e,t)
|
||
else if(t.objectMode||r&&r.length>0)if(t.ended&&!o){var s=new Error("stream.push() after EOF")
|
||
e.emit("error",s)}else if(t.endEmitted&&o){var c=new Error("stream.unshift() after end event")
|
||
e.emit("error",c)}else{var l
|
||
!t.decoder||o||n||(r=t.decoder.write(r),l=!t.objectMode&&0===r.length),o||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&_(e))),function(e,t){t.readingMore||(t.readingMore=!0,i(S,e,t))}(e,t)}else o||(t.reading=!1)
|
||
return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}l.inherits(y,a),y.prototype.push=function(e,t){var r=this._readableState
|
||
return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),g(this,r,e,t,!1)},y.prototype.unshift=function(e){return g(this,this._readableState,e,"",!0)},y.prototype.isPaused=function(){return!1===this._readableState.flowing},y.prototype.setEncoding=function(t){return d||(d=e("string_decoder/").StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this}
|
||
var b=8388608
|
||
function v(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=b?e=b:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState
|
||
t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i(w,e):w(e))}function w(e){h("emit readable"),e.emit("readable"),x(e)}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length
|
||
t.readingMore=!1}function E(e){h("readable nexttick read 0"),e.read(0)}function k(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState
|
||
for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n
|
||
e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data
|
||
e-=i.length
|
||
for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e
|
||
if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a))
|
||
break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1
|
||
n.data.copy(r),e-=n.data.length
|
||
for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e
|
||
if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a))
|
||
break}++i}return t.length-=i,r}(e,t)
|
||
return n}(e,t.buffer,t.decoder),r)
|
||
var r}function A(e){var t=e._readableState
|
||
if(t.length>0)throw new Error('"endReadable()" called on non-empty stream')
|
||
t.endEmitted||(t.ended=!0,i(T,t,e))}function T(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r
|
||
return-1}y.prototype.read=function(e){h("read",e),e=parseInt(e,10)
|
||
var t=this._readableState,r=e
|
||
if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?A(this):_(this),null
|
||
if(0===(e=v(e,t))&&t.ended)return 0===t.length&&A(this),null
|
||
var n,i=t.needReadable
|
||
return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",i=!0),t.ended||t.reading?h("reading or ended",i=!1):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=v(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&A(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var n=this,a=this._readableState
|
||
switch(a.pipesCount){case 0:a.pipes=e
|
||
break
|
||
case 1:a.pipes=[a.pipes,e]
|
||
break
|
||
default:a.pipes.push(e)}a.pipesCount+=1,h("pipe count=%d opts=%j",a.pipesCount,t)
|
||
var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:p
|
||
function c(e){h("onunpipe"),e===n&&p()}function l(){h("onend"),e.end()}a.endEmitted?i(u):n.once("end",u),e.on("unpipe",c)
|
||
var f=function(e){return function(){var t=e._readableState
|
||
h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,x(e))}}(n)
|
||
e.on("drain",f)
|
||
var d=!1
|
||
function p(){h("cleanup"),e.removeListener("close",b),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",g),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",p),n.removeListener("data",y),d=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}var m=!1
|
||
function y(t){h("ondata"),m=!1,!1!==e.write(t)||m||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==I(a.pipes,e))&&!d&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,m=!0),n.pause())}function g(t){h("onerror",t),_(),e.removeListener("error",g),0===s(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",v),_()}function v(){h("onfinish"),e.removeListener("close",b),_()}function _(){h("unpipe"),n.unpipe(e)}return n.on("data",y),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r)
|
||
e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",b),e.once("finish",v),e.emit("pipe",n),a.flowing||(h("pipe resume"),n.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState
|
||
if(0===t.pipesCount)return this
|
||
if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this)
|
||
if(!e){var r=t.pipes,n=t.pipesCount
|
||
t.pipes=null,t.pipesCount=0,t.flowing=!1
|
||
for(var i=0;i<n;i++)r[i].emit("unpipe",this)
|
||
return this}var o=I(t.pipes,e)
|
||
return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},y.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t)
|
||
if("data"===e)!1!==this._readableState.flowing&&this.resume()
|
||
else if("readable"===e){var n=this._readableState
|
||
n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&_(this):i(E,this))}return r},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var e=this._readableState
|
||
return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i(k,e,t))}(this,e)),this},y.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this
|
||
for(var i in e.on("end",function(){if(h("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end()
|
||
e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){(h("wrapped data"),t.decoder&&(i=t.decoder.write(i)),!t.objectMode||null!==i&&void 0!==i)&&((t.objectMode||i&&i.length)&&(n.push(i)||(r=!0,e.pause())))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i))
|
||
return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){h("wrapped _read",t),r&&(r=!1,e.resume())},n},y._fromList=C}).call(this,e("_process"))},{"./_stream_duplex":598,"./internal/streams/BufferList":603,_process:124,buffer:110,"buffer-shims":75,"core-util-is":82,events:114,inherits:220,isarray:382,"process-nextick-args":540,"string_decoder/":650,util:109}],601:[function(e,t,r){"use strict"
|
||
t.exports=a
|
||
var n=e("./_stream_duplex"),i=e("core-util-is")
|
||
function o(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState
|
||
n.transforming=!1
|
||
var i=n.writecb
|
||
if(!i)return e.emit("error",new Error("no writecb in Transform class"))
|
||
n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r)
|
||
i(t)
|
||
var o=e._readableState
|
||
o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function a(e){if(!(this instanceof a))return new a(e)
|
||
n.call(this,e),this._transformState=new o(this)
|
||
var t=this
|
||
this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(t)})}function s(e,t,r){if(t)return e.emit("error",t)
|
||
null!==r&&void 0!==r&&e.push(r)
|
||
var n=e._writableState,i=e._transformState
|
||
if(n.length)throw new Error("Calling transform done when ws.length != 0")
|
||
if(i.transforming)throw new Error("Calling transform done when still transforming")
|
||
return e.push(null)}i.inherits=e("inherits"),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState
|
||
if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState
|
||
null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},{"./_stream_duplex":598,"core-util-is":82,inherits:220}],602:[function(e,t,r){(function(r){"use strict"
|
||
t.exports=p
|
||
var n,i=e("process-nextick-args"),o=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i
|
||
p.WritableState=d
|
||
var a=e("core-util-is")
|
||
a.inherits=e("inherits")
|
||
var s,u={deprecate:e("util-deprecate")};(function(){try{s=e("stream")}catch(e){}finally{s||(s=e("events").EventEmitter)}})()
|
||
var c,l=e("buffer").Buffer,f=e("buffer-shims")
|
||
function h(){}function d(t,r){n=n||e("./_stream_duplex"),t=t||{},this.objectMode=!!t.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode)
|
||
var a=t.highWaterMark,s=this.objectMode?16:16384
|
||
this.highWaterMark=a||0===a?a:s,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1
|
||
var u=!1===t.decodeStrings
|
||
this.decodeStrings=!u,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,a=r.writecb
|
||
if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)(function(e,t,r,n,o){--t.pendingcb,r?i(o,n):o(n)
|
||
e._writableState.errorEmitted=!0,e.emit("error",n)})(e,r,n,t,a)
|
||
else{var s=b(r)
|
||
s||r.corked||r.bufferProcessing||!r.bufferedRequest||g(e,r),n?o(y,e,r,s,a):y(e,r,s,a)}})(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}function p(t){if(n=n||e("./_stream_duplex"),!(c.call(p,this)||this instanceof n))return new p(t)
|
||
this._writableState=new d(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),s.call(this)}function m(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function y(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),_(e,t)}function g(e,t){t.bufferProcessing=!0
|
||
var r=t.bufferedRequest
|
||
if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree
|
||
o.entry=r
|
||
for(var a=0;r;)i[a]=r,r=r.next,a+=1
|
||
m(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new w(t)}else{for(;r;){var s=r.chunk,u=r.encoding,c=r.callback
|
||
if(m(e,t,!1,t.objectMode?1:s.length,s,u,c),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function _(e,t){var r=b(t)
|
||
return r&&(0===t.pendingcb?(v(e,t),t.finished=!0,e.emit("finish")):v(e,t)),r}function w(e){var t=this
|
||
this.next=null,this.entry=null,this.finish=function(r){var n=t.entry
|
||
for(t.entry=null;n;){var i=n.callback
|
||
e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}a.inherits(p,s),d.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next
|
||
return t},function(){try{Object.defineProperty(d.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(p,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||e&&e._writableState instanceof d}})):c=function(e){return e instanceof this},p.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},p.prototype.write=function(e,t,r){var n=this._writableState,o=!1
|
||
return"function"==typeof t&&(r=t,t=null),l.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=h),n.ended?function(e,t){var r=new Error("write after end")
|
||
e.emit("error",r),i(t,r)}(this,r):function(e,t,r,n){var o=!0,a=!1
|
||
return null===r?a=new TypeError("May not write null values to stream"):l.isBuffer(r)||"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i(n,a),o=!1),o}(this,n,e,r)&&(n.pendingcb++,o=function(e,t,r,n,i){r=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r)),t}(t,r,n),l.isBuffer(r)&&(n="buffer")
|
||
var o=t.objectMode?1:r.length
|
||
t.length+=o
|
||
var a=t.length<t.highWaterMark
|
||
a||(t.needDrain=!0)
|
||
if(t.writing||t.corked){var s=t.lastBufferedRequest
|
||
t.lastBufferedRequest=new function(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}(r,n,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,o,r,n,i)
|
||
return a}(this,n,e,t,r)),o},p.prototype.cork=function(){this._writableState.corked++},p.prototype.uncork=function(){var e=this._writableState
|
||
e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},p.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e)
|
||
return this._writableState.defaultEncoding=e,this},p.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},p.prototype._writev=null,p.prototype.end=function(e,t,r){var n=this._writableState
|
||
"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?i(r):e.once("finish",r))
|
||
t.ended=!0,e.writable=!1}(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":598,_process:124,buffer:110,"buffer-shims":75,"core-util-is":82,events:114,inherits:220,"process-nextick-args":540,"util-deprecate":659}],603:[function(e,t,r){"use strict"
|
||
e("buffer").Buffer
|
||
var n=e("buffer-shims")
|
||
function i(){this.head=null,this.tail=null,this.length=0}t.exports=i,i.prototype.push=function(e){var t={data:e,next:null}
|
||
this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},i.prototype.unshift=function(e){var t={data:e,next:this.head}
|
||
0===this.length&&(this.tail=t),this.head=t,++this.length},i.prototype.shift=function(){if(0!==this.length){var e=this.head.data
|
||
return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},i.prototype.clear=function(){this.head=this.tail=null,this.length=0},i.prototype.join=function(e){if(0===this.length)return""
|
||
for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data
|
||
return r},i.prototype.concat=function(e){if(0===this.length)return n.alloc(0)
|
||
if(1===this.length)return this.head.data
|
||
for(var t=n.allocUnsafe(e>>>0),r=this.head,i=0;r;)r.data.copy(t,i),i+=r.data.length,r=r.next
|
||
return t}},{buffer:110,"buffer-shims":75}],604:[function(e,t,r){(function(n){"use strict"
|
||
var i=function(){try{return e("stream")}catch(e){}}();(r=t.exports=e("./lib/_stream_readable.js")).Stream=i||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":598,"./lib/_stream_passthrough.js":599,"./lib/_stream_readable.js":600,"./lib/_stream_transform.js":601,"./lib/_stream_writable.js":602,_process:124}],605:[function(e,t,r){"use strict"
|
||
t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":601}],606:[function(e,t,r){"use strict"
|
||
var n=e("buffer").Buffer,i=e("inherits"),o=e("hash-base"),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0]
|
||
function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t)
|
||
for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,_=0|this._a,w=0|this._b,S=0|this._c,E=0|this._d,k=0|this._e,x=0;x<80;x+=1){var C,A
|
||
x<16?(C=m(r,n,i,o,d,e[s[x]],f[0],c[x]),A=v(_,w,S,E,k,e[u[x]],h[0],l[x])):x<32?(C=y(r,n,i,o,d,e[s[x]],f[1],c[x]),A=b(_,w,S,E,k,e[u[x]],h[1],l[x])):x<48?(C=g(r,n,i,o,d,e[s[x]],f[2],c[x]),A=g(_,w,S,E,k,e[u[x]],h[2],l[x])):x<64?(C=b(r,n,i,o,d,e[s[x]],f[3],c[x]),A=y(_,w,S,E,k,e[u[x]],h[3],l[x])):(C=v(r,n,i,o,d,e[s[x]],f[4],c[x]),A=m(_,w,S,E,k,e[u[x]],h[4],l[x])),r=d,d=o,o=p(i,10),i=n,n=C,_=k,k=E,E=p(S,10),S=w,w=A}var T=this._b+i+E|0
|
||
this._b=this._c+o+k|0,this._c=this._d+d+_|0,this._d=this._e+r+w|0,this._e=this._a+n+S|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update()
|
||
var e=n.alloc?n.alloc(20):new n(20)
|
||
return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=d},{buffer:110,"hash-base":607,inherits:220}],607:[function(e,t,r){arguments[4][461][0].apply(r,arguments)},{dup:461,inherits:220,"safe-buffer":608,stream:144}],608:[function(e,t,r){arguments[4][143][0].apply(r,arguments)},{buffer:110,dup:143}],609:[function(e,t,r){"use strict";(function(e){var n=2147483647
|
||
function i(e){var t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,l=new Array(64)
|
||
function f(e){for(var f=0,h=e.length;h>=64;){var d,p,m,y,g,b=r,v=n,_=i,w=o,S=a,E=s,k=u,x=c
|
||
for(p=0;p<16;p++)m=f+4*p,l[p]=(255&e[m])<<24|(255&e[m+1])<<16|(255&e[m+2])<<8|255&e[m+3]
|
||
for(p=16;p<64;p++)y=((d=l[p-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,g=((d=l[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,l[p]=(y+l[p-7]|0)+(g+l[p-16]|0)|0
|
||
for(p=0;p<64;p++)y=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&E^~S&k)|0)+(x+(t[p]+l[p]|0)|0)|0,g=((b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10))+(b&v^b&_^v&_)|0,x=k,k=E,E=S,S=w+y|0,w=_,_=v,v=b,b=y+g|0
|
||
r=r+b|0,n=n+v|0,i=i+_|0,o=o+w|0,a=a+S|0,s=s+E|0,u=u+k|0,c=c+x|0,f+=64,h-=64}}f(e)
|
||
var h,d=e.length%64,p=e.length/536870912|0,m=e.length<<3,y=d<56?56:120,g=e.slice(e.length-d,e.length)
|
||
for(g.push(128),h=d+1;h<y;h++)g.push(0)
|
||
return g.push(p>>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(m>>>24&255),g.push(m>>>16&255),g.push(m>>>8&255),g.push(m>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function o(e,t,r){var n
|
||
e=e.length<=64?e:i(e)
|
||
var o=64+t.length+4,a=new Array(o),s=new Array(64),u=[]
|
||
for(n=0;n<64;n++)a[n]=54
|
||
for(n=0;n<e.length;n++)a[n]^=e[n]
|
||
for(n=0;n<t.length;n++)a[64+n]=t[n]
|
||
for(n=o-4;n<o;n++)a[n]=0
|
||
for(n=0;n<64;n++)s[n]=92
|
||
for(n=0;n<e.length;n++)s[n]^=e[n]
|
||
function c(){for(var e=o-1;e>=o-4;e--){if(a[e]++,a[e]<=255)return
|
||
a[e]=0}}for(;r>=32;)c(),u=u.concat(i(s.concat(i(a)))),r-=32
|
||
return r>0&&(c(),u=u.concat(i(s.concat(i(a))).slice(0,r))),u}function a(e,t,r,n,i){var o
|
||
for(l(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)c(e,16*o,i,16),u(i,n),l(i,0,e,t+16*o,16)
|
||
for(o=0;o<r;o++)l(e,t+2*o*16,e,16*o,16)
|
||
for(o=0;o<r;o++)l(e,t+16*(2*o+1),e,16*(o+r),16)}function s(e,t){return e<<t|e>>>32-t}function u(e,t){l(e,0,t,0,16)
|
||
for(var r=8;r>0;r-=2){t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9)
|
||
t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18)}for(r=0;r<16;++r)e[r]+=t[r]}function c(e,t,r,n){for(var i=0;i<n;i++)r[i]^=e[t+i]}function l(e,t,r,n,i){for(;i--;)r[n++]=e[t++]}function f(e){if(!e||"number"!=typeof e.length)return!1
|
||
for(var t=0;t<e.length;t++){if("number"!=typeof e[t])return!1
|
||
var r=parseInt(e[t])
|
||
if(r!=e[t]||r<0||r>=256)return!1}return!0}function h(e,t){var r=parseInt(e)
|
||
if(e!=r)throw new Error("invalid "+t)
|
||
return r}function d(e,t,r,i,s,u,d){if(!d)throw new Error("missing callback")
|
||
if(r=h(r,"N"),i=h(i,"r"),s=h(s,"p"),u=h(u,"dkLen"),0===r||0!=(r&r-1))throw new Error("N must be power of 2")
|
||
if(r>n/128/i)throw new Error("N too large")
|
||
if(i>n/128/s)throw new Error("r too large")
|
||
if(!f(e))throw new Error("password must be an array or buffer")
|
||
if(!f(t))throw new Error("salt must be an array or buffer")
|
||
for(var p=o(e,t,128*s*i),m=new Uint32Array(32*s*i),y=0;y<m.length;y++){var g=4*y
|
||
m[y]=(255&p[g+3])<<24|(255&p[g+2])<<16|(255&p[g+1])<<8|(255&p[g+0])<<0}var b,v,_=new Uint32Array(64*i),w=new Uint32Array(32*i*r),S=32*i,E=new Uint32Array(16),k=new Uint32Array(16),x=s*r*2,C=0,A=null,T=!1,I=0,P=0,M=parseInt(1e3/i),R="undefined"!=typeof setImmediate?setImmediate:setTimeout;(function t(){if(T)return d(new Error("cancelled"),C/x)
|
||
switch(I){case 0:l(m,v=32*P*i,_,0,S),I=1,b=0
|
||
case 1:(f=r-b)>M&&(f=M)
|
||
for(var n=0;n<f;n++)l(_,0,w,(b+n)*S,S),a(_,S,i,E,k)
|
||
if(b+=f,C+=f,(h=parseInt(1e3*C/x))!==A){if(T=d(null,C/x))break
|
||
A=h}if(b<r)break
|
||
b=0,I=2
|
||
case 2:var f,h
|
||
for((f=r-b)>M&&(f=M),n=0;n<f;n++){var y=_[16*(2*i-1)]&r-1
|
||
c(w,y*S,_,S),a(_,S,i,E,k)}if(b+=f,C+=f,(h=parseInt(1e3*C/x))!==A){if(T=d(null,C/x))break
|
||
A=h}if(b<r)break
|
||
if(l(_,0,m,v,S),++P<s){I=0
|
||
break}for(p=[],n=0;n<m.length;n++)p.push(m[n]>>0&255),p.push(m[n]>>8&255),p.push(m[n]>>16&255),p.push(m[n]>>24&255)
|
||
var g=o(e,p,u)
|
||
return d(null,1,g)}R(t)})()}void 0!==r?t.exports=d:"function"==typeof define&&define.amd?define(d):e&&(e.scrypt&&(e._scrypt=e.scrypt),e.scrypt=d)})(void 0)},{}],610:[function(e,t,r){"use strict"
|
||
t.exports=e("./lib")(e("./lib/js"))},{"./lib":613,"./lib/js":619}],611:[function(e,t,r){(function(e){"use strict"
|
||
var t=Object.prototype.toString
|
||
r.isArray=function(e,t){if(!Array.isArray(e))throw TypeError(t)},r.isBoolean=function(e,r){if("[object Boolean]"!==t.call(e))throw TypeError(r)},r.isBuffer=function(t,r){if(!e.isBuffer(t))throw TypeError(r)},r.isFunction=function(e,r){if("[object Function]"!==t.call(e))throw TypeError(r)},r.isNumber=function(e,r){if("[object Number]"!==t.call(e))throw TypeError(r)},r.isObject=function(e,r){if("[object Object]"!==t.call(e))throw TypeError(r)},r.isBufferLength=function(e,t,r){if(e.length!==t)throw RangeError(r)},r.isBufferLength2=function(e,t,r,n){if(e.length!==t&&e.length!==r)throw RangeError(n)},r.isLengthGTZero=function(e,t){if(0===e.length)throw RangeError(t)},r.isNumberInInterval=function(e,t,r,n){if(e<=t||e>=r)throw RangeError(n)}}).call(this,{isBuffer:e("../../ember-browserify/node_modules/is-buffer/index.js")})},{"../../ember-browserify/node_modules/is-buffer/index.js":119}],612:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("bip66"),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])
|
||
r.privateKeyExport=function(e,t,r){var i=n.from(r?o:a)
|
||
return e.copy(i,r?8:9),t.copy(i,r?181:214),i},r.privateKeyImport=function(e){var t=e.length,r=0
|
||
if(!(t<r+1||48!==e[r])&&!(t<(r+=1)+1)&&128&e[r]){var n=127&e[r]
|
||
if(r+=1,!(n<1||n>2||t<r+n)){var i=e[r+n-1]|(n>1?e[r+n-2]<<8:0)
|
||
if(!(t<(r+=n)+i||t<r+3||2!==e[r]||1!==e[r+1]||1!==e[r+2]||t<(r+=3)+2||4!==e[r]||e[r+1]>32||t<r+2+e[r+1]))return e.slice(r+2,r+2+e[r+1])}}},r.signatureExport=function(e){for(var t=n.concat([n.from([0]),e.r]),r=33,o=0;r>1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var a=n.concat([n.from([0]),e.s]),s=33,u=0;s>1&&0===a[u]&&!(128&a[u+1]);--s,++u);return i.encode(t.slice(o),a.slice(u))},r.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0)
|
||
try{var o=i.decode(e)
|
||
if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long")
|
||
if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},r.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0
|
||
if(48===e[o++]){var a=e[o++]
|
||
if(!(128&a&&(o+=a-128)>i)&&2===e[o++]){var s=e[o++]
|
||
if(128&s){if(o+(a=s-128)>i)return
|
||
for(;a>0&&0===e[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+e[o]}if(!(s>i-o)){var u=o
|
||
if(o+=s,2===e[o++]){var c=e[o++]
|
||
if(128&c){if(o+(a=c-128)>i)return
|
||
for(;a>0&&0===e[o];o+=1,a-=1);for(c=0;a>0;o+=1,a-=1)c=(c<<8)+e[o]}if(!(c>i-o)){var l=o
|
||
for(o+=c;s>0&&0===e[u];s-=1,u+=1);if(!(s>32)){var f=e.slice(u,u+s)
|
||
for(f.copy(t,32-f.length);c>0&&0===e[l];c-=1,l+=1);if(!(c>32)){var h=e.slice(l,l+c)
|
||
return h.copy(r,32-h.length),{r:t,s:r}}}}}}}}}},{bip66:36,"safe-buffer":608}],613:[function(e,t,r){"use strict"
|
||
var n=e("./assert"),i=e("./der"),o=e("./messages.json")
|
||
function a(e,t){return void 0===e?t:(n.isBoolean(e,o.COMPRESSED_TYPE_INVALID),e)}t.exports=function(e){return{privateKeyVerify:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),32===t.length&&e.privateKeyVerify(t)},privateKeyExport:function(t,r){n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0)
|
||
var s=e.privateKeyExport(t,r)
|
||
return i.privateKeyExport(t,s,r)},privateKeyImport:function(t){if(n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),(t=i.privateKeyImport(t))&&32===t.length&&e.privateKeyVerify(t))return t
|
||
throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyNegate(t)},privateKeyModInverse:function(t){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.privateKeyModInverse(t)},privateKeyTweakAdd:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakAdd(t,r)},privateKeyTweakMul:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),e.privateKeyTweakMul(t,r)},publicKeyCreate:function(t,r){return n.isBuffer(t,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(t,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyCreate(t,r)},publicKeyConvert:function(t,r){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=a(r,!0),e.publicKeyConvert(t,r)},publicKeyVerify:function(t){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),e.publicKeyVerify(t)},publicKeyTweakAdd:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=a(i,!0),e.publicKeyTweakAdd(t,r,i)},publicKeyTweakMul:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=a(i,!0),e.publicKeyTweakMul(t,r,i)},publicKeyCombine:function(t,r){n.isArray(t,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(t,o.EC_PUBLIC_KEYS_LENGTH_INVALID)
|
||
for(var i=0;i<t.length;++i)n.isBuffer(t[i],o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t[i],33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID)
|
||
return r=a(r,!0),e.publicKeyCombine(t,r)},signatureNormalize:function(t){return n.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(t,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),e.signatureNormalize(t)},signatureExport:function(t){n.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(t,64,o.ECDSA_SIGNATURE_LENGTH_INVALID)
|
||
var r=e.signatureExport(t)
|
||
return i.signatureExport(r)},signatureImport:function(t){n.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(t,o.ECDSA_SIGNATURE_LENGTH_INVALID)
|
||
var r=i.signatureImport(t)
|
||
if(r)return e.signatureImport(r)
|
||
throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},signatureImportLax:function(t){n.isBuffer(t,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(t,o.ECDSA_SIGNATURE_LENGTH_INVALID)
|
||
var r=i.signatureImportLax(t)
|
||
if(r)return e.signatureImport(r)
|
||
throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},sign:function(t,r,i){n.isBuffer(t,o.MSG32_TYPE_INVALID),n.isBufferLength(t,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID)
|
||
var a=null,s=null
|
||
return void 0!==i&&(n.isObject(i,o.OPTIONS_TYPE_INVALID),void 0!==i.data&&(n.isBuffer(i.data,o.OPTIONS_DATA_TYPE_INVALID),n.isBufferLength(i.data,32,o.OPTIONS_DATA_LENGTH_INVALID),a=i.data),void 0!==i.noncefn&&(n.isFunction(i.noncefn,o.OPTIONS_NONCEFN_TYPE_INVALID),s=i.noncefn)),e.sign(t,r,s,a)},verify:function(t,r,i){return n.isBuffer(t,o.MSG32_TYPE_INVALID),n.isBufferLength(t,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),n.isBuffer(i,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(i,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),e.verify(t,r,i)},recover:function(t,r,i,s){return n.isBuffer(t,o.MSG32_TYPE_INVALID),n.isBufferLength(t,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),n.isNumber(i,o.RECOVERY_ID_TYPE_INVALID),n.isNumberInInterval(i,-1,4,o.RECOVERY_ID_VALUE_INVALID),s=a(s,!0),e.recover(t,r,i,s)},ecdh:function(t,r){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),e.ecdh(t,r)},ecdhUnsafe:function(t,r,i){return n.isBuffer(t,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(t,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),i=a(i,!0),e.ecdhUnsafe(t,r,i)}}}},{"./assert":611,"./der":612,"./messages.json":620}],614:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("./optimized")
|
||
function o(){this.negative=0,this.words=null,this.length=0}o.fromNumber=function(e){var t=new o
|
||
return t.words=[67108863&e],t.length=1,t},o.fromBuffer=function(e){var t=new o
|
||
return t.words=new Array(10),t.words[0]=(3&e[28])<<24|e[29]<<16|e[30]<<8|e[31],t.words[1]=(15&e[25])<<22|e[26]<<14|e[27]<<6|e[28]>>>2,t.words[2]=(63&e[22])<<20|e[23]<<12|e[24]<<4|e[25]>>>4,t.words[3]=(255&e[19])<<18|e[20]<<10|e[21]<<2|e[22]>>>6,t.words[4]=(3&e[15])<<24|e[16]<<16|e[17]<<8|e[18],t.words[5]=(15&e[12])<<22|e[13]<<14|e[14]<<6|e[15]>>>2,t.words[6]=(63&e[9])<<20|e[10]<<12|e[11]<<4|e[12]>>>4,t.words[7]=(255&e[6])<<18|e[7]<<10|e[8]<<2|e[9]>>>6,t.words[8]=(3&e[2])<<24|e[3]<<16|e[4]<<8|e[5],t.words[9]=e[0]<<14|e[1]<<6|e[2]>>>2,t.length=10,t.strip()},o.prototype.toBuffer=function(){for(var e=this.words,t=this.length;t<10;++t)e[t]=0
|
||
return n.from([e[9]>>>14&255,e[9]>>>6&255,(63&e[9])<<2|e[8]>>>24&3,e[8]>>>16&255,e[8]>>>8&255,255&e[8],e[7]>>>18&255,e[7]>>>10&255,e[7]>>>2&255,(3&e[7])<<6|e[6]>>>20&63,e[6]>>>12&255,e[6]>>>4&255,(15&e[6])<<4|e[5]>>>22&15,e[5]>>>14&255,e[5]>>>6&255,(63&e[5])<<2|e[4]>>>24&3,e[4]>>>16&255,e[4]>>>8&255,255&e[4],e[3]>>>18&255,e[3]>>>10&255,e[3]>>>2&255,(3&e[3])<<6|e[2]>>>20&63,e[2]>>>12&255,e[2]>>>4&255,(15&e[2])<<4|e[1]>>>22&15,e[1]>>>14&255,e[1]>>>6&255,(63&e[1])<<2|e[0]>>>24&3,e[0]>>>16&255,e[0]>>>8&255,255&e[0]])},o.prototype.clone=function(){var e=new o
|
||
e.words=new Array(this.length)
|
||
for(var t=0;t<this.length;t++)e.words[t]=this.words[t]
|
||
return e.length=this.length,e.negative=this.negative,e},o.prototype.strip=function(){for(;this.length>1&&0==(0|this.words[this.length-1]);)this.length--
|
||
return this},o.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.ucmp=function(e){if(this.length!==e.length)return this.length>e.length?1:-1
|
||
for(var t=this.length-1;t>=0;--t)if(this.words[t]!==e.words[t])return this.words[t]>e.words[t]?1:-1
|
||
return 0},o.prototype.gtOne=function(){return this.length>1||this.words[0]>1},o.prototype.isOverflow=function(){return this.ucmp(o.n)>=0},o.prototype.isHigh=function(){return 1===this.ucmp(o.nh)},o.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},o.prototype.iuaddn=function(e){this.words[0]+=e
|
||
for(var t=0;this.words[t]>67108863&&t<this.length;++t)this.words[t]-=67108864,this.words[t+1]+=1
|
||
return t===this.length&&(this.words[t]=1,this.length+=1),this},o.prototype.iadd=function(e){if(this.negative!==e.negative)return 0!==this.negative?(this.negative=0,this.isub(e),this.negative^=1):(e.negative=0,this.isub(e),e.negative=1),this.normSign()
|
||
var t,r
|
||
this.length>e.length?(t=this,r=e):(t=e,r=this)
|
||
for(var n=0,i=0;n<r.length;++n){var o=t.words[n]+r.words[n]+i
|
||
this.words[n]=67108863&o,i=o>>>26}for(;0!==i&&n<t.length;++n)o=t.words[n]+i,this.words[n]=67108863&o,i=o>>>26
|
||
if(this.length=t.length,0!==i)this.words[this.length++]=i
|
||
else if(t!==this)for(;n<t.length;++n)this.words[n]=t.words[n]
|
||
return this},o.prototype.add=function(e){return this.clone().iadd(e)},o.prototype.isub=function(e){if(this.negative!==e.negative)return 0!==this.negative?(this.negative=0,this.iadd(e),this.negative=1):(e.negative=0,this.iadd(e),e.negative=1),this.normSign()
|
||
var t,r,n=this.ucmp(e)
|
||
if(0===n)return this.negative=0,this.words[0]=0,this.length=1,this
|
||
n>0?(t=this,r=e):(t=e,r=this)
|
||
for(var i=0,o=0;i<r.length;++i){var a=t.words[i]-r.words[i]+o
|
||
o=a>>26,this.words[i]=67108863&a}for(;0!==o&&i<t.length;++i)o=(a=t.words[i]+o)>>26,this.words[i]=67108863&a
|
||
if(0===o&&i<t.length&&t!==this)for(;i<t.length;++i)this.words[i]=t.words[i]
|
||
return this.length=Math.max(this.length,i),t!==this&&(this.negative^=1),this.strip().normSign()},o.prototype.sub=function(e){return this.clone().isub(e)},o.umulTo=function(e,t,r){r.length=e.length+t.length-1
|
||
var n=e.words[0]*t.words[0],i=n/67108864|0
|
||
r.words[0]=67108863&n
|
||
for(var o=1,a=r.length;o<a;o++){for(var s=i>>>26,u=67108863&i,c=Math.max(0,o-e.length+1),l=Math.min(o,t.length-1);c<=l;c++){var f=o-c,h=e.words[f]*t.words[c]+u
|
||
s+=h/67108864|0,u=67108863&h}r.words[o]=u,i=s}return 0!==i&&(r.words[r.length++]=i),r.strip()},o.umulTo10x10=Math.imul?i.umulTo10x10:o.umulTo,o.umulnTo=function(e,t,r){if(0===t)return r.words=[0],r.length=1,r
|
||
for(var n=0,i=0;n<e.length;++n){var o=e.words[n]*t+i
|
||
r.words[n]=67108863&o,i=o/67108864|0}return i>0?(r.words[n]=i,r.length=e.length+1):r.length=e.length,r},o.prototype.umul=function(e){var t=new o
|
||
return t.words=new Array(this.length+e.length),10===this.length&&10===e.length?o.umulTo10x10(this,e,t):1===this.length?o.umulnTo(e,this.words[0],t):1===e.length?o.umulnTo(this,e.words[0],t):o.umulTo(this,e,t)},o.prototype.isplit=function(e){e.length=Math.min(this.length,9)
|
||
for(var t=0;t<e.length;++t)e.words[t]=this.words[t]
|
||
if(this.length<=9)return this.words[0]=0,this.length=1,this
|
||
var r=this.words[9]
|
||
for(e.words[e.length++]=4194303&r,t=10;t<this.length;++t){var n=this.words[t]
|
||
this.words[t-10]=(4194303&n)<<4|r>>>22,r=n}return r>>>=22,this.words[t-10]=r,0===r&&this.length>10?this.length-=10:this.length-=9,this},o.prototype.fireduce=function(){return this.isOverflow()&&this.isub(o.n),this},o.prototype.ureduce=function(){var e=this.clone().isplit(o.tmp).umul(o.nc).iadd(o.tmp)
|
||
return e.bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)).bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)),e.fireduce()},o.prototype.ishrn=function(e){for(var t=(1<<e)-1,r=26-e,n=this.length-1,i=0;n>=0;--n){var o=this.words[n]
|
||
this.words[n]=i<<r|o>>>e,i=o&t}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},o.prototype.uinvm=function(){for(var e=this.clone(),t=o.n.clone(),r=o.fromNumber(1),n=o.fromNumber(0),i=o.fromNumber(0),a=o.fromNumber(1);e.isEven()&&t.isEven();){for(var s=1,u=1;0==(e.words[0]&u)&&0==(t.words[0]&u)&&s<26;++s,u<<=1);e.ishrn(s),t.ishrn(s)}for(var c=t.clone(),l=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.ishrn(f);f-- >0;)(r.isOdd()||n.isOdd())&&(r.iadd(c),n.isub(l)),r.ishrn(1),n.ishrn(1)
|
||
for(var d=0,p=1;0==(t.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(t.ishrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(l)),i.ishrn(1),a.ishrn(1)
|
||
e.ucmp(t)>=0?(e.isub(t),r.isub(i),n.isub(a)):(t.isub(e),i.isub(r),a.isub(n))}if(1===i.negative){i.negative=0
|
||
var m=i.ureduce()
|
||
return m.negative^=1,m.normSign().iadd(o.n)}return i.ureduce()},o.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2
|
||
for(var e=0,t=0;e<this.length;++e){var r=0|this.words[e]
|
||
t+=977*r,this.words[e]=67108863&t,t=64*r+(t/67108864|0)}return 0===this.words[this.length-1]&&(this.length-=1,0===this.words[this.length-1]&&(this.length-=1)),this},o.prototype.redIReduce=function(){this.isplit(o.tmp).imulK().iadd(o.tmp),this.bitLengthGT256()&&this.isplit(o.tmp).imulK().iadd(o.tmp)
|
||
var e=this.ucmp(o.p)
|
||
return 0===e?(this.words[0]=0,this.length=1):e>0?this.isub(o.p):this.strip(),this}
|
||
o.prototype.redNeg=function(){return this.isZero()?o.fromNumber(0):o.p.sub(this)},o.prototype.redAdd=function(e){return this.clone().redIAdd(e)},o.prototype.redIAdd=function(e){return this.iadd(e),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redSub=function(e){return this.clone().redISub(e)},o.prototype.redISub=function(e){return this.isub(e),0!==this.negative&&this.iadd(o.p),this},o.prototype.redMul=function(e){return this.umul(e).redIReduce()},o.prototype.redSqr=function(){return this.umul(this).redIReduce()},o.prototype.redSqrt=function(){if(this.isZero())return this.clone()
|
||
for(var e=this.redSqr(),t=e.redSqr(),r=t.redSqr().redMul(t),n=r.redMul(e),i=n.redMul(this),o=i,a=0;a<54;++a)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i)
|
||
for(o=o.redSqr().redSqr().redSqr().redSqr().redMul(n),a=0;a<5;++a)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i)
|
||
return 0===(o=(o=o.redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().ucmp(this)?o:null},o.prototype.redInvm=function(){for(var e,t=this.clone(),r=o.p.clone(),n=o.fromNumber(1),i=o.fromNumber(0);t.gtOne()&&r.gtOne();){for(var a=0,s=1;0==(t.words[0]&s)&&a<26;++a,s<<=1);if(a>0)for(t.ishrn(a);a-- >0;)n.isOdd()&&n.iadd(o.p),n.ishrn(1)
|
||
for(var u=0,c=1;0==(r.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(r.ishrn(u);u-- >0;)i.isOdd()&&i.iadd(o.p),i.ishrn(1)
|
||
t.ucmp(r)>=0?(t.isub(r),n.isub(i)):(r.isub(t),i.isub(n))}return 0!==(e=1===t.length&&1===t.words[0]?n:i).negative&&e.iadd(o.p),0!==e.negative?(e.negative=0,e.redIReduce().redNeg()):e.redIReduce()},o.prototype.getNAF=function(e){for(var t=[],r=1<<e+1,n=r-1,i=r>>1,o=this.clone();!o.isZero();){for(var a=0,s=1;0==(o.words[0]&s)&&a<26;++a,s<<=1)t.push(0)
|
||
if(0!==a)o.ishrn(a)
|
||
else{var u=o.words[0]&n
|
||
if(u>=i)t.push(i-u),o.iuaddn(u-i).ishrn(1)
|
||
else if(t.push(u),o.words[0]-=u,!o.isZero()){for(a=e-1;a>0;--a)t.push(0)
|
||
o.ishrn(e)}}}return t},o.prototype.inspect=function(){if(this.isZero())return"0"
|
||
for(var e=this.toBuffer().toString("hex"),t=0;"0"===e[t];++t);return e.slice(t)},o.n=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),o.nh=o.n.clone().ishrn(1),o.nc=o.fromBuffer(n.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),o.p=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),o.psn=o.p.sub(o.n),o.tmp=new o,o.tmp.words=new Array(10),o.fromNumber(1).words[3]=0,t.exports=o},{"./optimized":615,"safe-buffer":608}],615:[function(e,t,r){"use strict"
|
||
r.umulTo10x10=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,c=0,l=0|a[0],f=8191&l,h=l>>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,b=y>>>13,v=0|a[3],_=8191&v,w=v>>>13,S=0|a[4],E=8191&S,k=S>>>13,x=0|a[5],C=8191&x,A=x>>>13,T=0|a[6],I=8191&T,P=T>>>13,M=0|a[7],R=8191&M,O=M>>>13,B=0|a[8],N=8191&B,j=B>>>13,L=0|a[9],D=8191&L,U=L>>>13,F=0|s[0],z=8191&F,q=F>>>13,V=0|s[1],H=8191&V,K=V>>>13,W=0|s[2],G=8191&W,Y=W>>>13,Q=0|s[3],X=8191&Q,$=Q>>>13,J=0|s[4],Z=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,he=le>>>13,de=0|s[9],pe=8191&de,me=de>>>13
|
||
r.length=19,n=Math.imul(f,z),i=Math.imul(f,q)
|
||
var ye=c+n+((8191&(i+=Math.imul(h,z)))<<13)
|
||
c=(o=Math.imul(h,q))+(i>>>13)+(ye>>>26),ye&=67108863,n=Math.imul(p,z),i=Math.imul(p,q),i+=Math.imul(m,z),o=Math.imul(m,q),n+=Math.imul(f,H),i+=Math.imul(f,K)
|
||
var ge=c+n+((8191&(i+=Math.imul(h,H)))<<13)
|
||
c=(o+=Math.imul(h,K))+(i>>>13)+(ge>>>26),ge&=67108863,n=Math.imul(g,z),i=Math.imul(g,q),i+=Math.imul(b,z),o=Math.imul(b,q),n+=Math.imul(p,H),i+=Math.imul(p,K),i+=Math.imul(m,H),o+=Math.imul(m,K),n+=Math.imul(f,G),i+=Math.imul(f,Y)
|
||
var be=c+n+((8191&(i+=Math.imul(h,G)))<<13)
|
||
c=(o+=Math.imul(h,Y))+(i>>>13)+(be>>>26),be&=67108863,n=Math.imul(_,z),i=Math.imul(_,q),i+=Math.imul(w,z),o=Math.imul(w,q),n+=Math.imul(g,H),i+=Math.imul(g,K),i+=Math.imul(b,H),o+=Math.imul(b,K),n+=Math.imul(p,G),i+=Math.imul(p,Y),i+=Math.imul(m,G),o+=Math.imul(m,Y),n+=Math.imul(f,X),i+=Math.imul(f,$)
|
||
var ve=c+n+((8191&(i+=Math.imul(h,X)))<<13)
|
||
c=(o+=Math.imul(h,$))+(i>>>13)+(ve>>>26),ve&=67108863,n=Math.imul(E,z),i=Math.imul(E,q),i+=Math.imul(k,z),o=Math.imul(k,q),n+=Math.imul(_,H),i+=Math.imul(_,K),i+=Math.imul(w,H),o+=Math.imul(w,K),n+=Math.imul(g,G),i+=Math.imul(g,Y),i+=Math.imul(b,G),o+=Math.imul(b,Y),n+=Math.imul(p,X),i+=Math.imul(p,$),i+=Math.imul(m,X),o+=Math.imul(m,$),n+=Math.imul(f,Z),i+=Math.imul(f,ee)
|
||
var _e=c+n+((8191&(i+=Math.imul(h,Z)))<<13)
|
||
c=(o+=Math.imul(h,ee))+(i>>>13)+(_e>>>26),_e&=67108863,n=Math.imul(C,z),i=Math.imul(C,q),i+=Math.imul(A,z),o=Math.imul(A,q),n+=Math.imul(E,H),i+=Math.imul(E,K),i+=Math.imul(k,H),o+=Math.imul(k,K),n+=Math.imul(_,G),i+=Math.imul(_,Y),i+=Math.imul(w,G),o+=Math.imul(w,Y),n+=Math.imul(g,X),i+=Math.imul(g,$),i+=Math.imul(b,X),o+=Math.imul(b,$),n+=Math.imul(p,Z),i+=Math.imul(p,ee),i+=Math.imul(m,Z),o+=Math.imul(m,ee),n+=Math.imul(f,re),i+=Math.imul(f,ne)
|
||
var we=c+n+((8191&(i+=Math.imul(h,re)))<<13)
|
||
c=(o+=Math.imul(h,ne))+(i>>>13)+(we>>>26),we&=67108863,n=Math.imul(I,z),i=Math.imul(I,q),i+=Math.imul(P,z),o=Math.imul(P,q),n+=Math.imul(C,H),i+=Math.imul(C,K),i+=Math.imul(A,H),o+=Math.imul(A,K),n+=Math.imul(E,G),i+=Math.imul(E,Y),i+=Math.imul(k,G),o+=Math.imul(k,Y),n+=Math.imul(_,X),i+=Math.imul(_,$),i+=Math.imul(w,X),o+=Math.imul(w,$),n+=Math.imul(g,Z),i+=Math.imul(g,ee),i+=Math.imul(b,Z),o+=Math.imul(b,ee),n+=Math.imul(p,re),i+=Math.imul(p,ne),i+=Math.imul(m,re),o+=Math.imul(m,ne),n+=Math.imul(f,oe),i+=Math.imul(f,ae)
|
||
var Se=c+n+((8191&(i+=Math.imul(h,oe)))<<13)
|
||
c=(o+=Math.imul(h,ae))+(i>>>13)+(Se>>>26),Se&=67108863,n=Math.imul(R,z),i=Math.imul(R,q),i+=Math.imul(O,z),o=Math.imul(O,q),n+=Math.imul(I,H),i+=Math.imul(I,K),i+=Math.imul(P,H),o+=Math.imul(P,K),n+=Math.imul(C,G),i+=Math.imul(C,Y),i+=Math.imul(A,G),o+=Math.imul(A,Y),n+=Math.imul(E,X),i+=Math.imul(E,$),i+=Math.imul(k,X),o+=Math.imul(k,$),n+=Math.imul(_,Z),i+=Math.imul(_,ee),i+=Math.imul(w,Z),o+=Math.imul(w,ee),n+=Math.imul(g,re),i+=Math.imul(g,ne),i+=Math.imul(b,re),o+=Math.imul(b,ne),n+=Math.imul(p,oe),i+=Math.imul(p,ae),i+=Math.imul(m,oe),o+=Math.imul(m,ae)
|
||
n+=Math.imul(f,ue),i+=Math.imul(f,ce)
|
||
var Ee=c+n+((8191&(i+=Math.imul(h,ue)))<<13)
|
||
c=(o+=Math.imul(h,ce))+(i>>>13)+(Ee>>>26),Ee&=67108863,n=Math.imul(N,z),i=Math.imul(N,q),i+=Math.imul(j,z),o=Math.imul(j,q),n+=Math.imul(R,H),i+=Math.imul(R,K),i+=Math.imul(O,H),o+=Math.imul(O,K),n+=Math.imul(I,G),i+=Math.imul(I,Y),i+=Math.imul(P,G),o+=Math.imul(P,Y),n+=Math.imul(C,X),i+=Math.imul(C,$),i+=Math.imul(A,X),o+=Math.imul(A,$),n+=Math.imul(E,Z),i+=Math.imul(E,ee),i+=Math.imul(k,Z),o+=Math.imul(k,ee),n+=Math.imul(_,re),i+=Math.imul(_,ne),i+=Math.imul(w,re),o+=Math.imul(w,ne),n+=Math.imul(g,oe),i+=Math.imul(g,ae),i+=Math.imul(b,oe),o+=Math.imul(b,ae)
|
||
n+=Math.imul(p,ue),i+=Math.imul(p,ce),i+=Math.imul(m,ue),o+=Math.imul(m,ce),n+=Math.imul(f,fe),i+=Math.imul(f,he)
|
||
var ke=c+n+((8191&(i+=Math.imul(h,fe)))<<13)
|
||
c=(o+=Math.imul(h,he))+(i>>>13)+(ke>>>26),ke&=67108863,n=Math.imul(D,z),i=Math.imul(D,q),i+=Math.imul(U,z),o=Math.imul(U,q),n+=Math.imul(N,H),i+=Math.imul(N,K),i+=Math.imul(j,H),o+=Math.imul(j,K),n+=Math.imul(R,G),i+=Math.imul(R,Y),i+=Math.imul(O,G),o+=Math.imul(O,Y),n+=Math.imul(I,X),i+=Math.imul(I,$),i+=Math.imul(P,X),o+=Math.imul(P,$),n+=Math.imul(C,Z),i+=Math.imul(C,ee),i+=Math.imul(A,Z),o+=Math.imul(A,ee),n+=Math.imul(E,re),i+=Math.imul(E,ne),i+=Math.imul(k,re),o+=Math.imul(k,ne),n+=Math.imul(_,oe),i+=Math.imul(_,ae),i+=Math.imul(w,oe),o+=Math.imul(w,ae)
|
||
n+=Math.imul(g,ue),i+=Math.imul(g,ce),i+=Math.imul(b,ue),o+=Math.imul(b,ce),n+=Math.imul(p,fe),i+=Math.imul(p,he),i+=Math.imul(m,fe),o+=Math.imul(m,he),n+=Math.imul(f,pe),i+=Math.imul(f,me)
|
||
var xe=c+n+((8191&(i+=Math.imul(h,pe)))<<13)
|
||
c=(o+=Math.imul(h,me))+(i>>>13)+(xe>>>26),xe&=67108863,n=Math.imul(D,H),i=Math.imul(D,K),i+=Math.imul(U,H),o=Math.imul(U,K),n+=Math.imul(N,G),i+=Math.imul(N,Y),i+=Math.imul(j,G),o+=Math.imul(j,Y),n+=Math.imul(R,X),i+=Math.imul(R,$),i+=Math.imul(O,X),o+=Math.imul(O,$),n+=Math.imul(I,Z),i+=Math.imul(I,ee),i+=Math.imul(P,Z),o+=Math.imul(P,ee),n+=Math.imul(C,re),i+=Math.imul(C,ne),i+=Math.imul(A,re),o+=Math.imul(A,ne),n+=Math.imul(E,oe),i+=Math.imul(E,ae),i+=Math.imul(k,oe),o+=Math.imul(k,ae),n+=Math.imul(_,ue),i+=Math.imul(_,ce),i+=Math.imul(w,ue),o+=Math.imul(w,ce)
|
||
n+=Math.imul(g,fe),i+=Math.imul(g,he),i+=Math.imul(b,fe),o+=Math.imul(b,he),n+=Math.imul(p,pe),i+=Math.imul(p,me)
|
||
var Ce=c+n+((8191&(i+=Math.imul(m,pe)))<<13)
|
||
c=(o+=Math.imul(m,me))+(i>>>13)+(Ce>>>26),Ce&=67108863,n=Math.imul(D,G),i=Math.imul(D,Y),i+=Math.imul(U,G),o=Math.imul(U,Y),n+=Math.imul(N,X),i+=Math.imul(N,$),i+=Math.imul(j,X),o+=Math.imul(j,$),n+=Math.imul(R,Z),i+=Math.imul(R,ee),i+=Math.imul(O,Z),o+=Math.imul(O,ee),n+=Math.imul(I,re),i+=Math.imul(I,ne),i+=Math.imul(P,re),o+=Math.imul(P,ne),n+=Math.imul(C,oe),i+=Math.imul(C,ae),i+=Math.imul(A,oe),o+=Math.imul(A,ae),n+=Math.imul(E,ue),i+=Math.imul(E,ce),i+=Math.imul(k,ue),o+=Math.imul(k,ce),n+=Math.imul(_,fe),i+=Math.imul(_,he),i+=Math.imul(w,fe),o+=Math.imul(w,he)
|
||
n+=Math.imul(g,pe),i+=Math.imul(g,me)
|
||
var Ae=c+n+((8191&(i+=Math.imul(b,pe)))<<13)
|
||
c=(o+=Math.imul(b,me))+(i>>>13)+(Ae>>>26),Ae&=67108863,n=Math.imul(D,X),i=Math.imul(D,$),i+=Math.imul(U,X),o=Math.imul(U,$),n+=Math.imul(N,Z),i+=Math.imul(N,ee),i+=Math.imul(j,Z),o+=Math.imul(j,ee),n+=Math.imul(R,re),i+=Math.imul(R,ne),i+=Math.imul(O,re),o+=Math.imul(O,ne),n+=Math.imul(I,oe),i+=Math.imul(I,ae),i+=Math.imul(P,oe),o+=Math.imul(P,ae),n+=Math.imul(C,ue),i+=Math.imul(C,ce),i+=Math.imul(A,ue),o+=Math.imul(A,ce),n+=Math.imul(E,fe),i+=Math.imul(E,he),i+=Math.imul(k,fe),o+=Math.imul(k,he),n+=Math.imul(_,pe),i+=Math.imul(_,me)
|
||
var Te=c+n+((8191&(i+=Math.imul(w,pe)))<<13)
|
||
c=(o+=Math.imul(w,me))+(i>>>13)+(Te>>>26),Te&=67108863,n=Math.imul(D,Z),i=Math.imul(D,ee),i+=Math.imul(U,Z),o=Math.imul(U,ee),n+=Math.imul(N,re),i+=Math.imul(N,ne),i+=Math.imul(j,re),o+=Math.imul(j,ne),n+=Math.imul(R,oe),i+=Math.imul(R,ae),i+=Math.imul(O,oe),o+=Math.imul(O,ae),n+=Math.imul(I,ue),i+=Math.imul(I,ce),i+=Math.imul(P,ue),o+=Math.imul(P,ce),n+=Math.imul(C,fe),i+=Math.imul(C,he),i+=Math.imul(A,fe),o+=Math.imul(A,he),n+=Math.imul(E,pe),i+=Math.imul(E,me)
|
||
var Ie=c+n+((8191&(i+=Math.imul(k,pe)))<<13)
|
||
c=(o+=Math.imul(k,me))+(i>>>13)+(Ie>>>26),Ie&=67108863,n=Math.imul(D,re),i=Math.imul(D,ne),i+=Math.imul(U,re),o=Math.imul(U,ne),n+=Math.imul(N,oe),i+=Math.imul(N,ae),i+=Math.imul(j,oe),o+=Math.imul(j,ae),n+=Math.imul(R,ue),i+=Math.imul(R,ce),i+=Math.imul(O,ue),o+=Math.imul(O,ce),n+=Math.imul(I,fe),i+=Math.imul(I,he),i+=Math.imul(P,fe),o+=Math.imul(P,he),n+=Math.imul(C,pe),i+=Math.imul(C,me)
|
||
var Pe=c+n+((8191&(i+=Math.imul(A,pe)))<<13)
|
||
c=(o+=Math.imul(A,me))+(i>>>13)+(Pe>>>26),Pe&=67108863,n=Math.imul(D,oe),i=Math.imul(D,ae),i+=Math.imul(U,oe),o=Math.imul(U,ae),n+=Math.imul(N,ue),i+=Math.imul(N,ce),i+=Math.imul(j,ue),o+=Math.imul(j,ce),n+=Math.imul(R,fe),i+=Math.imul(R,he),i+=Math.imul(O,fe),o+=Math.imul(O,he),n+=Math.imul(I,pe),i+=Math.imul(I,me)
|
||
var Me=c+n+((8191&(i+=Math.imul(P,pe)))<<13)
|
||
c=(o+=Math.imul(P,me))+(i>>>13)+(Me>>>26),Me&=67108863,n=Math.imul(D,ue),i=Math.imul(D,ce),i+=Math.imul(U,ue),o=Math.imul(U,ce),n+=Math.imul(N,fe),i+=Math.imul(N,he),i+=Math.imul(j,fe),o+=Math.imul(j,he),n+=Math.imul(R,pe),i+=Math.imul(R,me)
|
||
var Re=c+n+((8191&(i+=Math.imul(O,pe)))<<13)
|
||
c=(o+=Math.imul(O,me))+(i>>>13)+(Re>>>26),Re&=67108863,n=Math.imul(D,fe),i=Math.imul(D,he),i+=Math.imul(U,fe),o=Math.imul(U,he),n+=Math.imul(N,pe),i+=Math.imul(N,me)
|
||
var Oe=c+n+((8191&(i+=Math.imul(j,pe)))<<13)
|
||
c=(o+=Math.imul(j,me))+(i>>>13)+(Oe>>>26),Oe&=67108863,n=Math.imul(D,pe),i=Math.imul(D,me)
|
||
var Be=c+n+((8191&(i+=Math.imul(U,pe)))<<13)
|
||
return c=(o=Math.imul(U,me))+(i>>>13)+(Be>>>26),Be&=67108863,u[0]=ye,u[1]=ge,u[2]=be,u[3]=ve,u[4]=_e,u[5]=we,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=xe,u[10]=Ce,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Pe,u[15]=Me,u[16]=Re,u[17]=Oe,u[18]=Be,0!==c&&(u[19]=c,r.length++),r}},{}],616:[function(e,t,r){"use strict"
|
||
var n=e("./bn")
|
||
function i(e,t,r){null===e&&null===t&&null===r?(this.x=i.one,this.y=i.one,this.z=i.zero):(this.x=e,this.y=t,this.z=r),this.zOne=this.z===i.one}i.zero=n.fromNumber(0),i.one=n.fromNumber(1),i.prototype.neg=function(){return this.inf?this:new i(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(e){if(this.inf)return e
|
||
if(e.inf)return this
|
||
var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),o=e.x.redMul(r),a=this.y.redMul(t).redMul(e.z),s=e.y.redMul(r).redMul(this.z),u=n.redSub(o),c=a.redSub(s)
|
||
if(u.isZero())return c.isZero()?this.dbl():new i(null,null,null)
|
||
var l=u.redSqr(),f=n.redMul(l),h=l.redMul(u),d=c.redSqr().redIAdd(h).redISub(f).redISub(f)
|
||
return new i(d,c.redMul(f.redISub(d)).redISub(a.redMul(h)),this.z.redMul(e.z).redMul(u))},i.prototype.mixedAdd=function(e){if(this.inf)return e.toECJPoint()
|
||
if(e.inf)return this
|
||
var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),o=this.y,a=e.y.redMul(t).redMul(this.z),s=r.redSub(n),u=o.redSub(a)
|
||
if(s.isZero())return u.isZero()?this.dbl():new i(null,null,null)
|
||
var c=s.redSqr(),l=r.redMul(c),f=c.redMul(s),h=u.redSqr().redIAdd(f).redISub(l).redISub(l)
|
||
return new i(h,u.redMul(l.redISub(h)).redISub(o.redMul(f)),this.z.redMul(s))},i.prototype.dbl=function(){if(this.inf)return this
|
||
var e,t,r
|
||
if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),a=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(n).redISub(a)
|
||
s=s.redIAdd(s)
|
||
var u=n.redAdd(n).redIAdd(n),c=u.redSqr().redISub(s).redISub(s),l=a.redIAdd(a).redIAdd(a).redIAdd(a)
|
||
e=c,t=u.redMul(s.redISub(c)).redISub(l),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),p=this.x.redAdd(h).redSqr().redISub(f).redISub(d)
|
||
p=p.redIAdd(p)
|
||
var m=f.redAdd(f).redIAdd(f),y=m.redSqr(),g=d.redIAdd(d).redIAdd(d).redIAdd(d)
|
||
e=y.redISub(p).redISub(p),t=m.redMul(p.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return new i(e,t,r)},i.prototype.dblp=function(e){if(0===e||this.inf)return this
|
||
for(var t=this,r=0;r<e;r++)t=t.dbl()
|
||
return t},Object.defineProperty(i.prototype,"inf",{enumerable:!0,get:function(){return this.z.isZero()}}),t.exports=i},{"./bn":614}],617:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("./bn"),o=e("./ecjpoint")
|
||
function a(e,t){null===e&&null===t?(this.x=this.y=null,this.inf=!0):(this.x=e,this.y=t,this.inf=!1)}a.fromPublicKey=function(e){var t,r,n=e[0]
|
||
return 33!==e.length||2!==n&&3!==n?65!==e.length||4!==n&&6!==n&&7!==n?null:(t=i.fromBuffer(e.slice(1,33)),r=i.fromBuffer(e.slice(33,65)),t.ucmp(i.p)>=0||r.ucmp(i.p)>=0?null:6!==n&&7!==n||r.isOdd()===(7===n)?0!==t.redSqr().redMul(t).redIAdd7().ucmp(r.redSqr())?null:new a(t,r):null):(t=i.fromBuffer(e.slice(1,33))).ucmp(i.p)>=0?null:null===(r=t.redSqr().redMul(t).redIAdd7().redSqrt())?null:(3===n!==r.isOdd()&&(r=r.redNeg()),new a(t,r))},a.prototype.toPublicKey=function(e){var t,r=this.x,i=this.y
|
||
return e?((t=n.alloc(33))[0]=i.isOdd()?3:2,r.toBuffer().copy(t,1)):((t=n.alloc(65))[0]=4,r.toBuffer().copy(t,1),i.toBuffer().copy(t,33)),t},a.fromECJPoint=function(e){if(e.inf)return new a(null,null)
|
||
var t=e.z.redInvm(),r=t.redSqr()
|
||
return new a(e.x.redMul(r),e.y.redMul(r).redMul(t))},a.prototype.toECJPoint=function(){return this.inf?new o(null,null,null):new o(this.x,this.y,o.one)},a.prototype.neg=function(){return this.inf?this:new a(this.x,this.y.redNeg())},a.prototype.add=function(e){if(this.inf)return e
|
||
if(e.inf)return this
|
||
if(0===this.x.ucmp(e.x))return 0===this.y.ucmp(e.y)?this.dbl():new a(null,null)
|
||
var t=this.y.redSub(e.y)
|
||
t.isZero()||(t=t.redMul(this.x.redSub(e.x).redInvm()))
|
||
var r=t.redSqr().redISub(this.x).redISub(e.x)
|
||
return new a(r,t.redMul(this.x.redSub(r)).redISub(this.y))},a.prototype.dbl=function(){if(this.inf)return this
|
||
var e=this.y.redAdd(this.y)
|
||
if(e.isZero())return new a(null,null)
|
||
var t=this.x.redSqr(),r=t.redAdd(t).redIAdd(t).redMul(e.redInvm()),n=r.redSqr().redISub(this.x.redAdd(this.x))
|
||
return new a(n,r.redMul(this.x.redSub(n)).redISub(this.y))},a.prototype.mul=function(e){for(var t=this._getNAFPoints(4),r=t.points,n=e.getNAF(t.wnd),i=new o(null,null,null),s=n.length-1;s>=0;s--){for(var u=0;s>=0&&0===n[s];s--,++u);if(s>=0&&(u+=1),i=i.dblp(u),s<0)break
|
||
var c=n[s]
|
||
i=c>0?i.mixedAdd(r[c-1>>1]):i.mixedAdd(r[-c-1>>1].neg())}return a.fromECJPoint(i)},a.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},a.prototype._getNAFPoints=function(e){var t=new Array((1<<e)-1)
|
||
t[0]=this
|
||
for(var r=this.dbl(),n=1;n<t.length;++n)t[n]=t[n-1].add(r)
|
||
return{wnd:e,points:t}},t.exports=a},{"./bn":614,"./ecjpoint":616,"safe-buffer":608}],618:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("./bn"),o=e("./ecpoint"),a=e("./ecjpoint")
|
||
function s(){this.x=i.fromBuffer(n.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=i.fromBuffer(n.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}s.prototype._precompute=function(){for(var e=new o(this.x,this.y),t=new Array(1+Math.ceil(64.25)),r=t[0]=e,n=1;n<t.length;++n){for(var i=0;i<4;i++)r=r.dbl()
|
||
t[n]=r}this.precomputed={naf:e._getNAFPoints(7),doubles:{step:4,points:t,negpoints:t.map(function(e){return e.neg()})}}},s.prototype.mul=function(e){for(var t=this.precomputed.doubles.step,r=this.precomputed.doubles.points,n=this.precomputed.doubles.negpoints,i=e.getNAF(1),s=((1<<t+1)-(t%2==0?2:1))/3,u=[],c=0;c<i.length;c+=t){for(var l=0,f=c+t-1;f>=c;f--)l=(l<<1)+i[f]
|
||
u.push(l)}for(var h=new a(null,null,null),d=new a(null,null,null),p=s;p>0;p--){for(var m=0;m<u.length;m++)u[m]===p?d=d.mixedAdd(r[m]):u[m]===-p&&(d=d.mixedAdd(n[m]))
|
||
h=h.add(d)}return o.fromECJPoint(h)},s.prototype.mulAdd=function(e,t,r){for(var n=this.precomputed.naf,i=t._getNAFPoints1(),o=[n.points,i.points],s=[e.getNAF(n.wnd),r.getNAF(i.wnd)],u=new a(null,null,null),c=[null,null],l=Math.max(s[0].length,s[1].length);l>=0;l--){for(var f=0;l>=0&&(c[0]=0|s[0][l],c[1]=0|s[1][l],0===c[0]&&0===c[1]);++f,--l);if(l>=0&&(f+=1),u=u.dblp(f),l<0)break
|
||
for(var h=0;h<2;h++){var d,p=c[h]
|
||
0!==p&&(p>0?d=o[h][p>>1]:p<0&&(d=o[h][-p>>1].neg()),u=void 0===d.z?u.mixedAdd(d):u.add(d))}}return u},t.exports=new s},{"./bn":614,"./ecjpoint":616,"./ecpoint":617,"safe-buffer":608}],619:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer,i=e("create-hash"),o=e("drbg.js/hmac"),a=e("../messages.json"),s=e("./bn"),u=e("./ecpoint"),c=e("./ecpointg")
|
||
r.privateKeyVerify=function(e){var t=s.fromBuffer(e)
|
||
return!(t.isOverflow()||t.isZero())},r.privateKeyExport=function(e,t){var r=s.fromBuffer(e)
|
||
if(r.isOverflow()||r.isZero())throw new Error(a.EC_PRIVATE_KEY_EXPORT_DER_FAIL)
|
||
return c.mul(r).toPublicKey(t)},r.privateKeyNegate=function(e){var t=s.fromBuffer(e)
|
||
return t.isZero()?n.alloc(32):(t.ucmp(s.n)>0&&t.isub(s.n),s.n.sub(t).toBuffer())},r.privateKeyModInverse=function(e){var t=s.fromBuffer(e)
|
||
if(t.isOverflow()||t.isZero())throw new Error(a.EC_PRIVATE_KEY_RANGE_INVALID)
|
||
return t.uinvm().toBuffer()},r.privateKeyTweakAdd=function(e,t){var r=s.fromBuffer(t)
|
||
if(r.isOverflow())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL)
|
||
if(r.iadd(s.fromBuffer(e)),r.isOverflow()&&r.isub(s.n),r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL)
|
||
return r.toBuffer()},r.privateKeyTweakMul=function(e,t){var r=s.fromBuffer(t)
|
||
if(r.isOverflow()||r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_MUL_FAIL)
|
||
var n=s.fromBuffer(e)
|
||
return r.umul(n).ureduce().toBuffer()},r.publicKeyCreate=function(e,t){var r=s.fromBuffer(e)
|
||
if(r.isOverflow()||r.isZero())throw new Error(a.EC_PUBLIC_KEY_CREATE_FAIL)
|
||
return c.mul(r).toPublicKey(t)},r.publicKeyConvert=function(e,t){var r=u.fromPublicKey(e)
|
||
if(null===r)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL)
|
||
return r.toPublicKey(t)},r.publicKeyVerify=function(e){return null!==u.fromPublicKey(e)},r.publicKeyTweakAdd=function(e,t,r){var n=u.fromPublicKey(e)
|
||
if(null===n)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL)
|
||
if((t=s.fromBuffer(t)).isOverflow())throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL)
|
||
return c.mul(t).add(n).toPublicKey(r)},r.publicKeyTweakMul=function(e,t,r){var n=u.fromPublicKey(e)
|
||
if(null===n)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL)
|
||
if((t=s.fromBuffer(t)).isOverflow()||t.isZero())throw new Error(a.EC_PUBLIC_KEY_TWEAK_MUL_FAIL)
|
||
return n.mul(t).toPublicKey(r)},r.publicKeyCombine=function(e,t){for(var r=new Array(e.length),n=0;n<e.length;++n)if(r[n]=u.fromPublicKey(e[n]),null===r[n])throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL)
|
||
for(var i=r[0],o=1;o<r.length;++o)i=i.add(r[o])
|
||
if(i.inf)throw new Error(a.EC_PUBLIC_KEY_COMBINE_FAIL)
|
||
return i.toPublicKey(t)},r.signatureNormalize=function(e){var t=s.fromBuffer(e.slice(0,32)),r=s.fromBuffer(e.slice(32,64))
|
||
if(t.isOverflow()||r.isOverflow())throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL)
|
||
var i=n.from(e)
|
||
return r.isHigh()&&s.n.sub(r).toBuffer().copy(i,32),i},r.signatureExport=function(e){var t=e.slice(0,32),r=e.slice(32,64)
|
||
if(s.fromBuffer(t).isOverflow()||s.fromBuffer(r).isOverflow())throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL)
|
||
return{r:t,s:r}},r.signatureImport=function(e){var t=s.fromBuffer(e.r)
|
||
t.isOverflow()&&(t=s.fromNumber(0))
|
||
var r=s.fromBuffer(e.s)
|
||
return r.isOverflow()&&(r=s.fromNumber(0)),n.concat([t.toBuffer(),r.toBuffer()])},r.sign=function(e,t,r,i){var u=s.fromBuffer(t)
|
||
if(u.isOverflow()||u.isZero())throw new Error(a.ECDSA_SIGN_FAIL)
|
||
if(null===r){var l=new o("sha256",t,e,i)
|
||
r=function(){return l.generate(32)}}for(var f=s.fromBuffer(e),h=0;;++h){var d=r(e,t,null,i,h)
|
||
if(!n.isBuffer(d)||32!==d.length)throw new Error(a.ECDSA_SIGN_FAIL)
|
||
var p=s.fromBuffer(d)
|
||
if(!p.isOverflow()&&!p.isZero()){var m=c.mul(p),y=m.x.fireduce()
|
||
if(!y.isZero()){var g=p.uinvm().umul(y.umul(u).ureduce().iadd(f).fireduce()).ureduce()
|
||
if(!g.isZero()){var b=(0!==m.x.ucmp(y)?2:0)|(m.y.isOdd()?1:0)
|
||
return g.isHigh()&&(g=s.n.sub(g),b^=1),{signature:n.concat([y.toBuffer(),g.toBuffer()]),recovery:b}}}}}},r.verify=function(e,t,r){var n=s.fromBuffer(t.slice(0,32)),i=s.fromBuffer(t.slice(32,64))
|
||
if(n.isOverflow()||i.isOverflow())throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL)
|
||
if(i.isHigh()||n.isZero()||i.isZero())return!1
|
||
var o=u.fromPublicKey(r)
|
||
if(null===o)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL)
|
||
var l=i.uinvm(),f=l.umul(s.fromBuffer(e)).ureduce(),h=l.umul(n).ureduce(),d=c.mulAdd(f,o,h)
|
||
if(d.inf)return!1
|
||
var p=d.z.redSqr()
|
||
return 0===n.redMul(p).ucmp(d.x)||!(n.ucmp(s.psn)>=0)&&0===n.iadd(s.psn).redMul(p).ucmp(d.x)},r.recover=function(e,t,r,i){var o=s.fromBuffer(t.slice(0,32)),l=s.fromBuffer(t.slice(32,64))
|
||
if(o.isOverflow()||l.isOverflow())throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL)
|
||
do{if(o.isZero()||l.isZero())break
|
||
var f=o
|
||
if(r>>1){if(f.ucmp(s.psn)>=0)break
|
||
f=o.add(s.n)}var h=n.concat([n.from([2+(1&r)]),f.toBuffer()]),d=u.fromPublicKey(h)
|
||
if(null===d)break
|
||
var p=o.uinvm(),m=s.n.sub(s.fromBuffer(e)).umul(p).ureduce(),y=l.umul(p).ureduce()
|
||
return u.fromECJPoint(c.mulAdd(m,d,y)).toPublicKey(i)}while(0)
|
||
throw new Error(a.ECDSA_RECOVER_FAIL)},r.ecdh=function(e,t){var n=r.ecdhUnsafe(e,t,!0)
|
||
return i("sha256").update(n).digest()},r.ecdhUnsafe=function(e,t,r){var n=u.fromPublicKey(e)
|
||
if(null===n)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL)
|
||
var i=s.fromBuffer(t)
|
||
if(i.isOverflow()||i.isZero())throw new Error(a.ECDH_FAIL)
|
||
return n.mul(i).toPublicKey(r)}},{"../messages.json":620,"./bn":614,"./ecpoint":617,"./ecpointg":618,"create-hash":83,"drbg.js/hmac":88,"safe-buffer":608}],620:[function(e,t,r){t.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},{}],621:[function(e,t,r){(function(e,t){"use strict";(function(t,r){if(!t.setImmediate){var n,i,o,a,s,u=1,c={},l=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t)
|
||
h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(){var t=d(arguments)
|
||
return e.nextTick(p(m,t)),t}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage
|
||
return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){m(e.data)},n=function(){var e=d(arguments)
|
||
return o.port2.postMessage(e),e}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,n=function(){var e=d(arguments),t=f.createElement("script")
|
||
return t.onreadystatechange=function(){m(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t),e}):n=function(){var e=d(arguments)
|
||
return setTimeout(p(m,e),0),e}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&m(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),n=function(){var e=d(arguments)
|
||
return t.postMessage(a+e,"*"),e}),h.setImmediate=n,h.clearImmediate=y}function d(e){return c[u]=p.apply(r,e),u++}function p(e){var t=[].slice.call(arguments,1)
|
||
return function(){"function"==typeof e?e.apply(r,t):new Function(""+e)()}}function m(e){if(l)setTimeout(p(m,e),0)
|
||
else{var t=c[e]
|
||
if(t){l=!0
|
||
try{t()}finally{y(e),l=!1}}}}function y(e){delete c[e]}})("undefined"==typeof self?void 0===t?void 0:t:self)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:124}],622:[function(e,t,r){"use strict"
|
||
var n=e("safe-buffer").Buffer
|
||
function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t))
|
||
for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),l=0;l<c;l++)r[u+l]=e[s+l]
|
||
s+=c,(a+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize
|
||
this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0))
|
||
var r=8*this._len
|
||
if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4)
|
||
else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296
|
||
this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block)
|
||
var o=this._hash()
|
||
return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":608}],623:[function(e,t,r){"use strict"
|
||
var n=t.exports=function(e){e=e.toLowerCase()
|
||
var t=n[e]
|
||
if(!t)throw new Error(e+" is not supported (we accept pull requests)")
|
||
return new t}
|
||
n.sha=e("./sha"),n.sha1=e("./sha1"),n.sha224=e("./sha224"),n.sha256=e("./sha256"),n.sha384=e("./sha384"),n.sha512=e("./sha512")},{"./sha":624,"./sha1":625,"./sha224":626,"./sha256":627,"./sha384":628,"./sha512":629}],624:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80)
|
||
function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f)
|
||
for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16]
|
||
for(var h=0;h<80;++h){var d=~~(h/20),p=0|((t=n)<<5|t>>>27)+l(d,i,o,s)+u+r[h]+a[d]
|
||
u=s,s=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20)
|
||
return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":622,inherits:220,"safe-buffer":608}],625:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80)
|
||
function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h)
|
||
for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31
|
||
for(var d=0;d<80;++d){var p=~~(d/20),m=c(n)+f(p,i,o,s)+u+r[d]+a[p]|0
|
||
u=s,s=o,o=l(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20)
|
||
return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":622,inherits:220,"safe-buffer":608}],626:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64)
|
||
function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28)
|
||
return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=u},{"./hash":622,"./sha256":627,inherits:220,"safe-buffer":608}],627:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64)
|
||
function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,y=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g)
|
||
for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+d(r[g-15])+r[g-16]
|
||
for(var b=0;b<64;++b){var v=y+h(u)+c(u,p,m)+a[b]+r[b]|0,_=f(n)+l(n,i,o)|0
|
||
y=m,m=p,p=u,u=s+v|0,s=o,o=i,i=n,n=v+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32)
|
||
return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=u},{"./hash":622,inherits:220,"safe-buffer":608}],628:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160)
|
||
function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48)
|
||
function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=u},{"./hash":622,"./sha512":629,inherits:220,"safe-buffer":608}],629:[function(e,t,r){"use strict"
|
||
var n=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160)
|
||
function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,_=0|this._al,w=0|this._bl,S=0|this._cl,E=0|this._dl,k=0|this._el,x=0|this._fl,C=0|this._gl,A=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4)
|
||
for(;T<160;T+=2){var I=t[T-30],P=t[T-30+1],M=d(I,P),R=p(P,I),O=m(I=t[T-4],P=t[T-4+1]),B=y(P,I),N=t[T-14],j=t[T-14+1],L=t[T-32],D=t[T-32+1],U=R+j|0,F=M+N+g(U,R)|0
|
||
F=(F=F+O+g(U=U+B|0,B)|0)+L+g(U=U+D|0,D)|0,t[T]=F,t[T+1]=U}for(var z=0;z<160;z+=2){F=t[z],U=t[z+1]
|
||
var q=l(r,n,i),V=l(_,w,S),H=f(r,_),K=f(_,r),W=h(s,k),G=h(k,s),Y=a[z],Q=a[z+1],X=c(s,u,b),$=c(k,x,C),J=A+G|0,Z=v+W+g(J,A)|0
|
||
Z=(Z=(Z=Z+X+g(J=J+$|0,$)|0)+Y+g(J=J+Q|0,Q)|0)+F+g(J=J+U|0,U)|0
|
||
var ee=K+V|0,te=H+q+g(ee,K)|0
|
||
v=b,A=C,b=u,C=x,u=s,x=k,s=o+Z+g(k=E+J|0,E)|0,o=i,E=S,i=n,S=w,n=r,w=_,r=Z+te+g(_=J+ee|0,J)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+k|0,this._fl=this._fl+x|0,this._gl=this._gl+C|0,this._hl=this._hl+A|0,this._ah=this._ah+r+g(this._al,_)|0,this._bh=this._bh+n+g(this._bl,w)|0,this._ch=this._ch+i+g(this._cl,S)|0,this._dh=this._dh+o+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,k)|0,this._fh=this._fh+u+g(this._fl,x)|0,this._gh=this._gh+b+g(this._gl,C)|0,this._hh=this._hh+v+g(this._hl,A)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64)
|
||
function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=u},{"./hash":622,inherits:220,"safe-buffer":608}],630:[function(e,t,r){"use strict"
|
||
var n=e("varint")
|
||
r.encode=function e(t,r,i){t=t>=0?2*t:-2*t-1
|
||
var o=n.encode(t,r,i)
|
||
return e.bytes=n.encode.bytes,o},r.decode=function e(t,r){var i=n.decode(t,r)
|
||
return e.bytes=n.decode.bytes,1&i?(i+1)/-2:i/2},r.encodingLength=function(e){return n.encodingLength(e>=0?2*e:-2*e-1)}},{varint:662}],631:[function(e,t,r){"use strict"
|
||
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=e("through2"),o=e("string_decoder").StringDecoder
|
||
function a(e,t,r){if(this._last+=this._decoder.write(e),this._last.length>this.maxLength)return r(new Error("maximum buffer reached"))
|
||
var n=this._last.split(this.matcher)
|
||
this._last=n.pop()
|
||
for(var i=0;i<n.length;i++)u(this,this.mapper(n[i]))
|
||
r()}function s(e){this._last+=this._decoder.end(),this._last&&u(this,this.mapper(this._last)),e()}function u(e,t){void 0!==t&&e.push(t)}function c(e){return e}t.exports=function(e,t,r){switch(e=e||/\r?\n/,t=t||c,r=r||{},arguments.length){case 1:"function"==typeof e?(t=e,e=/\r?\n/):"object"!==(void 0===e?"undefined":n(e))||e instanceof RegExp||(r=e,e=/\r?\n/)
|
||
break
|
||
case 2:"function"==typeof e?(r=t,t=e,e=/\r?\n/):"object"===(void 0===t?"undefined":n(t))&&(r=t,t=c)}var u=i(r,a,s)
|
||
return u._readableState.objectMode=!0,u._readableState.highWaterMark&&!r.highWaterMark&&(u._readableState.highWaterMark=16),u._last="",u._decoder=new o("utf8"),u.matcher=e,u.mapper=t,u.maxLength=r.maxLength,u}},{string_decoder:149,through2:655}],632:[function(e,t,r){"use strict"
|
||
var n,i,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=void 0,i=function(){var e=function(e,r){return t(e.slice(),r)}
|
||
function t(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)})
|
||
var n=e.length
|
||
if(n<=1)return e
|
||
for(var i=new Array(n),o=1;o<n;o*=2){r(e,t,o,i)
|
||
var a=e
|
||
e=i,i=a}return e}e.inplace=function(e,n){var i=t(e,n)
|
||
return i!==e&&r(i,null,e.length,e),e}
|
||
var r=function(e,t,r,n){var i,o,a,s,u,c=e.length,l=0,f=2*r
|
||
for(i=0;i<c;i+=f)for(a=(o=i+r)+r,o>c&&(o=c),a>c&&(a=c),s=i,u=o;;)if(s<o&&u<a)t(e[s],e[u])<=0?n[l++]=e[s++]:n[l++]=e[u++]
|
||
else if(s<o)n[l++]=e[s++]
|
||
else{if(!(u<a))break
|
||
n[l++]=e[u++]}}
|
||
return e},"object"===(void 0===r?"undefined":o(r))&&void 0!==t?t.exports=i():"function"==typeof define&&define.amd?define(i):n.stable=i()},{}],633:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("./lib/request"),i=e("./lib/response"),o=e("xtend"),a=e("builtin-status-codes"),s=e("url"),u=r
|
||
u.request=function(e,r){e="string"==typeof e?s.parse(e):o(e)
|
||
var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,c=e.port,l=e.path||"/"
|
||
u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{}
|
||
var f=new n(e)
|
||
return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t)
|
||
return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":635,"./lib/response":636,"builtin-status-codes":77,url:151,xtend:666}],634:[function(e,t,r){(function(e){"use strict"
|
||
r.fetch=s(e.fetch)&&s(e.ReadableStream),r.writableStream=s(e.WritableStream),r.abortController=s(e.AbortController),r.blobConstructor=!1
|
||
try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var t
|
||
function n(){if(void 0!==t)return t
|
||
if(e.XMLHttpRequest){t=new e.XMLHttpRequest
|
||
try{t.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null
|
||
return t}function i(e){var t=n()
|
||
if(!t)return!1
|
||
try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var o=void 0!==e.ArrayBuffer,a=o&&s(e.ArrayBuffer.prototype.slice)
|
||
function s(e){return"function"==typeof e}r.arraybuffer=r.fetch||o&&i("arraybuffer"),r.msstream=!r.fetch&&a&&i("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o&&i("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!n()&&s(n().overrideMimeType),r.vbArray=s(e.VBArray),t=null}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],635:[function(e,t,r){(function(r,n,i){"use strict"
|
||
var o=e("./capability"),a=e("inherits"),s=e("./response"),u=e("readable-stream"),c=e("to-arraybuffer"),l=s.IncomingMessage,f=s.readyStates
|
||
var h=t.exports=function(e){var t,r=this
|
||
u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){r.setHeader(t,e.headers[t])})
|
||
var n=!0
|
||
if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)n=!1,t=!0
|
||
else if("prefer-streaming"===e.mode)t=!1
|
||
else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType
|
||
else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode")
|
||
t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}(t,n),r.on("finish",function(){r._onFinish()})}
|
||
a(h,u.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()]
|
||
return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this
|
||
if(!e._destroyed){var t=e._opts,a=e._headers,s=null
|
||
"GET"!==t.method&&"HEAD"!==t.method&&(s=o.arraybuffer?c(i.concat(e._body)):o.blobConstructor?new n.Blob(e._body.map(function(e){return c(e)}),{type:(a["content-type"]||{}).value||""}):i.concat(e._body).toString())
|
||
var u=[]
|
||
if(Object.keys(a).forEach(function(e){var t=a[e].name,r=a[e].value
|
||
Array.isArray(r)?r.forEach(function(e){u.push([t,e])}):u.push([t,r])}),"fetch"===e._mode){var l=null
|
||
if(o.abortController){var h=new AbortController
|
||
l=h.signal,e._fetchAbortController=h,"requestTimeout"in t&&0!==t.requestTimeout&&n.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout)}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:l}).then(function(t){e._fetchResponse=t,e._connect()},function(t){e.emit("error",t)})}else{var d=e._xhr=new n.XMLHttpRequest
|
||
try{d.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}"responseType"in d&&(d.responseType=e._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(d.timeout=t.requestTimeout,d.ontimeout=function(){e.emit("requestTimeout")}),u.forEach(function(e){d.setRequestHeader(e[0],e[1])}),e._response=null,d.onreadystatechange=function(){switch(d.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(d.onprogress=function(){e._onXHRProgress()}),d.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))}
|
||
try{d.send(s)}catch(t){return void r.nextTick(function(){e.emit("error",t)})}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status
|
||
return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this
|
||
e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){}
|
||
var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":634,"./response":636,_process:124,buffer:110,inherits:220,"readable-stream":646,"to-arraybuffer":656}],636:[function(e,t,r){(function(t,n,i){"use strict"
|
||
var o=e("./capability"),a=e("inherits"),s=e("readable-stream"),u=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=r.IncomingMessage=function(e,r,n){var a=this
|
||
if(s.Readable.call(a),a._mode=n,a.headers={},a.rawHeaders=[],a.trailers={},a.rawTrailers=[],a.on("end",function(){t.nextTick(function(){a.emit("close")})}),"fetch"===n){if(a._fetchResponse=r,a.url=r.url,a.statusCode=r.status,a.statusMessage=r.statusText,r.headers.forEach(function(e,t){a.headers[t.toLowerCase()]=e,a.rawHeaders.push(t,e)}),o.writableStream){var u=new WritableStream({write:function(e){return new Promise(function(t,r){a._destroyed||(a.push(new i(e))?t():a._resumeFetch=t)})},close:function(){a._destroyed||a.push(null)},abort:function(e){a._destroyed||a.emit("error",e)}})
|
||
try{return void r.body.pipeTo(u)}catch(e){}}var c=r.body.getReader();(function e(){c.read().then(function(t){a._destroyed||(t.done?a.push(null):(a.push(new i(t.value)),e()))}).catch(function(e){a._destroyed||a.emit("error",e)})})()}else{if(a._xhr=e,a._pos=0,a.url=e.responseURL,a.statusCode=e.status,a.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/)
|
||
if(t){var r=t[1].toLowerCase()
|
||
"set-cookie"===r?(void 0===a.headers[r]&&(a.headers[r]=[]),a.headers[r].push(t[2])):void 0!==a.headers[r]?a.headers[r]+=", "+t[2]:a.headers[r]=t[2],a.rawHeaders.push(t[1],t[2])}}),a._charset="x-user-defined",!o.overrideMimeType){var l=a.rawHeaders["mime-type"]
|
||
if(l){var f=l.match(/;\s*charset=([^;])(;|$)/)
|
||
f&&(a._charset=f[1].toLowerCase())}a._charset||(a._charset="utf-8")}}}
|
||
a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch
|
||
e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null
|
||
switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break
|
||
try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r))
|
||
break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray"
|
||
break}if(r.length>e._pos){var o=r.substr(e._pos)
|
||
if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s)
|
||
e.push(a)}else e.push(o,e._charset)
|
||
e._pos=r.length}break
|
||
case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break
|
||
r=t.response,e.push(new i(new Uint8Array(r)))
|
||
break
|
||
case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==u.LOADING||!r)break
|
||
e.push(new i(new Uint8Array(r)))
|
||
break
|
||
case"ms-stream":if(r=t.response,t.readyState!==u.LOADING)break
|
||
var c=new n.MSStreamReader
|
||
c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new i(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":634,_process:124,buffer:110,inherits:220,"readable-stream":646}],637:[function(e,t,r){(function(e){"use strict"
|
||
!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function')
|
||
var o,a,s=arguments.length
|
||
switch(s){case 0:case 1:return e.nextTick(t)
|
||
case 2:return e.nextTick(function(){t.call(null,r)})
|
||
case 3:return e.nextTick(function(){t.call(null,r,n)})
|
||
case 4:return e.nextTick(function(){t.call(null,r,n,i)})
|
||
default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a]
|
||
return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(this,e("_process"))},{_process:124}],638:[function(e,t,r){arguments[4][40][0].apply(r,arguments)},{"./_stream_readable":640,"./_stream_writable":642,"core-util-is":82,dup:40,inherits:220,"process-nextick-args":637}],639:[function(e,t,r){arguments[4][131][0].apply(r,arguments)},{"./_stream_transform":641,"core-util-is":82,dup:131,inherits:220}],640:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
t.exports=v
|
||
var o,a=e("isarray")
|
||
v.ReadableState=b
|
||
e("events").EventEmitter
|
||
var s=function(e,t){return e.listeners(t).length},u=e("./internal/streams/stream"),c=e("safe-buffer").Buffer,l=n.Uint8Array||function(){}
|
||
var f=e("core-util-is")
|
||
f.inherits=e("inherits")
|
||
var h=e("util"),d=void 0
|
||
d=h&&h.debuglog?h.debuglog("stream"):function(){}
|
||
var p,m=e("./internal/streams/BufferList"),y=e("./internal/streams/destroy")
|
||
f.inherits(v,u)
|
||
var g=["error","close","destroy","pause","resume"]
|
||
function b(t,r){o=o||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof o
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode)
|
||
var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384
|
||
this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||e("./_stream_duplex"),!(this instanceof v))return new v(t)
|
||
this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function _(e,t,r,n,i){var o,a=e._readableState
|
||
null===t?(a.reading=!1,function(e,t){if(t.ended)return
|
||
if(t.decoder){var r=t.decoder.end()
|
||
r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,a)):(i||(o=function(e,t){var r
|
||
n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"))
|
||
var n
|
||
return r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):C(e,a)):w(e,a,t,!1))):n||(a.reading=!1))
|
||
return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function w(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),C(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState
|
||
return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},v.prototype.unshift=function(e){return _(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this}
|
||
var S=8388608
|
||
function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState
|
||
t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(x,e):x(e))}function x(e){d("emit readable"),e.emit("readable"),P(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length
|
||
t.readingMore=!1}function T(e){d("readable nexttick read 0"),e.read(0)}function I(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState
|
||
for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n
|
||
e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data
|
||
e-=i.length
|
||
for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e
|
||
if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a))
|
||
break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1
|
||
n.data.copy(r),e-=n.data.length
|
||
for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e
|
||
if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a))
|
||
break}++i}return t.length-=i,r}(e,t)
|
||
return n}(e,t.buffer,t.decoder),r)
|
||
var r}function R(e){var t=e._readableState
|
||
if(t.length>0)throw new Error('"endReadable()" called on non-empty stream')
|
||
t.endEmitted||(t.ended=!0,i.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r
|
||
return-1}v.prototype.read=function(e){d("read",e),e=parseInt(e,10)
|
||
var t=this._readableState,r=e
|
||
if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):k(this),null
|
||
if(0===(e=E(e,t))&&t.ended)return 0===t.length&&R(this),null
|
||
var n,i=t.needReadable
|
||
return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&R(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var n=this,o=this._readableState
|
||
switch(o.pipesCount){case 0:o.pipes=e
|
||
break
|
||
case 1:o.pipes=[o.pipes,e]
|
||
break
|
||
default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t)
|
||
var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:v
|
||
function c(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",v),n.removeListener("data",m),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",c)
|
||
var f=function(e){return function(){var t=e._readableState
|
||
d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(n)
|
||
e.on("drain",f)
|
||
var h=!1
|
||
var p=!1
|
||
function m(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(t){d("onerror",t),v(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",b),v()}function b(){d("onfinish"),e.removeListener("close",g),v()}function v(){d("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r)
|
||
e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",y),e.once("close",g),e.once("finish",b),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1}
|
||
if(0===t.pipesCount)return this
|
||
if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this)
|
||
if(!e){var n=t.pipes,i=t.pipesCount
|
||
t.pipes=null,t.pipesCount=0,t.flowing=!1
|
||
for(var o=0;o<i;o++)n[o].emit("unpipe",this,r)
|
||
return this}var a=B(t.pipes,e)
|
||
return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)},v.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t)
|
||
if("data"===e)!1!==this._readableState.flowing&&this.resume()
|
||
else if("readable"===e){var n=this._readableState
|
||
n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):i.nextTick(T,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState
|
||
return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(I,e,t))}(this,e)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1
|
||
for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end()
|
||
e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i))
|
||
for(var o=0;o<g.length;o++)e.on(g[o],this.emit.bind(this,g[o]))
|
||
return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=M}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":638,"./internal/streams/BufferList":643,"./internal/streams/destroy":644,"./internal/streams/stream":645,_process:124,"core-util-is":82,events:114,inherits:220,isarray:382,"process-nextick-args":637,"safe-buffer":608,"string_decoder/":647,util:109}],641:[function(e,t,r){arguments[4][133][0].apply(r,arguments)},{"./_stream_duplex":638,"core-util-is":82,dup:133,inherits:220}],642:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("process-nextick-args")
|
||
function o(e){var t=this
|
||
this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry
|
||
e.entry=null
|
||
for(;n;){var i=n.callback
|
||
t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e})(t,e)}}t.exports=g
|
||
var a,s=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i.nextTick
|
||
g.WritableState=y
|
||
var u=e("core-util-is")
|
||
u.inherits=e("inherits")
|
||
var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,h=n.Uint8Array||function(){}
|
||
var d,p=e("./internal/streams/destroy")
|
||
function m(){}function y(t,r){a=a||e("./_stream_duplex"),t=t||{}
|
||
var n=r instanceof a
|
||
this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode)
|
||
var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384
|
||
this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1
|
||
var f=!1===t.decodeStrings
|
||
this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,n=r.sync,o=r.writecb
|
||
if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)(function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))})(e,r,n,t,o)
|
||
else{var a=w(r)
|
||
a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?s(v,e,r,a,o):v(e,r,a,o)}})(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(t){if(a=a||e("./_stream_duplex"),!(d.call(g,this)||this instanceof a))return new g(t)
|
||
this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function b(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function v(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function _(e,t){t.bufferProcessing=!0
|
||
var r=t.bufferedRequest
|
||
if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree
|
||
a.entry=r
|
||
for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1
|
||
i.allBuffers=u,b(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback
|
||
if(b(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function w(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)})}function E(e,t){var r=w(t)
|
||
return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(g,l),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next
|
||
return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===g&&(e&&e._writableState instanceof y)}})):d=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,f.isBuffer(n)||n instanceof h)
|
||
return s&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=m),o.ended?function(e,t){var r=new Error("write after end")
|
||
e.emit("error",r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1
|
||
return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r))
|
||
return t}(t,n,i)
|
||
n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length
|
||
t.length+=s
|
||
var u=t.length<t.highWaterMark
|
||
u||(t.needDrain=!0)
|
||
if(t.writing||t.corked){var c=t.lastBufferedRequest
|
||
t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,n,i,o)
|
||
return u}(this,o,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState
|
||
e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e)
|
||
return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState
|
||
"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r))
|
||
t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=p.destroy,g.prototype._undestroy=p.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":638,"./internal/streams/destroy":644,"./internal/streams/stream":645,_process:124,"core-util-is":82,inherits:220,"process-nextick-args":637,"safe-buffer":608,"util-deprecate":659}],643:[function(e,t,r){arguments[4][43][0].apply(r,arguments)},{dup:43,"safe-buffer":608,util:109}],644:[function(e,t,r){arguments[4][44][0].apply(r,arguments)},{dup:44,"process-nextick-args":637}],645:[function(e,t,r){arguments[4][45][0].apply(r,arguments)},{dup:45,events:114}],646:[function(e,t,r){arguments[4][140][0].apply(r,arguments)},{"./lib/_stream_duplex.js":638,"./lib/_stream_passthrough.js":639,"./lib/_stream_readable.js":640,"./lib/_stream_transform.js":641,"./lib/_stream_writable.js":642,dup:140}],647:[function(e,t,r){arguments[4][46][0].apply(r,arguments)},{dup:46,"safe-buffer":608}],648:[function(e,t,r){(function(n){"use strict"
|
||
e("pull-stream/pull")
|
||
var i=e("looper")
|
||
function o(e,t){function r(){i(),t()}function n(e){i(),t(e)}function i(){e.removeListener("close",r),e.removeListener("error",n)}e.on("close",r),e.on("error",n)}function o(e){e.destroy?e.destroy():console.error("warning, stream-to-pull-stream: \nthe wrapped node-stream does not implement `destroy`, \nthis may cause resource leaks.")}function a(e,t,r){var a,s,u=!1
|
||
function c(){s||(s=!0,r&&r(!0===a?null:a))}function l(){u||(u=!0,h(),a?c():e(a=!0,c))}function f(t){h(),a||e(a=t,c)}function h(){t.on("finish",l),t.removeListener("close",l),t.removeListener("error",f)}t.on("close",l),t.on("finish",l),t.on("error",f),n.nextTick(function(){i(function(r){e(null,function(e,n){if(a=a||e,!0===e)return t._isStdio?c():t.end()
|
||
if(a=a||e)return o(t),c()
|
||
t._isStdio?t.write(n,function(){r()}):!1===t.write(n)?t.once("drain",r):r()})})})}function s(e){var t,r=[],n=[],i=!1
|
||
function a(){for(;(r.length||t)&&n.length;)n.shift()(r.length?null:t,r.shift())
|
||
!r.length&&i&&(i=!1,e.resume())}return e.on("data",function(t){r.push(t),a(),r.length&&e.pause&&(i=!0,e.pause())}),e.on("end",function(){t=!0,a()}),e.on("close",function(){t=!0,a()}),e.on("error",function(e){t=e,a()}),function(r,i){if(!i)throw new Error("*must* provide cb")
|
||
if(r){var s=function(){for(;n.length;)n.shift()(r)
|
||
i(r)}
|
||
if(t)return s()
|
||
e.once("close",s),o(e)}else n.push(i),a()}}var u=s,c=function(e,t){return function(r){return a(r,e,t)}},l=function(e){return s(e)};(r=t.exports=function(e,t){return e.writable&&e.write?e.readable?function(r){return a(r,e,t),s(e)}:c(e,t):l(e)}).sink=c,r.source=l,r.read=u,r.read1=s,r.read2=function(e){var t,r=!1,n=!1
|
||
function i(){var r=e.read()
|
||
if(null!==r&&t){var n=t
|
||
t=null,n(null,r)}}return e.on("readable",function(){n=!0,t&&i()}).on("end",function(){r=!0,t&&t(r)}).on("error",function(e){r=e,t&&t(r)}),function(e,o){t=o,r?o(r):n&&i()}},r.duplex=function(e,t){return{source:l(e),sink:c(e,t)}},r.transform=function(e){return function(t){var r=l(e)
|
||
return c(e)(t),r}}}).call(this,e("_process"))},{_process:124,looper:458,"pull-stream/pull":562}],649:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("util"),i=e("stream")
|
||
t.exports.createReadStream=function(e,t){return new o(e,t)}
|
||
var o=function(e,t){e instanceof r||"string"==typeof e?(t=t||{},i.Readable.call(this,{highWaterMark:t.highWaterMark,encoding:t.encoding})):i.Readable.call(this,{objectMode:!0}),this._object=e}
|
||
n.inherits(o,i.Readable),o.prototype._read=function(){this.push(this._object),this._object=null}}).call(this,e("buffer").Buffer)},{buffer:110,stream:144,util:156}],650:[function(e,t,r){arguments[4][149][0].apply(r,arguments)},{buffer:110,dup:149}],651:[function(e,t,r){"use strict"
|
||
var n=e("util"),i=e("bl"),o=e("xtend"),a=e("./headers"),s=e("readable-stream").Writable,u=e("readable-stream").PassThrough,c=function(){},l=function(e){return(e&=511)&&512-e},f=function(e,t){this._parent=e,this.offset=t,u.call(this)}
|
||
n.inherits(f,u),f.prototype.destroy=function(e){this._parent.destroy(e)}
|
||
var h=function e(t){if(!(this instanceof e))return new e(t)
|
||
s.call(this,t),t=t||{},this._offset=0,this._buffer=i(),this._missing=0,this._partial=!1,this._onparse=c,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null
|
||
var r=this,n=r._buffer,u=function(){r._continue()},h=function(e){if(r._locked=!1,e)return r.destroy(e)
|
||
r._stream||u()},d=function(){r._stream=null
|
||
var e=l(r._header.size)
|
||
e?r._parse(e,p):r._parse(512,v),r._locked||u()},p=function(){r._buffer.consume(l(r._header.size)),r._parse(512,v),u()},m=function(){var e=r._header.size
|
||
r._paxGlobal=a.decodePax(n.slice(0,e)),n.consume(e),d()},y=function(){var e=r._header.size
|
||
r._pax=a.decodePax(n.slice(0,e)),r._paxGlobal&&(r._pax=o(r._paxGlobal,r._pax)),n.consume(e),d()},g=function(){var e=r._header.size
|
||
this._gnuLongPath=a.decodeLongPath(n.slice(0,e),t.filenameEncoding),n.consume(e),d()},b=function(){var e=r._header.size
|
||
this._gnuLongLinkPath=a.decodeLongPath(n.slice(0,e),t.filenameEncoding),n.consume(e),d()},v=function e(){var i,o=r._offset
|
||
try{i=r._header=a.decode(n.slice(0,512),t.filenameEncoding)}catch(e){r.emit("error",e)}return n.consume(512),i?"gnu-long-path"===i.type?(r._parse(i.size,g),void u()):"gnu-long-link-path"===i.type?(r._parse(i.size,b),void u()):"pax-global-header"===i.type?(r._parse(i.size,m),void u()):"pax-header"===i.type?(r._parse(i.size,y),void u()):(r._gnuLongPath&&(i.name=r._gnuLongPath,r._gnuLongPath=null),r._gnuLongLinkPath&&(i.linkname=r._gnuLongLinkPath,r._gnuLongLinkPath=null),r._pax&&(r._header=i=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e}(i,r._pax),r._pax=null),r._locked=!0,i.size&&"directory"!==i.type?(r._stream=new f(r,o),r.emit("entry",i,r._stream,h),r._parse(i.size,d),void u()):(r._parse(512,e),void r.emit("entry",i,function(e,t){var r=new f(e,t)
|
||
return r.end(),r}(r,o),h))):(r._parse(512,e),void u())}
|
||
this._onheader=v,this._parse(512,v)}
|
||
n.inherits(h,s),h.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))},h.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)},h.prototype._continue=function(){if(!this._destroyed){var e=this._cb
|
||
this._cb=c,this._overflow?this._write(this._overflow,void 0,e):e()}},h.prototype._write=function(e,t,r){if(!this._destroyed){var n=this._stream,i=this._buffer,o=this._missing
|
||
if(e.length&&(this._partial=!0),e.length<o)return this._missing-=e.length,this._overflow=null,n?n.write(e,r):(i.append(e),r())
|
||
this._cb=r,this._missing=0
|
||
var a=null
|
||
e.length>o&&(a=e.slice(o),e=e.slice(0,o)),n?n.end(e):i.append(e),this._overflow=a,this._onparse()}},h.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"))
|
||
e()},t.exports=h},{"./headers":652,bl:37,"readable-stream":604,util:156,xtend:666}],652:[function(e,t,r){(function(t){"use strict"
|
||
var n=e("to-buffer"),i=e("buffer-alloc"),o="0".charCodeAt(0),a=parseInt("7777",8),s=function(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r
|
||
return n},u=function(e){for(var t=256,r=0;r<148;r++)t+=e[r]
|
||
for(var n=156;n<512;n++)t+=e[n]
|
||
return t},c=function(e,t){return(e=e.toString(8)).length>t?"7777777777777777777".slice(0,t)+" ":"0000000000000000000".slice(0,t-e.length)+e+" "}
|
||
var l=function(e,t,r){if(128&(e=e.slice(t,t+r))[t=0])return function(e){var t
|
||
if(128===e[0])t=!0
|
||
else{if(255!==e[0])return null
|
||
t=!1}for(var r=!1,n=[],i=e.length-1;i>0;i--){var o=e[i]
|
||
t?n.push(o):r&&0===o?n.push(0):r?(r=!1,n.push(256-o)):n.push(255-o)}var a=0,s=n.length
|
||
for(i=0;i<s;i++)a+=n[i]*Math.pow(256,i)
|
||
return t?a:-1*a}(e)
|
||
for(;t<e.length&&32===e[t];)t++
|
||
for(var n=(i=s(e,32,t,e.length),o=e.length,a=e.length,"number"!=typeof i?a:(i=~~i)>=o?o:i>=0?i:(i+=o)>=0?i:0);t<n&&0===e[t];)t++
|
||
return n===t?0:parseInt(e.slice(t,n).toString(),8)
|
||
var i,o,a},f=function(e,t,r,n){return e.slice(t,s(e,0,t,t+r)).toString(n)},h=function(e){var r=t.byteLength(e),n=Math.floor(Math.log(r)/Math.log(10))+1
|
||
return r+n>=Math.pow(10,n)&&n++,r+n+e}
|
||
r.decodeLongPath=function(e,t){return f(e,0,e.length,t)},r.encodePax=function(e){var t=""
|
||
e.name&&(t+=h(" path="+e.name+"\n")),e.linkname&&(t+=h(" linkpath="+e.linkname+"\n"))
|
||
var r=e.pax
|
||
if(r)for(var i in r)t+=h(" "+i+"="+r[i]+"\n")
|
||
return n(t)},r.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&32!==e[r];)r++
|
||
var n=parseInt(e.slice(0,r).toString(),10)
|
||
if(!n)return t
|
||
var i=e.slice(r+1,n-1).toString(),o=i.indexOf("=")
|
||
if(-1===o)return t
|
||
t[i.slice(0,o)]=i.slice(o+1),e=e.slice(n)}return t},r.encode=function(e){var r=i(512),n=e.name,s=""
|
||
if(5===e.typeflag&&"/"!==n[n.length-1]&&(n+="/"),t.byteLength(n)!==n.length)return null
|
||
for(;t.byteLength(n)>100;){var l=n.indexOf("/")
|
||
if(-1===l)return null
|
||
s+=s?"/"+n.slice(0,l):n.slice(0,l),n=n.slice(l+1)}return t.byteLength(n)>100||t.byteLength(s)>155?null:e.linkname&&t.byteLength(e.linkname)>100?null:(r.write(n),r.write(c(e.mode&a,6),100),r.write(c(e.uid,6),108),r.write(c(e.gid,6),116),r.write(c(e.size,11),124),r.write(c(e.mtime.getTime()/1e3|0,11),136),r[156]=o+function(e){switch(e){case"file":return 0
|
||
case"link":return 1
|
||
case"symlink":return 2
|
||
case"character-device":return 3
|
||
case"block-device":return 4
|
||
case"directory":return 5
|
||
case"fifo":return 6
|
||
case"contiguous-file":return 7
|
||
case"pax-header":return 72}return 0}(e.type),e.linkname&&r.write(e.linkname,157),r.write("ustar\x0000",257),e.uname&&r.write(e.uname,265),e.gname&&r.write(e.gname,297),r.write(c(e.devmajor||0,6),329),r.write(c(e.devminor||0,6),337),s&&r.write(s,345),r.write(c(u(r),6),148),r)},r.decode=function(e,t){var r=0===e[156]?0:e[156]-o,n=f(e,0,100,t),i=l(e,100,8),a=l(e,108,8),s=l(e,116,8),c=l(e,124,12),h=l(e,136,12),d=function(e){switch(e){case 0:return"file"
|
||
case 1:return"link"
|
||
case 2:return"symlink"
|
||
case 3:return"character-device"
|
||
case 4:return"block-device"
|
||
case 5:return"directory"
|
||
case 6:return"fifo"
|
||
case 7:return"contiguous-file"
|
||
case 72:return"pax-header"
|
||
case 55:return"pax-global-header"
|
||
case 27:return"gnu-long-link-path"
|
||
case 28:case 30:return"gnu-long-path"}return null}(r),p=0===e[157]?null:f(e,157,100,t),m=f(e,265,32),y=f(e,297,32),g=l(e,329,8),b=l(e,337,8)
|
||
e[345]&&(n=f(e,345,155,t)+"/"+n),0===r&&n&&"/"===n[n.length-1]&&(r=5)
|
||
var v=u(e)
|
||
if(256===v)return null
|
||
if(v!==l(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?")
|
||
return{name:n,mode:i,uid:a,gid:s,size:c,mtime:new Date(1e3*h),type:d,linkname:p,uname:m,gname:y,devmajor:g,devminor:b}}}).call(this,e("buffer").Buffer)},{buffer:110,"buffer-alloc":72,"to-buffer":657}],653:[function(e,t,r){"use strict"
|
||
r.extract=e("./extract"),r.pack=e("./pack")},{"./extract":651,"./pack":654}],654:[function(e,t,r){(function(r,n){"use strict"
|
||
var i=e("fs-constants"),o=e("end-of-stream"),a=e("util"),s=e("buffer-alloc"),u=e("to-buffer"),c=e("readable-stream").Readable,l=e("readable-stream").Writable,f=e("string_decoder").StringDecoder,h=e("./headers"),d=parseInt("755",8),p=parseInt("644",8),m=s(1024),y=function(){},g=function(e,t){(t&=511)&&e.push(m.slice(0,512-t))}
|
||
var b=function(e){l.call(this),this.written=0,this._to=e,this._destroyed=!1}
|
||
a.inherits(b,l),b.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r()
|
||
this._to._drain=r},b.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))}
|
||
var v=function(){l.call(this),this.linkname="",this._decoder=new f("utf-8"),this._destroyed=!1}
|
||
a.inherits(v,l),v.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()},v.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))}
|
||
var _=function(){l.call(this),this._destroyed=!1}
|
||
a.inherits(_,l),_.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))},_.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))}
|
||
var w=function e(t){if(!(this instanceof e))return new e(t)
|
||
c.call(this,t),this._drain=y,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null}
|
||
a.inherits(w,c),w.prototype.entry=function(e,t,a){if(this._stream)throw new Error("already piping an entry")
|
||
if(!this._finalized&&!this._destroyed){"function"==typeof t&&(a=t,t=null),a||(a=y)
|
||
var s=this
|
||
if(e.size&&"symlink"!==e.type||(e.size=0),e.type||(e.type=function(e){switch(e&i.S_IFMT){case i.S_IFBLK:return"block-device"
|
||
case i.S_IFCHR:return"character-device"
|
||
case i.S_IFDIR:return"directory"
|
||
case i.S_IFIFO:return"fifo"
|
||
case i.S_IFLNK:return"symlink"}return"file"}(e.mode)),e.mode||(e.mode="directory"===e.type?d:p),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),"string"==typeof t&&(t=u(t)),r.isBuffer(t))return e.size=t.length,this._encode(e),this.push(t),g(s,e.size),n.nextTick(a),new _
|
||
if("symlink"===e.type&&!e.linkname){var c=new v
|
||
return o(c,function(t){if(t)return s.destroy(),a(t)
|
||
e.linkname=c.linkname,s._encode(e),a()}),c}if(this._encode(e),"file"!==e.type&&"contiguous-file"!==e.type)return n.nextTick(a),new _
|
||
var l=new b(this)
|
||
return this._stream=l,o(l,function(t){return s._stream=null,t?(s.destroy(),a(t)):l.written!==e.size?(s.destroy(),a(new Error("size mismatch"))):(g(s,e.size),s._finalizing&&s.finalize(),void a())}),l}},w.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(m),this.push(null))},w.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},w.prototype._encode=function(e){if(!e.pax){var t=h.encode(e)
|
||
if(t)return void this.push(t)}this._encodePax(e)},w.prototype._encodePax=function(e){var t=h.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor}
|
||
this.push(h.encode(r)),this.push(t),g(this,t.length),r.size=e.size,r.type=e.type,this.push(h.encode(r))},w.prototype._read=function(e){var t=this._drain
|
||
this._drain=y,t()},t.exports=w}).call(this,{isBuffer:e("../ember-browserify/node_modules/is-buffer/index.js")},e("_process"))},{"../ember-browserify/node_modules/is-buffer/index.js":119,"./headers":652,_process:124,"buffer-alloc":72,"end-of-stream":159,"fs-constants":207,"readable-stream":604,string_decoder:149,"to-buffer":657,util:156}],655:[function(e,t,r){(function(r){"use strict"
|
||
var n=e("readable-stream/transform"),i=e("util").inherits,o=e("xtend")
|
||
function a(e){n.call(this,e),this._destroyed=!1}function s(e,t,r){r(null,e)}function u(e){return function(t,r,n){return"function"==typeof t&&(n=r,r=t,t={}),"function"!=typeof r&&(r=s),"function"!=typeof n&&(n=null),e(t,r,n)}}i(a,n),a.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0
|
||
var t=this
|
||
r.nextTick(function(){e&&t.emit("error",e),t.emit("close")})}},t.exports=u(function(e,t,r){var n=new a(e)
|
||
return n._transform=t,r&&(n._flush=r),n}),t.exports.ctor=u(function(e,t,r){function n(t){if(!(this instanceof n))return new n(t)
|
||
this.options=o(e,t),a.call(this,this.options)}return i(n,a),n.prototype._transform=t,r&&(n.prototype._flush=r),n}),t.exports.obj=u(function(e,t,r){var n=new a(o({objectMode:!0,highWaterMark:16},e))
|
||
return n._transform=t,r&&(n._flush=r),n})}).call(this,e("_process"))},{_process:124,"readable-stream/transform":605,util:156,xtend:666}],656:[function(e,t,r){arguments[4][150][0].apply(r,arguments)},{buffer:110,dup:150}],657:[function(e,t,r){(function(e){"use strict"
|
||
t.exports=function(t,n){if(e.isBuffer(t))return t
|
||
if("string"==typeof t)return r(t,n)
|
||
if(Array.isArray(t))return r(t)
|
||
throw new Error("Input should be a buffer or a string")}
|
||
var r=e.from&&e.from!==Uint8Array.from?e.from:function(t,r){return new e(t,r)}}).call(this,e("buffer").Buffer)},{buffer:110}],658:[function(e,t,r){"use strict"
|
||
var n,i,o,a="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},s=void 0,u=1e5,c=(n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,{Class:function(e){return n.call(e).replace(/^\[object *|\]$/g,"")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,t){return i.call(e,t)},IsCallable:function(e){return"function"==typeof e},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0}}),l=Math.LN2,f=Math.abs,h=Math.floor,d=Math.log,p=Math.min,m=Math.pow,y=Math.round
|
||
function g(e){if(b&&o){var t,r=b(e)
|
||
for(t=0;t<r.length;t+=1)o(e,r[t],{value:e[r[t]],writable:!1,enumerable:!1,configurable:!1})}}o=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(e,t,r){if(!e===Object(e))throw new TypeError("Object.defineProperty called on non-object")
|
||
return c.HasProperty(r,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,r.get),c.HasProperty(r,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,r.set),c.HasProperty(r,"value")&&(e[t]=r.value),e}
|
||
var b=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError("Object.getOwnPropertyNames called on non-object")
|
||
var t,r=[]
|
||
for(t in e)c.HasOwnProperty(e,t)&&r.push(t)
|
||
return r}
|
||
function v(e,t){var r=32-t
|
||
return e<<r>>r}function _(e,t){var r=32-t
|
||
return e<<r>>>r}function w(e){return[255&e]}function S(e){return v(e[0],8)}function E(e){return[255&e]}function k(e){return _(e[0],8)}function x(e){return[(e=y(Number(e)))<0?0:e>255?255:255&e]}function C(e){return[e>>8&255,255&e]}function A(e){return v(e[0]<<8|e[1],16)}function T(e){return[e>>8&255,255&e]}function I(e){return _(e[0]<<8|e[1],16)}function P(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function M(e){return v(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function R(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function O(e){return _(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function B(e,t,r){var n,i,o,a,s,u,c,y=(1<<t-1)-1
|
||
function g(e){var t=h(e),r=e-t
|
||
return r<.5?t:r>.5?t+1:t%2?t+1:t}for(e!=e?(i=(1<<t)-1,o=m(2,r-1),n=0):e===1/0||e===-1/0?(i=(1<<t)-1,o=0,n=e<0?1:0):0===e?(i=0,o=0,n=1/e==-1/0?1:0):(n=e<0,(e=f(e))>=m(2,1-y)?(i=p(h(d(e)/l),1023),(o=g(e/m(2,i)*m(2,r)))/m(2,r)>=2&&(i+=1,o=1),i>y?(i=(1<<t)-1,o=0):(i+=y,o-=m(2,r))):(i=0,o=g(e/m(2,1-y-r)))),s=[],a=r;a;a-=1)s.push(o%2?1:0),o=h(o/2)
|
||
for(a=t;a;a-=1)s.push(i%2?1:0),i=h(i/2)
|
||
for(s.push(n?1:0),s.reverse(),u=s.join(""),c=[];u.length;)c.push(parseInt(u.substring(0,8),2)),u=u.substring(8)
|
||
return c}function N(e,t,r){var n,i,o,a,s,u,c,l,f=[]
|
||
for(n=e.length;n;n-=1)for(o=e[n-1],i=8;i;i-=1)f.push(o%2?1:0),o>>=1
|
||
return f.reverse(),a=f.join(""),s=(1<<t-1)-1,u=parseInt(a.substring(0,1),2)?-1:1,c=parseInt(a.substring(1,1+t),2),l=parseInt(a.substring(1+t),2),c===(1<<t)-1?0!==l?NaN:u*(1/0):c>0?u*m(2,c-s)*(1+l/m(2,r)):0!==l?u*m(2,-(s-1))*(l/m(2,r)):u<0?-0:0}function j(e){return N(e,11,52)}function L(e){return B(e,11,52)}function D(e){return N(e,8,23)}function U(e){return B(e,8,23)}(function(){var e=function(e){if((e=c.ToInt32(e))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer")
|
||
var t
|
||
for(this.byteLength=e,this._bytes=[],this._bytes.length=e,t=0;t<this.byteLength;t+=1)this._bytes[t]=0
|
||
g(this)}
|
||
r.ArrayBuffer=r.ArrayBuffer||e
|
||
var t=function(){}
|
||
function n(r,n,i){var l
|
||
return(l=function(t,r,n){var i,s,f,h
|
||
if(arguments.length&&"number"!=typeof arguments[0])if("object"===a(arguments[0])&&arguments[0].constructor===l)for(i=arguments[0],this.length=i.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,f=0;f<this.length;f+=1)this._setter(f,i._getter(f))
|
||
else if("object"!==a(arguments[0])||(arguments[0]instanceof e||"ArrayBuffer"===c.Class(arguments[0]))){if("object"!==a(arguments[0])||!(arguments[0]instanceof e||"ArrayBuffer"===c.Class(arguments[0])))throw new TypeError("Unexpected argument type(s)")
|
||
if(this.buffer=t,this.byteOffset=c.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range")
|
||
if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.")
|
||
if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size")
|
||
this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=c.ToUint32(n),this.byteLength=this.length*this.BYTES_PER_ELEMENT
|
||
if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(s=arguments[0],this.length=c.ToUint32(s.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0,f=0;f<this.length;f+=1)h=s[f],this._setter(f,Number(h))
|
||
else{if(this.length=c.ToInt32(arguments[0]),n<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer")
|
||
this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new e(this.byteLength),this.byteOffset=0}this.constructor=l,g(this),function(e){if(o){if(e.length>u)throw new RangeError("Array too large for polyfill")
|
||
var t
|
||
for(t=0;t<e.length;t+=1)r(t)}function r(t){o(e,t,{get:function(){return e._getter(t)},set:function(r){e._setter(t,r)},enumerable:!0,configurable:!1})}}(this)}).prototype=new t,l.prototype.BYTES_PER_ELEMENT=r,l.prototype._pack=n,l.prototype._unpack=i,l.BYTES_PER_ELEMENT=r,l.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError("Not enough arguments")
|
||
if((e=c.ToUint32(e))>=this.length)return s
|
||
var t,r,n=[]
|
||
for(t=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;t<this.BYTES_PER_ELEMENT;t+=1,r+=1)n.push(this.buffer._bytes[r])
|
||
return this._unpack(n)},l.prototype.get=l.prototype._getter,l.prototype._setter=function(e,t){if(arguments.length<2)throw new SyntaxError("Not enough arguments")
|
||
if((e=c.ToUint32(e))>=this.length)return s
|
||
var r,n,i=this._pack(t)
|
||
for(r=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;r<this.BYTES_PER_ELEMENT;r+=1,n+=1)this.buffer._bytes[n]=i[r]},l.prototype.set=function(e,t){if(arguments.length<1)throw new SyntaxError("Not enough arguments")
|
||
var r,n,i,o,s,u,l,f,h,d
|
||
if("object"===a(arguments[0])&&arguments[0].constructor===this.constructor){if(r=arguments[0],(i=c.ToUint32(arguments[1]))+r.length>this.length)throw new RangeError("Offset plus length of array is out of range")
|
||
if(f=this.byteOffset+i*this.BYTES_PER_ELEMENT,h=r.length*this.BYTES_PER_ELEMENT,r.buffer===this.buffer){for(d=[],s=0,u=r.byteOffset;s<h;s+=1,u+=1)d[s]=r.buffer._bytes[u]
|
||
for(s=0,l=f;s<h;s+=1,l+=1)this.buffer._bytes[l]=d[s]}else for(s=0,u=r.byteOffset,l=f;s<h;s+=1,u+=1,l+=1)this.buffer._bytes[l]=r.buffer._bytes[u]}else{if("object"!==a(arguments[0])||void 0===arguments[0].length)throw new TypeError("Unexpected argument type(s)")
|
||
if(n=arguments[0],o=c.ToUint32(n.length),(i=c.ToUint32(arguments[1]))+o>this.length)throw new RangeError("Offset plus length of array is out of range")
|
||
for(s=0;s<o;s+=1)u=n[s],this._setter(i+s,Number(u))}},l.prototype.subarray=function(e,t){function r(e,t,r){return e<t?t:e>r?r:e}e=c.ToInt32(e),t=c.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),e<0&&(e=this.length+e),t<0&&(t=this.length+t),e=r(e,0,this.length)
|
||
var n=(t=r(t,0,this.length))-e
|
||
return n<0&&(n=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,n)},l}var i=n(1,w,S),l=n(1,E,k),f=n(1,x,k),h=n(2,C,A),d=n(2,T,I),p=n(4,P,M),m=n(4,R,O),y=n(4,U,D),b=n(8,L,j)
|
||
r.Int8Array=r.Int8Array||i,r.Uint8Array=r.Uint8Array||l,r.Uint8ClampedArray=r.Uint8ClampedArray||f,r.Int16Array=r.Int16Array||h,r.Uint16Array=r.Uint16Array||d,r.Int32Array=r.Int32Array||p,r.Uint32Array=r.Uint32Array||m,r.Float32Array=r.Float32Array||y,r.Float64Array=r.Float64Array||b})(),function(){function e(e,t){return c.IsCallable(e.get)?e.get(t):e[t]}var t,n=(t=new r.Uint16Array([4660]),18===e(new r.Uint8Array(t.buffer),0)),i=function(e,t,n){if(0===arguments.length)e=new r.ArrayBuffer(0)
|
||
else if(!(e instanceof r.ArrayBuffer||"ArrayBuffer"===c.Class(e)))throw new TypeError("TypeError")
|
||
if(this.buffer=e||new r.ArrayBuffer(0),this.byteOffset=c.ToUint32(t),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range")
|
||
if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=c.ToUint32(n),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")
|
||
g(this)}
|
||
function o(t){return function(i,o){if((i=c.ToUint32(i))+t.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range")
|
||
i+=this.byteOffset
|
||
var a,s=new r.Uint8Array(this.buffer,i,t.BYTES_PER_ELEMENT),u=[]
|
||
for(a=0;a<t.BYTES_PER_ELEMENT;a+=1)u.push(e(s,a))
|
||
return Boolean(o)===Boolean(n)&&u.reverse(),e(new t(new r.Uint8Array(u).buffer),0)}}function a(t){return function(i,o,a){if((i=c.ToUint32(i))+t.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range")
|
||
var s,u=new t([o]),l=new r.Uint8Array(u.buffer),f=[]
|
||
for(s=0;s<t.BYTES_PER_ELEMENT;s+=1)f.push(e(l,s))
|
||
Boolean(a)===Boolean(n)&&f.reverse(),new r.Uint8Array(this.buffer,i,t.BYTES_PER_ELEMENT).set(f)}}i.prototype.getUint8=o(r.Uint8Array),i.prototype.getInt8=o(r.Int8Array),i.prototype.getUint16=o(r.Uint16Array),i.prototype.getInt16=o(r.Int16Array),i.prototype.getUint32=o(r.Uint32Array),i.prototype.getInt32=o(r.Int32Array),i.prototype.getFloat32=o(r.Float32Array),i.prototype.getFloat64=o(r.Float64Array),i.prototype.setUint8=a(r.Uint8Array),i.prototype.setInt8=a(r.Int8Array),i.prototype.setUint16=a(r.Uint16Array),i.prototype.setInt16=a(r.Int16Array),i.prototype.setUint32=a(r.Uint32Array),i.prototype.setInt32=a(r.Int32Array),i.prototype.setFloat32=a(r.Float32Array),i.prototype.setFloat64=a(r.Float64Array),r.DataView=r.DataView||i}()},{}],659:[function(e,t,r){(function(e){"use strict"
|
||
function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t]
|
||
return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e
|
||
var n=!1
|
||
return function(){if(!n){if(r("throwDeprecation"))throw new Error(t)
|
||
r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],660:[function(e,t,r){"use strict"
|
||
t.exports=function e(t,r){var o,a=0,r=r||0,s=0,u=r,c=t.length
|
||
do{if(u>=c)throw e.bytes=0,new RangeError("Could not decode varint")
|
||
o=t[u++],a+=s<28?(o&i)<<s:(o&i)*Math.pow(2,s),s+=7}while(o>=n)
|
||
e.bytes=u-r
|
||
return a}
|
||
var n=128,i=127},{}],661:[function(e,t,r){"use strict"
|
||
t.exports=function e(t,r,a){r=r||[]
|
||
a=a||0
|
||
var s=a
|
||
for(;t>=o;)r[a++]=255&t|n,t/=128
|
||
for(;t&i;)r[a++]=255&t|n,t>>>=7
|
||
r[a]=0|t
|
||
e.bytes=a-s+1
|
||
return r}
|
||
var n=128,i=-128,o=Math.pow(2,31)},{}],662:[function(e,t,r){"use strict"
|
||
t.exports={encode:e("./encode.js"),decode:e("./decode.js"),encodingLength:e("./length.js")}},{"./decode.js":660,"./encode.js":661,"./length.js":663}],663:[function(e,t,r){"use strict"
|
||
var n=Math.pow(2,7),i=Math.pow(2,14),o=Math.pow(2,21),a=Math.pow(2,28),s=Math.pow(2,35),u=Math.pow(2,42),c=Math.pow(2,49),l=Math.pow(2,56),f=Math.pow(2,63)
|
||
t.exports=function(e){return e<n?1:e<i?2:e<o?3:e<a?4:e<s?5:e<u?6:e<c?7:e<l?8:e<f?9:10}},{}],664:[function(e,t,r){"use strict"
|
||
var n="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}
|
||
t.exports=function(e){if("function"!=typeof Promise)throw"Promise support required"
|
||
var t=e.crypto||e.msCrypto
|
||
if(t){var r=t.subtle||t.webkitSubtle
|
||
if(r){var i=e.Crypto||t.constructor||Object,o=e.SubtleCrypto||r.constructor||Object,a=(e.CryptoKey||e.Key||Object,e.navigator.userAgent.indexOf("Edge/")>-1),s=!!e.msCrypto&&!a,u=!t.subtle&&!!t.webkitSubtle
|
||
if(s||u){var c={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},l={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"}
|
||
if(["generateKey","importKey","unwrapKey"].forEach(function(e){var n=r[e]
|
||
r[e]=function(i,o,a){var c,l,f,_,k,x=[].slice.call(arguments)
|
||
switch(e){case"generateKey":c=y(i),l=o,f=a
|
||
break
|
||
case"importKey":c=y(a),l=x[3],f=x[4],"jwk"===i&&((o=b(o)).alg||(o.alg=g(c)),o.key_ops||(o.key_ops="oct"!==o.kty?"d"in o?f.filter(E):f.filter(S):f.slice()),x[1]=(_=b(o),s&&(_.extractable=_.ext,delete _.ext),p(unescape(encodeURIComponent(JSON.stringify(_)))).buffer))
|
||
break
|
||
case"unwrapKey":c=x[4],l=x[5],f=x[6],x[2]=a._key}if("generateKey"===e&&"HMAC"===c.name&&c.hash)return c.length=c.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[c.hash.name],r.importKey("raw",t.getRandomValues(new Uint8Array(c.length+7>>3)),c,l,f)
|
||
if(u&&"generateKey"===e&&"RSASSA-PKCS1-v1_5"===c.name&&(!c.modulusLength||c.modulusLength>=2048))return(i=y(i)).name="RSAES-PKCS1-v1_5",delete i.hash,r.generateKey(i,!0,["encrypt","decrypt"]).then(function(e){return Promise.all([r.exportKey("jwk",e.publicKey),r.exportKey("jwk",e.privateKey)])}).then(function(e){return e[0].alg=e[1].alg=g(c),e[0].key_ops=f.filter(S),e[1].key_ops=f.filter(E),Promise.all([r.importKey("jwk",e[0],c,!0,e[0].key_ops),r.importKey("jwk",e[1],c,l,e[1].key_ops)])}).then(function(e){return{publicKey:e[0],privateKey:e[1]}})
|
||
if((u||s&&"SHA-1"===(c.hash||{}).name)&&"importKey"===e&&"jwk"===i&&"HMAC"===c.name&&"oct"===o.kty)return r.importKey("raw",p(d(o.k)),a,x[3],x[4])
|
||
if(u&&"importKey"===e&&("spki"===i||"pkcs8"===i))return r.importKey("jwk",function(e){var t=v(e),r=!1
|
||
t.length>2&&(r=!0,t.shift())
|
||
var n={ext:!0}
|
||
switch(t[0][0]){case"1.2.840.113549.1.1.1":var i=["n","e","d","p","q","dp","dq","qi"],o=v(t[1])
|
||
r&&o.shift()
|
||
for(var a=0;a<o.length;a++)o[a][0]||(o[a]=o[a].subarray(1)),n[i[a]]=h(m(o[a]))
|
||
n.kty="RSA"
|
||
break
|
||
default:throw new TypeError("Unsupported key type")}return n}(o),a,x[3],x[4])
|
||
if(s&&"unwrapKey"===e)return r.decrypt(x[3],a,o).then(function(e){return r.importKey(i,e,x[4],x[5],x[6])})
|
||
try{k=n.apply(r,x)}catch(e){return Promise.reject(e)}return s&&(k=new Promise(function(e,t){k.onabort=k.onerror=function(e){t(e)},k.oncomplete=function(t){e(t.target.result)}})),k=k.then(function(e){return"HMAC"===c.name&&(c.length||(c.length=8*e.algorithm.length)),0==c.name.search("RSA")&&(c.modulusLength||(c.modulusLength=(e.publicKey||e).algorithm.modulusLength),c.publicExponent||(c.publicExponent=(e.publicKey||e).algorithm.publicExponent)),e=e.publicKey&&e.privateKey?{publicKey:new w(e.publicKey,c,l,f.filter(S)),privateKey:new w(e.privateKey,c,l,f.filter(E))}:new w(e,c,l,f)})}}),["exportKey","wrapKey"].forEach(function(e){var t=r[e]
|
||
r[e]=function(n,i,o){var a,c=[].slice.call(arguments)
|
||
switch(e){case"exportKey":c[1]=i._key
|
||
break
|
||
case"wrapKey":c[1]=i._key,c[2]=o._key}if((u||s&&"SHA-1"===(i.algorithm.hash||{}).name)&&"exportKey"===e&&"jwk"===n&&"HMAC"===i.algorithm.name&&(c[0]="raw"),!u||"exportKey"!==e||"spki"!==n&&"pkcs8"!==n||(c[0]="jwk"),s&&"wrapKey"===e)return r.exportKey(n,i).then(function(e){return"jwk"===n&&(e=p(unescape(encodeURIComponent(JSON.stringify(b(e)))))),r.encrypt(c[3],o,e)})
|
||
try{a=t.apply(r,c)}catch(e){return Promise.reject(e)}return s&&(a=new Promise(function(e,t){a.onabort=a.onerror=function(e){t(e)},a.oncomplete=function(t){e(t.target.result)}})),"exportKey"===e&&"jwk"===n&&(a=a.then(function(e){return(u||s&&"SHA-1"===(i.algorithm.hash||{}).name)&&"HMAC"===i.algorithm.name?{kty:"oct",alg:g(i.algorithm),key_ops:i.usages.slice(),ext:!0,k:h(m(e))}:((e=b(e)).alg||(e.alg=g(i.algorithm)),e.key_ops||(e.key_ops="public"===i.type?i.usages.filter(S):"private"===i.type?i.usages.filter(E):i.usages.slice()),e)})),!u||"exportKey"!==e||"spki"!==n&&"pkcs8"!==n||(a=a.then(function(e){return e=function(e){var t,r=[["",null]],n=!1
|
||
switch(e.kty){case"RSA":for(var i=["n","e","d","p","q","dp","dq","qi"],o=[],a=0;a<i.length&&i[a]in e;a++){var s=o[a]=p(d(e[i[a]]))
|
||
128&s[0]&&(o[a]=new Uint8Array(s.length+1),o[a].set(s,1))}o.length>2&&(n=!0,o.unshift(new Uint8Array([0]))),r[0][0]="1.2.840.113549.1.1.1",t=o
|
||
break
|
||
default:throw new TypeError("Unsupported key type")}return r.push(new Uint8Array(_(t)).buffer),n?r.unshift(new Uint8Array([0])):r[1]={tag:3,value:r[1]},new Uint8Array(_(r)).buffer}(b(e))})),a}}),["encrypt","decrypt","sign","verify"].forEach(function(e){var t=r[e]
|
||
r[e]=function(n,i,o,a){if(s&&(!o.byteLength||a&&!a.byteLength))throw new Error("Empy input is not allowed")
|
||
var u,c=[].slice.call(arguments),l=y(n)
|
||
if(s&&"decrypt"===e&&"AES-GCM"===l.name){var f=n.tagLength>>3
|
||
c[2]=(o.buffer||o).slice(0,o.byteLength-f),n.tag=(o.buffer||o).slice(o.byteLength-f)}c[1]=i._key
|
||
try{u=t.apply(r,c)}catch(e){return Promise.reject(e)}return s&&(u=new Promise(function(t,r){u.onabort=u.onerror=function(e){r(e)},u.oncomplete=function(r){r=r.target.result
|
||
if("encrypt"===e&&r instanceof AesGcmEncryptResult){var n=r.ciphertext,i=r.tag;(r=new Uint8Array(n.byteLength+i.byteLength)).set(new Uint8Array(n),0),r.set(new Uint8Array(i),n.byteLength),r=r.buffer}t(r)}})),u}}),s){var f=r.digest
|
||
r.digest=function(e,t){if(!t.byteLength)throw new Error("Empy input is not allowed")
|
||
var n
|
||
try{n=f.call(r,e,t)}catch(e){return Promise.reject(e)}return n=new Promise(function(e,t){n.onabort=n.onerror=function(e){t(e)},n.oncomplete=function(t){e(t.target.result)}})},e.crypto=Object.create(t,{getRandomValues:{value:function(e){return t.getRandomValues(e)}},subtle:{value:r}}),e.CryptoKey=w}u&&(t.subtle=r,e.Crypto=i,e.SubtleCrypto=o,e.CryptoKey=w)}}}function h(e){return btoa(e).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function d(e){return e=(e+="===").slice(0,-e.length%4),atob(e.replace(/-/g,"+").replace(/_/g,"/"))}function p(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=e.charCodeAt(r)
|
||
return t}function m(e){return e instanceof ArrayBuffer&&(e=new Uint8Array(e)),String.fromCharCode.apply(String,e)}function y(e){var t={name:(e.name||e||"").toUpperCase().replace("V","v")}
|
||
switch(t.name){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break
|
||
case"AES-CBC":case"AES-GCM":case"AES-KW":e.length&&(t.length=e.length)
|
||
break
|
||
case"HMAC":e.hash&&(t.hash=y(e.hash)),e.length&&(t.length=e.length)
|
||
break
|
||
case"RSAES-PKCS1-v1_5":e.publicExponent&&(t.publicExponent=new Uint8Array(e.publicExponent)),e.modulusLength&&(t.modulusLength=e.modulusLength)
|
||
break
|
||
case"RSASSA-PKCS1-v1_5":case"RSA-OAEP":e.hash&&(t.hash=y(e.hash)),e.publicExponent&&(t.publicExponent=new Uint8Array(e.publicExponent)),e.modulusLength&&(t.modulusLength=e.modulusLength)
|
||
break
|
||
default:throw new SyntaxError("Bad algorithm name")}return t}function g(e){return{HMAC:{"SHA-1":"HS1","SHA-256":"HS256","SHA-384":"HS384","SHA-512":"HS512"},"RSASSA-PKCS1-v1_5":{"SHA-1":"RS1","SHA-256":"RS256","SHA-384":"RS384","SHA-512":"RS512"},"RSAES-PKCS1-v1_5":{"":"RSA1_5"},"RSA-OAEP":{"SHA-1":"RSA-OAEP","SHA-256":"RSA-OAEP-256"},"AES-KW":{128:"A128KW",192:"A192KW",256:"A256KW"},"AES-GCM":{128:"A128GCM",192:"A192GCM",256:"A256GCM"},"AES-CBC":{128:"A128CBC",192:"A192CBC",256:"A256CBC"}}[e.name][(e.hash||{}).name||e.length||""]}function b(e){(e instanceof ArrayBuffer||e instanceof Uint8Array)&&(e=JSON.parse(decodeURIComponent(escape(m(e)))))
|
||
var t={kty:e.kty,alg:e.alg,ext:e.ext||e.extractable}
|
||
switch(t.kty){case"oct":t.k=e.k
|
||
case"RSA":["n","e","d","p","q","dp","dq","qi","oth"].forEach(function(r){r in e&&(t[r]=e[r])})
|
||
break
|
||
default:throw new TypeError("Unsupported key type")}return t}function v(e,t){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),t||(t={pos:0,end:e.length}),t.end-t.pos<2||t.end>e.length)throw new RangeError("Malformed DER")
|
||
var r,n=e[t.pos++],i=e[t.pos++]
|
||
if(i>=128){if(i&=127,t.end-t.pos<i)throw new RangeError("Malformed DER")
|
||
for(var o=0;i--;)o<<=8,o|=e[t.pos++]
|
||
i=o}if(t.end-t.pos<i)throw new RangeError("Malformed DER")
|
||
switch(n){case 2:r=e.subarray(t.pos,t.pos+=i)
|
||
break
|
||
case 3:if(e[t.pos++])throw new Error("Unsupported bit string")
|
||
i--
|
||
case 4:r=new Uint8Array(e.subarray(t.pos,t.pos+=i)).buffer
|
||
break
|
||
case 5:r=null
|
||
break
|
||
case 6:var a=btoa(m(e.subarray(t.pos,t.pos+=i)))
|
||
if(!(a in c))throw new Error("Unsupported OBJECT ID "+a)
|
||
r=c[a]
|
||
break
|
||
case 48:r=[]
|
||
for(var s=t.pos+i;t.pos<s;)r.push(v(e,t))
|
||
break
|
||
default:throw new Error("Unsupported DER tag 0x"+n.toString(16))}return r}function _(e,t){t||(t=[])
|
||
var r=0,i=0,o=t.length+2
|
||
if(t.push(0,0),e instanceof Uint8Array){r=2,i=e.length
|
||
for(var a=0;a<i;a++)t.push(e[a])}else if(e instanceof ArrayBuffer){r=4,i=e.byteLength,e=new Uint8Array(e)
|
||
for(a=0;a<i;a++)t.push(e[a])}else if(null===e)r=5,i=0
|
||
else if("string"==typeof e&&e in l){var s=p(atob(l[e]))
|
||
r=6,i=s.length
|
||
for(a=0;a<i;a++)t.push(s[a])}else if(e instanceof Array){for(a=0;a<e.length;a++)_(e[a],t)
|
||
r=48,i=t.length-o}else{if(!("object"===(void 0===e?"undefined":n(e))&&3===e.tag&&e.value instanceof ArrayBuffer))throw new Error("Unsupported DER value "+e)
|
||
r=3,i=(e=new Uint8Array(e.value)).byteLength,t.push(0)
|
||
for(a=0;a<i;a++)t.push(e[a])
|
||
i++}if(i>=128){var u=i
|
||
i=4
|
||
for(t.splice(o,0,u>>24&255,u>>16&255,u>>8&255,255&u);i>1&&!(u>>24);)u<<=8,i--
|
||
i<4&&t.splice(o,4-i),i|=128}return t.splice(o-2,2,r,i),t}function w(e,t,r,n){Object.defineProperties(this,{_key:{value:e},type:{value:e.type,enumerable:!0},extractable:{value:void 0===r?e.extractable:r,enumerable:!0},algorithm:{value:void 0===t?e.algorithm:t,enumerable:!0},usages:{value:void 0===n?e.usages:n,enumerable:!0}})}function S(e){return"verify"===e||"encrypt"===e||"wrapKey"===e}function E(e){return"sign"===e||"decrypt"===e||"unwrapKey"===e}}},{}],665:[function(e,t,r){"use strict"
|
||
t.exports=function e(t,r){if(t&&r)return e(t)(r)
|
||
if("function"!=typeof t)throw new TypeError("need wrapper function")
|
||
Object.keys(t).forEach(function(e){n[e]=t[e]})
|
||
return n
|
||
function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r]
|
||
var n=t.apply(this,e),i=e[e.length-1]
|
||
return"function"==typeof n&&n!==i&&Object.keys(i).forEach(function(e){n[e]=i[e]}),n}}},{}],666:[function(e,t,r){arguments[4][158][0].apply(r,arguments)},{dup:158}],667:[function(e,t,r){"use strict"
|
||
function n(e){var t=this
|
||
if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach(function(e){t.push(e)})
|
||
else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r])
|
||
return t}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n)
|
||
this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list")
|
||
var t=e.next,r=e.prev
|
||
t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e)
|
||
var t=this.head
|
||
e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e)
|
||
var t=this.tail
|
||
e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e])
|
||
return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e])
|
||
return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value
|
||
return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value
|
||
return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this
|
||
for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this
|
||
for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next
|
||
if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev
|
||
if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this
|
||
for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next
|
||
return r},n.prototype.mapReverse=function(e,t){t=t||this
|
||
for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev
|
||
return r},n.prototype.reduce=function(e,t){var r,n=this.head
|
||
if(arguments.length>1)r=t
|
||
else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value")
|
||
n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next
|
||
return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail
|
||
if(arguments.length>1)r=t
|
||
else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value")
|
||
n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev
|
||
return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next
|
||
return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev
|
||
return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length)
|
||
var r=new n
|
||
if(t<e||t<0)return r
|
||
e<0&&(e=0),t>this.length&&(t=this.length)
|
||
for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next
|
||
for(;null!==o&&i<t;i++,o=o.next)r.push(o.value)
|
||
return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length)
|
||
var r=new n
|
||
if(t<e||t<0)return r
|
||
e<0&&(e=0),t>this.length&&(t=this.length)
|
||
for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev
|
||
for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value)
|
||
return r},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev
|
||
r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this}},{}],668:[function(e,t,r){"use strict"
|
||
define("npm:ethers",function(){return{default:e("ethers")}}),define("npm:kredits-contracts",function(){return{default:e("kredits-contracts")}})},{ethers:163,"kredits-contracts":396}]},{},[668]),"undefined"==typeof FastBoot&&function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e()
|
||
else if("function"==typeof define&&define.amd)define([],e)
|
||
else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=e()}}(function(){return function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require
|
||
if(!s&&u)return u(a,!0)
|
||
if(o)return o(a,!0)
|
||
var c=new Error("Cannot find module '"+a+"'")
|
||
throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}}
|
||
t[a][0].call(l.exports,function(e){var r=t[a][1][e]
|
||
return i(r||e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a])
|
||
return i}}()({1:[function(e,t,r){},{}],2:[function(e,t,r){var n=e(6)
|
||
function i(e){if(e){var t=[0,0,0],r=1,i=e.match(/^#([a-fA-F0-9]{3})$/i)
|
||
if(i){i=i[1]
|
||
for(var o=0;o<t.length;o++)t[o]=parseInt(i[o]+i[o],16)}else if(i=e.match(/^#([a-fA-F0-9]{6})$/i)){i=i[1]
|
||
for(o=0;o<t.length;o++)t[o]=parseInt(i.slice(2*o,2*o+2),16)}else if(i=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<t.length;o++)t[o]=parseInt(i[o+1])
|
||
r=parseFloat(i[4])}else if(i=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(o=0;o<t.length;o++)t[o]=Math.round(2.55*parseFloat(i[o+1]))
|
||
r=parseFloat(i[4])}else if(i=e.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0]
|
||
if(!(t=n[i[1]]))return}for(o=0;o<t.length;o++)t[o]=l(t[o],0,255)
|
||
return r=r||0==r?l(r,0,1):1,t[3]=r,t}}function o(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/)
|
||
if(t){var r=parseFloat(t[4])
|
||
return[l(parseInt(t[1]),0,360),l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(r)?1:r,0,1)]}}}function a(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/)
|
||
if(t){var r=parseFloat(t[4])
|
||
return[l(parseInt(t[1]),0,360),l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(r)?1:r,0,1)]}}}function s(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function u(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function c(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function l(e,t,r){return Math.min(Math.max(t,e),r)}function f(e){var t=e.toString(16).toUpperCase()
|
||
return t.length<2?"0"+t:t}t.exports={getRgba:i,getHsla:o,getRgb:function(e){var t=i(e)
|
||
return t&&t.slice(0,3)},getHsl:function(e){var t=o(e)
|
||
return t&&t.slice(0,3)},getHwb:a,getAlpha:function(e){var t=i(e)
|
||
if(t)return t[3]
|
||
if(t=o(e))return t[3]
|
||
if(t=a(e))return t[3]},hexString:function(e){return"#"+f(e[0])+f(e[1])+f(e[2])},rgbString:function(e,t){if(t<1||e[3]&&e[3]<1)return s(e,t)
|
||
return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:s,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return u(e,t)
|
||
var r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100)
|
||
return"rgb("+r+"%, "+n+"%, "+i+"%)"},percentaString:u,hslString:function(e,t){if(t<1||e[3]&&e[3]<1)return c(e,t)
|
||
return"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:c,hwbString:function(e,t){void 0===t&&(t=void 0!==e[3]?e[3]:1)
|
||
return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return h[e.slice(0,3)]}}
|
||
var h={}
|
||
for(var d in n)h[n[d]]=d},{6:6}],3:[function(e,t,r){var n=e(5),i=e(2),o=function(e){return e instanceof o?e:this instanceof o?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=i.getRgba(e))?this.setValues("rgb",t):(t=i.getHsla(e))?this.setValues("hsl",t):(t=i.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new o(e)
|
||
var t}
|
||
o.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values
|
||
return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values
|
||
return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values
|
||
return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return i.hexString(this.values.rgb)},rgbString:function(){return i.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return i.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return i.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return i.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return i.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return i.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return i.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb
|
||
return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],r=0;r<e.length;r++){var n=e[r]/255
|
||
t[r]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),r=e.luminosity()
|
||
return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e)
|
||
return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb
|
||
return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t]
|
||
return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl
|
||
return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl
|
||
return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl
|
||
return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl
|
||
return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb
|
||
return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb
|
||
return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2]
|
||
return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha
|
||
return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha
|
||
return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,r=(t[0]+e)%360
|
||
return t[0]=r<0?360+r:r,this.setValues("hsl",t),this},mix:function(e,t){var r=e,n=void 0===t?.5:t,i=2*n-1,o=this.alpha()-r.alpha(),a=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-a
|
||
return this.rgb(a*this.red()+s*r.red(),a*this.green()+s*r.green(),a*this.blue()+s*r.blue()).alpha(this.alpha()*n+r.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var e,t,r=new o,n=this.values,i=r.values
|
||
for(var a in n)n.hasOwnProperty(a)&&(e=n[a],"[object Array]"===(t={}.toString.call(e))?i[a]=e.slice(0):"[object Number]"===t?i[a]=e:console.error("unexpected color value:",e))
|
||
return r}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(e){for(var t=this.values,r={},n=0;n<e.length;n++)r[e.charAt(n)]=t[e][n]
|
||
return 1!==t.alpha&&(r.a=t.alpha),r},o.prototype.setValues=function(e,t){var r,i,o=this.values,a=this.spaces,s=this.maxes,u=1
|
||
if(this.valid=!0,"alpha"===e)u=t
|
||
else if(t.length)o[e]=t.slice(0,e.length),u=t[e.length]
|
||
else if(void 0!==t[e.charAt(0)]){for(r=0;r<e.length;r++)o[e][r]=t[e.charAt(r)]
|
||
u=t.a}else if(void 0!==t[a[e][0]]){var c=a[e]
|
||
for(r=0;r<e.length;r++)o[e][r]=t[c[r]]
|
||
u=t.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===u?o.alpha:u)),"alpha"===e)return!1
|
||
for(r=0;r<e.length;r++)i=Math.max(0,Math.min(s[e][r],o[e][r])),o[e][r]=Math.round(i)
|
||
for(var l in a)l!==e&&(o[l]=n[e][l](o[e]))
|
||
return!0},o.prototype.setSpace=function(e,t){var r=t[0]
|
||
return void 0===r?this.getValues(e):("number"==typeof r&&(r=Array.prototype.slice.call(t)),this.setValues(e,r),this)},o.prototype.setChannel=function(e,t,r){var n=this.values[e]
|
||
return void 0===r?n[t]:r===n[t]?this:(n[t]=r,this.setValues(e,n),this)},"undefined"!=typeof window&&(window.Color=o),t.exports=o},{2:2,5:5}],4:[function(e,t,n){function i(e){var t,r,n=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(n,i,o),s=Math.max(n,i,o),u=s-a
|
||
return s==a?t=0:n==s?t=(i-o)/u:i==s?t=2+(o-n)/u:o==s&&(t=4+(n-i)/u),(t=Math.min(60*t,360))<0&&(t+=360),r=(a+s)/2,[t,100*(s==a?0:r<=.5?u/(s+a):u/(2-s-a)),100*r]}function o(e){var t,r,n=e[0],i=e[1],o=e[2],a=Math.min(n,i,o),s=Math.max(n,i,o),u=s-a
|
||
return r=0==s?0:u/s*1e3/10,s==a?t=0:n==s?t=(i-o)/u:i==s?t=2+(o-n)/u:o==s&&(t=4+(n-i)/u),(t=Math.min(60*t,360))<0&&(t+=360),[t,r,s/255*1e3/10]}function a(e){var t=e[0],r=e[1],n=e[2]
|
||
return[i(e)[0],100*(1/255*Math.min(t,Math.min(r,n))),100*(n=1-1/255*Math.max(t,Math.max(r,n)))]}function s(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255
|
||
return[100*((1-r-(t=Math.min(1-r,1-n,1-i)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]}function u(e){return x[JSON.stringify(e)]}function c(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255
|
||
return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]}function l(e){var t=c(e),r=t[0],n=t[1],i=t[2]
|
||
return n/=100,i/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function f(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,u=e[2]/100
|
||
if(0==s)return[o=255*u,o,o]
|
||
t=2*u-(r=u<.5?u*(1+s):u+s-u*s),i=[0,0,0]
|
||
for(var c=0;c<3;c++)(n=a+1/3*-(c-1))<0&&n++,n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c]=255*o
|
||
return i}function h(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*o),u=255*n*(1-r*(1-o))
|
||
n*=255
|
||
switch(i){case 0:return[n,u,a]
|
||
case 1:return[s,n,a]
|
||
case 2:return[a,n,u]
|
||
case 3:return[a,s,n]
|
||
case 4:return[u,a,n]
|
||
case 5:return[n,a,s]}}function d(e){var t,n,i,o,a=e[0]/360,s=e[1]/100,u=e[2]/100,c=s+u
|
||
switch(c>1&&(s/=c,u/=c),n=1-u,i=6*a-(t=Math.floor(6*a)),0!=(1&t)&&(i=1-i),o=s+i*(n-s),t){default:case 6:case 0:r=n,g=o,b=s
|
||
break
|
||
case 1:r=o,g=n,b=s
|
||
break
|
||
case 2:r=s,g=n,b=o
|
||
break
|
||
case 3:r=s,g=o,b=n
|
||
break
|
||
case 4:r=o,g=s,b=n
|
||
break
|
||
case 5:r=n,g=s,b=o}return[255*r,255*g,255*b]}function p(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100
|
||
return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]}function m(e){var t,r,n,i=e[0]/100,o=e[1]/100,a=e[2]/100
|
||
return r=-.9689*i+1.8758*o+.0415*a,n=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:t*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]}function y(e){var t=e[0],r=e[1],n=e[2]
|
||
return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function v(e){var t,r,n,i,o=e[0],a=e[1],s=e[2]
|
||
return o<=8?i=(r=100*o/903.3)/100*7.787+16/116:(r=100*Math.pow((o+16)/116,3),i=Math.pow(r/100,1/3)),[t=t/95.047<=.008856?t=95.047*(a/500+i-16/116)/7.787:95.047*Math.pow(a/500+i,3),r,n=n/108.883<=.008859?n=108.883*(i-s/200-16/116)/7.787:108.883*Math.pow(i-s/200,3)]}function _(e){var t,r=e[0],n=e[1],i=e[2]
|
||
return(t=360*Math.atan2(i,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+i*i),t]}function w(e){return m(v(e))}function S(e){var t,r=e[0],n=e[1]
|
||
return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]}function E(e){return k[e]}t.exports={rgb2hsl:i,rgb2hsv:o,rgb2hwb:a,rgb2cmyk:s,rgb2keyword:u,rgb2xyz:c,rgb2lab:l,rgb2lch:function(e){return _(l(e))},hsl2rgb:f,hsl2hsv:function(e){var t=e[0],r=e[1]/100,n=e[2]/100
|
||
if(0===n)return[0,0,0]
|
||
return[t,100*(2*(r*=(n*=2)<=1?n:2-n)/(n+r)),100*((n+r)/2)]},hsl2hwb:function(e){return a(f(e))},hsl2cmyk:function(e){return s(f(e))},hsl2keyword:function(e){return u(f(e))},hsv2rgb:h,hsv2hsl:function(e){var t,r,n=e[0],i=e[1]/100,o=e[2]/100
|
||
return t=i*o,[n,100*(t=(t/=(r=(2-i)*o)<=1?r:2-r)||0),100*(r/=2)]},hsv2hwb:function(e){return a(h(e))},hsv2cmyk:function(e){return s(h(e))},hsv2keyword:function(e){return u(h(e))},hwb2rgb:d,hwb2hsl:function(e){return i(d(e))},hwb2hsv:function(e){return o(d(e))},hwb2cmyk:function(e){return s(d(e))},hwb2keyword:function(e){return u(d(e))},cmyk2rgb:p,cmyk2hsl:function(e){return i(p(e))},cmyk2hsv:function(e){return o(p(e))},cmyk2hwb:function(e){return a(p(e))},cmyk2keyword:function(e){return u(p(e))},keyword2rgb:E,keyword2hsl:function(e){return i(E(e))},keyword2hsv:function(e){return o(E(e))},keyword2hwb:function(e){return a(E(e))},keyword2cmyk:function(e){return s(E(e))},keyword2lab:function(e){return l(E(e))},keyword2xyz:function(e){return c(E(e))},xyz2rgb:m,xyz2lab:y,xyz2lch:function(e){return _(y(e))},lab2xyz:v,lab2rgb:w,lab2lch:_,lch2lab:S,lch2xyz:function(e){return v(S(e))},lch2rgb:function(e){return w(S(e))}}
|
||
var k={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},x={}
|
||
for(var C in k)x[JSON.stringify(k[C])]=C},{}],5:[function(e,t,r){var n=e(4),i=function(){return new c}
|
||
for(var o in n){i[o+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),n[e](t)}}(o)
|
||
var a=/(\w+)2(\w+)/.exec(o),s=a[1],u=a[2];(i[s]=i[s]||{})[u]=i[o]=function(e){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments))
|
||
var r=n[e](t)
|
||
if("string"==typeof r||void 0===r)return r
|
||
for(var i=0;i<r.length;i++)r[i]=Math.round(r[i])
|
||
return r}}(o)}var c=function(){this.convs={}}
|
||
c.prototype.routeSpace=function(e,t){var r=t[0]
|
||
return void 0===r?this.getValues(e):("number"==typeof r&&(r=Array.prototype.slice.call(t)),this.setValues(e,r))},c.prototype.setValues=function(e,t){return this.space=e,this.convs={},this.convs[e]=t,this},c.prototype.getValues=function(e){var t=this.convs[e]
|
||
if(!t){var r=this.space,n=this.convs[r]
|
||
t=i[r][e](n),this.convs[e]=t}return t},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(e){c.prototype[e]=function(t){return this.routeSpace(e,arguments)}}),t.exports=i},{4:4}],6:[function(e,t,r){"use strict"
|
||
t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(e,t,r){var n=e(29)()
|
||
n.helpers=e(45),e(27)(n),n.defaults=e(25),n.Element=e(26),n.elements=e(40),n.Interaction=e(28),n.layouts=e(30),n.platform=e(48),n.plugins=e(31),n.Ticks=e(34),e(22)(n),e(23)(n),e(24)(n),e(33)(n),e(32)(n),e(35)(n),e(55)(n),e(53)(n),e(54)(n),e(56)(n),e(57)(n),e(58)(n),e(15)(n),e(16)(n),e(17)(n),e(18)(n),e(19)(n),e(20)(n),e(21)(n),e(8)(n)
|
||
e(9)(n),e(10)(n),e(11)(n),e(12)(n),e(13)(n),e(14)(n)
|
||
var i=e(49)
|
||
for(var o in i)i.hasOwnProperty(o)&&n.plugins.register(i[o])
|
||
n.platform.initialize(),t.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=i.legend._element,n.Title=i.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(e,t,r){"use strict"
|
||
t.exports=function(e){e.Bar=function(t,r){return r.type="bar",new e(t,r)}}},{}],9:[function(e,t,r){"use strict"
|
||
t.exports=function(e){e.Bubble=function(t,r){return r.type="bubble",new e(t,r)}}},{}],10:[function(e,t,r){"use strict"
|
||
t.exports=function(e){e.Doughnut=function(t,r){return r.type="doughnut",new e(t,r)}}},{}],11:[function(e,t,r){"use strict"
|
||
t.exports=function(e){e.Line=function(t,r){return r.type="line",new e(t,r)}}},{}],12:[function(e,t,r){"use strict"
|
||
t.exports=function(e){e.PolarArea=function(t,r){return r.type="polarArea",new e(t,r)}}},{}],13:[function(e,t,r){"use strict"
|
||
t.exports=function(e){e.Radar=function(t,r){return r.type="radar",new e(t,r)}}},{}],14:[function(e,t,r){"use strict"
|
||
t.exports=function(e){e.Scatter=function(t,r){return r.type="scatter",new e(t,r)}}},{}],15:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(40),o=e(45)
|
||
n._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),n._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(e,t){var r=""
|
||
return e.length>0&&(e[0].yLabel?r=e[0].yLabel:t.labels.length>0&&e[0].index<t.labels.length&&(r=t.labels[e[0].index])),r},label:function(e,t){return(t.datasets[e.datasetIndex].label||"")+": "+e.xLabel}},mode:"index",axis:"y"}}),t.exports=function(e){e.controllers.bar=e.DatasetController.extend({dataElementType:i.Rectangle,initialize:function(){var t
|
||
e.DatasetController.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},update:function(e){var t,r,n=this.getMeta().data
|
||
for(this._ruler=this.getRuler(),t=0,r=n.length;t<r;++t)this.updateElement(n[t],t,e)},updateElement:function(e,t,r){var n=this,i=n.chart,a=n.getMeta(),s=n.getDataset(),u=e.custom||{},c=i.options.elements.rectangle
|
||
e._xScale=n.getScaleForId(a.xAxisID),e._yScale=n.getScaleForId(a.yAxisID),e._datasetIndex=n.index,e._index=t,e._model={datasetLabel:s.label,label:i.data.labels[t],borderSkipped:u.borderSkipped?u.borderSkipped:c.borderSkipped,backgroundColor:u.backgroundColor?u.backgroundColor:o.valueAtIndexOrDefault(s.backgroundColor,t,c.backgroundColor),borderColor:u.borderColor?u.borderColor:o.valueAtIndexOrDefault(s.borderColor,t,c.borderColor),borderWidth:u.borderWidth?u.borderWidth:o.valueAtIndexOrDefault(s.borderWidth,t,c.borderWidth)},n.updateElementGeometry(e,t,r),e.pivot()},updateElementGeometry:function(e,t,r){var n=this,i=e._model,o=n.getValueScale(),a=o.getBasePixel(),s=o.isHorizontal(),u=n._ruler||n.getRuler(),c=n.calculateBarValuePixels(n.index,t),l=n.calculateBarIndexPixels(n.index,t,u)
|
||
i.horizontal=s,i.base=r?a:c.base,i.x=s?r?a:c.head:l.center,i.y=s?l.center:r?a:c.head,i.height=s?l.size:void 0,i.width=s?void 0:l.size},getValueScaleId:function(){return this.getMeta().yAxisID},getIndexScaleId:function(){return this.getMeta().xAxisID},getValueScale:function(){return this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return this.getScaleForId(this.getIndexScaleId())},_getStacks:function(e){var t,r,n=this.chart,i=this.getIndexScale().options.stacked,o=void 0===e?n.data.datasets.length:e+1,a=[]
|
||
for(t=0;t<o;++t)(r=n.getDatasetMeta(t)).bar&&n.isDatasetVisible(t)&&(!1===i||!0===i&&-1===a.indexOf(r.stack)||void 0===i&&(void 0===r.stack||-1===a.indexOf(r.stack)))&&a.push(r.stack)
|
||
return a},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var r=this._getStacks(e),n=void 0!==t?r.indexOf(t):-1
|
||
return-1===n?r.length-1:n},getRuler:function(){var e,t,r=this.getIndexScale(),n=this.getStackCount(),i=this.index,a=r.isHorizontal(),s=a?r.left:r.top,u=s+(a?r.width:r.height),c=[]
|
||
for(e=0,t=this.getMeta().data.length;e<t;++e)c.push(r.getPixelForValue(null,e,i))
|
||
return{min:o.isNullOrUndef(r.options.barThickness)?function(e,t){var r,n,i,o,a=e.isHorizontal()?e.width:e.height,s=e.getTicks()
|
||
for(i=1,o=t.length;i<o;++i)a=Math.min(a,t[i]-t[i-1])
|
||
for(i=0,o=s.length;i<o;++i)n=e.getPixelForTick(i),a=i>0?Math.min(a,n-r):a,r=n
|
||
return a}(r,c):-1,pixels:c,start:s,end:u,stackCount:n,scale:r}},calculateBarValuePixels:function(e,t){var r,n,i,o,a,s,u=this.chart,c=this.getMeta(),l=this.getValueScale(),f=u.data.datasets,h=l.getRightValue(f[e].data[t]),d=l.options.stacked,p=c.stack,m=0
|
||
if(d||void 0===d&&void 0!==p)for(r=0;r<e;++r)(n=u.getDatasetMeta(r)).bar&&n.stack===p&&n.controller.getValueScaleId()===l.id&&u.isDatasetVisible(r)&&(i=l.getRightValue(f[r].data[t]),(h<0&&i<0||h>=0&&i>0)&&(m+=i))
|
||
return o=l.getPixelForValue(m),{size:s=((a=l.getPixelForValue(m+h))-o)/2,base:o,head:a,center:a+s/2}},calculateBarIndexPixels:function(e,t,r){var n=r.scale.options,i="flex"===n.barThickness?function(e,t,r){var n,i=t.pixels,o=i[e],a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null,u=r.categoryPercentage
|
||
return null===a&&(a=o-(null===s?t.end-o:s-o)),null===s&&(s=o+o-a),n=o-(o-a)/2*u,{chunk:(s-a)/2*u/t.stackCount,ratio:r.barPercentage,start:n}}(t,r,n):function(e,t,r){var n,i,a=r.barThickness,s=t.stackCount,u=t.pixels[e]
|
||
return o.isNullOrUndef(a)?(n=t.min*r.categoryPercentage,i=r.barPercentage):(n=a*s,i=1),{chunk:n/s,ratio:i,start:u-n/2}}(t,r,n),a=this.getStackIndex(e,this.getMeta().stack),s=i.start+i.chunk*a+i.chunk/2,u=Math.min(o.valueOrDefault(n.maxBarThickness,1/0),i.chunk*i.ratio)
|
||
return{base:s-u/2,head:s+u/2,center:s,size:u}},draw:function(){var e=this.chart,t=this.getValueScale(),r=this.getMeta().data,n=this.getDataset(),i=r.length,a=0
|
||
for(o.canvas.clipArea(e.ctx,e.chartArea);a<i;++a)isNaN(t.getRightValue(n.data[a]))||r[a].draw()
|
||
o.canvas.unclipArea(e.ctx)},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e._index,n=e.custom||{},i=e._model
|
||
i.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:o.valueAtIndexOrDefault(t.hoverBackgroundColor,r,o.getHoverColor(i.backgroundColor)),i.borderColor=n.hoverBorderColor?n.hoverBorderColor:o.valueAtIndexOrDefault(t.hoverBorderColor,r,o.getHoverColor(i.borderColor)),i.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:o.valueAtIndexOrDefault(t.hoverBorderWidth,r,i.borderWidth)},removeHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e._index,n=e.custom||{},i=e._model,a=this.chart.options.elements.rectangle
|
||
i.backgroundColor=n.backgroundColor?n.backgroundColor:o.valueAtIndexOrDefault(t.backgroundColor,r,a.backgroundColor),i.borderColor=n.borderColor?n.borderColor:o.valueAtIndexOrDefault(t.borderColor,r,a.borderColor),i.borderWidth=n.borderWidth?n.borderWidth:o.valueAtIndexOrDefault(t.borderWidth,r,a.borderWidth)}}),e.controllers.horizontalBar=e.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(40),o=e(45)
|
||
n._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var r=t.datasets[e.datasetIndex].label||"",n=t.datasets[e.datasetIndex].data[e.index]
|
||
return r+": ("+e.xLabel+", "+e.yLabel+", "+n.r+")"}}}}),t.exports=function(e){e.controllers.bubble=e.DatasetController.extend({dataElementType:i.Point,update:function(e){var t=this,r=t.getMeta().data
|
||
o.each(r,function(r,n){t.updateElement(r,n,e)})},updateElement:function(e,t,r){var n=this,i=n.getMeta(),o=e.custom||{},a=n.getScaleForId(i.xAxisID),s=n.getScaleForId(i.yAxisID),u=n._resolveElementOptions(e,t),c=n.getDataset().data[t],l=n.index,f=r?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof c?c:NaN,t,l),h=r?s.getBasePixel():s.getPixelForValue(c,t,l)
|
||
e._xScale=a,e._yScale=s,e._options=u,e._datasetIndex=l,e._index=t,e._model={backgroundColor:u.backgroundColor,borderColor:u.borderColor,borderWidth:u.borderWidth,hitRadius:u.hitRadius,pointStyle:u.pointStyle,radius:r?0:u.radius,skip:o.skip||isNaN(f)||isNaN(h),x:f,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,r=e._options
|
||
t.backgroundColor=o.valueOrDefault(r.hoverBackgroundColor,o.getHoverColor(r.backgroundColor)),t.borderColor=o.valueOrDefault(r.hoverBorderColor,o.getHoverColor(r.borderColor)),t.borderWidth=o.valueOrDefault(r.hoverBorderWidth,r.borderWidth),t.radius=r.radius+r.hoverRadius},removeHoverStyle:function(e){var t=e._model,r=e._options
|
||
t.backgroundColor=r.backgroundColor,t.borderColor=r.borderColor,t.borderWidth=r.borderWidth,t.radius=r.radius},_resolveElementOptions:function(e,t){var r,n,i,a=this.chart,s=a.data.datasets[this.index],u=e.custom||{},c=a.options.elements.point,l=o.options.resolve,f=s.data[t],h={},d={chart:a,dataIndex:t,dataset:s,datasetIndex:this.index},p=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"]
|
||
for(r=0,n=p.length;r<n;++r)h[i=p[r]]=l([u[i],s[i],c[i]],d,t)
|
||
return h.radius=l([u.radius,f?f.r:void 0,s.radius,c.radius],d,t),h}})}},{25:25,40:40,45:45}],17:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(40),o=e(45)
|
||
n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t=[]
|
||
t.push('<ul class="'+e.id+'-legend">')
|
||
var r=e.data,n=r.datasets,i=r.labels
|
||
if(n.length)for(var o=0;o<n[0].data.length;++o)t.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),i[o]&&t.push(i[o]),t.push("</li>")
|
||
return t.push("</ul>"),t.join("")},legend:{labels:{generateLabels:function(e){var t=e.data
|
||
return t.labels.length&&t.datasets.length?t.labels.map(function(r,n){var i=e.getDatasetMeta(0),a=t.datasets[0],s=i.data[n],u=s&&s.custom||{},c=o.valueAtIndexOrDefault,l=e.options.elements.arc
|
||
return{text:r,fillStyle:u.backgroundColor?u.backgroundColor:c(a.backgroundColor,n,l.backgroundColor),strokeStyle:u.borderColor?u.borderColor:c(a.borderColor,n,l.borderColor),lineWidth:u.borderWidth?u.borderWidth:c(a.borderWidth,n,l.borderWidth),hidden:isNaN(a.data[n])||i.data[n].hidden,index:n}}):[]}},onClick:function(e,t){var r,n,i,o=t.index,a=this.chart
|
||
for(r=0,n=(a.data.datasets||[]).length;r<n;++r)(i=a.getDatasetMeta(r)).data[o]&&(i.data[o].hidden=!i.data[o].hidden)
|
||
a.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var r=t.labels[e.index],n=": "+t.datasets[e.datasetIndex].data[e.index]
|
||
return o.isArray(r)?(r=r.slice())[0]+=n:r+=n,r}}}}),n._set("pie",o.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),t.exports=function(e){e.controllers.doughnut=e.controllers.pie=e.DatasetController.extend({dataElementType:i.Arc,linkScales:o.noop,getRingIndex:function(e){for(var t=0,r=0;r<e;++r)this.chart.isDatasetVisible(r)&&++t
|
||
return t},update:function(e){var t=this,r=t.chart,n=r.chartArea,i=r.options,a=i.elements.arc,s=n.right-n.left-a.borderWidth,u=n.bottom-n.top-a.borderWidth,c=Math.min(s,u),l={x:0,y:0},f=t.getMeta(),h=i.cutoutPercentage,d=i.circumference
|
||
if(d<2*Math.PI){var p=i.rotation%(2*Math.PI),m=(p+=2*Math.PI*(p>=Math.PI?-1:p<-Math.PI?1:0))+d,y={x:Math.cos(p),y:Math.sin(p)},g={x:Math.cos(m),y:Math.sin(m)},b=p<=0&&m>=0||p<=2*Math.PI&&2*Math.PI<=m,v=p<=.5*Math.PI&&.5*Math.PI<=m||p<=2.5*Math.PI&&2.5*Math.PI<=m,_=p<=-Math.PI&&-Math.PI<=m||p<=Math.PI&&Math.PI<=m,w=p<=.5*-Math.PI&&.5*-Math.PI<=m||p<=1.5*Math.PI&&1.5*Math.PI<=m,S=h/100,E={x:_?-1:Math.min(y.x*(y.x<0?1:S),g.x*(g.x<0?1:S)),y:w?-1:Math.min(y.y*(y.y<0?1:S),g.y*(g.y<0?1:S))},k={x:b?1:Math.max(y.x*(y.x>0?1:S),g.x*(g.x>0?1:S)),y:v?1:Math.max(y.y*(y.y>0?1:S),g.y*(g.y>0?1:S))},x={width:.5*(k.x-E.x),height:.5*(k.y-E.y)}
|
||
c=Math.min(s/x.width,u/x.height),l={x:-.5*(k.x+E.x),y:-.5*(k.y+E.y)}}r.borderWidth=t.getMaxBorderWidth(f.data),r.outerRadius=Math.max((c-r.borderWidth)/2,0),r.innerRadius=Math.max(h?r.outerRadius/100*h:0,0),r.radiusLength=(r.outerRadius-r.innerRadius)/r.getVisibleDatasetCount(),r.offsetX=l.x*r.outerRadius,r.offsetY=l.y*r.outerRadius,f.total=t.calculateTotal(),t.outerRadius=r.outerRadius-r.radiusLength*t.getRingIndex(t.index),t.innerRadius=Math.max(t.outerRadius-r.radiusLength,0),o.each(f.data,function(r,n){t.updateElement(r,n,e)})},updateElement:function(e,t,r){var n=this,i=n.chart,a=i.chartArea,s=i.options,u=s.animation,c=(a.left+a.right)/2,l=(a.top+a.bottom)/2,f=s.rotation,h=s.rotation,d=n.getDataset(),p=r&&u.animateRotate?0:e.hidden?0:n.calculateCircumference(d.data[t])*(s.circumference/(2*Math.PI)),m=r&&u.animateScale?0:n.innerRadius,y=r&&u.animateScale?0:n.outerRadius,g=o.valueAtIndexOrDefault
|
||
o.extend(e,{_datasetIndex:n.index,_index:t,_model:{x:c+i.offsetX,y:l+i.offsetY,startAngle:f,endAngle:h,circumference:p,outerRadius:y,innerRadius:m,label:g(d.label,t,i.data.labels[t])}})
|
||
var b=e._model
|
||
this.removeHoverStyle(e),r&&u.animateRotate||(b.startAngle=0===t?s.rotation:n.getMeta().data[t-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),e.pivot()},removeHoverStyle:function(t){e.DatasetController.prototype.removeHoverStyle.call(this,t,this.chart.options.elements.arc)},calculateTotal:function(){var e,t=this.getDataset(),r=this.getMeta(),n=0
|
||
return o.each(r.data,function(r,i){e=t.data[i],isNaN(e)||r.hidden||(n+=Math.abs(e))}),n},calculateCircumference:function(e){var t=this.getMeta().total
|
||
return t>0&&!isNaN(e)?2*Math.PI*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){for(var t,r,n=0,i=this.index,o=e.length,a=0;a<o;a++)t=e[a]._model?e[a]._model.borderWidth:0,n=(r=e[a]._chart?e[a]._chart.config.data.datasets[i].hoverBorderWidth:0)>(n=t>n?t:n)?r:n
|
||
return n}})}},{25:25,40:40,45:45}],18:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(40),o=e(45)
|
||
n._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),t.exports=function(e){function t(e,t){return o.valueOrDefault(e.showLine,t.showLines)}e.controllers.line=e.DatasetController.extend({datasetElementType:i.Line,dataElementType:i.Point,update:function(e){var r,n,i,a=this,s=a.getMeta(),u=s.dataset,c=s.data||[],l=a.chart.options,f=l.elements.line,h=a.getScaleForId(s.yAxisID),d=a.getDataset(),p=t(d,l)
|
||
for(p&&(i=u.custom||{},void 0!==d.tension&&void 0===d.lineTension&&(d.lineTension=d.tension),u._scale=h,u._datasetIndex=a.index,u._children=c,u._model={spanGaps:d.spanGaps?d.spanGaps:l.spanGaps,tension:i.tension?i.tension:o.valueOrDefault(d.lineTension,f.tension),backgroundColor:i.backgroundColor?i.backgroundColor:d.backgroundColor||f.backgroundColor,borderWidth:i.borderWidth?i.borderWidth:d.borderWidth||f.borderWidth,borderColor:i.borderColor?i.borderColor:d.borderColor||f.borderColor,borderCapStyle:i.borderCapStyle?i.borderCapStyle:d.borderCapStyle||f.borderCapStyle,borderDash:i.borderDash?i.borderDash:d.borderDash||f.borderDash,borderDashOffset:i.borderDashOffset?i.borderDashOffset:d.borderDashOffset||f.borderDashOffset,borderJoinStyle:i.borderJoinStyle?i.borderJoinStyle:d.borderJoinStyle||f.borderJoinStyle,fill:i.fill?i.fill:void 0!==d.fill?d.fill:f.fill,steppedLine:i.steppedLine?i.steppedLine:o.valueOrDefault(d.steppedLine,f.stepped),cubicInterpolationMode:i.cubicInterpolationMode?i.cubicInterpolationMode:o.valueOrDefault(d.cubicInterpolationMode,f.cubicInterpolationMode)},u.pivot()),r=0,n=c.length;r<n;++r)a.updateElement(c[r],r,e)
|
||
for(p&&0!==u._model.tension&&a.updateBezierControlPoints(),r=0,n=c.length;r<n;++r)c[r].pivot()},getPointBackgroundColor:function(e,t){var r=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),i=e.custom||{}
|
||
return i.backgroundColor?r=i.backgroundColor:n.pointBackgroundColor?r=o.valueAtIndexOrDefault(n.pointBackgroundColor,t,r):n.backgroundColor&&(r=n.backgroundColor),r},getPointBorderColor:function(e,t){var r=this.chart.options.elements.point.borderColor,n=this.getDataset(),i=e.custom||{}
|
||
return i.borderColor?r=i.borderColor:n.pointBorderColor?r=o.valueAtIndexOrDefault(n.pointBorderColor,t,r):n.borderColor&&(r=n.borderColor),r},getPointBorderWidth:function(e,t){var r=this.chart.options.elements.point.borderWidth,n=this.getDataset(),i=e.custom||{}
|
||
return isNaN(i.borderWidth)?!isNaN(n.pointBorderWidth)||o.isArray(n.pointBorderWidth)?r=o.valueAtIndexOrDefault(n.pointBorderWidth,t,r):isNaN(n.borderWidth)||(r=n.borderWidth):r=i.borderWidth,r},updateElement:function(e,t,r){var n,i,a=this,s=a.getMeta(),u=e.custom||{},c=a.getDataset(),l=a.index,f=c.data[t],h=a.getScaleForId(s.yAxisID),d=a.getScaleForId(s.xAxisID),p=a.chart.options.elements.point
|
||
void 0!==c.radius&&void 0===c.pointRadius&&(c.pointRadius=c.radius),void 0!==c.hitRadius&&void 0===c.pointHitRadius&&(c.pointHitRadius=c.hitRadius),n=d.getPixelForValue("object"==typeof f?f:NaN,t,l),i=r?h.getBasePixel():a.calculatePointY(f,t,l),e._xScale=d,e._yScale=h,e._datasetIndex=l,e._index=t,e._model={x:n,y:i,skip:u.skip||isNaN(n)||isNaN(i),radius:u.radius||o.valueAtIndexOrDefault(c.pointRadius,t,p.radius),pointStyle:u.pointStyle||o.valueAtIndexOrDefault(c.pointStyle,t,p.pointStyle),backgroundColor:a.getPointBackgroundColor(e,t),borderColor:a.getPointBorderColor(e,t),borderWidth:a.getPointBorderWidth(e,t),tension:s.dataset._model?s.dataset._model.tension:0,steppedLine:!!s.dataset._model&&s.dataset._model.steppedLine,hitRadius:u.hitRadius||o.valueAtIndexOrDefault(c.pointHitRadius,t,p.hitRadius)}},calculatePointY:function(e,t,r){var n,i,o,a=this.chart,s=this.getMeta(),u=this.getScaleForId(s.yAxisID),c=0,l=0
|
||
if(u.options.stacked){for(n=0;n<r;n++)if(i=a.data.datasets[n],"line"===(o=a.getDatasetMeta(n)).type&&o.yAxisID===u.id&&a.isDatasetVisible(n)){var f=Number(u.getRightValue(i.data[t]))
|
||
f<0?l+=f||0:c+=f||0}var h=Number(u.getRightValue(e))
|
||
return h<0?u.getPixelForValue(l+h):u.getPixelForValue(c+h)}return u.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,r,n,i=this.getMeta(),a=this.chart.chartArea,s=i.data||[]
|
||
function u(e,t,r){return Math.max(Math.min(e,r),t)}if(i.dataset._model.spanGaps&&(s=s.filter(function(e){return!e._model.skip})),"monotone"===i.dataset._model.cubicInterpolationMode)o.splineCurveMonotone(s)
|
||
else for(e=0,t=s.length;e<t;++e)r=s[e]._model,n=o.splineCurve(o.previousItem(s,e)._model,r,o.nextItem(s,e)._model,i.dataset._model.tension),r.controlPointPreviousX=n.previous.x,r.controlPointPreviousY=n.previous.y,r.controlPointNextX=n.next.x,r.controlPointNextY=n.next.y
|
||
if(this.chart.options.elements.line.capBezierPoints)for(e=0,t=s.length;e<t;++e)(r=s[e]._model).controlPointPreviousX=u(r.controlPointPreviousX,a.left,a.right),r.controlPointPreviousY=u(r.controlPointPreviousY,a.top,a.bottom),r.controlPointNextX=u(r.controlPointNextX,a.left,a.right),r.controlPointNextY=u(r.controlPointNextY,a.top,a.bottom)},draw:function(){var e=this.chart,r=this.getMeta(),n=r.data||[],i=e.chartArea,a=n.length,s=0
|
||
for(o.canvas.clipArea(e.ctx,i),t(this.getDataset(),e.options)&&r.dataset.draw(),o.canvas.unclipArea(e.ctx);s<a;++s)n[s].draw(i)},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e._index,n=e.custom||{},i=e._model
|
||
i.radius=n.hoverRadius||o.valueAtIndexOrDefault(t.pointHoverRadius,r,this.chart.options.elements.point.hoverRadius),i.backgroundColor=n.hoverBackgroundColor||o.valueAtIndexOrDefault(t.pointHoverBackgroundColor,r,o.getHoverColor(i.backgroundColor)),i.borderColor=n.hoverBorderColor||o.valueAtIndexOrDefault(t.pointHoverBorderColor,r,o.getHoverColor(i.borderColor)),i.borderWidth=n.hoverBorderWidth||o.valueAtIndexOrDefault(t.pointHoverBorderWidth,r,i.borderWidth)},removeHoverStyle:function(e){var t=this,r=t.chart.data.datasets[e._datasetIndex],n=e._index,i=e.custom||{},a=e._model
|
||
void 0!==r.radius&&void 0===r.pointRadius&&(r.pointRadius=r.radius),a.radius=i.radius||o.valueAtIndexOrDefault(r.pointRadius,n,t.chart.options.elements.point.radius),a.backgroundColor=t.getPointBackgroundColor(e,n),a.borderColor=t.getPointBorderColor(e,n),a.borderWidth=t.getPointBorderWidth(e,n)}})}},{25:25,40:40,45:45}],19:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(40),o=e(45)
|
||
n._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t=[]
|
||
t.push('<ul class="'+e.id+'-legend">')
|
||
var r=e.data,n=r.datasets,i=r.labels
|
||
if(n.length)for(var o=0;o<n[0].data.length;++o)t.push('<li><span style="background-color:'+n[0].backgroundColor[o]+'"></span>'),i[o]&&t.push(i[o]),t.push("</li>")
|
||
return t.push("</ul>"),t.join("")},legend:{labels:{generateLabels:function(e){var t=e.data
|
||
return t.labels.length&&t.datasets.length?t.labels.map(function(r,n){var i=e.getDatasetMeta(0),a=t.datasets[0],s=i.data[n].custom||{},u=o.valueAtIndexOrDefault,c=e.options.elements.arc
|
||
return{text:r,fillStyle:s.backgroundColor?s.backgroundColor:u(a.backgroundColor,n,c.backgroundColor),strokeStyle:s.borderColor?s.borderColor:u(a.borderColor,n,c.borderColor),lineWidth:s.borderWidth?s.borderWidth:u(a.borderWidth,n,c.borderWidth),hidden:isNaN(a.data[n])||i.data[n].hidden,index:n}}):[]}},onClick:function(e,t){var r,n,i,o=t.index,a=this.chart
|
||
for(r=0,n=(a.data.datasets||[]).length;r<n;++r)(i=a.getDatasetMeta(r)).data[o].hidden=!i.data[o].hidden
|
||
a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}}),t.exports=function(e){e.controllers.polarArea=e.DatasetController.extend({dataElementType:i.Arc,linkScales:o.noop,update:function(e){var t=this,r=t.chart,n=r.chartArea,i=t.getMeta(),a=r.options,s=a.elements.arc,u=Math.min(n.right-n.left,n.bottom-n.top)
|
||
r.outerRadius=Math.max((u-s.borderWidth/2)/2,0),r.innerRadius=Math.max(a.cutoutPercentage?r.outerRadius/100*a.cutoutPercentage:1,0),r.radiusLength=(r.outerRadius-r.innerRadius)/r.getVisibleDatasetCount(),t.outerRadius=r.outerRadius-r.radiusLength*t.index,t.innerRadius=t.outerRadius-r.radiusLength,i.count=t.countVisibleElements(),o.each(i.data,function(r,n){t.updateElement(r,n,e)})},updateElement:function(e,t,r){for(var n=this,i=n.chart,a=n.getDataset(),s=i.options,u=s.animation,c=i.scale,l=i.data.labels,f=n.calculateCircumference(a.data[t]),h=c.xCenter,d=c.yCenter,p=0,m=n.getMeta(),y=0;y<t;++y)isNaN(a.data[y])||m.data[y].hidden||++p
|
||
var g=s.startAngle,b=e.hidden?0:c.getDistanceFromCenterForValue(a.data[t]),v=g+f*p,_=v+(e.hidden?0:f),w=u.animateScale?0:c.getDistanceFromCenterForValue(a.data[t])
|
||
o.extend(e,{_datasetIndex:n.index,_index:t,_scale:c,_model:{x:h,y:d,innerRadius:0,outerRadius:r?w:b,startAngle:r&&u.animateRotate?g:v,endAngle:r&&u.animateRotate?g:_,label:o.valueAtIndexOrDefault(l,t,l[t])}}),n.removeHoverStyle(e),e.pivot()},removeHoverStyle:function(t){e.DatasetController.prototype.removeHoverStyle.call(this,t,this.chart.options.elements.arc)},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),r=0
|
||
return o.each(t.data,function(t,n){isNaN(e.data[n])||t.hidden||r++}),r},calculateCircumference:function(e){var t=this.getMeta().count
|
||
return t>0&&!isNaN(e)?2*Math.PI/t:0}})}},{25:25,40:40,45:45}],20:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(40),o=e(45)
|
||
n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),t.exports=function(e){e.controllers.radar=e.DatasetController.extend({datasetElementType:i.Line,dataElementType:i.Point,linkScales:o.noop,update:function(e){var t=this,r=t.getMeta(),n=r.dataset,i=r.data,a=n.custom||{},s=t.getDataset(),u=t.chart.options.elements.line,c=t.chart.scale
|
||
void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),o.extend(r.dataset,{_datasetIndex:t.index,_scale:c,_children:i,_loop:!0,_model:{tension:a.tension?a.tension:o.valueOrDefault(s.lineTension,u.tension),backgroundColor:a.backgroundColor?a.backgroundColor:s.backgroundColor||u.backgroundColor,borderWidth:a.borderWidth?a.borderWidth:s.borderWidth||u.borderWidth,borderColor:a.borderColor?a.borderColor:s.borderColor||u.borderColor,fill:a.fill?a.fill:void 0!==s.fill?s.fill:u.fill,borderCapStyle:a.borderCapStyle?a.borderCapStyle:s.borderCapStyle||u.borderCapStyle,borderDash:a.borderDash?a.borderDash:s.borderDash||u.borderDash,borderDashOffset:a.borderDashOffset?a.borderDashOffset:s.borderDashOffset||u.borderDashOffset,borderJoinStyle:a.borderJoinStyle?a.borderJoinStyle:s.borderJoinStyle||u.borderJoinStyle}}),r.dataset.pivot(),o.each(i,function(r,n){t.updateElement(r,n,e)},t),t.updateBezierControlPoints()},updateElement:function(e,t,r){var n=this,i=e.custom||{},a=n.getDataset(),s=n.chart.scale,u=n.chart.options.elements.point,c=s.getPointPositionForValue(t,a.data[t])
|
||
void 0!==a.radius&&void 0===a.pointRadius&&(a.pointRadius=a.radius),void 0!==a.hitRadius&&void 0===a.pointHitRadius&&(a.pointHitRadius=a.hitRadius),o.extend(e,{_datasetIndex:n.index,_index:t,_scale:s,_model:{x:r?s.xCenter:c.x,y:r?s.yCenter:c.y,tension:i.tension?i.tension:o.valueOrDefault(a.lineTension,n.chart.options.elements.line.tension),radius:i.radius?i.radius:o.valueAtIndexOrDefault(a.pointRadius,t,u.radius),backgroundColor:i.backgroundColor?i.backgroundColor:o.valueAtIndexOrDefault(a.pointBackgroundColor,t,u.backgroundColor),borderColor:i.borderColor?i.borderColor:o.valueAtIndexOrDefault(a.pointBorderColor,t,u.borderColor),borderWidth:i.borderWidth?i.borderWidth:o.valueAtIndexOrDefault(a.pointBorderWidth,t,u.borderWidth),pointStyle:i.pointStyle?i.pointStyle:o.valueAtIndexOrDefault(a.pointStyle,t,u.pointStyle),hitRadius:i.hitRadius?i.hitRadius:o.valueAtIndexOrDefault(a.pointHitRadius,t,u.hitRadius)}}),e._model.skip=i.skip?i.skip:isNaN(e._model.x)||isNaN(e._model.y)},updateBezierControlPoints:function(){var e=this.chart.chartArea,t=this.getMeta()
|
||
o.each(t.data,function(r,n){var i=r._model,a=o.splineCurve(o.previousItem(t.data,n,!0)._model,i,o.nextItem(t.data,n,!0)._model,i.tension)
|
||
i.controlPointPreviousX=Math.max(Math.min(a.previous.x,e.right),e.left),i.controlPointPreviousY=Math.max(Math.min(a.previous.y,e.bottom),e.top),i.controlPointNextX=Math.max(Math.min(a.next.x,e.right),e.left),i.controlPointNextY=Math.max(Math.min(a.next.y,e.bottom),e.top),r.pivot()})},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e.custom||{},n=e._index,i=e._model
|
||
i.radius=r.hoverRadius?r.hoverRadius:o.valueAtIndexOrDefault(t.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),i.backgroundColor=r.hoverBackgroundColor?r.hoverBackgroundColor:o.valueAtIndexOrDefault(t.pointHoverBackgroundColor,n,o.getHoverColor(i.backgroundColor)),i.borderColor=r.hoverBorderColor?r.hoverBorderColor:o.valueAtIndexOrDefault(t.pointHoverBorderColor,n,o.getHoverColor(i.borderColor)),i.borderWidth=r.hoverBorderWidth?r.hoverBorderWidth:o.valueAtIndexOrDefault(t.pointHoverBorderWidth,n,i.borderWidth)},removeHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e.custom||{},n=e._index,i=e._model,a=this.chart.options.elements.point
|
||
i.radius=r.radius?r.radius:o.valueAtIndexOrDefault(t.pointRadius,n,a.radius),i.backgroundColor=r.backgroundColor?r.backgroundColor:o.valueAtIndexOrDefault(t.pointBackgroundColor,n,a.backgroundColor),i.borderColor=r.borderColor?r.borderColor:o.valueAtIndexOrDefault(t.pointBorderColor,n,a.borderColor),i.borderWidth=r.borderWidth?r.borderWidth:o.valueAtIndexOrDefault(t.pointBorderWidth,n,a.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(e,t,r){"use strict"
|
||
e(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),t.exports=function(e){e.controllers.scatter=e.controllers.line}},{25:25}],22:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45)
|
||
n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:o.noop,onComplete:o.noop}}),t.exports=function(e){e.Animation=i.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),e.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(e,t,r,n){var i,o,a=this.animations
|
||
for(t.chart=e,n||(e.animating=!0),i=0,o=a.length;i<o;++i)if(a[i].chart===e)return void(a[i]=t)
|
||
a.push(t),1===a.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=o.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this
|
||
null===e.request&&(e.request=o.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){var e=this,t=Date.now(),r=0
|
||
e.dropFrames>1&&(r=Math.floor(e.dropFrames),e.dropFrames=e.dropFrames%1),e.advance(1+r)
|
||
var n=Date.now()
|
||
e.dropFrames+=(n-t)/e.frameDuration,e.animations.length>0&&e.requestAnimationFrame()},advance:function(e){for(var t,r,n=this.animations,i=0;i<n.length;)r=(t=n[i]).chart,t.currentStep=(t.currentStep||0)+e,t.currentStep=Math.min(t.currentStep,t.numSteps),o.callback(t.render,[r,t],r),o.callback(t.onAnimationProgress,[t],r),t.currentStep>=t.numSteps?(o.callback(t.onAnimationComplete,[t],r),r.animating=!1,n.splice(i,1)):++i}},Object.defineProperty(e.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(e.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}})}},{25:25,26:26,45:45}],23:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(45),o=e(28),a=e(30),s=e(48),u=e(31)
|
||
t.exports=function(e){function t(e){return"top"===e||"bottom"===e}e.types={},e.instances={},e.controllers={},i.extend(e.prototype,{construct:function(t,r){var o=this
|
||
r=function(e){var t=(e=e||{}).data=e.data||{}
|
||
return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=i.configMerge(n.global,n[e.type],e.options||{}),e}(r)
|
||
var a=s.acquireContext(t,r),u=a&&a.canvas,c=u&&u.height,l=u&&u.width
|
||
o.id=i.uid(),o.ctx=a,o.canvas=u,o.config=r,o.width=l,o.height=c,o.aspectRatio=c?l/c:null,o.options=r.options,o._bufferedRender=!1,o.chart=o,o.controller=o,e.instances[o.id]=o,Object.defineProperty(o,"data",{get:function(){return o.config.data},set:function(e){o.config.data=e}}),a&&u?(o.initialize(),o.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this
|
||
return u.notify(e,"beforeInit"),i.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.initToolTip(),u.notify(e,"afterInit"),e},clear:function(){return i.canvas.clear(this),this},stop:function(){return e.animationService.cancelAnimation(this),this},resize:function(e){var t=this,r=t.options,n=t.canvas,o=r.maintainAspectRatio&&t.aspectRatio||null,a=Math.max(0,Math.floor(i.getMaximumWidth(n))),s=Math.max(0,Math.floor(o?a/o:i.getMaximumHeight(n)))
|
||
if((t.width!==a||t.height!==s)&&(n.width=t.width=a,n.height=t.height=s,n.style.width=a+"px",n.style.height=s+"px",i.retinaScale(t,r.devicePixelRatio),!e)){var c={width:a,height:s}
|
||
u.notify(t,"resize",[c]),t.options.onResize&&t.options.onResize(t,c),t.stop(),t.update(t.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},r=e.scale
|
||
i.each(t.xAxes,function(e,t){e.id=e.id||"x-axis-"+t}),i.each(t.yAxes,function(e,t){e.id=e.id||"y-axis-"+t}),r&&(r.id=r.id||"scale")},buildOrUpdateScales:function(){var r=this,n=r.options,o=r.scales||{},a=[],s=Object.keys(o).reduce(function(e,t){return e[t]=!1,e},{})
|
||
n.scales&&(a=a.concat((n.scales.xAxes||[]).map(function(e){return{options:e,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(e){return{options:e,dtype:"linear",dposition:"left"}}))),n.scale&&a.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),i.each(a,function(n){var a=n.options,u=a.id,c=i.valueOrDefault(a.type,n.dtype)
|
||
t(a.position)!==t(n.dposition)&&(a.position=n.dposition),s[u]=!0
|
||
var l=null
|
||
if(u in o&&o[u].type===c)(l=o[u]).options=a,l.ctx=r.ctx,l.chart=r
|
||
else{var f=e.scaleService.getScaleConstructor(c)
|
||
if(!f)return
|
||
l=new f({id:u,type:c,options:a,ctx:r.ctx,chart:r}),o[l.id]=l}l.mergeTicksOptions(),n.isDefault&&(r.scale=l)}),i.each(s,function(e,t){e||delete o[t]}),r.scales=o,e.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,r=[],n=[]
|
||
return i.each(t.data.datasets,function(i,o){var a=t.getDatasetMeta(o),s=i.type||t.config.type
|
||
if(a.type&&a.type!==s&&(t.destroyDatasetMeta(o),a=t.getDatasetMeta(o)),a.type=s,r.push(a.type),a.controller)a.controller.updateIndex(o),a.controller.linkScales()
|
||
else{var u=e.controllers[a.type]
|
||
if(void 0===u)throw new Error('"'+a.type+'" is not a chart type.')
|
||
a.controller=new u(t,o),n.push(a.controller)}},t),n},resetElements:function(){var e=this
|
||
i.each(e.data.datasets,function(t,r){e.getDatasetMeta(r).controller.reset()},e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var r,n,o=this
|
||
if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n=(r=o).options,i.each(r.scales,function(e){a.removeBox(r,e)}),n=i.configMerge(e.defaults.global,e.defaults[r.config.type],n),r.options=r.config.options=n,r.ensureScalesHaveIDs(),r.buildOrUpdateScales(),r.tooltip._options=n.tooltips,r.tooltip.initialize(),u._invalidate(o),!1!==u.notify(o,"beforeUpdate")){o.tooltip._data=o.data
|
||
var s=o.buildOrUpdateControllers()
|
||
i.each(o.data.datasets,function(e,t){o.getDatasetMeta(t).controller.buildOrUpdateElements()},o),o.updateLayout(),o.options.animation&&o.options.animation.duration&&i.each(s,function(e){e.reset()}),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],u.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:o.render(t)}},updateLayout:function(){!1!==u.notify(this,"beforeLayout")&&(a.update(this,this.width,this.height),u.notify(this,"afterScaleUpdate"),u.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==u.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e)
|
||
u.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),r={meta:t,index:e}
|
||
!1!==u.notify(this,"beforeDatasetUpdate",[r])&&(t.controller.update(),u.notify(this,"afterDatasetUpdate",[r]))},render:function(t){var r=this
|
||
t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]})
|
||
var n=t.duration,o=t.lazy
|
||
if(!1!==u.notify(r,"beforeRender")){var a=r.options.animation,s=function(e){u.notify(r,"afterRender"),i.callback(a&&a.onComplete,[e],r)}
|
||
if(a&&(void 0!==n&&0!==n||void 0===n&&0!==a.duration)){var c=new e.Animation({numSteps:(n||a.duration)/16.66,easing:t.easing||a.easing,render:function(e,t){var r=i.easing.effects[t.easing],n=t.currentStep,o=n/t.numSteps
|
||
e.draw(r(o),o,n)},onAnimationProgress:a.onProgress,onAnimationComplete:s})
|
||
e.animationService.addAnimation(r,c,n,o)}else r.draw(),s(new e.Animation({numSteps:0,chart:r}))
|
||
return r}},draw:function(e){var t=this
|
||
t.clear(),i.isNullOrUndef(e)&&(e=1),t.transition(e),!1!==u.notify(t,"beforeDraw",[e])&&(i.each(t.boxes,function(e){e.draw(t.chartArea)},t),t.scale&&t.scale.draw(),t.drawDatasets(e),t._drawTooltip(e),u.notify(t,"afterDraw",[e]))},transition:function(e){for(var t=0,r=(this.data.datasets||[]).length;t<r;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e)
|
||
this.tooltip.transition(e)},drawDatasets:function(e){var t=this
|
||
if(!1!==u.notify(t,"beforeDatasetsDraw",[e])){for(var r=(t.data.datasets||[]).length-1;r>=0;--r)t.isDatasetVisible(r)&&t.drawDataset(r,e)
|
||
u.notify(t,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var r=this.getDatasetMeta(e),n={meta:r,index:e,easingValue:t}
|
||
!1!==u.notify(this,"beforeDatasetDraw",[n])&&(r.controller.draw(t),u.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,r={tooltip:t,easingValue:e}
|
||
!1!==u.notify(this,"beforeTooltipDraw",[r])&&(t.draw(),u.notify(this,"afterTooltipDraw",[r]))},getElementAtEvent:function(e){return o.modes.single(this,e)},getElementsAtEvent:function(e){return o.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return o.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,r){var n=o.modes[t]
|
||
return"function"==typeof n?n(this,e,r):[]},getDatasetAtEvent:function(e){return o.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e]
|
||
t._meta||(t._meta={})
|
||
var r=t._meta[this.id]
|
||
return r||(r=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),r},getVisibleDatasetCount:function(){for(var e=0,t=0,r=this.data.datasets.length;t<r;++t)this.isDatasetVisible(t)&&e++
|
||
return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e)
|
||
return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,r=this.data.datasets[e],n=r._meta&&r._meta[t]
|
||
n&&(n.controller.destroy(),delete r._meta[t])},destroy:function(){var t,r,n=this,o=n.canvas
|
||
for(n.stop(),t=0,r=n.data.datasets.length;t<r;++t)n.destroyDatasetMeta(t)
|
||
o&&(n.unbindEvents(),i.canvas.clear(n),s.releaseContext(n.ctx),n.canvas=null,n.ctx=null),u.notify(n,"destroy"),delete e.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this
|
||
t.tooltip=new e.Tooltip({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var e=this,t=e._listeners={},r=function(){e.eventHandler.apply(e,arguments)}
|
||
i.each(e.options.events,function(n){s.addEventListener(e,n,r),t[n]=r}),e.options.responsive&&(r=function(){e.resize()},s.addEventListener(e,"resize",r),t.resize=r)},unbindEvents:function(){var e=this,t=e._listeners
|
||
t&&(delete e._listeners,i.each(t,function(t,r){s.removeEventListener(e,r,t)}))},updateHoverStyle:function(e,t,r){var n,i,o,a=r?"setHoverStyle":"removeHoverStyle"
|
||
for(i=0,o=e.length;i<o;++i)(n=e[i])&&this.getDatasetMeta(n._datasetIndex).controller[a](n)},eventHandler:function(e){var t=this,r=t.tooltip
|
||
if(!1!==u.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null
|
||
var n=t.handleEvent(e)
|
||
r&&(n=r._start?r.handleEvent(e):n|r.handleEvent(e)),u.notify(t,"afterEvent",[e])
|
||
var i=t._bufferedRequest
|
||
return i?t.render(i):n&&!t.animating&&(t.stop(),t.render(t.options.hover.animationDuration,!0)),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,r=this,n=r.options||{},o=n.hover
|
||
return r.lastActive=r.lastActive||[],"mouseout"===e.type?r.active=[]:r.active=r.getElementsAtEventForMode(e,o.mode,o),i.callback(n.onHover||n.hover.onHover,[e.native,r.active],r),"mouseup"!==e.type&&"click"!==e.type||n.onClick&&n.onClick.call(r,e.native,r.active),r.lastActive.length&&r.updateHoverStyle(r.lastActive,o.mode,!1),r.active.length&&o.mode&&r.updateHoverStyle(r.active,o.mode,!0),t=!i.arrayEquals(r.active,r.lastActive),r.lastActive=r.active,t}}),e.Controller=e}},{25:25,28:28,30:30,31:31,45:45,48:48}],24:[function(e,t,r){"use strict"
|
||
var n=e(45)
|
||
t.exports=function(e){var t=["push","pop","shift","splice","unshift"]
|
||
function r(e,r){var n=e._chartjs
|
||
if(n){var i=n.listeners,o=i.indexOf(r);-1!==o&&i.splice(o,1),i.length>0||(t.forEach(function(t){delete e[t]}),delete e._chartjs)}}e.DatasetController=function(e,t){this.initialize(e,t)},n.extend(e.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(e,t){this.chart=e,this.index=t,this.linkScales(),this.addElements()},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),r=e.getDataset()
|
||
null!==t.xAxisID&&t.xAxisID in e.chart.scales||(t.xAxisID=r.xAxisID||e.chart.options.scales.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in e.chart.scales||(t.yAxisID=r.yAxisID||e.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},reset:function(){this.update(!0)},destroy:function(){this._data&&r(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType
|
||
return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType
|
||
return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,r=this.getMeta(),n=this.getDataset().data||[],i=r.data
|
||
for(e=0,t=n.length;e<t;++e)i[e]=i[e]||this.createMetaData(e)
|
||
r.dataset=r.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e)
|
||
this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,i,o=this,a=o.getDataset(),s=a.data||(a.data=[])
|
||
o._data!==s&&(o._data&&r(o._data,o),i=o,(e=s)._chartjs?e._chartjs.listeners.push(i):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[i]}}),t.forEach(function(t){var r="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=e[t]
|
||
Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),o=i.apply(this,t)
|
||
return n.each(e._chartjs.listeners,function(e){"function"==typeof e[r]&&e[r].apply(e,t)}),o}})})),o._data=s),o.resyncElements()},update:n.noop,transition:function(e){for(var t=this.getMeta(),r=t.data||[],n=r.length,i=0;i<n;++i)r[i].transition(e)
|
||
t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],r=t.length,n=0
|
||
for(e.dataset&&e.dataset.draw();n<r;++n)t[n].draw()},removeHoverStyle:function(e,t){var r=this.chart.data.datasets[e._datasetIndex],i=e._index,o=e.custom||{},a=n.valueAtIndexOrDefault,s=e._model
|
||
s.backgroundColor=o.backgroundColor?o.backgroundColor:a(r.backgroundColor,i,t.backgroundColor),s.borderColor=o.borderColor?o.borderColor:a(r.borderColor,i,t.borderColor),s.borderWidth=o.borderWidth?o.borderWidth:a(r.borderWidth,i,t.borderWidth)},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e._index,i=e.custom||{},o=n.valueAtIndexOrDefault,a=n.getHoverColor,s=e._model
|
||
s.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:o(t.hoverBackgroundColor,r,a(s.backgroundColor)),s.borderColor=i.hoverBorderColor?i.hoverBorderColor:o(t.hoverBorderColor,r,a(s.borderColor)),s.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:o(t.hoverBorderWidth,r,s.borderWidth)},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,r=e.data.length,n=t.length
|
||
n<r?e.data.splice(n,r-n):n>r&&this.insertElements(r,n-r)},insertElements:function(e,t){for(var r=0;r<t;++r)this.addElementAndReset(e+r)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),e.DatasetController.extend=n.inherits}},{45:45}],25:[function(e,t,r){"use strict"
|
||
var n=e(45)
|
||
t.exports={_set:function(e,t){return n.merge(this[e]||(this[e]={}),t)}}},{45:45}],26:[function(e,t,r){"use strict"
|
||
var n=e(3),i=e(45)
|
||
var o=function(e){i.extend(this,e),this.initialize.apply(this,arguments)}
|
||
i.extend(o.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var e=this
|
||
return e._view||(e._view=i.clone(e._model)),e._start={},e},transition:function(e){var t=this,r=t._model,i=t._start,o=t._view
|
||
return r&&1!==e?(o||(o=t._view={}),i||(i=t._start={}),function(e,t,r,i){var o,a,s,u,c,l,f,h,d,p=Object.keys(r)
|
||
for(o=0,a=p.length;o<a;++o)if(l=r[s=p[o]],t.hasOwnProperty(s)||(t[s]=l),(u=t[s])!==l&&"_"!==s[0]){if(e.hasOwnProperty(s)||(e[s]=u),(f=typeof l)==typeof(c=e[s]))if("string"===f){if((h=n(c)).valid&&(d=n(l)).valid){t[s]=d.mix(h,i).rgbString()
|
||
continue}}else if("number"===f&&isFinite(c)&&isFinite(l)){t[s]=c+(l-c)*i
|
||
continue}t[s]=l}}(i,o,r,e),t):(t._view=r,t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return i.isNumber(this._model.x)&&i.isNumber(this._model.y)}}),o.extend=i.inherits,t.exports=o},{3:3,45:45}],27:[function(e,t,r){"use strict"
|
||
var n=e(3),i=e(25),o=e(45)
|
||
t.exports=function(e){function t(e,t,r){var n
|
||
return"string"==typeof e?(n=parseInt(e,10),-1!==e.indexOf("%")&&(n=n/100*t.parentNode[r])):n=e,n}function r(e){return void 0!==e&&null!==e&&"none"!==e}function a(e,n,i){var o=document.defaultView,a=e.parentNode,s=o.getComputedStyle(e)[n],u=o.getComputedStyle(a)[n],c=r(s),l=r(u),f=Number.POSITIVE_INFINITY
|
||
return c||l?Math.min(c?t(s,e,i):f,l?t(u,a,i):f):"none"}o.configMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(t,r,n,i){var a=r[t]||{},s=n[t]
|
||
"scales"===t?r[t]=o.scaleMerge(a,s):"scale"===t?r[t]=o.merge(a,[e.scaleService.getScaleDefaults(s.type),s]):o._merger(t,r,n,i)}})},o.scaleMerge=function(){return o.merge(o.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(t,r,n,i){if("xAxes"===t||"yAxes"===t){var a,s,u,c=n[t].length
|
||
for(r[t]||(r[t]=[]),a=0;a<c;++a)u=n[t][a],s=o.valueOrDefault(u.type,"xAxes"===t?"category":"linear"),a>=r[t].length&&r[t].push({}),!r[t][a].type||u.type&&u.type!==r[t][a].type?o.merge(r[t][a],[e.scaleService.getScaleDefaults(s),u]):o.merge(r[t][a],u)}else o._merger(t,r,n,i)}})},o.where=function(e,t){if(o.isArray(e)&&Array.prototype.filter)return e.filter(t)
|
||
var r=[]
|
||
return o.each(e,function(e){t(e)&&r.push(e)}),r},o.findIndex=Array.prototype.findIndex?function(e,t,r){return e.findIndex(t,r)}:function(e,t,r){r=void 0===r?e:r
|
||
for(var n=0,i=e.length;n<i;++n)if(t.call(r,e[n],n,e))return n
|
||
return-1},o.findNextWhere=function(e,t,r){o.isNullOrUndef(r)&&(r=-1)
|
||
for(var n=r+1;n<e.length;n++){var i=e[n]
|
||
if(t(i))return i}},o.findPreviousWhere=function(e,t,r){o.isNullOrUndef(r)&&(r=e.length)
|
||
for(var n=r-1;n>=0;n--){var i=e[n]
|
||
if(t(i))return i}},o.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},o.almostEquals=function(e,t,r){return Math.abs(e-t)<r},o.almostWhole=function(e,t){var r=Math.round(e)
|
||
return r-t<e&&r+t>e},o.max=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.max(e,t)},Number.NEGATIVE_INFINITY)},o.min=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.min(e,t)},Number.POSITIVE_INFINITY)},o.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},o.log10=Math.log10?function(e){return Math.log10(e)}:function(e){var t=Math.log(e)*Math.LOG10E,r=Math.round(t)
|
||
return e===Math.pow(10,r)?r:t},o.toRadians=function(e){return e*(Math.PI/180)},o.toDegrees=function(e){return e*(180/Math.PI)},o.getAngleFromPoint=function(e,t){var r=t.x-e.x,n=t.y-e.y,i=Math.sqrt(r*r+n*n),o=Math.atan2(n,r)
|
||
return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:i}},o.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},o.aliasPixel=function(e){return e%2==0?0:.5},o.splineCurve=function(e,t,r,n){var i=e.skip?t:e,o=t,a=r.skip?t:r,s=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),u=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),c=s/(s+u),l=u/(s+u),f=n*(c=isNaN(c)?0:c),h=n*(l=isNaN(l)?0:l)
|
||
return{previous:{x:o.x-f*(a.x-i.x),y:o.y-f*(a.y-i.y)},next:{x:o.x+h*(a.x-i.x),y:o.y+h*(a.y-i.y)}}},o.EPSILON=Number.EPSILON||1e-14,o.splineCurveMonotone=function(e){var t,r,n,i,a,s,u,c,l,f=(e||[]).map(function(e){return{model:e._model,deltaK:0,mK:0}}),h=f.length
|
||
for(t=0;t<h;++t)if(!(n=f[t]).model.skip){if(r=t>0?f[t-1]:null,(i=t<h-1?f[t+1]:null)&&!i.model.skip){var d=i.model.x-n.model.x
|
||
n.deltaK=0!==d?(i.model.y-n.model.y)/d:0}!r||r.model.skip?n.mK=n.deltaK:!i||i.model.skip?n.mK=r.deltaK:this.sign(r.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(r.deltaK+n.deltaK)/2}for(t=0;t<h-1;++t)n=f[t],i=f[t+1],n.model.skip||i.model.skip||(o.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=i.mK=0:(a=n.mK/n.deltaK,s=i.mK/n.deltaK,(c=Math.pow(a,2)+Math.pow(s,2))<=9||(u=3/Math.sqrt(c),n.mK=a*u*n.deltaK,i.mK=s*u*n.deltaK)))
|
||
for(t=0;t<h;++t)(n=f[t]).model.skip||(r=t>0?f[t-1]:null,i=t<h-1?f[t+1]:null,r&&!r.model.skip&&(l=(n.model.x-r.model.x)/3,n.model.controlPointPreviousX=n.model.x-l,n.model.controlPointPreviousY=n.model.y-l*n.mK),i&&!i.model.skip&&(l=(i.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+l,n.model.controlPointNextY=n.model.y+l*n.mK))},o.nextItem=function(e,t,r){return r?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},o.previousItem=function(e,t,r){return r?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},o.niceNum=function(e,t){var r=Math.floor(o.log10(e)),n=e/Math.pow(10,r)
|
||
return(t?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,r)},o.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},o.getRelativePosition=function(e,t){var r,n,i=e.originalEvent||e,a=e.currentTarget||e.srcElement,s=a.getBoundingClientRect(),u=i.touches
|
||
u&&u.length>0?(r=u[0].clientX,n=u[0].clientY):(r=i.clientX,n=i.clientY)
|
||
var c=parseFloat(o.getStyle(a,"padding-left")),l=parseFloat(o.getStyle(a,"padding-top")),f=parseFloat(o.getStyle(a,"padding-right")),h=parseFloat(o.getStyle(a,"padding-bottom")),d=s.right-s.left-c-f,p=s.bottom-s.top-l-h
|
||
return{x:r=Math.round((r-s.left-c)/d*a.width/t.currentDevicePixelRatio),y:n=Math.round((n-s.top-l)/p*a.height/t.currentDevicePixelRatio)}},o.getConstraintWidth=function(e){return a(e,"max-width","clientWidth")},o.getConstraintHeight=function(e){return a(e,"max-height","clientHeight")},o.getMaximumWidth=function(e){var t=e.parentNode
|
||
if(!t)return e.clientWidth
|
||
var r=parseInt(o.getStyle(t,"padding-left"),10),n=parseInt(o.getStyle(t,"padding-right"),10),i=t.clientWidth-r-n,a=o.getConstraintWidth(e)
|
||
return isNaN(a)?i:Math.min(i,a)},o.getMaximumHeight=function(e){var t=e.parentNode
|
||
if(!t)return e.clientHeight
|
||
var r=parseInt(o.getStyle(t,"padding-top"),10),n=parseInt(o.getStyle(t,"padding-bottom"),10),i=t.clientHeight-r-n,a=o.getConstraintHeight(e)
|
||
return isNaN(a)?i:Math.min(i,a)}
|
||
o.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},o.retinaScale=function(e,t){var r=e.currentDevicePixelRatio=t||window.devicePixelRatio||1
|
||
if(1!==r){var n=e.canvas,i=e.height,o=e.width
|
||
n.height=i*r,n.width=o*r,e.ctx.scale(r,r),n.style.height||n.style.width||(n.style.height=i+"px",n.style.width=o+"px")}},o.fontString=function(e,t,r){return t+" "+e+"px "+r},o.longestText=function(e,t,r,n){var i=(n=n||{}).data=n.data||{},a=n.garbageCollect=n.garbageCollect||[]
|
||
n.font!==t&&(i=n.data={},a=n.garbageCollect=[],n.font=t),e.font=t
|
||
var s=0
|
||
o.each(r,function(t){void 0!==t&&null!==t&&!0!==o.isArray(t)?s=o.measureText(e,i,a,s,t):o.isArray(t)&&o.each(t,function(t){void 0===t||null===t||o.isArray(t)||(s=o.measureText(e,i,a,s,t))})})
|
||
var u=a.length/2
|
||
if(u>r.length){for(var c=0;c<u;c++)delete i[a[c]]
|
||
a.splice(0,u)}return s},o.measureText=function(e,t,r,n,i){var o=t[i]
|
||
return o||(o=t[i]=e.measureText(i).width,r.push(i)),o>n&&(n=o),n},o.numberOfLabelLines=function(e){var t=1
|
||
return o.each(e,function(e){o.isArray(e)&&e.length>t&&(t=e.length)}),t},o.color=n?function(e){return e instanceof CanvasGradient&&(e=i.global.defaultColor),n(e)}:function(e){return console.error("Color.js not found!"),e},o.getHoverColor=function(e){return e instanceof CanvasPattern?e:o.color(e).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(e,t,r){"use strict"
|
||
var n=e(45)
|
||
function i(e,t){return e.native?{x:e.x,y:e.y}:n.getRelativePosition(e,t)}function o(e,t){var r,n,i,o,a
|
||
for(n=0,o=e.data.datasets.length;n<o;++n)if(e.isDatasetVisible(n))for(i=0,a=(r=e.getDatasetMeta(n)).data.length;i<a;++i){var s=r.data[i]
|
||
s._view.skip||t(s)}}function a(e,t){var r=[]
|
||
return o(e,function(e){e.inRange(t.x,t.y)&&r.push(e)}),r}function s(e,t,r,n){var i=Number.POSITIVE_INFINITY,a=[]
|
||
return o(e,function(e){if(!r||e.inRange(t.x,t.y)){var o=e.getCenterPoint(),s=n(t,o)
|
||
s<i?(a=[e],i=s):s===i&&a.push(e)}}),a}function u(e){var t=-1!==e.indexOf("x"),r=-1!==e.indexOf("y")
|
||
return function(e,n){var i=t?Math.abs(e.x-n.x):0,o=r?Math.abs(e.y-n.y):0
|
||
return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function c(e,t,r){var n=i(t,e)
|
||
r.axis=r.axis||"x"
|
||
var o=u(r.axis),c=r.intersect?a(e,n):s(e,n,!1,o),l=[]
|
||
return c.length?(e.data.datasets.forEach(function(t,r){if(e.isDatasetVisible(r)){var n=e.getDatasetMeta(r).data[c[0]._index]
|
||
n&&!n._view.skip&&l.push(n)}}),l):[]}t.exports={modes:{single:function(e,t){var r=i(t,e),n=[]
|
||
return o(e,function(e){if(e.inRange(r.x,r.y))return n.push(e),n}),n.slice(0,1)},label:c,index:c,dataset:function(e,t,r){var n=i(t,e)
|
||
r.axis=r.axis||"xy"
|
||
var o=u(r.axis),c=r.intersect?a(e,n):s(e,n,!1,o)
|
||
return c.length>0&&(c=e.getDatasetMeta(c[0]._datasetIndex).data),c},"x-axis":function(e,t){return c(e,t,{intersect:!1})},point:function(e,t){return a(e,i(t,e))},nearest:function(e,t,r){var n=i(t,e)
|
||
r.axis=r.axis||"xy"
|
||
var o=u(r.axis),a=s(e,n,r.intersect,o)
|
||
return a.length>1&&a.sort(function(e,t){var r=e.getArea()-t.getArea()
|
||
return 0===r&&(r=e._datasetIndex-t._datasetIndex),r}),a.slice(0,1)},x:function(e,t,r){var n=i(t,e),a=[],s=!1
|
||
return o(e,function(e){e.inXRange(n.x)&&a.push(e),e.inRange(n.x,n.y)&&(s=!0)}),r.intersect&&!s&&(a=[]),a},y:function(e,t,r){var n=i(t,e),a=[],s=!1
|
||
return o(e,function(e){e.inYRange(n.y)&&a.push(e),e.inRange(n.x,n.y)&&(s=!0)}),r.intersect&&!s&&(a=[]),a}}}},{45:45}],29:[function(e,t,r){"use strict"
|
||
e(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),t.exports=function(){var e=function(e,t){return this.construct(e,t),this}
|
||
return e.Chart=e,e}},{25:25}],30:[function(e,t,r){"use strict"
|
||
var n=e(45)
|
||
function i(e,t){return n.where(e,function(e){return e.position===t})}function o(e,t){e.forEach(function(e,t){return e._tmpIndex_=t,e}),e.sort(function(e,r){var n=t?r:e,i=t?e:r
|
||
return n.weight===i.weight?n._tmpIndex_-i._tmpIndex_:n.weight-i.weight}),e.forEach(function(e){delete e._tmpIndex_})}t.exports={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,e.boxes.push(t)},removeBox:function(e,t){var r=e.boxes?e.boxes.indexOf(t):-1;-1!==r&&e.boxes.splice(r,1)},configure:function(e,t,r){for(var n,i=["fullWidth","position","weight"],o=i.length,a=0;a<o;++a)n=i[a],r.hasOwnProperty(n)&&(t[n]=r[n])},update:function(e,t,r){if(e){var a=e.options.layout||{},s=n.options.toPadding(a.padding),u=s.left,c=s.right,l=s.top,f=s.bottom,h=i(e.boxes,"left"),d=i(e.boxes,"right"),p=i(e.boxes,"top"),m=i(e.boxes,"bottom"),y=i(e.boxes,"chartArea")
|
||
o(h,!0),o(d,!1),o(p,!0),o(m,!1)
|
||
var g=t-u-c,b=r-l-f,v=b/2,_=(t-g/2)/(h.length+d.length),w=(r-v)/(p.length+m.length),S=g,E=b,k=[]
|
||
n.each(h.concat(d,p,m),function(e){var t,r=e.isHorizontal()
|
||
r?(t=e.update(e.fullWidth?g:S,w),E-=t.height):(t=e.update(_,E),S-=t.width),k.push({horizontal:r,minSize:t,box:e})})
|
||
var x=0,C=0,A=0,T=0
|
||
n.each(p.concat(m),function(e){if(e.getPadding){var t=e.getPadding()
|
||
x=Math.max(x,t.left),C=Math.max(C,t.right)}}),n.each(h.concat(d),function(e){if(e.getPadding){var t=e.getPadding()
|
||
A=Math.max(A,t.top),T=Math.max(T,t.bottom)}})
|
||
var I=u,P=c,M=l,R=f
|
||
n.each(h.concat(d),U),n.each(h,function(e){I+=e.width}),n.each(d,function(e){P+=e.width}),n.each(p.concat(m),U),n.each(p,function(e){M+=e.height}),n.each(m,function(e){R+=e.height}),n.each(h.concat(d),function(e){var t=n.findNextWhere(k,function(t){return t.box===e}),r={left:0,right:0,top:M,bottom:R}
|
||
t&&e.update(t.minSize.width,E,r)}),I=u,P=c,M=l,R=f,n.each(h,function(e){I+=e.width}),n.each(d,function(e){P+=e.width}),n.each(p,function(e){M+=e.height}),n.each(m,function(e){R+=e.height})
|
||
var O=Math.max(x-I,0)
|
||
I+=O,P+=Math.max(C-P,0)
|
||
var B=Math.max(A-M,0)
|
||
M+=B,R+=Math.max(T-R,0)
|
||
var N=r-M-R,j=t-I-P
|
||
j===S&&N===E||(n.each(h,function(e){e.height=N}),n.each(d,function(e){e.height=N}),n.each(p,function(e){e.fullWidth||(e.width=j)}),n.each(m,function(e){e.fullWidth||(e.width=j)}),E=N,S=j)
|
||
var L=u+O,D=l+B
|
||
n.each(h.concat(p),F),L+=S,D+=E,n.each(d,F),n.each(m,F),e.chartArea={left:I,top:M,right:I+S,bottom:M+E},n.each(y,function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(S,E)})}function U(e){var t=n.findNextWhere(k,function(t){return t.box===e})
|
||
if(t)if(e.isHorizontal()){var r={left:Math.max(I,x),right:Math.max(P,C),top:0,bottom:0}
|
||
e.update(e.fullWidth?g:S,b/2,r)}else e.update(t.minSize.width,E)}function F(e){e.isHorizontal()?(e.left=e.fullWidth?u:I,e.right=e.fullWidth?t-c:I+S,e.top=D,e.bottom=D+e.height,D=e.bottom):(e.left=L,e.right=L+e.width,e.top=M,e.bottom=M+E,L=e.right)}}}},{45:45}],31:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(45)
|
||
n._set("global",{plugins:{}}),t.exports={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach(function(e){var r=t.indexOf(e);-1!==r&&t.splice(r,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,r){var n,i,o,a,s,u=this.descriptors(e),c=u.length
|
||
for(n=0;n<c;++n)if("function"==typeof(s=(o=(i=u[n]).plugin)[t])&&((a=[e].concat(r||[])).push(i.options),!1===s.apply(o,a)))return!1
|
||
return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={})
|
||
if(t.id===this._cacheId)return t.descriptors
|
||
var r=[],o=[],a=e&&e.config||{},s=a.options&&a.options.plugins||{}
|
||
return this._plugins.concat(a.plugins||[]).forEach(function(e){if(-1===r.indexOf(e)){var t=e.id,a=s[t]
|
||
!1!==a&&(!0===a&&(a=i.clone(n.global.plugins[t])),r.push(e),o.push({plugin:e,options:a||{}}))}}),t.descriptors=o,t.id=this._cacheId,o},_invalidate:function(e){delete e.$plugins}}},{25:25,45:45}],32:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45),a=e(34)
|
||
function s(e){var t,r,n=[]
|
||
for(t=0,r=e.length;t<r;++t)n.push(e[t].label)
|
||
return n}function u(e,t,r){var n=e.getPixelForTick(t)
|
||
return r&&(n-=0===t?(e.getPixelForTick(1)-n)/2:(n-e.getPixelForTick(t-1))/2),n}n._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",lineHeight:1.2,padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:a.formatters.values,minor:{},major:{}}}),t.exports=function(e){function t(e,t,r){return o.isArray(t)?o.longestText(e,r,t):e.measureText(t).width}function r(e){var t=o.valueOrDefault,r=n.global,i=t(e.fontSize,r.defaultFontSize),a=t(e.fontStyle,r.defaultFontStyle),s=t(e.fontFamily,r.defaultFontFamily)
|
||
return{size:i,style:a,family:s,font:o.fontString(i,a,s)}}function a(e){return o.options.toLineHeight(o.valueOrDefault(e.lineHeight,1.2),o.valueOrDefault(e.fontSize,n.global.defaultFontSize))}e.Scale=i.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var e=this.options.ticks
|
||
for(var t in!1===e.minor&&(e.minor={display:!1}),!1===e.major&&(e.major={display:!1}),e)"major"!==t&&"minor"!==t&&(void 0===e.minor[t]&&(e.minor[t]=e[t]),void 0===e.major[t]&&(e.major[t]=e[t]))},beforeUpdate:function(){o.callback(this.options.beforeUpdate,[this])},update:function(e,t,r){var n,i,a,s,u,c,l=this
|
||
for(l.beforeUpdate(),l.maxWidth=e,l.maxHeight=t,l.margins=o.extend({left:0,right:0,top:0,bottom:0},r),l.longestTextCache=l.longestTextCache||{},l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),u=l.buildTicks()||[],l.afterBuildTicks(),l.beforeTickToLabelConversion(),a=l.convertTicksToLabels(u)||l.ticks,l.afterTickToLabelConversion(),l.ticks=a,n=0,i=a.length;n<i;++n)s=a[n],(c=u[n])?c.label=s:u.push(c={label:s,major:!1})
|
||
return l._ticks=u,l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l.afterUpdate(),l.minSize},afterUpdate:function(){o.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){o.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this
|
||
e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){o.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){o.callback(this.options.beforeDataLimits,[this])},determineDataLimits:o.noop,afterDataLimits:function(){o.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){o.callback(this.options.beforeBuildTicks,[this])},buildTicks:o.noop,afterBuildTicks:function(){o.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){o.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks
|
||
this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){o.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){o.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e=this,t=e.ctx,n=e.options.ticks,i=s(e._ticks),a=r(n)
|
||
t.font=a.font
|
||
var u=n.minRotation||0
|
||
if(i.length&&e.options.display&&e.isHorizontal())for(var c,l=o.longestText(t,a.font,i,e.longestTextCache),f=l,h=e.getPixelForTick(1)-e.getPixelForTick(0)-6;f>h&&u<n.maxRotation;){var d=o.toRadians(u)
|
||
if(c=Math.cos(d),Math.sin(d)*l>e.maxHeight){u--
|
||
break}u++,f=c*l}e.labelRotation=u},afterCalculateTickRotation:function(){o.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){o.callback(this.options.beforeFit,[this])},fit:function(){var e=this,n=e.minSize={width:0,height:0},i=s(e._ticks),u=e.options,c=u.ticks,l=u.scaleLabel,f=u.gridLines,h=u.display,d=e.isHorizontal(),p=r(c),m=u.gridLines.tickMarkLength
|
||
if(n.width=d?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:h&&f.drawTicks?m:0,n.height=d?h&&f.drawTicks?m:0:e.maxHeight,l.display&&h){var y=a(l)+o.options.toPadding(l.padding).height
|
||
d?n.height+=y:n.width+=y}if(c.display&&h){var g=o.longestText(e.ctx,p.font,i,e.longestTextCache),b=o.numberOfLabelLines(i),v=.5*p.size,_=e.options.ticks.padding
|
||
if(d){e.longestLabelWidth=g
|
||
var w=o.toRadians(e.labelRotation),S=Math.cos(w),E=Math.sin(w)*g+p.size*b+v*(b-1)+v
|
||
n.height=Math.min(e.maxHeight,n.height+E+_),e.ctx.font=p.font
|
||
var k=t(e.ctx,i[0],p.font),x=t(e.ctx,i[i.length-1],p.font)
|
||
0!==e.labelRotation?(e.paddingLeft="bottom"===u.position?S*k+3:S*v+3,e.paddingRight="bottom"===u.position?S*v+3:S*x+3):(e.paddingLeft=k/2+3,e.paddingRight=x/2+3)}else c.mirror?g=0:g+=_+v,n.width=Math.min(e.maxWidth,n.width+g),e.paddingTop=p.size/2,e.paddingBottom=p.size/2}e.handleMargins(),e.width=n.width,e.height=n.height},handleMargins:function(){var e=this
|
||
e.margins&&(e.paddingLeft=Math.max(e.paddingLeft-e.margins.left,0),e.paddingTop=Math.max(e.paddingTop-e.margins.top,0),e.paddingRight=Math.max(e.paddingRight-e.margins.right,0),e.paddingBottom=Math.max(e.paddingBottom-e.margins.bottom,0))},afterFit:function(){o.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(o.isNullOrUndef(e))return NaN
|
||
if("number"==typeof e&&!isFinite(e))return NaN
|
||
if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y)
|
||
return e},getLabelForIndex:o.noop,getPixelForValue:o.noop,getValueForPixel:o.noop,getPixelForTick:function(e){var t=this,r=t.options.offset
|
||
if(t.isHorizontal()){var n=(t.width-(t.paddingLeft+t.paddingRight))/Math.max(t._ticks.length-(r?0:1),1),i=n*e+t.paddingLeft
|
||
r&&(i+=n/2)
|
||
var o=t.left+Math.round(i)
|
||
return o+=t.isFullWidth()?t.margins.left:0}var a=t.height-(t.paddingTop+t.paddingBottom)
|
||
return t.top+e*(a/(t._ticks.length-1))},getPixelForDecimal:function(e){var t=this
|
||
if(t.isHorizontal()){var r=(t.width-(t.paddingLeft+t.paddingRight))*e+t.paddingLeft,n=t.left+Math.round(r)
|
||
return n+=t.isFullWidth()?t.margins.left:0}return t.top+e*t.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max
|
||
return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,r,n,i,a=this,s=a.isHorizontal(),u=a.options.ticks.minor,c=e.length,l=o.toRadians(a.labelRotation),f=Math.cos(l),h=a.longestLabelWidth*f,d=[]
|
||
for(u.maxTicksLimit&&(i=u.maxTicksLimit),s&&(t=!1,(h+u.autoSkipPadding)*c>a.width-(a.paddingLeft+a.paddingRight)&&(t=1+Math.floor((h+u.autoSkipPadding)*c/(a.width-(a.paddingLeft+a.paddingRight)))),i&&c>i&&(t=Math.max(t,Math.floor(c/i)))),r=0;r<c;r++)n=e[r],(t>1&&r%t>0||r%t==0&&r+t>=c)&&r!==c-1&&delete n.label,d.push(n)
|
||
return d},draw:function(e){var t=this,i=t.options
|
||
if(i.display){var s=t.ctx,c=n.global,l=i.ticks.minor,f=i.ticks.major||l,h=i.gridLines,d=i.scaleLabel,p=0!==t.labelRotation,m=t.isHorizontal(),y=l.autoSkip?t._autoSkip(t.getTicks()):t.getTicks(),g=o.valueOrDefault(l.fontColor,c.defaultFontColor),b=r(l),v=o.valueOrDefault(f.fontColor,c.defaultFontColor),_=r(f),w=h.drawTicks?h.tickMarkLength:0,S=o.valueOrDefault(d.fontColor,c.defaultFontColor),E=r(d),k=o.options.toPadding(d.padding),x=o.toRadians(t.labelRotation),C=[],A=t.options.gridLines.lineWidth,T="right"===i.position?t.right:t.right-A-w,I="right"===i.position?t.right+w:t.right,P="bottom"===i.position?t.top+A:t.bottom-w-A,M="bottom"===i.position?t.top+A+w:t.bottom+A
|
||
if(o.each(y,function(r,n){if(!o.isNullOrUndef(r.label)){var a,s,f,d,g,b,v,_,S,E,k,R,O,B,N=r.label
|
||
n===t.zeroLineIndex&&i.offset===h.offsetGridLines?(a=h.zeroLineWidth,s=h.zeroLineColor,f=h.zeroLineBorderDash,d=h.zeroLineBorderDashOffset):(a=o.valueAtIndexOrDefault(h.lineWidth,n),s=o.valueAtIndexOrDefault(h.color,n),f=o.valueOrDefault(h.borderDash,c.borderDash),d=o.valueOrDefault(h.borderDashOffset,c.borderDashOffset))
|
||
var j="middle",L="middle",D=l.padding
|
||
if(m){var U=w+D
|
||
"bottom"===i.position?(L=p?"middle":"top",j=p?"right":"center",B=t.top+U):(L=p?"middle":"bottom",j=p?"left":"center",B=t.bottom-U)
|
||
var F=u(t,n,h.offsetGridLines&&y.length>1)
|
||
F<t.left&&(s="rgba(0,0,0,0)"),F+=o.aliasPixel(a),O=t.getPixelForTick(n)+l.labelOffset,g=v=S=k=F,b=P,_=M,E=e.top,R=e.bottom+A}else{var z,q="left"===i.position
|
||
l.mirror?(j=q?"left":"right",z=D):(j=q?"right":"left",z=w+D),O=q?t.right-z:t.left+z
|
||
var V=u(t,n,h.offsetGridLines&&y.length>1)
|
||
V<t.top&&(s="rgba(0,0,0,0)"),V+=o.aliasPixel(a),B=t.getPixelForTick(n)+l.labelOffset,g=T,v=I,S=e.left,k=e.right+A,b=_=E=R=V}C.push({tx1:g,ty1:b,tx2:v,ty2:_,x1:S,y1:E,x2:k,y2:R,labelX:O,labelY:B,glWidth:a,glColor:s,glBorderDash:f,glBorderDashOffset:d,rotation:-1*x,label:N,major:r.major,textBaseline:L,textAlign:j})}}),o.each(C,function(e){if(h.display&&(s.save(),s.lineWidth=e.glWidth,s.strokeStyle=e.glColor,s.setLineDash&&(s.setLineDash(e.glBorderDash),s.lineDashOffset=e.glBorderDashOffset),s.beginPath(),h.drawTicks&&(s.moveTo(e.tx1,e.ty1),s.lineTo(e.tx2,e.ty2)),h.drawOnChartArea&&(s.moveTo(e.x1,e.y1),s.lineTo(e.x2,e.y2)),s.stroke(),s.restore()),l.display){s.save(),s.translate(e.labelX,e.labelY),s.rotate(e.rotation),s.font=e.major?_.font:b.font,s.fillStyle=e.major?v:g,s.textBaseline=e.textBaseline,s.textAlign=e.textAlign
|
||
var r=e.label
|
||
if(o.isArray(r))for(var n=r.length,i=1.5*b.size,a=t.isHorizontal()?0:-i*(n-1)/2,u=0;u<n;++u)s.fillText(""+r[u],0,a),a+=i
|
||
else s.fillText(r,0,0)
|
||
s.restore()}}),d.display){var R,O,B=0,N=a(d)/2
|
||
if(m)R=t.left+(t.right-t.left)/2,O="bottom"===i.position?t.bottom-N-k.bottom:t.top+N+k.top
|
||
else{var j="left"===i.position
|
||
R=j?t.left+N+k.top:t.right-N-k.top,O=t.top+(t.bottom-t.top)/2,B=j?-.5*Math.PI:.5*Math.PI}s.save(),s.translate(R,O),s.rotate(B),s.textAlign="center",s.textBaseline="middle",s.fillStyle=S,s.font=E.font,s.fillText(d.labelString,0,0),s.restore()}if(h.drawBorder){s.lineWidth=o.valueAtIndexOrDefault(h.lineWidth,0),s.strokeStyle=o.valueAtIndexOrDefault(h.color,0)
|
||
var L=t.left,D=t.right+A,U=t.top,F=t.bottom+A,z=o.aliasPixel(s.lineWidth)
|
||
m?(U=F="top"===i.position?t.bottom:t.top,U+=z,F+=z):(L=D="left"===i.position?t.right:t.left,L+=z,D+=z),s.beginPath(),s.moveTo(L,U),s.lineTo(D,F),s.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(45),o=e(30)
|
||
t.exports=function(e){e.scaleService={constructors:{},defaults:{},registerScaleType:function(e,t,r){this.constructors[e]=t,this.defaults[e]=i.clone(r)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?i.merge({},[n.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=i.extend(this.defaults[e],t))},addScalesToLayout:function(e){i.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,o.addBox(e,t)})}}}},{25:25,30:30,45:45}],34:[function(e,t,r){"use strict"
|
||
var n=e(45)
|
||
t.exports={formatters:{values:function(e){return n.isArray(e)?e:""+e},linear:function(e,t,r){var i=r.length>3?r[2]-r[1]:r[1]-r[0]
|
||
Math.abs(i)>1&&e!==Math.floor(e)&&(i=e-Math.floor(e))
|
||
var o=n.log10(Math.abs(i)),a=""
|
||
if(0!==e){var s=-1*Math.floor(o)
|
||
s=Math.max(Math.min(s,20),0),a=e.toFixed(s)}else a="0"
|
||
return a},logarithmic:function(e,t,r){var i=e/Math.pow(10,Math.floor(n.log10(e)))
|
||
return 0===e?"0":1===i||2===i||5===i||0===t||t===r.length-1?e.toExponential():""}}}},{45:45}],35:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45)
|
||
n._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:o.noop,title:function(e,t){var r="",n=t.labels,i=n?n.length:0
|
||
if(e.length>0){var o=e[0]
|
||
o.xLabel?r=o.xLabel:i>0&&o.index<i&&(r=n[o.index])}return r},afterTitle:o.noop,beforeBody:o.noop,beforeLabel:o.noop,label:function(e,t){var r=t.datasets[e.datasetIndex].label||""
|
||
return r&&(r+=": "),r+=e.yLabel},labelColor:function(e,t){var r=t.getDatasetMeta(e.datasetIndex).data[e.index]._view
|
||
return{borderColor:r.borderColor,backgroundColor:r.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:o.noop,afterBody:o.noop,beforeFooter:o.noop,footer:o.noop,afterFooter:o.noop}}}),t.exports=function(e){function t(e,t){var r=o.color(e)
|
||
return r.alpha(t*r.alpha()).rgbaString()}function r(e,t){return t&&(o.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function a(e){var t=n.global,r=o.valueOrDefault
|
||
return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:r(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:r(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:r(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:r(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:r(e.titleFontStyle,t.defaultFontStyle),titleFontSize:r(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:r(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:r(e.footerFontStyle,t.defaultFontStyle),footerFontSize:r(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}e.Tooltip=i.extend({initialize:function(){this._model=a(this._options),this._lastActive=[]},getTitle:function(){var e=this._options.callbacks,t=e.beforeTitle.apply(this,arguments),n=e.title.apply(this,arguments),i=e.afterTitle.apply(this,arguments),o=[]
|
||
return o=r(o=r(o=r(o,t),n),i)},getBeforeBody:function(){var e=this._options.callbacks.beforeBody.apply(this,arguments)
|
||
return o.isArray(e)?e:void 0!==e?[e]:[]},getBody:function(e,t){var n=this,i=n._options.callbacks,a=[]
|
||
return o.each(e,function(e){var o={before:[],lines:[],after:[]}
|
||
r(o.before,i.beforeLabel.call(n,e,t)),r(o.lines,i.label.call(n,e,t)),r(o.after,i.afterLabel.call(n,e,t)),a.push(o)}),a},getAfterBody:function(){var e=this._options.callbacks.afterBody.apply(this,arguments)
|
||
return o.isArray(e)?e:void 0!==e?[e]:[]},getFooter:function(){var e=this._options.callbacks,t=e.beforeFooter.apply(this,arguments),n=e.footer.apply(this,arguments),i=e.afterFooter.apply(this,arguments),o=[]
|
||
return o=r(o=r(o=r(o,t),n),i)},update:function(t){var r,n,i,s,u,c,l,f=this,h=f._options,d=f._model,p=f._model=a(h),m=f._active,y=f._data,g={xAlign:d.xAlign,yAlign:d.yAlign},b={x:d.x,y:d.y},v={width:d.width,height:d.height},_={x:d.caretX,y:d.caretY}
|
||
if(m.length){p.opacity=1
|
||
var w=[],S=[]
|
||
_=e.Tooltip.positioners[h.position].call(f,m,f._eventPosition)
|
||
var E=[]
|
||
for(r=0,n=m.length;r<n;++r)E.push((i=m[r],s=void 0,u=void 0,void 0,void 0,s=i._xScale,u=i._yScale||i._scale,c=i._index,l=i._datasetIndex,{xLabel:s?s.getLabelForIndex(c,l):"",yLabel:u?u.getLabelForIndex(c,l):"",index:c,datasetIndex:l,x:i._model.x,y:i._model.y}))
|
||
h.filter&&(E=E.filter(function(e){return h.filter(e,y)})),h.itemSort&&(E=E.sort(function(e,t){return h.itemSort(e,t,y)})),o.each(E,function(e){w.push(h.callbacks.labelColor.call(f,e,f._chart)),S.push(h.callbacks.labelTextColor.call(f,e,f._chart))}),p.title=f.getTitle(E,y),p.beforeBody=f.getBeforeBody(E,y),p.body=f.getBody(E,y),p.afterBody=f.getAfterBody(E,y),p.footer=f.getFooter(E,y),p.x=Math.round(_.x),p.y=Math.round(_.y),p.caretPadding=h.caretPadding,p.labelColors=w,p.labelTextColors=S,p.dataPoints=E,b=function(e,t,r,n){var i=e.x,o=e.y,a=e.caretSize,s=e.caretPadding,u=e.cornerRadius,c=r.xAlign,l=r.yAlign,f=a+s,h=u+s
|
||
return"right"===c?i-=t.width:"center"===c&&((i-=t.width/2)+t.width>n.width&&(i=n.width-t.width),i<0&&(i=0)),"top"===l?o+=f:o-="bottom"===l?t.height+f:t.height/2,"center"===l?"left"===c?i+=f:"right"===c&&(i-=f):"left"===c?i-=h:"right"===c&&(i+=h),{x:i,y:o}}(p,v=function(e,t){var r=e._chart.ctx,n=2*t.yPadding,i=0,a=t.body,s=a.reduce(function(e,t){return e+t.before.length+t.lines.length+t.after.length},0)
|
||
s+=t.beforeBody.length+t.afterBody.length
|
||
var u=t.title.length,c=t.footer.length,l=t.titleFontSize,f=t.bodyFontSize,h=t.footerFontSize
|
||
n+=u*l,n+=u?(u-1)*t.titleSpacing:0,n+=u?t.titleMarginBottom:0,n+=s*f,n+=s?(s-1)*t.bodySpacing:0,n+=c?t.footerMarginTop:0,n+=c*h,n+=c?(c-1)*t.footerSpacing:0
|
||
var d=0,p=function(e){i=Math.max(i,r.measureText(e).width+d)}
|
||
return r.font=o.fontString(l,t._titleFontStyle,t._titleFontFamily),o.each(t.title,p),r.font=o.fontString(f,t._bodyFontStyle,t._bodyFontFamily),o.each(t.beforeBody.concat(t.afterBody),p),d=t.displayColors?f+2:0,o.each(a,function(e){o.each(e.before,p),o.each(e.lines,p),o.each(e.after,p)}),d=0,r.font=o.fontString(h,t._footerFontStyle,t._footerFontFamily),o.each(t.footer,p),{width:i+=2*t.xPadding,height:n}}(this,p),g=function(e,t){var r,n,i,o,a,s=e._model,u=e._chart,c=e._chart.chartArea,l="center",f="center"
|
||
s.y<t.height?f="top":s.y>u.height-t.height&&(f="bottom")
|
||
var h=(c.left+c.right)/2,d=(c.top+c.bottom)/2
|
||
"center"===f?(r=function(e){return e<=h},n=function(e){return e>h}):(r=function(e){return e<=t.width/2},n=function(e){return e>=u.width-t.width/2}),i=function(e){return e+t.width+s.caretSize+s.caretPadding>u.width},o=function(e){return e-t.width-s.caretSize-s.caretPadding<0},a=function(e){return e<=d?"top":"bottom"},r(s.x)?(l="left",i(s.x)&&(l="center",f=a(s.y))):n(s.x)&&(l="right",o(s.x)&&(l="center",f=a(s.y)))
|
||
var p=e._options
|
||
return{xAlign:p.xAlign?p.xAlign:l,yAlign:p.yAlign?p.yAlign:f}}(this,v),f._chart)}else p.opacity=0
|
||
return p.xAlign=g.xAlign,p.yAlign=g.yAlign,p.x=b.x,p.y=b.y,p.width=v.width,p.height=v.height,p.caretX=_.x,p.caretY=_.y,f._model=p,t&&h.custom&&h.custom.call(f,p),f},drawCaret:function(e,t){var r=this._chart.ctx,n=this._view,i=this.getCaretPosition(e,t,n)
|
||
r.lineTo(i.x1,i.y1),r.lineTo(i.x2,i.y2),r.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,r){var n,i,o,a,s,u,c=r.caretSize,l=r.cornerRadius,f=r.xAlign,h=r.yAlign,d=e.x,p=e.y,m=t.width,y=t.height
|
||
if("center"===h)s=p+y/2,"left"===f?(i=(n=d)-c,o=n,a=s+c,u=s-c):(i=(n=d+m)+c,o=n,a=s-c,u=s+c)
|
||
else if("left"===f?(n=(i=d+l+c)-c,o=i+c):"right"===f?(n=(i=d+m-l-c)-c,o=i+c):(n=(i=r.caretX)-c,o=i+c),"top"===h)s=(a=p)-c,u=a
|
||
else{s=(a=p+y)+c,u=a
|
||
var g=o
|
||
o=n,n=g}return{x1:n,x2:i,x3:o,y1:a,y2:s,y3:u}},drawTitle:function(e,r,n,i){var a=r.title
|
||
if(a.length){n.textAlign=r._titleAlign,n.textBaseline="top"
|
||
var s,u,c=r.titleFontSize,l=r.titleSpacing
|
||
for(n.fillStyle=t(r.titleFontColor,i),n.font=o.fontString(c,r._titleFontStyle,r._titleFontFamily),s=0,u=a.length;s<u;++s)n.fillText(a[s],e.x,e.y),e.y+=c+l,s+1===a.length&&(e.y+=r.titleMarginBottom-l)}},drawBody:function(e,r,n,i){var a=r.bodyFontSize,s=r.bodySpacing,u=r.body
|
||
n.textAlign=r._bodyAlign,n.textBaseline="top",n.font=o.fontString(a,r._bodyFontStyle,r._bodyFontFamily)
|
||
var c=0,l=function(t){n.fillText(t,e.x+c,e.y),e.y+=a+s}
|
||
n.fillStyle=t(r.bodyFontColor,i),o.each(r.beforeBody,l)
|
||
var f=r.displayColors
|
||
c=f?a+2:0,o.each(u,function(s,u){var c=t(r.labelTextColors[u],i)
|
||
n.fillStyle=c,o.each(s.before,l),o.each(s.lines,function(o){f&&(n.fillStyle=t(r.legendColorBackground,i),n.fillRect(e.x,e.y,a,a),n.lineWidth=1,n.strokeStyle=t(r.labelColors[u].borderColor,i),n.strokeRect(e.x,e.y,a,a),n.fillStyle=t(r.labelColors[u].backgroundColor,i),n.fillRect(e.x+1,e.y+1,a-2,a-2),n.fillStyle=c),l(o)}),o.each(s.after,l)}),c=0,o.each(r.afterBody,l),e.y-=s},drawFooter:function(e,r,n,i){var a=r.footer
|
||
a.length&&(e.y+=r.footerMarginTop,n.textAlign=r._footerAlign,n.textBaseline="top",n.fillStyle=t(r.footerFontColor,i),n.font=o.fontString(r.footerFontSize,r._footerFontStyle,r._footerFontFamily),o.each(a,function(t){n.fillText(t,e.x,e.y),e.y+=r.footerFontSize+r.footerSpacing}))},drawBackground:function(e,r,n,i,o){n.fillStyle=t(r.backgroundColor,o),n.strokeStyle=t(r.borderColor,o),n.lineWidth=r.borderWidth
|
||
var a=r.xAlign,s=r.yAlign,u=e.x,c=e.y,l=i.width,f=i.height,h=r.cornerRadius
|
||
n.beginPath(),n.moveTo(u+h,c),"top"===s&&this.drawCaret(e,i),n.lineTo(u+l-h,c),n.quadraticCurveTo(u+l,c,u+l,c+h),"center"===s&&"right"===a&&this.drawCaret(e,i),n.lineTo(u+l,c+f-h),n.quadraticCurveTo(u+l,c+f,u+l-h,c+f),"bottom"===s&&this.drawCaret(e,i),n.lineTo(u+h,c+f),n.quadraticCurveTo(u,c+f,u,c+f-h),"center"===s&&"left"===a&&this.drawCaret(e,i),n.lineTo(u,c+h),n.quadraticCurveTo(u,c,u+h,c),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view
|
||
if(0!==t.opacity){var r={width:t.width,height:t.height},n={x:t.x,y:t.y},i=Math.abs(t.opacity<.001)?0:t.opacity,o=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length
|
||
this._options.enabled&&o&&(this.drawBackground(n,t,e,r,i),n.x+=t.xPadding,n.y+=t.yPadding,this.drawTitle(n,t,e,i),this.drawBody(n,t,e,i),this.drawFooter(n,t,e,i))}},handleEvent:function(e){var t,r=this,n=r._options
|
||
return r._lastActive=r._lastActive||[],"mouseout"===e.type?r._active=[]:r._active=r._chart.getElementsAtEventForMode(e,n.mode,n),(t=!o.arrayEquals(r._active,r._lastActive))&&(r._lastActive=r._active,(n.enabled||n.custom)&&(r._eventPosition={x:e.x,y:e.y},r.update(!0),r.pivot())),t}}),e.Tooltip.positioners={average:function(e){if(!e.length)return!1
|
||
var t,r,n=0,i=0,o=0
|
||
for(t=0,r=e.length;t<r;++t){var a=e[t]
|
||
if(a&&a.hasValue()){var s=a.tooltipPosition()
|
||
n+=s.x,i+=s.y,++o}}return{x:Math.round(n/o),y:Math.round(i/o)}},nearest:function(e,t){var r,n,i,a=t.x,s=t.y,u=Number.POSITIVE_INFINITY
|
||
for(r=0,n=e.length;r<n;++r){var c=e[r]
|
||
if(c&&c.hasValue()){var l=c.getCenterPoint(),f=o.distanceBetweenPoints(t,l)
|
||
f<u&&(u=f,i=c)}}if(i){var h=i.tooltipPosition()
|
||
a=h.x,s=h.y}return{x:a,y:s}}}}},{25:25,26:26,45:45}],36:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45)
|
||
n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),t.exports=i.extend({inLabelRange:function(e){var t=this._view
|
||
return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var r=this._view
|
||
if(r){for(var n=o.getAngleFromPoint(r,{x:e,y:t}),i=n.angle,a=n.distance,s=r.startAngle,u=r.endAngle;u<s;)u+=2*Math.PI
|
||
for(;i>u;)i-=2*Math.PI
|
||
for(;i<s;)i+=2*Math.PI
|
||
var c=i>=s&&i<=u,l=a>=r.innerRadius&&a<=r.outerRadius
|
||
return c&&l}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,r=(e.innerRadius+e.outerRadius)/2
|
||
return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},getArea:function(){var e=this._view
|
||
return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,r=(e.outerRadius-e.innerRadius)/2+e.innerRadius
|
||
return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},draw:function(){var e=this._chart.ctx,t=this._view,r=t.startAngle,n=t.endAngle
|
||
e.beginPath(),e.arc(t.x,t.y,t.outerRadius,r,n),e.arc(t.x,t.y,t.innerRadius,n,r,!0),e.closePath(),e.strokeStyle=t.borderColor,e.lineWidth=t.borderWidth,e.fillStyle=t.backgroundColor,e.fill(),e.lineJoin="bevel",t.borderWidth&&e.stroke()}})},{25:25,26:26,45:45}],37:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45),a=n.global
|
||
n._set("global",{elements:{line:{tension:.4,backgroundColor:a.defaultColor,borderWidth:3,borderColor:a.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),t.exports=i.extend({draw:function(){var e,t,r,n,i=this._view,s=this._chart.ctx,u=i.spanGaps,c=this._children.slice(),l=a.elements.line,f=-1
|
||
for(this._loop&&c.length&&c.push(c[0]),s.save(),s.lineCap=i.borderCapStyle||l.borderCapStyle,s.setLineDash&&s.setLineDash(i.borderDash||l.borderDash),s.lineDashOffset=i.borderDashOffset||l.borderDashOffset,s.lineJoin=i.borderJoinStyle||l.borderJoinStyle,s.lineWidth=i.borderWidth||l.borderWidth,s.strokeStyle=i.borderColor||a.defaultColor,s.beginPath(),f=-1,e=0;e<c.length;++e)t=c[e],r=o.previousItem(c,e),n=t._view,0===e?n.skip||(s.moveTo(n.x,n.y),f=e):(r=-1===f?r:c[f],n.skip||(f!==e-1&&!u||-1===f?s.moveTo(n.x,n.y):o.canvas.lineTo(s,r._view,t._view),f=e))
|
||
s.stroke(),s.restore()}})},{25:25,26:26,45:45}],38:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45),a=n.global.defaultColor
|
||
function s(e){var t=this._view
|
||
return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}n._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:a,borderColor:a,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),t.exports=i.extend({inRange:function(e,t){var r=this._view
|
||
return!!r&&Math.pow(e-r.x,2)+Math.pow(t-r.y,2)<Math.pow(r.hitRadius+r.radius,2)},inLabelRange:s,inXRange:s,inYRange:function(e){var t=this._view
|
||
return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view
|
||
return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view
|
||
return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,r=this._model,i=this._chart.ctx,s=t.pointStyle,u=t.radius,c=t.x,l=t.y,f=o.color,h=0
|
||
t.skip||(i.strokeStyle=t.borderColor||a,i.lineWidth=o.valueOrDefault(t.borderWidth,n.global.elements.point.borderWidth),i.fillStyle=t.backgroundColor||a,void 0!==e&&(r.x<e.left||1.01*e.right<r.x||r.y<e.top||1.01*e.bottom<r.y)&&(r.x<e.left?h=(c-r.x)/(e.left-r.x):1.01*e.right<r.x?h=(r.x-c)/(r.x-e.right):r.y<e.top?h=(l-r.y)/(e.top-r.y):1.01*e.bottom<r.y&&(h=(r.y-l)/(r.y-e.bottom)),h=Math.round(100*h)/100,i.strokeStyle=f(i.strokeStyle).alpha(h).rgbString(),i.fillStyle=f(i.fillStyle).alpha(h).rgbString()),o.canvas.drawPoint(i,s,u,c,l))}})},{25:25,26:26,45:45}],39:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26)
|
||
function o(e){return void 0!==e._view.width}function a(e){var t,r,n,i,a=e._view
|
||
if(o(e)){var s=a.width/2
|
||
t=a.x-s,r=a.x+s,n=Math.min(a.y,a.base),i=Math.max(a.y,a.base)}else{var u=a.height/2
|
||
t=Math.min(a.x,a.base),r=Math.max(a.x,a.base),n=a.y-u,i=a.y+u}return{left:t,top:n,right:r,bottom:i}}n._set("global",{elements:{rectangle:{backgroundColor:n.global.defaultColor,borderColor:n.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),t.exports=i.extend({draw:function(){var e,t,r,n,i,o,a,s=this._chart.ctx,u=this._view,c=u.borderWidth
|
||
if(u.horizontal?(e=u.base,t=u.x,r=u.y-u.height/2,n=u.y+u.height/2,i=t>e?1:-1,o=1,a=u.borderSkipped||"left"):(e=u.x-u.width/2,t=u.x+u.width/2,r=u.y,i=1,o=(n=u.base)>r?1:-1,a=u.borderSkipped||"bottom"),c){var l=Math.min(Math.abs(e-t),Math.abs(r-n)),f=(c=c>l?l:c)/2,h=e+("left"!==a?f*i:0),d=t+("right"!==a?-f*i:0),p=r+("top"!==a?f*o:0),m=n+("bottom"!==a?-f*o:0)
|
||
h!==d&&(r=p,n=m),p!==m&&(e=h,t=d)}s.beginPath(),s.fillStyle=u.backgroundColor,s.strokeStyle=u.borderColor,s.lineWidth=c
|
||
var y=[[e,n],[e,r],[t,r],[t,n]],g=["bottom","left","top","right"].indexOf(a,0)
|
||
function b(e){return y[(g+e)%4]}-1===g&&(g=0)
|
||
var v=b(0)
|
||
s.moveTo(v[0],v[1])
|
||
for(var _=1;_<4;_++)v=b(_),s.lineTo(v[0],v[1])
|
||
s.fill(),c&&s.stroke()},height:function(){var e=this._view
|
||
return e.base-e.y},inRange:function(e,t){var r=!1
|
||
if(this._view){var n=a(this)
|
||
r=e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom}return r},inLabelRange:function(e,t){if(!this._view)return!1
|
||
var r=a(this)
|
||
return o(this)?e>=r.left&&e<=r.right:t>=r.top&&t<=r.bottom},inXRange:function(e){var t=a(this)
|
||
return e>=t.left&&e<=t.right},inYRange:function(e){var t=a(this)
|
||
return e>=t.top&&e<=t.bottom},getCenterPoint:function(){var e,t,r=this._view
|
||
return o(this)?(e=r.x,t=(r.y+r.base)/2):(e=(r.x+r.base)/2,t=r.y),{x:e,y:t}},getArea:function(){var e=this._view
|
||
return e.width*Math.abs(e.y-e.base)},tooltipPosition:function(){var e=this._view
|
||
return{x:e.x,y:e.y}}})},{25:25,26:26}],40:[function(e,t,r){"use strict"
|
||
t.exports={},t.exports.Arc=e(36),t.exports.Line=e(37),t.exports.Point=e(38),t.exports.Rectangle=e(39)},{36:36,37:37,38:38,39:39}],41:[function(e,t,r){"use strict"
|
||
var n=e(42)
|
||
r=t.exports={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,r,n,i,o){if(o){var a=Math.min(o,n/2),s=Math.min(o,i/2)
|
||
e.moveTo(t+a,r),e.lineTo(t+n-a,r),e.quadraticCurveTo(t+n,r,t+n,r+s),e.lineTo(t+n,r+i-s),e.quadraticCurveTo(t+n,r+i,t+n-a,r+i),e.lineTo(t+a,r+i),e.quadraticCurveTo(t,r+i,t,r+i-s),e.lineTo(t,r+s),e.quadraticCurveTo(t,r,t+a,r)}else e.rect(t,r,n,i)},drawPoint:function(e,t,r,n,i){var o,a,s,u,c,l
|
||
if(!t||"object"!=typeof t||"[object HTMLImageElement]"!==(o=t.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(r)||r<=0)){switch(t){default:e.beginPath(),e.arc(n,i,r,0,2*Math.PI),e.closePath(),e.fill()
|
||
break
|
||
case"triangle":e.beginPath(),c=(a=3*r/Math.sqrt(3))*Math.sqrt(3)/2,e.moveTo(n-a/2,i+c/3),e.lineTo(n+a/2,i+c/3),e.lineTo(n,i-2*c/3),e.closePath(),e.fill()
|
||
break
|
||
case"rect":l=1/Math.SQRT2*r,e.beginPath(),e.fillRect(n-l,i-l,2*l,2*l),e.strokeRect(n-l,i-l,2*l,2*l)
|
||
break
|
||
case"rectRounded":var f=r/Math.SQRT2,h=n-f,d=i-f,p=Math.SQRT2*r
|
||
e.beginPath(),this.roundedRect(e,h,d,p,p,r/2),e.closePath(),e.fill()
|
||
break
|
||
case"rectRot":l=1/Math.SQRT2*r,e.beginPath(),e.moveTo(n-l,i),e.lineTo(n,i+l),e.lineTo(n+l,i),e.lineTo(n,i-l),e.closePath(),e.fill()
|
||
break
|
||
case"cross":e.beginPath(),e.moveTo(n,i+r),e.lineTo(n,i-r),e.moveTo(n-r,i),e.lineTo(n+r,i),e.closePath()
|
||
break
|
||
case"crossRot":e.beginPath(),s=Math.cos(Math.PI/4)*r,u=Math.sin(Math.PI/4)*r,e.moveTo(n-s,i-u),e.lineTo(n+s,i+u),e.moveTo(n-s,i+u),e.lineTo(n+s,i-u),e.closePath()
|
||
break
|
||
case"star":e.beginPath(),e.moveTo(n,i+r),e.lineTo(n,i-r),e.moveTo(n-r,i),e.lineTo(n+r,i),s=Math.cos(Math.PI/4)*r,u=Math.sin(Math.PI/4)*r,e.moveTo(n-s,i-u),e.lineTo(n+s,i+u),e.moveTo(n-s,i+u),e.lineTo(n+s,i-u),e.closePath()
|
||
break
|
||
case"line":e.beginPath(),e.moveTo(n-r,i),e.lineTo(n+r,i),e.closePath()
|
||
break
|
||
case"dash":e.beginPath(),e.moveTo(n,i),e.lineTo(n+r,i),e.closePath()}e.stroke()}}else e.drawImage(t,n-t.width/2,i-t.height/2,t.width,t.height)},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,r,n){if(r.steppedLine)return"after"===r.steppedLine&&!n||"after"!==r.steppedLine&&n?e.lineTo(t.x,r.y):e.lineTo(r.x,t.y),void e.lineTo(r.x,r.y)
|
||
r.tension?e.bezierCurveTo(n?t.controlPointPreviousX:t.controlPointNextX,n?t.controlPointPreviousY:t.controlPointNextY,n?r.controlPointNextX:r.controlPointPreviousX,n?r.controlPointNextY:r.controlPointPreviousY,r.x,r.y):e.lineTo(r.x,r.y)}}
|
||
n.clear=r.clear,n.drawRoundedRectangle=function(e){e.beginPath(),r.roundedRect.apply(r,arguments),e.closePath()}},{42:42}],42:[function(e,t,r){"use strict"
|
||
var n,i={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(e){return null===e||void 0===e},isArray:Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,r){return i.valueOrDefault(i.isArray(e)?e[t]:e,r)},callback:function(e,t,r){if(e&&"function"==typeof e.call)return e.apply(r,t)},each:function(e,t,r,n){var o,a,s
|
||
if(i.isArray(e))if(a=e.length,n)for(o=a-1;o>=0;o--)t.call(r,e[o],o)
|
||
else for(o=0;o<a;o++)t.call(r,e[o],o)
|
||
else if(i.isObject(e))for(a=(s=Object.keys(e)).length,o=0;o<a;o++)t.call(r,e[s[o]],s[o])},arrayEquals:function(e,t){var r,n,o,a
|
||
if(!e||!t||e.length!==t.length)return!1
|
||
for(r=0,n=e.length;r<n;++r)if(o=e[r],a=t[r],o instanceof Array&&a instanceof Array){if(!i.arrayEquals(o,a))return!1}else if(o!==a)return!1
|
||
return!0},clone:function(e){if(i.isArray(e))return e.map(i.clone)
|
||
if(i.isObject(e)){for(var t={},r=Object.keys(e),n=r.length,o=0;o<n;++o)t[r[o]]=i.clone(e[r[o]])
|
||
return t}return e},_merger:function(e,t,r,n){var o=t[e],a=r[e]
|
||
i.isObject(o)&&i.isObject(a)?i.merge(o,a,n):t[e]=i.clone(a)},_mergerIf:function(e,t,r){var n=t[e],o=r[e]
|
||
i.isObject(n)&&i.isObject(o)?i.mergeIf(n,o):t.hasOwnProperty(e)||(t[e]=i.clone(o))},merge:function(e,t,r){var n,o,a,s,u,c=i.isArray(t)?t:[t],l=c.length
|
||
if(!i.isObject(e))return e
|
||
for(n=(r=r||{}).merger||i._merger,o=0;o<l;++o)if(t=c[o],i.isObject(t))for(u=0,s=(a=Object.keys(t)).length;u<s;++u)n(a[u],e,t,r)
|
||
return e},mergeIf:function(e,t){return i.merge(e,t,{merger:i._mergerIf})},extend:function(e){for(var t=function(t,r){e[r]=t},r=1,n=arguments.length;r<n;++r)i.each(arguments[r],t)
|
||
return e},inherits:function(e){var t=this,r=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},n=function(){this.constructor=r}
|
||
return n.prototype=t.prototype,r.prototype=new n,r.extend=i.inherits,e&&i.extend(r.prototype,e),r.__super__=t.prototype,r}}
|
||
t.exports=i,i.callCallback=i.callback,i.indexOf=function(e,t,r){return Array.prototype.indexOf.call(e,t,r)},i.getValueOrDefault=i.valueOrDefault,i.getValueAtIndexOrDefault=i.valueAtIndexOrDefault},{}],43:[function(e,t,r){"use strict"
|
||
var n=e(42),i={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,r=0,n=1
|
||
return 0===e?0:1===e?1:(r||(r=.3),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r))},easeOutElastic:function(e){var t=1.70158,r=0,n=1
|
||
return 0===e?0:1===e?1:(r||(r=.3),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},easeInOutElastic:function(e){var t=1.70158,r=0,n=1
|
||
return 0===e?0:2==(e/=.5)?1:(r||(r=.45),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),e<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},easeInBack:function(e){var t=1.70158
|
||
return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158
|
||
return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158
|
||
return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-i.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*i.easeInBounce(2*e):.5*i.easeOutBounce(2*e-1)+.5}}
|
||
t.exports={effects:i},n.easingEffects=i},{42:42}],44:[function(e,t,r){"use strict"
|
||
var n=e(42)
|
||
t.exports={toLineHeight:function(e,t){var r=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/)
|
||
if(!r||"normal"===r[1])return 1.2*t
|
||
switch(e=+r[2],r[3]){case"px":return e
|
||
case"%":e/=100}return t*e},toPadding:function(e){var t,r,i,o
|
||
return n.isObject(e)?(t=+e.top||0,r=+e.right||0,i=+e.bottom||0,o=+e.left||0):t=r=i=o=+e||0,{top:t,right:r,bottom:i,left:o,height:t+i,width:o+r}},resolve:function(e,t,r){var i,o,a
|
||
for(i=0,o=e.length;i<o;++i)if(void 0!==(a=e[i])&&(void 0!==t&&"function"==typeof a&&(a=a(t)),void 0!==r&&n.isArray(a)&&(a=a[r]),void 0!==a))return a}}},{42:42}],45:[function(e,t,r){"use strict"
|
||
t.exports=e(42),t.exports.easing=e(43),t.exports.canvas=e(41),t.exports.options=e(44)},{41:41,42:42,43:43,44:44}],46:[function(e,t,r){t.exports={acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}}},{}],47:[function(e,t,r){"use strict"
|
||
var n=e(45),i="$chartjs",o="chartjs-",a=o+"render-monitor",s=o+"render-animation",u=["animationstart","webkitAnimationStart"],c={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"}
|
||
function l(e,t){var r=n.getStyle(e,t),i=r&&r.match(/^(\d+)(\.\d+)?px$/)
|
||
return i?Number(i[1]):void 0}var f=!!function(){var e=!1
|
||
try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}})
|
||
window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0}
|
||
function h(e,t,r){e.addEventListener(t,r,f)}function d(e,t,r){e.removeEventListener(t,r,f)}function p(e,t,r,n,i){return{type:e,chart:t,native:i||null,x:void 0!==r?r:null,y:void 0!==n?n:null}}function m(e,t,r){var c,l,f,d,m=e[i]||(e[i]={}),y=m.resizer=function(e){var t=document.createElement("div"),r=o+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"
|
||
t.style.cssText=n,t.className=r,t.innerHTML='<div class="'+r+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+r+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>'
|
||
var i=t.childNodes[0],a=t.childNodes[1]
|
||
t._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,a.scrollLeft=1e6,a.scrollTop=1e6}
|
||
var s=function(){t._reset(),e()}
|
||
return h(i,"scroll",s.bind(i,"expand")),h(a,"scroll",s.bind(a,"shrink")),t}((c=function(){if(m.resizer)return t(p("resize",r))},f=!1,d=[],function(){d=Array.prototype.slice.call(arguments),l=l||this,f||(f=!0,n.requestAnimFrame.call(window,function(){f=!1,c.apply(l,d)}))}));(function(e,t){var r=e[i]||(e[i]={}),o=r.renderProxy=function(e){e.animationName===s&&t()}
|
||
n.each(u,function(t){h(e,t,o)}),r.reflow=!!e.offsetParent,e.classList.add(a)})(e,function(){if(m.resizer){var t=e.parentNode
|
||
t&&t!==y.parentNode&&t.insertBefore(y,t.firstChild),y._reset()}})}function y(e){var t=e[i]||{},r=t.resizer
|
||
delete t.resizer,function(e){var t=e[i]||{},r=t.renderProxy
|
||
r&&(n.each(u,function(t){d(e,t,r)}),delete t.renderProxy),e.classList.remove(a)}(e),r&&r.parentNode&&r.parentNode.removeChild(r)}t.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var e,t,r,n="from{opacity:0.99}to{opacity:1}"
|
||
t="@-webkit-keyframes "+s+"{"+n+"}@keyframes "+s+"{"+n+"}."+a+"{-webkit-animation:"+s+" 0.001s;animation:"+s+" 0.001s;}",r=(e=this)._style||document.createElement("style"),e._style||(e._style=r,t="/* Chart.js */\n"+t,r.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(r)),r.appendChild(document.createTextNode(t))},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas)
|
||
var r=e&&e.getContext&&e.getContext("2d")
|
||
return r&&r.canvas===e?(function(e,t){var r=e.style,n=e.getAttribute("height"),o=e.getAttribute("width")
|
||
if(e[i]={initial:{height:n,width:o,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",null===o||""===o){var a=l(e,"width")
|
||
void 0!==a&&(e.width=a)}if(null===n||""===n)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2)
|
||
else{var s=l(e,"height")
|
||
void 0!==a&&(e.height=s)}}(e,t),r):null},releaseContext:function(e){var t=e.canvas
|
||
if(t[i]){var r=t[i].initial;["height","width"].forEach(function(e){var i=r[e]
|
||
n.isNullOrUndef(i)?t.removeAttribute(e):t.setAttribute(e,i)}),n.each(r.style||{},function(e,r){t.style[r]=e}),t.width=t.width,delete t[i]}},addEventListener:function(e,t,r){var o=e.canvas
|
||
if("resize"!==t){var a=r[i]||(r[i]={})
|
||
h(o,t,(a.proxies||(a.proxies={}))[e.id+"_"+t]=function(t){r(function(e,t){var r=c[e.type]||e.type,i=n.getRelativePosition(e,t)
|
||
return p(r,t,i.x,i.y,e)}(t,e))})}else m(o,r,e)},removeEventListener:function(e,t,r){var n=e.canvas
|
||
if("resize"!==t){var o=((r[i]||{}).proxies||{})[e.id+"_"+t]
|
||
o&&d(n,t,o)}else y(n)}},n.addEvent=h,n.removeEvent=d},{45:45}],48:[function(e,t,r){"use strict"
|
||
var n=e(45),i=e(46),o=e(47),a=o._enabled?o:i
|
||
t.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(e,t,r){"use strict"
|
||
t.exports={},t.exports.filler=e(50),t.exports.legend=e(51),t.exports.title=e(52)},{50:50,51:51,52:52}],50:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(40),o=e(45)
|
||
n._set("global",{plugins:{filler:{propagate:!0}}})
|
||
var a={dataset:function(e){var t=e.fill,r=e.chart,n=r.getDatasetMeta(t),i=n&&r.isDatasetVisible(t)&&n.dataset._children||[],o=i.length||0
|
||
return o?function(e,t){return t<o&&i[t]._view||null}:null},boundary:function(e){var t=e.boundary,r=t?t.x:null,n=t?t.y:null
|
||
return function(e){return{x:null===r?e.x:r,y:null===n?e.y:n}}}}
|
||
function s(e,t,r){var n,i=e._model||{},o=i.fill
|
||
if(void 0===o&&(o=!!i.backgroundColor),!1===o||null===o)return!1
|
||
if(!0===o)return"origin"
|
||
if(n=parseFloat(o,10),isFinite(n)&&Math.floor(n)===n)return"-"!==o[0]&&"+"!==o[0]||(n=t+n),!(n===t||n<0||n>=r)&&n
|
||
switch(o){case"bottom":return"start"
|
||
case"top":return"end"
|
||
case"zero":return"origin"
|
||
case"origin":case"start":case"end":return o
|
||
default:return!1}}function u(e){var t,r=e.el._model||{},n=e.el._scale||{},i=e.fill,o=null
|
||
if(isFinite(i))return null
|
||
if("start"===i?o=void 0===r.scaleBottom?n.bottom:r.scaleBottom:"end"===i?o=void 0===r.scaleTop?n.top:r.scaleTop:void 0!==r.scaleZero?o=r.scaleZero:n.getBasePosition?o=n.getBasePosition():n.getBasePixel&&(o=n.getBasePixel()),void 0!==o&&null!==o){if(void 0!==o.x&&void 0!==o.y)return o
|
||
if("number"==typeof o&&isFinite(o))return{x:(t=n.isHorizontal())?o:null,y:t?null:o}}return null}function c(e,t,r){var n,i=e[t].fill,o=[t]
|
||
if(!r)return i
|
||
for(;!1!==i&&-1===o.indexOf(i);){if(!isFinite(i))return i
|
||
if(!(n=e[i]))return!1
|
||
if(n.visible)return i
|
||
o.push(i),i=n.fill}return!1}function l(e){var t=e.fill,r="dataset"
|
||
return!1===t?null:(isFinite(t)||(r="boundary"),a[r](e))}function f(e){return e&&!e.skip}function h(e,t,r,n,i){var a
|
||
if(n&&i){for(e.moveTo(t[0].x,t[0].y),a=1;a<n;++a)o.canvas.lineTo(e,t[a-1],t[a])
|
||
for(e.lineTo(r[i-1].x,r[i-1].y),a=i-1;a>0;--a)o.canvas.lineTo(e,r[a],r[a-1],!0)}}t.exports={id:"filler",afterDatasetsUpdate:function(e,t){var r,n,o,a,f=(e.data.datasets||[]).length,h=t.propagate,d=[]
|
||
for(n=0;n<f;++n)a=null,(o=(r=e.getDatasetMeta(n)).dataset)&&o._model&&o instanceof i.Line&&(a={visible:e.isDatasetVisible(n),fill:s(o,n,f),chart:e,el:o}),r.$filler=a,d.push(a)
|
||
for(n=0;n<f;++n)(a=d[n])&&(a.fill=c(d,n,h),a.boundary=u(a),a.mapper=l(a))},beforeDatasetDraw:function(e,t){var r=t.meta.$filler
|
||
if(r){var i=e.ctx,a=r.el,s=a._view,u=a._children||[],c=r.mapper,l=s.backgroundColor||n.global.defaultColor
|
||
c&&l&&u.length&&(o.canvas.clipArea(i,e.chartArea),function(e,t,r,n,i,o){var a,s,u,c,l,d,p,m=t.length,y=n.spanGaps,g=[],b=[],v=0,_=0
|
||
for(e.beginPath(),a=0,s=m+!!o;a<s;++a)l=r(c=t[u=a%m]._view,u,n),d=f(c),p=f(l),d&&p?(v=g.push(c),_=b.push(l)):v&&_&&(y?(d&&g.push(c),p&&b.push(l)):(h(e,g,b,v,_),v=_=0,g=[],b=[]))
|
||
h(e,g,b,v,_),e.closePath(),e.fillStyle=i,e.fill()}(i,u,c,s,l,a._loop),o.canvas.unclipArea(i))}}}},{25:25,40:40,45:45}],51:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45),a=e(30),s=o.noop
|
||
function u(e,t){return e.usePointStyle?t*Math.SQRT2:e.boxWidth}n._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var r=t.datasetIndex,n=this.chart,i=n.getDatasetMeta(r)
|
||
i.hidden=null===i.hidden?!n.data.datasets[r].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data
|
||
return o.isArray(t.datasets)?t.datasets.map(function(t,r){return{text:t.label,fillStyle:o.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!e.isDatasetVisible(r),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:r}},this):[]}}},legendCallback:function(e){var t=[]
|
||
t.push('<ul class="'+e.id+'-legend">')
|
||
for(var r=0;r<e.data.datasets.length;r++)t.push('<li><span style="background-color:'+e.data.datasets[r].backgroundColor+'"></span>'),e.data.datasets[r].label&&t.push(e.data.datasets[r].label),t.push("</li>")
|
||
return t.push("</ul>"),t.join("")}})
|
||
var c=i.extend({initialize:function(e){o.extend(this,e),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:s,update:function(e,t,r){var n=this
|
||
return n.beforeUpdate(),n.maxWidth=e,n.maxHeight=t,n.margins=r,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:s,beforeSetDimensions:s,setDimensions:function(){var e=this
|
||
e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:s,beforeBuildLabels:s,buildLabels:function(){var e=this,t=e.options.labels||{},r=o.callback(t.generateLabels,[e.chart],e)||[]
|
||
t.filter&&(r=r.filter(function(r){return t.filter(r,e.chart.data)})),e.options.reverse&&r.reverse(),e.legendItems=r},afterBuildLabels:s,beforeFit:s,fit:function(){var e=this,t=e.options,r=t.labels,i=t.display,a=e.ctx,s=n.global,c=o.valueOrDefault,l=c(r.fontSize,s.defaultFontSize),f=c(r.fontStyle,s.defaultFontStyle),h=c(r.fontFamily,s.defaultFontFamily),d=o.fontString(l,f,h),p=e.legendHitBoxes=[],m=e.minSize,y=e.isHorizontal()
|
||
if(y?(m.width=e.maxWidth,m.height=i?10:0):(m.width=i?10:0,m.height=e.maxHeight),i)if(a.font=d,y){var g=e.lineWidths=[0],b=e.legendItems.length?l+r.padding:0
|
||
a.textAlign="left",a.textBaseline="top",o.each(e.legendItems,function(t,n){var i=u(r,l)+l/2+a.measureText(t.text).width
|
||
g[g.length-1]+i+r.padding>=e.width&&(b+=l+r.padding,g[g.length]=e.left),p[n]={left:0,top:0,width:i,height:l},g[g.length-1]+=i+r.padding}),m.height+=b}else{var v=r.padding,_=e.columnWidths=[],w=r.padding,S=0,E=0,k=l+v
|
||
o.each(e.legendItems,function(e,t){var n=u(r,l)+l/2+a.measureText(e.text).width
|
||
E+k>m.height&&(w+=S+r.padding,_.push(S),S=0,E=0),S=Math.max(S,n),E+=k,p[t]={left:0,top:0,width:n,height:l}}),w+=S,_.push(S),m.width+=w}e.width=m.width,e.height=m.height},afterFit:s,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,r=t.labels,i=n.global,a=i.elements.line,s=e.width,c=e.lineWidths
|
||
if(t.display){var l,f=e.ctx,h=o.valueOrDefault,d=h(r.fontColor,i.defaultFontColor),p=h(r.fontSize,i.defaultFontSize),m=h(r.fontStyle,i.defaultFontStyle),y=h(r.fontFamily,i.defaultFontFamily),g=o.fontString(p,m,y)
|
||
f.textAlign="left",f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=d,f.fillStyle=d,f.font=g
|
||
var b=u(r,p),v=e.legendHitBoxes,_=e.isHorizontal()
|
||
l=_?{x:e.left+(s-c[0])/2,y:e.top+r.padding,line:0}:{x:e.left+r.padding,y:e.top+r.padding,line:0}
|
||
var w=p+r.padding
|
||
o.each(e.legendItems,function(n,u){var d=f.measureText(n.text).width,m=b+p/2+d,y=l.x,g=l.y
|
||
_?y+m>=s&&(g=l.y+=w,l.line++,y=l.x=e.left+(s-c[l.line])/2):g+w>e.bottom&&(y=l.x=y+e.columnWidths[l.line]+r.padding,g=l.y=e.top+r.padding,l.line++),function(e,r,n){if(!(isNaN(b)||b<=0)){f.save(),f.fillStyle=h(n.fillStyle,i.defaultColor),f.lineCap=h(n.lineCap,a.borderCapStyle),f.lineDashOffset=h(n.lineDashOffset,a.borderDashOffset),f.lineJoin=h(n.lineJoin,a.borderJoinStyle),f.lineWidth=h(n.lineWidth,a.borderWidth),f.strokeStyle=h(n.strokeStyle,i.defaultColor)
|
||
var s=0===h(n.lineWidth,a.borderWidth)
|
||
if(f.setLineDash&&f.setLineDash(h(n.lineDash,a.borderDash)),t.labels&&t.labels.usePointStyle){var u=p*Math.SQRT2/2,c=u/Math.SQRT2,l=e+c,d=r+c
|
||
o.canvas.drawPoint(f,n.pointStyle,u,l,d)}else s||f.strokeRect(e,r,b,p),f.fillRect(e,r,b,p)
|
||
f.restore()}}(y,g,n),v[u].left=y,v[u].top=g,function(e,t,r,n){var i=p/2,o=b+i+e,a=t+i
|
||
f.fillText(r.text,o,a),r.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(o,a),f.lineTo(o+n,a),f.stroke())}(y,g,n,d),_?l.x+=m+r.padding:l.y+=w})}},handleEvent:function(e){var t=this,r=t.options,n="mouseup"===e.type?"click":e.type,i=!1
|
||
if("mousemove"===n){if(!r.onHover)return}else{if("click"!==n)return
|
||
if(!r.onClick)return}var o=e.x,a=e.y
|
||
if(o>=t.left&&o<=t.right&&a>=t.top&&a<=t.bottom)for(var s=t.legendHitBoxes,u=0;u<s.length;++u){var c=s[u]
|
||
if(o>=c.left&&o<=c.left+c.width&&a>=c.top&&a<=c.top+c.height){if("click"===n){r.onClick.call(t,e.native,t.legendItems[u]),i=!0
|
||
break}if("mousemove"===n){r.onHover.call(t,e.native,t.legendItems[u]),i=!0
|
||
break}}}return i}})
|
||
function l(e,t){var r=new c({ctx:e.ctx,options:t,chart:e})
|
||
a.configure(e,r,t),a.addBox(e,r),e.legend=r}t.exports={id:"legend",_element:c,beforeInit:function(e){var t=e.options.legend
|
||
t&&l(e,t)},beforeUpdate:function(e){var t=e.options.legend,r=e.legend
|
||
t?(o.mergeIf(t,n.global.legend),r?(a.configure(e,r,t),r.options=t):l(e,t)):r&&(a.removeBox(e,r),delete e.legend)},afterEvent:function(e,t){var r=e.legend
|
||
r&&r.handleEvent(t)}}},{25:25,26:26,30:30,45:45}],52:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(26),o=e(45),a=e(30),s=o.noop
|
||
n._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}})
|
||
var u=i.extend({initialize:function(e){o.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:s,update:function(e,t,r){var n=this
|
||
return n.beforeUpdate(),n.maxWidth=e,n.maxHeight=t,n.margins=r,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:s,beforeSetDimensions:s,setDimensions:function(){var e=this
|
||
e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:s,beforeBuildLabels:s,buildLabels:s,afterBuildLabels:s,beforeFit:s,fit:function(){var e=this,t=o.valueOrDefault,r=e.options,i=r.display,a=t(r.fontSize,n.global.defaultFontSize),s=e.minSize,u=o.isArray(r.text)?r.text.length:1,c=o.options.toLineHeight(r.lineHeight,a),l=i?u*c+2*r.padding:0
|
||
e.isHorizontal()?(s.width=e.maxWidth,s.height=l):(s.width=l,s.height=e.maxHeight),e.width=s.width,e.height=s.height},afterFit:s,isHorizontal:function(){var e=this.options.position
|
||
return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,r=o.valueOrDefault,i=e.options,a=n.global
|
||
if(i.display){var s,u,c,l=r(i.fontSize,a.defaultFontSize),f=r(i.fontStyle,a.defaultFontStyle),h=r(i.fontFamily,a.defaultFontFamily),d=o.fontString(l,f,h),p=o.options.toLineHeight(i.lineHeight,l),m=p/2+i.padding,y=0,g=e.top,b=e.left,v=e.bottom,_=e.right
|
||
t.fillStyle=r(i.fontColor,a.defaultFontColor),t.font=d,e.isHorizontal()?(u=b+(_-b)/2,c=g+m,s=_-b):(u="left"===i.position?b+m:_-m,c=g+(v-g)/2,s=v-g,y=Math.PI*("left"===i.position?-.5:.5)),t.save(),t.translate(u,c),t.rotate(y),t.textAlign="center",t.textBaseline="middle"
|
||
var w=i.text
|
||
if(o.isArray(w))for(var S=0,E=0;E<w.length;++E)t.fillText(w[E],0,S,s),S+=p
|
||
else t.fillText(w,0,0,s)
|
||
t.restore()}}})
|
||
function c(e,t){var r=new u({ctx:e.ctx,options:t,chart:e})
|
||
a.configure(e,r,t),a.addBox(e,r),e.titleBlock=r}t.exports={id:"title",_element:u,beforeInit:function(e){var t=e.options.title
|
||
t&&c(e,t)},beforeUpdate:function(e){var t=e.options.title,r=e.titleBlock
|
||
t?(o.mergeIf(t,n.global.title),r?(a.configure(e,r,t),r.options=t):c(e,t)):r&&(a.removeBox(e,r),delete e.titleBlock)}}},{25:25,26:26,30:30,45:45}],53:[function(e,t,r){"use strict"
|
||
t.exports=function(e){var t=e.Scale.extend({getLabels:function(){var e=this.chart.data
|
||
return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels},determineDataLimits:function(){var e,t=this,r=t.getLabels()
|
||
t.minIndex=0,t.maxIndex=r.length-1,void 0!==t.options.ticks.min&&(e=r.indexOf(t.options.ticks.min),t.minIndex=-1!==e?e:t.minIndex),void 0!==t.options.ticks.max&&(e=r.indexOf(t.options.ticks.max),t.maxIndex=-1!==e?e:t.maxIndex),t.min=r[t.minIndex],t.max=r[t.maxIndex]},buildTicks:function(){var e=this,t=e.getLabels()
|
||
e.ticks=0===e.minIndex&&e.maxIndex===t.length-1?t:t.slice(e.minIndex,e.maxIndex+1)},getLabelForIndex:function(e,t){var r=this,n=r.chart.data,i=r.isHorizontal()
|
||
return n.yLabels&&!i?r.getRightValue(n.datasets[t].data[e]):r.ticks[e-r.minIndex]},getPixelForValue:function(e,t){var r,n=this,i=n.options.offset,o=Math.max(n.maxIndex+1-n.minIndex-(i?0:1),1)
|
||
if(void 0!==e&&null!==e&&(r=n.isHorizontal()?e.x:e.y),void 0!==r||void 0!==e&&isNaN(t)){var a=n.getLabels()
|
||
e=r||e
|
||
var s=a.indexOf(e)
|
||
t=-1!==s?s:t}if(n.isHorizontal()){var u=n.width/o,c=u*(t-n.minIndex)
|
||
return i&&(c+=u/2),n.left+Math.round(c)}var l=n.height/o,f=l*(t-n.minIndex)
|
||
return i&&(f+=l/2),n.top+Math.round(f)},getPixelForTick:function(e){return this.getPixelForValue(this.ticks[e],e+this.minIndex,null)},getValueForPixel:function(e){var t=this,r=t.options.offset,n=Math.max(t._ticks.length-(r?0:1),1),i=t.isHorizontal(),o=(i?t.width:t.height)/n
|
||
return e-=i?t.left:t.top,r&&(e-=o/2),(e<=0?0:Math.round(e/o))+t.minIndex},getBasePixel:function(){return this.bottom}})
|
||
e.scaleService.registerScaleType("category",t,{position:"bottom"})}},{}],54:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(45),o=e(34)
|
||
t.exports=function(e){var t={position:"left",ticks:{callback:o.formatters.linear}},r=e.LinearScaleBase.extend({determineDataLimits:function(){var e=this,t=e.options,r=e.chart,n=r.data.datasets,o=e.isHorizontal()
|
||
function a(t){return o?t.xAxisID===e.id:t.yAxisID===e.id}e.min=null,e.max=null
|
||
var s=t.stacked
|
||
if(void 0===s&&i.each(n,function(e,t){if(!s){var n=r.getDatasetMeta(t)
|
||
r.isDatasetVisible(t)&&a(n)&&void 0!==n.stack&&(s=!0)}}),t.stacked||s){var u={}
|
||
i.each(n,function(n,o){var s=r.getDatasetMeta(o),c=[s.type,void 0===t.stacked&&void 0===s.stack?o:"",s.stack].join(".")
|
||
void 0===u[c]&&(u[c]={positiveValues:[],negativeValues:[]})
|
||
var l=u[c].positiveValues,f=u[c].negativeValues
|
||
r.isDatasetVisible(o)&&a(s)&&i.each(n.data,function(r,n){var i=+e.getRightValue(r)
|
||
isNaN(i)||s.data[n].hidden||(l[n]=l[n]||0,f[n]=f[n]||0,t.relativePoints?l[n]=100:i<0?f[n]+=i:l[n]+=i)})}),i.each(u,function(t){var r=t.positiveValues.concat(t.negativeValues),n=i.min(r),o=i.max(r)
|
||
e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?o:Math.max(e.max,o)})}else i.each(n,function(t,n){var o=r.getDatasetMeta(n)
|
||
r.isDatasetVisible(n)&&a(o)&&i.each(t.data,function(t,r){var n=+e.getRightValue(t)
|
||
isNaN(n)||o.data[r].hidden||(null===e.min?e.min=n:n<e.min&&(e.min=n),null===e.max?e.max=n:n>e.max&&(e.max=n))})})
|
||
e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var e,t=this.options.ticks
|
||
if(this.isHorizontal())e=Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.width/50))
|
||
else{var r=i.valueOrDefault(t.fontSize,n.global.defaultFontSize)
|
||
e=Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.height/(2*r)))}return e},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){var t=this,r=t.start,n=+t.getRightValue(e),i=t.end-r
|
||
return t.isHorizontal()?t.left+t.width/i*(n-r):t.bottom-t.height/i*(n-r)},getValueForPixel:function(e){var t=this,r=t.isHorizontal(),n=r?t.width:t.height,i=(r?e-t.left:t.bottom-e)/n
|
||
return t.start+(t.end-t.start)*i},getPixelForTick:function(e){return this.getPixelForValue(this.ticksAsNumbers[e])}})
|
||
e.scaleService.registerScaleType("linear",r,t)}},{25:25,34:34,45:45}],55:[function(e,t,r){"use strict"
|
||
var n=e(45)
|
||
t.exports=function(e){var t=n.noop
|
||
e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks
|
||
if(t.beginAtZero){var r=n.sign(e.min),i=n.sign(e.max)
|
||
r<0&&i<0?e.max=0:r>0&&i>0&&(e.min=0)}var o=void 0!==t.min||void 0!==t.suggestedMin,a=void 0!==t.max||void 0!==t.suggestedMax
|
||
void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),o!==a&&e.min>=e.max&&(o?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:t,handleDirectionalChanges:t,buildTicks:function(){var e=this,t=e.options.ticks,r=e.getTickLimit(),i={maxTicks:r=Math.max(2,r),min:t.min,max:t.max,stepSize:n.valueOrDefault(t.fixedStepSize,t.stepSize)},o=e.ticks=function(e,t){var r,i=[]
|
||
if(e.stepSize&&e.stepSize>0)r=e.stepSize
|
||
else{var o=n.niceNum(t.max-t.min,!1)
|
||
r=n.niceNum(o/(e.maxTicks-1),!0)}var a=Math.floor(t.min/r)*r,s=Math.ceil(t.max/r)*r
|
||
e.min&&e.max&&e.stepSize&&n.almostWhole((e.max-e.min)/e.stepSize,r/1e3)&&(a=e.min,s=e.max)
|
||
var u=(s-a)/r
|
||
u=n.almostEquals(u,Math.round(u),r/1e3)?Math.round(u):Math.ceil(u)
|
||
var c=1
|
||
r<1&&(c=Math.pow(10,r.toString().length-2),a=Math.round(a*c)/c,s=Math.round(s*c)/c),i.push(void 0!==e.min?e.min:a)
|
||
for(var l=1;l<u;++l)i.push(Math.round((a+l*r)*c)/c)
|
||
return i.push(void 0!==e.max?e.max:s),i}(i,e)
|
||
e.handleDirectionalChanges(),e.max=n.max(o),e.min=n.min(o),t.reverse?(o.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var t=this
|
||
t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),e.Scale.prototype.convertTicksToLabels.call(t)}})}},{45:45}],56:[function(e,t,r){"use strict"
|
||
var n=e(45),i=e(34)
|
||
t.exports=function(e){var t={position:"left",ticks:{callback:i.formatters.logarithmic}},r=e.Scale.extend({determineDataLimits:function(){var e=this,t=e.options,r=e.chart,i=r.data.datasets,o=e.isHorizontal()
|
||
function a(t){return o?t.xAxisID===e.id:t.yAxisID===e.id}e.min=null,e.max=null,e.minNotZero=null
|
||
var s=t.stacked
|
||
if(void 0===s&&n.each(i,function(e,t){if(!s){var n=r.getDatasetMeta(t)
|
||
r.isDatasetVisible(t)&&a(n)&&void 0!==n.stack&&(s=!0)}}),t.stacked||s){var u={}
|
||
n.each(i,function(i,o){var s=r.getDatasetMeta(o),c=[s.type,void 0===t.stacked&&void 0===s.stack?o:"",s.stack].join(".")
|
||
r.isDatasetVisible(o)&&a(s)&&(void 0===u[c]&&(u[c]=[]),n.each(i.data,function(t,r){var n=u[c],i=+e.getRightValue(t)
|
||
isNaN(i)||s.data[r].hidden||i<0||(n[r]=n[r]||0,n[r]+=i)}))}),n.each(u,function(t){if(t.length>0){var r=n.min(t),i=n.max(t)
|
||
e.min=null===e.min?r:Math.min(e.min,r),e.max=null===e.max?i:Math.max(e.max,i)}})}else n.each(i,function(t,i){var o=r.getDatasetMeta(i)
|
||
r.isDatasetVisible(i)&&a(o)&&n.each(t.data,function(t,r){var n=+e.getRightValue(t)
|
||
isNaN(n)||o.data[r].hidden||n<0||(null===e.min?e.min=n:n<e.min&&(e.min=n),null===e.max?e.max=n:n>e.max&&(e.max=n),0!==n&&(null===e.minNotZero||n<e.minNotZero)&&(e.minNotZero=n))})})
|
||
this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks,r=n.valueOrDefault
|
||
e.min=r(t.min,e.min),e.max=r(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(n.log10(e.min))-1),e.max=Math.pow(10,Math.floor(n.log10(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(n.log10(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(n.log10(e.min))+1):10),null===e.minNotZero&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(n.log10(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,r=!e.isHorizontal(),i={min:t.min,max:t.max},o=e.ticks=function(e,t){var r,i,o=[],a=n.valueOrDefault,s=a(e.min,Math.pow(10,Math.floor(n.log10(t.min)))),u=Math.floor(n.log10(t.max)),c=Math.ceil(t.max/Math.pow(10,u))
|
||
0===s?(r=Math.floor(n.log10(t.minNotZero)),i=Math.floor(t.minNotZero/Math.pow(10,r)),o.push(s),s=i*Math.pow(10,r)):(r=Math.floor(n.log10(s)),i=Math.floor(s/Math.pow(10,r)))
|
||
var l=r<0?Math.pow(10,Math.abs(r)):1
|
||
do{o.push(s),10==++i&&(i=1,l=++r>=0?1:l),s=Math.round(i*Math.pow(10,r)*l)/l}while(r<u||r===u&&i<c)
|
||
var f=a(e.max,s)
|
||
return o.push(f),o}(i,e)
|
||
e.max=n.max(o),e.min=n.min(o),t.reverse?(r=!r,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),r&&o.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),e.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){return this.getPixelForValue(this.tickValues[e])},_getFirstTickValue:function(e){var t=Math.floor(n.log10(e))
|
||
return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},getPixelForValue:function(t){var r,i,o,a,s,u=this,c=u.options.ticks.reverse,l=n.log10,f=u._getFirstTickValue(u.minNotZero),h=0
|
||
return t=+u.getRightValue(t),c?(o=u.end,a=u.start,s=-1):(o=u.start,a=u.end,s=1),u.isHorizontal()?(r=u.width,i=c?u.right:u.left):(r=u.height,s*=-1,i=c?u.top:u.bottom),t!==o&&(0===o&&(r-=h=n.getValueOrDefault(u.options.ticks.fontSize,e.defaults.global.defaultFontSize),o=f),0!==t&&(h+=r/(l(a)-l(o))*(l(t)-l(o))),i+=s*h),i},getValueForPixel:function(t){var r,i,o,a,s=this,u=s.options.ticks.reverse,c=n.log10,l=s._getFirstTickValue(s.minNotZero)
|
||
if(u?(i=s.end,o=s.start):(i=s.start,o=s.end),s.isHorizontal()?(r=s.width,a=u?s.right-t:t-s.left):(r=s.height,a=u?t-s.top:s.bottom-t),a!==i){if(0===i){var f=n.getValueOrDefault(s.options.ticks.fontSize,e.defaults.global.defaultFontSize)
|
||
a-=f,r-=f,i=l}a*=c(o)-c(i),a/=r,a=Math.pow(10,c(i)+a)}return a}})
|
||
e.scaleService.registerScaleType("logarithmic",r,t)}},{34:34,45:45}],57:[function(e,t,r){"use strict"
|
||
var n=e(25),i=e(45),o=e(34)
|
||
t.exports=function(e){var t=n.global,r={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:o.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}}
|
||
function a(e){var t=e.options
|
||
return t.angleLines.display||t.pointLabels.display?e.chart.data.labels.length:0}function s(e){var r=e.options.pointLabels,n=i.valueOrDefault(r.fontSize,t.defaultFontSize),o=i.valueOrDefault(r.fontStyle,t.defaultFontStyle),a=i.valueOrDefault(r.fontFamily,t.defaultFontFamily)
|
||
return{size:n,style:o,family:a,font:i.fontString(n,o,a)}}function u(e,t,r,n,i){return e===n||e===i?{start:t-r/2,end:t+r/2}:e<n||e>i?{start:t-r-5,end:t}:{start:t,end:t+r+5}}function c(e){return 0===e||180===e?"center":e<180?"left":"right"}function l(e,t,r,n){if(i.isArray(t))for(var o=r.y,a=1.5*n,s=0;s<t.length;++s)e.fillText(t[s],r.x,o),o+=a
|
||
else e.fillText(t,r.x,r.y)}function f(e,t,r){90===e||270===e?r.y-=t.h/2:(e>270||e<90)&&(r.y-=t.h)}function h(e){return i.isNumber(e)?e:0}var d=e.LinearScaleBase.extend({setDimensions:function(){var e=this,r=e.options,n=r.ticks
|
||
e.width=e.maxWidth,e.height=e.maxHeight,e.xCenter=Math.round(e.width/2),e.yCenter=Math.round(e.height/2)
|
||
var o=i.min([e.height,e.width]),a=i.valueOrDefault(n.fontSize,t.defaultFontSize)
|
||
e.drawingArea=r.display?o/2-(a/2+n.backdropPaddingY):o/2},determineDataLimits:function(){var e=this,t=e.chart,r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY
|
||
i.each(t.data.datasets,function(o,a){if(t.isDatasetVisible(a)){var s=t.getDatasetMeta(a)
|
||
i.each(o.data,function(t,i){var o=+e.getRightValue(t)
|
||
isNaN(o)||s.data[i].hidden||(r=Math.min(o,r),n=Math.max(o,n))})}}),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=n===Number.NEGATIVE_INFINITY?0:n,e.handleTickRangeOptions()},getTickLimit:function(){var e=this.options.ticks,r=i.valueOrDefault(e.fontSize,t.defaultFontSize)
|
||
return Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*r)))},convertTicksToLabels:function(){var t=this
|
||
e.LinearScaleBase.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e,t
|
||
this.options.pointLabels.display?function(e){var t,r,n,o=s(e),c=Math.min(e.height/2,e.width/2),l={r:e.width,l:0,t:e.height,b:0},f={}
|
||
e.ctx.font=o.font,e._pointLabelSizes=[]
|
||
var h,d,p,m=a(e)
|
||
for(t=0;t<m;t++){n=e.getPointPosition(t,c),h=e.ctx,d=o.size,p=e.pointLabels[t]||"",r=i.isArray(p)?{w:i.longestText(h,h.font,p),h:p.length*d+1.5*(p.length-1)*d}:{w:h.measureText(p).width,h:d},e._pointLabelSizes[t]=r
|
||
var y=e.getIndexAngle(t),g=i.toDegrees(y)%360,b=u(g,n.x,r.w,0,180),v=u(g,n.y,r.h,90,270)
|
||
b.start<l.l&&(l.l=b.start,f.l=y),b.end>l.r&&(l.r=b.end,f.r=y),v.start<l.t&&(l.t=v.start,f.t=y),v.end>l.b&&(l.b=v.end,f.b=y)}e.setReductions(c,l,f)}(this):(e=this,t=Math.min(e.height/2,e.width/2),e.drawingArea=Math.round(t),e.setCenterPoint(0,0,0,0))},setReductions:function(e,t,r){var n=t.l/Math.sin(r.l),i=Math.max(t.r-this.width,0)/Math.sin(r.r),o=-t.t/Math.cos(r.t),a=-Math.max(t.b-this.height,0)/Math.cos(r.b)
|
||
n=h(n),i=h(i),o=h(o),a=h(a),this.drawingArea=Math.min(Math.round(e-(n+i)/2),Math.round(e-(o+a)/2)),this.setCenterPoint(n,i,o,a)},setCenterPoint:function(e,t,r,n){var i=this,o=i.width-t-i.drawingArea,a=e+i.drawingArea,s=r+i.drawingArea,u=i.height-n-i.drawingArea
|
||
i.xCenter=Math.round((a+o)/2+i.left),i.yCenter=Math.round((s+u)/2+i.top)},getIndexAngle:function(e){return e*(2*Math.PI/a(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this
|
||
if(null===e)return 0
|
||
var r=t.drawingArea/(t.max-t.min)
|
||
return t.options.ticks.reverse?(t.max-e)*r:(e-t.min)*r},getPointPosition:function(e,t){var r=this.getIndexAngle(e)-Math.PI/2
|
||
return{x:Math.round(Math.cos(r)*t)+this.xCenter,y:Math.round(Math.sin(r)*t)+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(){var e=this.min,t=this.max
|
||
return this.getPointPositionForValue(0,this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0)},draw:function(){var e=this,r=e.options,n=r.gridLines,o=r.ticks,u=i.valueOrDefault
|
||
if(r.display){var h=e.ctx,d=this.getIndexAngle(0),p=u(o.fontSize,t.defaultFontSize),m=u(o.fontStyle,t.defaultFontStyle),y=u(o.fontFamily,t.defaultFontFamily),g=i.fontString(p,m,y)
|
||
i.each(e.ticks,function(r,s){if(s>0||o.reverse){var c=e.getDistanceFromCenterForValue(e.ticksAsNumbers[s])
|
||
if(n.display&&0!==s&&function(e,t,r,n){var o=e.ctx
|
||
if(o.strokeStyle=i.valueAtIndexOrDefault(t.color,n-1),o.lineWidth=i.valueAtIndexOrDefault(t.lineWidth,n-1),e.options.gridLines.circular)o.beginPath(),o.arc(e.xCenter,e.yCenter,r,0,2*Math.PI),o.closePath(),o.stroke()
|
||
else{var s=a(e)
|
||
if(0===s)return
|
||
o.beginPath()
|
||
var u=e.getPointPosition(0,r)
|
||
o.moveTo(u.x,u.y)
|
||
for(var c=1;c<s;c++)u=e.getPointPosition(c,r),o.lineTo(u.x,u.y)
|
||
o.closePath(),o.stroke()}}(e,n,c,s),o.display){var l=u(o.fontColor,t.defaultFontColor)
|
||
if(h.font=g,h.save(),h.translate(e.xCenter,e.yCenter),h.rotate(d),o.showLabelBackdrop){var f=h.measureText(r).width
|
||
h.fillStyle=o.backdropColor,h.fillRect(-f/2-o.backdropPaddingX,-c-p/2-o.backdropPaddingY,f+2*o.backdropPaddingX,p+2*o.backdropPaddingY)}h.textAlign="center",h.textBaseline="middle",h.fillStyle=l,h.fillText(r,0,-c),h.restore()}}}),(r.angleLines.display||r.pointLabels.display)&&function(e){var r=e.ctx,n=e.options,o=n.angleLines,u=n.pointLabels
|
||
r.lineWidth=o.lineWidth,r.strokeStyle=o.color
|
||
var h=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),d=s(e)
|
||
r.textBaseline="top"
|
||
for(var p=a(e)-1;p>=0;p--){if(o.display){var m=e.getPointPosition(p,h)
|
||
r.beginPath(),r.moveTo(e.xCenter,e.yCenter),r.lineTo(m.x,m.y),r.stroke(),r.closePath()}if(u.display){var y=e.getPointPosition(p,h+5),g=i.valueAtIndexOrDefault(u.fontColor,p,t.defaultFontColor)
|
||
r.font=d.font,r.fillStyle=g
|
||
var b=e.getIndexAngle(p),v=i.toDegrees(b)
|
||
r.textAlign=c(v),f(v,e._pointLabelSizes[p],y),l(r,e.pointLabels[p]||"",y,d.size)}}}(e)}}})
|
||
e.scaleService.registerScaleType("radialLinear",d,r)}},{25:25,34:34,45:45}],58:[function(e,t,r){"use strict"
|
||
var n=e(1)
|
||
n="function"==typeof n?n:window.moment
|
||
var i=e(25),o=e(45),a=Number.MIN_SAFE_INTEGER||-9007199254740991,s=Number.MAX_SAFE_INTEGER||9007199254740991,u={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},c=Object.keys(u)
|
||
function l(e,t){return e-t}function f(e){var t,r,n,i={},o=[]
|
||
for(t=0,r=e.length;t<r;++t)i[n=e[t]]||(i[n]=!0,o.push(n))
|
||
return o}function h(e,t,r,n){var i=function(e,t,r){for(var n,i,o,a=0,s=e.length-1;a>=0&&a<=s;){if(i=e[(n=a+s>>1)-1]||null,o=e[n],!i)return{lo:null,hi:o}
|
||
if(o[t]<r)a=n+1
|
||
else{if(!(i[t]>r))return{lo:i,hi:o}
|
||
s=n-1}}return{lo:o,hi:null}}(e,t,r),o=i.lo?i.hi?i.lo:e[e.length-2]:e[0],a=i.lo?i.hi?i.hi:e[e.length-1]:e[1],s=a[t]-o[t],u=s?(r-o[t])/s:0,c=(a[n]-o[n])*u
|
||
return o[n]+c}function d(e,t){var r=t.parser,i=t.parser||t.format
|
||
return"function"==typeof r?r(e):"string"==typeof e&&"string"==typeof i?n(e,i):(e instanceof n||(e=n(e)),e.isValid()?e:"function"==typeof i?i(e):e)}function p(e,t){if(o.isNullOrUndef(e))return null
|
||
var r=t.options.time,n=d(t.getRightValue(e),r)
|
||
return n.isValid()?(r.round&&n.startOf(r.round),n.valueOf()):null}function m(e){for(var t=c.indexOf(e)+1,r=c.length;t<r;++t)if(u[c[t]].common)return c[t]}function y(e,t,r,i){var a,l=i.time,f=l.unit||function(e,t,r,n){var i,o,a,l=c.length
|
||
for(i=c.indexOf(e);i<l-1;++i)if(a=(o=u[c[i]]).steps?o.steps[o.steps.length-1]:s,o.common&&Math.ceil((r-t)/(a*o.size))<=n)return c[i]
|
||
return c[l-1]}(l.minUnit,e,t,r),h=m(f),d=o.valueOrDefault(l.stepSize,l.unitStepSize),p="week"===f&&l.isoWeekday,y=i.ticks.major.enabled,g=u[f],b=n(e),v=n(t),_=[]
|
||
for(d||(d=function(e,t,r,n){var i,o,a,s=t-e,c=u[r],l=c.size,f=c.steps
|
||
if(!f)return Math.ceil(s/(n*l))
|
||
for(i=0,o=f.length;i<o&&(a=f[i],!(Math.ceil(s/(l*a))<=n));++i);return a}(e,t,f,r)),p&&(b=b.isoWeekday(p),v=v.isoWeekday(p)),b=b.startOf(p?"day":f),(v=v.startOf(p?"day":f))<t&&v.add(1,f),a=n(b),y&&h&&!p&&!l.round&&(a.startOf(h),a.add(~~((b-a)/(g.size*d))*d,f));a<v;a.add(d,f))_.push(+a)
|
||
return _.push(+a),_}t.exports=function(e){var t=e.Scale.extend({initialize:function(){if(!n)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com")
|
||
this.mergeTicksOptions(),e.Scale.prototype.initialize.call(this)},update:function(){var t=this.options
|
||
return t.time&&t.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),e.Scale.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),e.Scale.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var e,t,r,i,u,c,h=this,d=h.chart,m=h.options.time,y=m.unit||"day",g=s,b=a,v=[],_=[],w=[]
|
||
for(e=0,r=d.data.labels.length;e<r;++e)w.push(p(d.data.labels[e],h))
|
||
for(e=0,r=(d.data.datasets||[]).length;e<r;++e)if(d.isDatasetVisible(e))if(u=d.data.datasets[e].data,o.isObject(u[0]))for(_[e]=[],t=0,i=u.length;t<i;++t)c=p(u[t],h),v.push(c),_[e][t]=c
|
||
else v.push.apply(v,w),_[e]=w.slice(0)
|
||
else _[e]=[]
|
||
w.length&&(w=f(w).sort(l),g=Math.min(g,w[0]),b=Math.max(b,w[w.length-1])),v.length&&(v=f(v).sort(l),g=Math.min(g,v[0]),b=Math.max(b,v[v.length-1])),g=p(m.min,h)||g,b=p(m.max,h)||b,g=g===s?+n().startOf(y):g,b=b===a?+n().endOf(y)+1:b,h.min=Math.min(g,b),h.max=Math.max(g+1,b),h._horizontal=h.isHorizontal(),h._table=[],h._timestamps={data:v,datasets:_,labels:w}},buildTicks:function(){var e,t,r,i=this,o=i.min,a=i.max,s=i.options,l=s.time,f=[],g=[]
|
||
switch(s.ticks.source){case"data":f=i._timestamps.data
|
||
break
|
||
case"labels":f=i._timestamps.labels
|
||
break
|
||
case"auto":default:f=y(o,a,i.getLabelCapacity(o),s)}for("ticks"===s.bounds&&f.length&&(o=f[0],a=f[f.length-1]),o=p(l.min,i)||o,a=p(l.max,i)||a,e=0,t=f.length;e<t;++e)(r=f[e])>=o&&r<=a&&g.push(r)
|
||
return i.min=o,i.max=a,i._unit=l.unit||function(e,t,r,i){var o,a,s=n.duration(n(i).diff(n(r)))
|
||
for(o=c.length-1;o>=c.indexOf(t);o--)if(a=c[o],u[a].common&&s.as(a)>=e.length)return a
|
||
return c[t?c.indexOf(t):0]}(g,l.minUnit,i.min,i.max),i._majorUnit=m(i._unit),i._table=function(e,t,r,n){if("linear"===n||!e.length)return[{time:t,pos:0},{time:r,pos:1}]
|
||
var i,o,a,s,u,c=[],l=[t]
|
||
for(i=0,o=e.length;i<o;++i)(s=e[i])>t&&s<r&&l.push(s)
|
||
for(l.push(r),i=0,o=l.length;i<o;++i)u=l[i+1],a=l[i-1],s=l[i],void 0!==a&&void 0!==u&&Math.round((u+a)/2)===s||c.push({time:s,pos:i/(o-1)})
|
||
return c}(i._timestamps.data,o,a,s.distribution),i._offsets=function(e,t,r,n,i){var o,a,s=0,u=0
|
||
return i.offset&&t.length&&(i.time.min||(o=t.length>1?t[1]:n,a=t[0],s=(h(e,"time",o,"pos")-h(e,"time",a,"pos"))/2),i.time.max||(o=t[t.length-1],a=t.length>1?t[t.length-2]:r,u=(h(e,"time",o,"pos")-h(e,"time",a,"pos"))/2)),{left:s,right:u}}(i._table,g,o,a,s),i._labelFormat=function(e,t){var r,n,i,o=e.length
|
||
for(r=0;r<o;r++){if(0!==(n=d(e[r],t)).millisecond())return"MMM D, YYYY h:mm:ss.SSS a"
|
||
0===n.second()&&0===n.minute()&&0===n.hour()||(i=!0)}return i?"MMM D, YYYY h:mm:ss a":"MMM D, YYYY"}(i._timestamps.data,l),function(e,t){var r,i,o,a,s=[]
|
||
for(r=0,i=e.length;r<i;++r)o=e[r],a=!!t&&o===+n(o).startOf(t),s.push({value:o,major:a})
|
||
return s}(g,i._majorUnit)},getLabelForIndex:function(e,t){var r=this.chart.data,n=this.options.time,i=r.labels&&e<r.labels.length?r.labels[e]:"",a=r.datasets[t].data[e]
|
||
return o.isObject(a)&&(i=this.getRightValue(a)),n.tooltipFormat?d(i,n).format(n.tooltipFormat):"string"==typeof i?i:d(i,n).format(this._labelFormat)},tickFormatFunction:function(e,t,r,n){var i=this.options,a=e.valueOf(),s=i.time.displayFormats,u=s[this._unit],c=this._majorUnit,l=s[c],f=e.clone().startOf(c).valueOf(),h=i.ticks.major,d=h.enabled&&c&&l&&a===f,p=e.format(n||(d?l:u)),m=d?h:i.ticks.minor,y=o.valueOrDefault(m.callback,m.userCallback)
|
||
return y?y(p,t,r):p},convertTicksToLabels:function(e){var t,r,i=[]
|
||
for(t=0,r=e.length;t<r;++t)i.push(this.tickFormatFunction(n(e[t].value),t,e))
|
||
return i},getPixelForOffset:function(e){var t=this,r=t._horizontal?t.width:t.height,n=t._horizontal?t.left:t.top,i=h(t._table,"time",e,"pos")
|
||
return n+r*(t._offsets.left+i)/(t._offsets.left+1+t._offsets.right)},getPixelForValue:function(e,t,r){var n=null
|
||
if(void 0!==t&&void 0!==r&&(n=this._timestamps.datasets[r][t]),null===n&&(n=p(e,this)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(e){var t=this.getTicks()
|
||
return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this,r=t._horizontal?t.width:t.height,i=t._horizontal?t.left:t.top,o=(r?(e-i)/r:0)*(t._offsets.left+1+t._offsets.left)-t._offsets.right,a=h(t._table,"pos",o,"time")
|
||
return n(a)},getLabelWidth:function(e){var t=this.options.ticks,r=this.ctx.measureText(e).width,n=o.toRadians(t.maxRotation),a=Math.cos(n),s=Math.sin(n)
|
||
return r*a+o.valueOrDefault(t.fontSize,i.global.defaultFontSize)*s},getLabelCapacity:function(e){var t=this,r=t.options.time.displayFormats.millisecond,i=t.tickFormatFunction(n(e),0,[],r),o=t.getLabelWidth(i),a=t.isHorizontal()?t.width:t.height,s=Math.floor(a/o)
|
||
return s>0?s:1}})
|
||
e.scaleService.registerScaleType("time",t,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{1:1,25:25,45:45}]},{},[7])(7)}),createDeprecatedModule("ember/resolver"),createDeprecatedModule("resolver"),define("ember-ajax/-private/promise",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
var t=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r]
|
||
n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()
|
||
var r=function(e){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
|
||
return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t)
|
||
e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,Ember.RSVP.Promise),t(r,[{key:"then",value:function(){var e=function e(t,r,n){null===t&&(t=Function.prototype)
|
||
var i=Object.getOwnPropertyDescriptor(t,r)
|
||
if(void 0===i){var o=Object.getPrototypeOf(t)
|
||
return null===o?void 0:e(o,r,n)}if("value"in i)return i.value
|
||
var a=i.get
|
||
return void 0!==a?a.call(n):void 0}(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"then",this).apply(this,arguments)
|
||
return e.xhr=this.xhr,e}}]),r}()
|
||
e.default=r}),define("ember-ajax/-private/utils/get-header",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){if(Ember.isNone(e)||Ember.isNone(t))return
|
||
var r=Ember.A(Object.keys(e)).find(function(e){return e.toLowerCase()===t.toLowerCase()})
|
||
return e[r]}}),define("ember-ajax/-private/utils/is-fastboot",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
var t="undefined"!=typeof FastBoot
|
||
e.default=t}),define("ember-ajax/-private/utils/is-string",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return"string"==typeof e}}),define("ember-ajax/-private/utils/parse-response-headers",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var r={}
|
||
if(!e)return r
|
||
return e.split(t).reduce(function(e,t){var r,n=t.split(":"),i=(r=n,Array.isArray(r)?r:Array.from(r)),o=i[0],a=i.slice(1)
|
||
return o=o.trim(),(a=a.join(":").trim())&&(e[o]=a),e},r)}
|
||
var t=e.CRLF="\r\n"}),define("ember-ajax/-private/utils/url-helpers",["exports","require","ember-ajax/-private/utils/is-fastboot"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.parseURL=a,e.isFullURL=function(e){return e.match(n)},e.haveSameHost=function(e,t){return e=a(e),t=a(t),e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}
|
||
var n=/^(http|https)/,i="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),o=r.default?URL:i?(0,t.default)("url"):document.createElement("a")
|
||
function a(e){var t=void 0
|
||
i||r.default?t=o.parse(e):(o.href=e,t=o)
|
||
var n={}
|
||
return n.href=t.href,n.protocol=t.protocol,n.hostname=t.hostname,n.port=t.port,n.pathname=t.pathname,n.search=t.search,n.hash=t.hash,n}}),define("ember-ajax/ajax-request",["exports","ember-ajax/mixins/ajax-request"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Object.extend(t.default)}),define("ember-ajax/errors",["exports"],function(e){"use strict"
|
||
function t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Ajax operation failed",r=arguments[2]
|
||
Ember.Error.call(this,t),this.payload=e,this.status=r}function r(e){t.call(this,e,"Request was rejected because it was invalid",422)}function n(e){t.call(this,e,"Ajax authorization failed",401)}function i(e){t.call(this,e,"Request was rejected because user is not permitted to perform this operation.",403)}function o(e){t.call(this,e,"Request was formatted incorrectly.",400)}function a(e){t.call(this,e,"Resource was not found.",404)}function s(){t.call(this,null,"The ajax operation timed out",-1)}function u(){t.call(this,null,"The ajax operation was aborted",0)}function c(e){t.call(this,e,"The ajax operation failed due to a conflict",409)}function l(e,r){t.call(this,e,"Request was rejected due to server error",r)}function f(e){return e instanceof t}Object.defineProperty(e,"__esModule",{value:!0}),e.AjaxError=t,e.InvalidError=r,e.UnauthorizedError=n,e.ForbiddenError=i,e.BadRequestError=o,e.NotFoundError=a,e.TimeoutError=s,e.AbortError=u,e.ConflictError=c,e.ServerError=l,e.isAjaxError=f,e.isUnauthorizedError=function(e){return f(e)?e instanceof n:401===e},e.isForbiddenError=function(e){return f(e)?e instanceof i:403===e},e.isInvalidError=function(e){return f(e)?e instanceof r:422===e},e.isBadRequestError=function(e){return f(e)?e instanceof o:400===e},e.isNotFoundError=function(e){return f(e)?e instanceof a:404===e},e.isTimeoutError=function(e){return e instanceof s},e.isAbortError=function(e){return f(e)?e instanceof u:0===e},e.isConflictError=function(e){return f(e)?e instanceof c:409===e},e.isServerError=function(e){return f(e)?e instanceof l:e>=500&&e<600},e.isSuccess=function(e){var t=parseInt(e,10)
|
||
return t>=200&&t<300||304===t},t.prototype=Object.create(Ember.Error.prototype),r.prototype=Object.create(t.prototype),n.prototype=Object.create(t.prototype),i.prototype=Object.create(t.prototype),o.prototype=Object.create(t.prototype),a.prototype=Object.create(t.prototype),s.prototype=Object.create(t.prototype),u.prototype=Object.create(t.prototype)
|
||
c.prototype=Object.create(t.prototype),l.prototype=Object.create(t.prototype)}),define("ember-ajax/index",["exports","ember-ajax/request"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-ajax/mixins/ajax-request",["exports","ember-ajax/errors","ember-ajax/utils/ajax","ember-ajax/-private/utils/parse-response-headers","ember-ajax/-private/utils/get-header","ember-ajax/-private/utils/url-helpers","ember-ajax/-private/utils/is-string","ember-ajax/-private/promise"],function(e,t,r,n,i,o,a,s){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
var u="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},c=Ember.Logger,l=Ember.Test,f=/^application\/(?:vnd\.api\+)?json/i
|
||
function h(e){return!!(0,a.default)(e)&&!!e.match(f)}function d(e){return"/"===e.charAt(0)}function p(e){return e.substring(1)}function m(e){var t
|
||
return d(e)&&(e=p(e)),"/"===(t=e).charAt(t.length-1)&&(e=e.slice(0,-1)),e}var y=0
|
||
Ember.testing&&l.registerWaiter(function(){return 0===y}),e.default=Ember.Mixin.create({contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{},request:function(e,t){var r=this.options(e,t),n=this._makeRequest(r),i=new s.default(function(e,t){n.then(function(t){var r=t.response
|
||
e(r)}).catch(function(e){var r=e.response
|
||
t(r)})},"ember-ajax: "+r.type+" "+r.url+" response")
|
||
return i.xhr=n.xhr,i},raw:function(e,t){var r=this.options(e,t)
|
||
return this._makeRequest(r)},_makeRequest:function(e){var o=this,a=e.method||e.type||"GET",c={method:a,type:a,url:e.url};(function(e,t){var r=t.contentType,n=t.data,o=t.headers
|
||
return"GET"!==e&&!(!h(r)&&!h((0,i.default)(o,"Content-Type")))&&"object"===(void 0===n?"undefined":u(n))})(a,e)&&(e.data=JSON.stringify(e.data)),y+=1
|
||
var l=(0,r.default)(e),f=new s.default(function(e,r){l.done(function(i,a,s){var u=o.handleResponse(s.status,(0,n.default)(s.getAllResponseHeaders()),i,c);(0,t.isAjaxError)(u)?Ember.run.join(null,r,{payload:i,textStatus:a,jqXHR:s,response:u}):Ember.run.join(null,e,{payload:i,textStatus:a,jqXHR:s,response:u})}).fail(function(e,i,a){Ember.runInDebug(function(){"parsererror"===i&&e.responseText})
|
||
var s=o.parseErrorResponse(e.responseText)||a,u=void 0
|
||
u=a instanceof Error?a:"timeout"===i?new t.TimeoutError:"abort"===i?new t.AbortError:o.handleResponse(e.status,(0,n.default)(e.getAllResponseHeaders()),s,c),Ember.run.join(null,r,{payload:s,textStatus:i,jqXHR:e,errorThrown:a,response:u})}).always(function(){y-=1})},"ember-ajax: "+e.type+" "+e.url)
|
||
return f.xhr=l,f},post:function(e,t){return this.request(e,this._addTypeToOptionsFor(t,"POST"))},put:function(e,t){return this.request(e,this._addTypeToOptionsFor(t,"PUT"))},patch:function(e,t){return this.request(e,this._addTypeToOptionsFor(t,"PATCH"))},del:function(e,t){return this.request(e,this._addTypeToOptionsFor(t,"DELETE"))},delete:function(){return this.del.apply(this,arguments)},get:function(e){if(arguments.length>1||-1!==e.indexOf("/"))throw new Ember.Error("It seems you tried to use `.get` to make a request! Use the `.request` method instead.")
|
||
return this._super.apply(this,arguments)},_addTypeToOptionsFor:function(e,t){return(e=e||{}).type=t,e},_getFullHeadersHash:function(e){var t=Ember.get(this,"headers"),r=Ember.merge({},t)
|
||
return Ember.merge(r,e)},options:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
return t=Ember.merge({},t),t.url=this._buildURL(e,t),t.type=t.type||"GET",t.dataType=t.dataType||"json",t.contentType=Ember.isEmpty(t.contentType)?Ember.get(this,"contentType"):t.contentType,this._shouldSendHeaders(t)?t.headers=this._getFullHeadersHash(t.headers):t.headers=t.headers||{},t},_buildURL:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
|
||
if((0,o.isFullURL)(e))return e
|
||
var r=[],n=t.host||Ember.get(this,"host")
|
||
n&&(n=m(n)),r.push(n)
|
||
var i=t.namespace||Ember.get(this,"namespace")
|
||
return i&&(i=m(i),r.push(i)),new RegExp("^(/)?"+i).test(e)?e:(d(e)&&(e=p(e)),r.push(e),r.join("/"))},handleResponse:function(e,t,r,n){return this.isSuccess(e,t,r)?r:(r=this.normalizeErrorResponse(e,t,r),this._createCorrectError(e,t,r,n))},_createCorrectError:function(e,r,n,i){var o=void 0
|
||
if(this.isUnauthorizedError(e,r,n))o=new t.UnauthorizedError(n)
|
||
else if(this.isForbiddenError(e,r,n))o=new t.ForbiddenError(n)
|
||
else if(this.isInvalidError(e,r,n))o=new t.InvalidError(n)
|
||
else if(this.isBadRequestError(e,r,n))o=new t.BadRequestError(n)
|
||
else if(this.isNotFoundError(e,r,n))o=new t.NotFoundError(n)
|
||
else if(this.isAbortError(e,r,n))o=new t.AbortError(n)
|
||
else if(this.isConflictError(e,r,n))o=new t.ConflictError(n)
|
||
else if(this.isServerError(e,r,n))o=new t.ServerError(n,e)
|
||
else{var a=this.generateDetailedMessage(e,r,n,i)
|
||
o=new t.AjaxError(n,a,e)}return o},_matchHosts:function(e,t){return t.constructor===RegExp?t.test(e):"string"==typeof t?t===e:(c.warn("trustedHosts only handles strings or regexes.",t,"is neither."),!1)},_shouldSendHeaders:function(e){var t=this,r=e.url,n=e.host
|
||
r=r||"",n=n||Ember.get(this,"host")||""
|
||
var i=Ember.get(this,"trustedHosts")||Ember.A(),a=(0,o.parseURL)(r).hostname
|
||
return!(0,o.isFullURL)(r)||(!!i.find(function(e){return t._matchHosts(a,e)})||(0,o.haveSameHost)(r,n))},generateDetailedMessage:function(e,t,r,n){var o=void 0,a=(0,i.default)(t,"Content-Type")||"Empty Content-Type"
|
||
return o="text/html"===a.toLowerCase()&&r.length>250?"[Omitted Lengthy HTML]":JSON.stringify(r),["Ember AJAX Request "+(n.type+" "+n.url)+" returned a "+e,"Payload ("+a+")",o].join("\n")},isUnauthorizedError:function(e){return(0,t.isUnauthorizedError)(e)},isForbiddenError:function(e){return(0,t.isForbiddenError)(e)},isInvalidError:function(e){return(0,t.isInvalidError)(e)},isBadRequestError:function(e){return(0,t.isBadRequestError)(e)},isNotFoundError:function(e){return(0,t.isNotFoundError)(e)},isAbortError:function(e){return(0,t.isAbortError)(e)},isConflictError:function(e){return(0,t.isConflictError)(e)},isServerError:function(e){return(0,t.isServerError)(e)},isSuccess:function(e){return(0,t.isSuccess)(e)},parseErrorResponse:function(e){try{return JSON.parse(e)}catch(t){return e}},normalizeErrorResponse:function(e,t,r){return r}})}),define("ember-ajax/mixins/ajax-support",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Mixin.create({ajaxService:Ember.inject.service("ajax"),host:Ember.computed.alias("ajaxService.host"),namespace:Ember.computed.alias("ajaxService.namespace"),headers:Ember.computed.alias("ajaxService.headers"),ajax:function(e){var t=this.ajaxOptions.apply(this,arguments)
|
||
return this.get("ajaxService").request(e,t)}})}),define("ember-ajax/mixins/legacy/normalize-error-response",["exports","ember-ajax/-private/utils/is-string"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}
|
||
function n(e){return"object"===(void 0===e?"undefined":r(e))}e.default=Ember.Mixin.create({normalizeErrorResponse:function(e,r,i){return i=Ember.isNone(i)?{}:i,Ember.isArray(i.errors)?i.errors.map(function(t){if(n(t)){var r=Ember.merge({},t)
|
||
return r.status=""+t.status,r}return{status:""+e,title:t}}):Ember.isArray(i)?i.map(function(t){return n(t)?{status:""+e,title:t.title||"The backend responded with an error",detail:t}:{status:""+e,title:""+t}}):(0,t.default)(i)?[{status:""+e,title:i}]:[{status:""+e,title:i.title||"The backend responded with an error",detail:i}]}})}),define("ember-ajax/raw",["exports","ember-ajax/ajax-request"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e=new t.default
|
||
return e.raw.apply(e,arguments)}}),define("ember-ajax/request",["exports","ember-ajax/ajax-request"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e=new t.default
|
||
return e.request.apply(e,arguments)}}),define("ember-ajax/services/ajax",["exports","ember-ajax/mixins/ajax-request"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Service.extend(t.default)}),define("ember-ajax/utils/ajax",["exports","ember-ajax/-private/utils/is-fastboot"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default?najax:Ember.$.ajax}),define("ember-awesome-macros/-utils",["exports","ember-macro-helpers/curried-computed","ember-macro-helpers/lazy-curried-computed"],function(e,t,r){"use strict"
|
||
function n(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n]
|
||
for(var i=0;i<r.length;i++)if(void 0===r[i])return
|
||
return e.apply(void 0,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e.reduceKeys=function(e){return(0,t.default)(function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n]
|
||
return 0===r.length?0:r.reduce(function(t,r,n){return Array.isArray(r)&&(r=0===r.length?0:r.reduce(e)),0===n?r:e(t,r)},null)})},e.reduceKeys2=function(e){return(0,r.default)(function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i]
|
||
for(var o=void 0,a=0;a<n.length;a++)if(o=t(n[a]),e(o))return o
|
||
return o})},e.checkArgs=n,e.safelyCreateComputed=function(e){return(0,t.default)(n(function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i]
|
||
return t[e].apply(t,n)}))},e.deprecate=function(e,t,r){return Ember.deprecateFunc(t+" is deprecated, please use "+r,{id:i+"."+t,until:o},e)}
|
||
var i="ember-awesome-macros",o="sometime before 1.0"}),define("ember-awesome-macros/add",["exports","ember-awesome-macros/sum"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-awesome-macros/and",["exports","ember-awesome-macros/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.reduceKeys2)(function(e){return!e})}),define("ember-awesome-macros/array/-utils",["exports","ember-macro-helpers/lazy-computed","ember-macro-helpers/normalize-array-key","ember-macro-helpers/create-class-computed"],function(e,t,r,n){"use strict"
|
||
function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t]
|
||
return r}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeArray=function(e,r){var n=e.defaultValue,u=void 0===n?function(){return o}:n
|
||
return function(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o]
|
||
return a(n),t.default.apply(void 0,n.concat([function(e,t){var n=e(t)
|
||
if(!n)return s(u,n)
|
||
for(var o=arguments.length,a=Array(o>2?o-2:0),c=2;c<o;c++)a[c-2]=arguments[c]
|
||
var l=a.map(e)
|
||
return r.call.apply(r,[this,n].concat(i(l)))}]))}},e.normalizeArray2=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return o}
|
||
return function(){for(var n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o]
|
||
return a(i),t.default.apply(void 0,i.concat([function(t,n){for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a]
|
||
var u=t(n),c=u instanceof Ember.ArrayProxy
|
||
if(!Array.isArray(u)&&!c)return s(r,u)
|
||
var l=void 0,f=(l=c?u:Ember.A(u))[e]
|
||
return"function"==typeof f?f.apply(l,o.map(t)):f}]))}},e.normalizeArray3=function(e){var a=e.firstDefault,u=void 0===a?function(){return o}:a,c=e.secondDefault,l=void 0===c?function(){return o}:c,f=e.func
|
||
return(0,n.default)([!1,!0],function(e,n){for(var o=arguments.length,a=Array(o>2?o-2:0),c=2;c<o;c++)a[c-2]=arguments[c]
|
||
return t.default.apply(void 0,[(0,r.default)(e,[n])].concat(a,[function(e,t){var r,o=e(t),a=o instanceof Ember.ArrayProxy
|
||
if(!Array.isArray(o)&&!a)return s(u,o)
|
||
if("string"!=typeof n)return s(l,o)
|
||
var c=void 0
|
||
c=a?o:Ember.A(o)
|
||
for(var h=arguments.length,d=Array(h>2?h-2:0),p=2;p<h;p++)d[p-2]=arguments[p]
|
||
var m=[n].concat(i(d.map(e)))
|
||
return"function"==typeof f?f.apply(void 0,[c].concat(i(m))):(r=c)[f].apply(r,i(m))}]))})}
|
||
var o={}
|
||
function a(e){e[0]=(0,r.default)(e[0])}function s(e,t){var r=e()
|
||
return r===o?t:r}}),define("ember-awesome-macros/array/any",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("any",function(){return!1})})
|
||
define("ember-awesome-macros/array/compact",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("compact")}),define("ember-awesome-macros/array/concat",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("concat",function(){})}),define("ember-awesome-macros/array/every",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("every",function(){return!1})}),define("ember-awesome-macros/array/filter-by",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){return[]},func:"filterBy"})}),define("ember-awesome-macros/array/filter",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("filter",function(){return[]})}),define("ember-awesome-macros/array/find-by",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){},func:"findBy"})}),define("ember-awesome-macros/array/find",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("find")}),define("ember-awesome-macros/array/first",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray)({},function(e){return e[0]})}),define("ember-awesome-macros/array/group-by",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){return[]},func:function(e,t,r){var n=Ember.A()
|
||
return e.forEach(function(e){var i=Ember.get(e,t),o=function(e,t,r){return r?e.find(function(e){return r(Ember.get(e,"value"),t)}):e.findBy("value",t)}(n,i,r)
|
||
o?o.items.push(e):n.push({key:t,value:i,items:[e]})}),n}})}),define("ember-awesome-macros/array/includes",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("includes",function(){return!1})}),define("ember-awesome-macros/array/index-of",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("indexOf",function(){return-1})}),define("ember-awesome-macros/array/index",["exports","ember-awesome-macros/array/any","ember-awesome-macros/array/compact","ember-awesome-macros/array/concat","ember-awesome-macros/array/every","ember-awesome-macros/array/filter-by","ember-awesome-macros/array/filter","ember-awesome-macros/array/find-by","ember-awesome-macros/array/find","ember-awesome-macros/array/first","ember-awesome-macros/array/group-by","ember-awesome-macros/array/includes","ember-awesome-macros/array/index-of","ember-awesome-macros/array/invoke","ember-awesome-macros/array/is-any","ember-awesome-macros/array/is-every","ember-awesome-macros/array/join","ember-awesome-macros/array/last-index-of","ember-awesome-macros/array/last","ember-awesome-macros/array/length","ember-awesome-macros/array/map-by","ember-awesome-macros/array/map","ember-awesome-macros/array/object-at","ember-awesome-macros/array/reduce","ember-awesome-macros/array/reject-by","ember-awesome-macros/array/reverse","ember-awesome-macros/array/slice","ember-awesome-macros/array/sort","ember-awesome-macros/array/uniq-by","ember-awesome-macros/array/uniq","ember-awesome-macros/array/without"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"any",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"compact",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"every",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"filterBy",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"findBy",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"find",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"first",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"includes",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"indexOf",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"invoke",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"isAny",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"isEvery",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"join",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"lastIndexOf",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"last",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"length",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"mapBy",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"map",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"objectAt",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"rejectBy",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"reverse",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"slice",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"sort",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"uniqBy",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"uniq",{enumerable:!0,get:function(){return I.default}})
|
||
Object.defineProperty(e,"without",{enumerable:!0,get:function(){return P.default}})}),define("ember-awesome-macros/array/invoke",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){},secondDefault:function(){},func:"invoke"})}),define("ember-awesome-macros/array/is-any",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){},secondDefault:function(){},func:"isAny"})}),define("ember-awesome-macros/array/is-every",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){},secondDefault:function(){},func:"isEvery"})}),define("ember-awesome-macros/array/join",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("join",function(){return""})}),define("ember-awesome-macros/array/last-index-of",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("lastIndexOf",function(){return-1})}),define("ember-awesome-macros/array/last",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray)({},function(e){return e[e.length-1]})}),define("ember-awesome-macros/array/length",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("length")}),define("ember-awesome-macros/array/map-by",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){return[]},func:"mapBy"})}),define("ember-awesome-macros/array/map",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("map")}),define("ember-awesome-macros/array/object-at",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("objectAt")}),define("ember-awesome-macros/array/reduce",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray)({},function(e,t,r){return"function"==typeof r&&(r=r()),e.reduce(t,r)})}),define("ember-awesome-macros/array/reject-by",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){return[]},func:"rejectBy"})}),define("ember-awesome-macros/array/reverse",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray)({},function(e){return e.slice().reverse()})}),define("ember-awesome-macros/array/slice",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("slice")}),define("ember-awesome-macros/array/sort",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,n){var i=void 0
|
||
return i=void 0===n?function(e){return e.slice().sort()}:function(e,t){var n=void 0
|
||
return n="function"==typeof t?t.bind(this):function(e,n){for(var i=0,o=0;o<t.length;o++){var a=t[o].split(":"),s=r(a,2),u=s[0],c=s[1]
|
||
if(0!==(i=Ember.compare(Ember.get(e,u),Ember.get(n,u)))){"desc"===c&&(i*=-1)
|
||
break}}return i},e.slice().sort(n)},(0,t.normalizeArray)({},i)(e,n)}
|
||
var r=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()}),define("ember-awesome-macros/array/uniq-by",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray3)({firstDefault:function(){return[]},func:function(e,t){if(!e.uniqBy){var r=Ember.A(),n=Object.create(null)
|
||
return e.forEach(function(e){var i=Ember.guidFor(Ember.get(e,t))
|
||
i in n||(n[i]=!0,r.push(e))}),r}return e.uniqBy(t)}})}),define("ember-awesome-macros/array/uniq",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("uniq")}),define("ember-awesome-macros/array/without",["exports","ember-awesome-macros/array/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeArray2)("without")})
|
||
define("ember-awesome-macros/collect",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
return Ember.A(t)})}),define("ember-awesome-macros/computed",["exports","ember-awesome-macros/-utils","ember-macro-helpers/computed"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.deprecate)(r.default,"computed","ember-macro-helpers/computed")}),define("ember-awesome-macros/conditional",["exports","ember-macro-helpers/lazy-curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t,r,n){return e(t)?e(r):e(n)})}),define("ember-awesome-macros/default-true",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e){return void 0===e||e})}),define("ember-awesome-macros/difference",["exports","ember-awesome-macros/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.reduceKeys)(function(e,t){return e-t})}),define("ember-awesome-macros/divide",["exports","ember-awesome-macros/quotient"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-awesome-macros/eq",["exports","ember-awesome-macros/equal"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-awesome-macros/equal",["exports","ember-macro-helpers/lazy-curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i]
|
||
for(var o=e(t),a=0;a<n.length;a++)if(o!==e(n[a]))return!1
|
||
return!0})}),define("ember-awesome-macros/get-by",["exports","ember-macro-helpers/create-class-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)([!1,!0],function(e,t){return Ember.computed.readOnly(e+"."+t)})}),define("ember-awesome-macros/gt",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t){return e>t})}),define("ember-awesome-macros/gte",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t){return e>=t})}),define("ember-awesome-macros/hash",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
function r(e){var t=[],r=[]
|
||
return e.forEach(function(e){if("string"==typeof e)t.push(e),r.push(e)
|
||
else{var n=Object.getOwnPropertyNames(e)
|
||
t=t.concat(n),r=r.concat(n.map(function(t){return e[t]}))}}),{hashKeys:t,hashValues:r}}function n(e,t){return t.reduce(function(t,r,n){return t[e[n]]=r,t},{})}Object.defineProperty(e,"__esModule",{value:!0}),e.deconstructArgs=r,e.reduceValues=n,e.default=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o]
|
||
var a=r(i),s=a.hashKeys,u=a.hashValues
|
||
return(0,t.default)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
var i=n(s,t)
|
||
return Ember.Object.create(i)}).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t]
|
||
return r}return Array.from(e)}(u))}}),define("ember-awesome-macros/html-safe",["exports","ember-awesome-macros/-utils","ember-awesome-macros/string/html-safe"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.deprecate)(r.default,"htmlSafe","string.htmlSafe")}),define("ember-awesome-macros/index",["exports","ember-awesome-macros/add","ember-awesome-macros/and","ember-awesome-macros/collect","ember-awesome-macros/computed","ember-awesome-macros/conditional","ember-awesome-macros/default-true","ember-awesome-macros/difference","ember-awesome-macros/divide","ember-awesome-macros/eq","ember-awesome-macros/equal","ember-awesome-macros/get-by","ember-awesome-macros/gt","ember-awesome-macros/gte","ember-awesome-macros/hash","ember-awesome-macros/html-safe","ember-awesome-macros/instance-of","ember-awesome-macros/is-html-safe","ember-awesome-macros/lt","ember-awesome-macros/lte","ember-awesome-macros/math","ember-awesome-macros/mod","ember-awesome-macros/multiply","ember-awesome-macros/neq","ember-awesome-macros/not","ember-awesome-macros/not-equal","ember-awesome-macros/or","ember-awesome-macros/parse-float","ember-awesome-macros/parse-int","ember-awesome-macros/product","ember-awesome-macros/quotient","ember-awesome-macros/raw","ember-awesome-macros/subtract","ember-awesome-macros/sum","ember-awesome-macros/tag","ember-awesome-macros/to-str","ember-awesome-macros/to-string","ember-awesome-macros/type-of","ember-awesome-macros/unless","ember-awesome-macros/writable","ember-awesome-macros/array","ember-awesome-macros/promise","ember-awesome-macros/string","ember-awesome-macros/-utils"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P,M,R,O,B,N,j,L,D,U,F,z,q,V){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.underscore=e.trim=e.toUpper=e.toLower=e.substring=e.substr=e.split=e.decamelize=e.dasherize=e.classify=e.capitalize=e.camelize=e.promiseResolve=e.promiseObject=e.promiseHash=e.promiseArray=e.promiseAll=e.without=e.uniq=e.uniqBy=e.slice=e.reduce=e.objectAt=e.map=e.mapBy=e.last=e.lastIndexOf=e.join=e.isEvery=e.isAny=e.indexOf=e.includes=e.first=e.find=e.findBy=e.filter=e.filterBy=e.every=e.contains=e.compact=e.any=e.writable=e.unless=e.typeOf=e.toString=e.toStr=e.tag=e.sum=e.subtract=e.string=e.raw=e.quotient=e.promise=e.product=e.parseInt=e.parseFloat=e.or=e.notEqual=e.not=e.neq=e.multiply=e.mod=e.math=e.lte=e.lt=e.isHtmlSafe=e.instanceOf=e.htmlSafe=e.hash=e.gte=e.gt=e.getBy=e.equal=e.eq=e.divide=e.difference=e.defaultTrue=e.conditional=e.computed=e.collect=e.array=e.and=e.add=void 0,Object.defineProperty(e,"add",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"and",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"collect",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"computed",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"conditional",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"defaultTrue",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"difference",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"divide",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"eq",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"equal",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"getBy",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"gt",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"gte",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"hash",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"htmlSafe",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"instanceOf",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"isHtmlSafe",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"lt",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"lte",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"math",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"mod",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"multiply",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"neq",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"not",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"notEqual",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"or",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"parseFloat",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"parseInt",{enumerable:!0,get:function(){return T.default}})
|
||
Object.defineProperty(e,"product",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"quotient",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"raw",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"subtract",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(e,"sum",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,"tag",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"toStr",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"toString",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"typeOf",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"unless",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"writable",{enumerable:!0,get:function(){return U.default}}),e.array=F.default,e.promise=z.default,e.string=q.default
|
||
var H=(0,V.deprecate)(F.default.any,"any","array.any"),K=(0,V.deprecate)(F.default.compact,"compact","array.compact"),W=(0,V.deprecate)(F.default.includes,"contains","array.includes"),G=(0,V.deprecate)(F.default.every,"every","array.every"),Y=(0,V.deprecate)(F.default.filterBy,"filterBy","array.filterBy"),Q=(0,V.deprecate)(F.default.filter,"filter","array.filter"),X=(0,V.deprecate)(F.default.findBy,"findBy","array.findBy"),$=(0,V.deprecate)(F.default.find,"find","array.find"),J=(0,V.deprecate)(F.default.first,"first","array.first"),Z=(0,V.deprecate)(F.default.includes,"includes","array.includes"),ee=(0,V.deprecate)(F.default.indexOf,"indexOf","array.indexOf"),te=(0,V.deprecate)(F.default.isAny,"isAny","array.isAny"),re=(0,V.deprecate)(F.default.isEvery,"isEvery","array.isEvery"),ne=(0,V.deprecate)(F.default.join,"join","array.join"),ie=(0,V.deprecate)(F.default.lastIndexOf,"lastIndexOf","array.lastIndexOf"),oe=(0,V.deprecate)(F.default.last,"last","array.last"),ae=(0,V.deprecate)(F.default.mapBy,"mapBy","array.mapBy"),se=(0,V.deprecate)(F.default.map,"map","array.map"),ue=(0,V.deprecate)(F.default.objectAt,"objectAt","array.objectAt"),ce=(0,V.deprecate)(F.default.reduce,"reduce","array.reduce"),le=(0,V.deprecate)(F.default.slice,"slice","array.slice"),fe=(0,V.deprecate)(F.default.uniqBy,"uniqBy","array.uniqBy"),he=(0,V.deprecate)(F.default.uniq,"uniq","array.uniq"),de=(0,V.deprecate)(F.default.without,"without","array.without"),pe=(0,V.deprecate)(z.default.all,"promiseAll","promise.all"),me=(0,V.deprecate)(z.default.array,"promiseArray","promise.array"),ye=(0,V.deprecate)(z.default.hash,"promiseHash","promise.hash"),ge=(0,V.deprecate)(z.default.object,"promiseObject","promise.object"),be=(0,V.deprecate)(z.default.resolve,"promiseResolve","promise.resolve"),ve=(0,V.deprecate)(q.default.camelize,"camelize","string.camelize"),_e=(0,V.deprecate)(q.default.capitalize,"capitalize","string.capitalize"),we=(0,V.deprecate)(q.default.classify,"classify","string.classify"),Se=(0,V.deprecate)(q.default.dasherize,"dasherize","string.dasherize"),Ee=(0,V.deprecate)(q.default.decamelize,"decamelize","string.decamelize"),ke=(0,V.deprecate)(q.default.split,"split","string.split"),xe=(0,V.deprecate)(q.default.substr,"substr","string.substr"),Ce=(0,V.deprecate)(q.default.substring,"substring","string.substring"),Ae=(0,V.deprecate)(q.default.toLower,"toLower","string.toLower"),Te=(0,V.deprecate)(q.default.toUpper,"toUpper","string.toUpper"),Ie=(0,V.deprecate)(q.default.trim,"trim","string.trim"),Pe=(0,V.deprecate)(q.default.underscore,"underscore","string.underscore")
|
||
e.any=H,e.compact=K,e.contains=W,e.every=G,e.filterBy=Y,e.filter=Q,e.findBy=X,e.find=$,e.first=J,e.includes=Z,e.indexOf=ee,e.isAny=te,e.isEvery=re,e.join=ne,e.lastIndexOf=ie,e.last=oe,e.mapBy=ae,e.map=se,e.objectAt=ue,e.reduce=ce,e.slice=le,e.uniqBy=fe,e.uniq=he,e.without=de,e.promiseAll=pe,e.promiseArray=me,e.promiseHash=ye,e.promiseObject=ge,e.promiseResolve=be,e.camelize=ve
|
||
e.capitalize=_e,e.classify=we,e.dasherize=Se,e.decamelize=Ee,e.split=ke,e.substr=xe,e.substring=Ce,e.toLower=Ae,e.toUpper=Te,e.trim=Ie,e.underscore=Pe}),define("ember-awesome-macros/instance-of",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t){if(void 0!==t)return e instanceof t})}),define("ember-awesome-macros/is-html-safe",["exports","ember-awesome-macros/-utils","ember-awesome-macros/string/is-html-safe"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.deprecate)(r.default,"isHtmlSafe","string.isHtmlSafe")}),define("ember-awesome-macros/lt",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t){return e<t})}),define("ember-awesome-macros/lte",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t){return e<=t})}),define("ember-awesome-macros/math/abs",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.abs)}),define("ember-awesome-macros/math/acos",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.acos)}),define("ember-awesome-macros/math/acosh",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.acosh)}),define("ember-awesome-macros/math/asin",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.asin)}),define("ember-awesome-macros/math/asinh",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.asinh)}),define("ember-awesome-macros/math/atan",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.atan)}),define("ember-awesome-macros/math/atan2",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.atan2)}),define("ember-awesome-macros/math/atanh",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.atanh)}),define("ember-awesome-macros/math/cbrt",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.cbrt)}),define("ember-awesome-macros/math/ceil",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.ceil)}),define("ember-awesome-macros/math/clz32",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.clz32)}),define("ember-awesome-macros/math/cos",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.cos)})
|
||
define("ember-awesome-macros/math/cosh",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.cosh)}),define("ember-awesome-macros/math/exp",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.exp)}),define("ember-awesome-macros/math/expm1",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.expm1)}),define("ember-awesome-macros/math/floor",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.floor)}),define("ember-awesome-macros/math/fround",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.fround)}),define("ember-awesome-macros/math/hypot",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.hypot)}),define("ember-awesome-macros/math/imul",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.imul)}),define("ember-awesome-macros/math/index",["exports","ember-awesome-macros/math/abs","ember-awesome-macros/math/acos","ember-awesome-macros/math/acosh","ember-awesome-macros/math/asin","ember-awesome-macros/math/asinh","ember-awesome-macros/math/atan","ember-awesome-macros/math/atanh","ember-awesome-macros/math/atan2","ember-awesome-macros/math/ceil","ember-awesome-macros/math/cbrt","ember-awesome-macros/math/expm1","ember-awesome-macros/math/clz32","ember-awesome-macros/math/cos","ember-awesome-macros/math/cosh","ember-awesome-macros/math/exp","ember-awesome-macros/math/floor","ember-awesome-macros/math/fround","ember-awesome-macros/math/hypot","ember-awesome-macros/math/imul","ember-awesome-macros/math/log","ember-awesome-macros/math/log1p","ember-awesome-macros/math/log2","ember-awesome-macros/math/log10","ember-awesome-macros/math/max","ember-awesome-macros/math/min","ember-awesome-macros/math/pow","ember-awesome-macros/math/round","ember-awesome-macros/math/sign","ember-awesome-macros/math/sin","ember-awesome-macros/math/sinh","ember-awesome-macros/math/sqrt","ember-awesome-macros/math/tan","ember-awesome-macros/math/tanh","ember-awesome-macros/math/trunc"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_,w,S,E,k,x,C,A,T,I,P,M,R,O,B){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"abs",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"acos",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"acosh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"asin",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"asinh",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"atan",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"atanh",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"atan2",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"ceil",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"cbrt",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"expm1",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"clz32",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"cos",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"cosh",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"exp",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"floor",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"fround",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"hypot",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"imul",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"log",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"log1p",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"log2",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"log10",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"max",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"min",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"pow",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"round",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"sin",{enumerable:!0,get:function(){return I.default}})
|
||
Object.defineProperty(e,"sinh",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"sqrt",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"tan",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(e,"tanh",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,"trunc",{enumerable:!0,get:function(){return B.default}})}),define("ember-awesome-macros/math/log",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.log)}),define("ember-awesome-macros/math/log10",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.log10)}),define("ember-awesome-macros/math/log1p",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.log1p)}),define("ember-awesome-macros/math/log2",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.log2)}),define("ember-awesome-macros/math/max",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.max)}),define("ember-awesome-macros/math/min",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.min)}),define("ember-awesome-macros/math/pow",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.pow)}),define("ember-awesome-macros/math/round",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.round)}),define("ember-awesome-macros/math/sign",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.sign)}),define("ember-awesome-macros/math/sin",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.sin)}),define("ember-awesome-macros/math/sinh",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.sinh)}),define("ember-awesome-macros/math/sqrt",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.sqrt)}),define("ember-awesome-macros/math/tan",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.tan)}),define("ember-awesome-macros/math/tanh",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.tanh)}),define("ember-awesome-macros/math/trunc",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Math.trunc)}),define("ember-awesome-macros/mod",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t){return e%t})}),define("ember-awesome-macros/multiply",["exports","ember-awesome-macros/product"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-awesome-macros/neq",["exports","ember-awesome-macros/not-equal"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-awesome-macros/not-equal",["exports","ember-awesome-macros/not","ember-awesome-macros/eq"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return(0,t.default)(r.default.apply(void 0,arguments))}}),define("ember-awesome-macros/not",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e){return!e})}),define("ember-awesome-macros/or",["exports","ember-awesome-macros/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.reduceKeys2)(function(e){return e})}),define("ember-awesome-macros/parse-float",["exports","ember-macro-helpers/curried-computed","ember-awesome-macros/-utils"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)((0,r.checkArgs)(parseFloat))})
|
||
define("ember-awesome-macros/parse-int",["exports","ember-macro-helpers/curried-computed","ember-awesome-macros/-utils"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)((0,r.checkArgs)(parseInt))}),define("ember-awesome-macros/product",["exports","ember-awesome-macros/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.reduceKeys)(function(e,t){return e*t})}),define("ember-awesome-macros/promise/-utils",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.wrapPromiseProxy=function(e){var r=e.extend(Ember.PromiseProxyMixin)
|
||
return(0,t.default)(function(e){return void 0===e&&(e=Ember.RSVP.resolve(void 0)),r.create({promise:e})})}}),define("ember-awesome-macros/promise/all",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]
|
||
return Ember.RSVP.all(t)})}),define("ember-awesome-macros/promise/array",["exports","ember-awesome-macros/promise/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.wrapPromiseProxy)(Ember.ArrayProxy)}),define("ember-awesome-macros/promise/hash",["exports","ember-macro-helpers/curried-computed","ember-awesome-macros/hash"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i]
|
||
var o=(0,r.deconstructArgs)(n),a=o.hashKeys,s=o.hashValues
|
||
return(0,t.default)(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n]
|
||
var i=(0,r.reduceValues)(a,t)
|
||
return Ember.RSVP.hash(i)}).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t]
|
||
return r}return Array.from(e)}(s))}}),define("ember-awesome-macros/promise/index",["exports","ember-awesome-macros/promise/all","ember-awesome-macros/promise/array","ember-awesome-macros/promise/hash","ember-awesome-macros/promise/object","ember-awesome-macros/promise/resolve","ember-awesome-macros/promise/then"],function(e,t,r,n,i,o,a){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"all",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"hash",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"object",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"resolve",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"then",{enumerable:!0,get:function(){return a.default}})}),define("ember-awesome-macros/promise/object",["exports","ember-awesome-macros/promise/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.wrapPromiseProxy)(Ember.ObjectProxy)}),define("ember-awesome-macros/promise/resolve",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Ember.RSVP.resolve)}),define("ember-awesome-macros/promise/then",["exports","ember-macro-helpers/lazy-curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(function(e,t,r){return void 0===(t=e(t))?Ember.RSVP.resolve():t.then(function(t){if(void 0!==(r=e(r)))return Ember.get(t,r)})})}),define("ember-awesome-macros/quotient",["exports","ember-awesome-macros/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.reduceKeys)(function(e,t){return e/t})}),define("ember-awesome-macros/raw",["exports","ember-awesome-macros/-utils","ember-macro-helpers/raw"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.deprecate)(r.default,"raw","ember-macro-helpers/raw")}),define("ember-awesome-macros/string/-utils",["exports","ember-macro-helpers/curried-computed","ember-macro-helpers/lazy-curried-computed"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeString=function(e){return(0,t.default)(function(t){return t?e(t):t})},e.normalizeString2=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){}
|
||
return(0,r.default)(function(r,n){for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a]
|
||
var s=r(n)
|
||
if(void 0===s)return t()
|
||
var u=s[e]
|
||
return"function"==typeof u?u.apply(s,o.map(r)):u})}}),define("ember-awesome-macros/string/camelize",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.camelize)}),define("ember-awesome-macros/string/capitalize",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.capitalize)}),define("ember-awesome-macros/string/classify",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.classify)}),define("ember-awesome-macros/string/dasherize",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.dasherize)}),define("ember-awesome-macros/string/decamelize",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.decamelize)}),define("ember-awesome-macros/string/escape-expression",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)(Ember.Handlebars.Utils.escapeExpression)}),define("ember-awesome-macros/string/html-safe",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.htmlSafe)}),define("ember-awesome-macros/string/index-of",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("indexOf")}),define("ember-awesome-macros/string/index",["exports","ember-awesome-macros/string/camelize","ember-awesome-macros/string/capitalize","ember-awesome-macros/string/classify","ember-awesome-macros/string/dasherize","ember-awesome-macros/string/decamelize","ember-awesome-macros/string/escape-expression","ember-awesome-macros/string/html-safe","ember-awesome-macros/string/index-of","ember-awesome-macros/string/is-html-safe","ember-awesome-macros/string/last-index-of","ember-awesome-macros/string/length","ember-awesome-macros/string/replace","ember-awesome-macros/string/split","ember-awesome-macros/string/substr","ember-awesome-macros/string/substring","ember-awesome-macros/string/titleize","ember-awesome-macros/string/to-lower","ember-awesome-macros/string/to-upper","ember-awesome-macros/string/trim","ember-awesome-macros/string/underscore"],function(e,t,r,n,i,o,a,s,u,c,l,f,h,d,p,m,y,g,b,v,_){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"camelize",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"capitalize",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"classify",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"dasherize",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"decamelize",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"escapeExpression",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"htmlSafe",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"indexOf",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"isHtmlSafe",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"lastIndexOf",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"length",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"replace",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"split",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"substr",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"substring",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"titleize",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"toLower",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"toUpper",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"trim",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"underscore",{enumerable:!0,get:function(){return _.default}})}),define("ember-awesome-macros/string/is-html-safe",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.isHTMLSafe)}),define("ember-awesome-macros/string/last-index-of",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("lastIndexOf")}),define("ember-awesome-macros/string/length",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("length")}),define("ember-awesome-macros/string/replace",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("replace")}),define("ember-awesome-macros/string/split",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("split",function(){return[]})}),define("ember-awesome-macros/string/substr",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("substr")}),define("ember-awesome-macros/string/substring",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("substring")}),define("ember-awesome-macros/string/titleize",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(function(e){return e.toLowerCase().replace(/(?:^|\s|-|\/)\S/g,function(e){return e.toUpperCase()})})})
|
||
define("ember-awesome-macros/string/to-lower",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("toLowerCase")}),define("ember-awesome-macros/string/to-upper",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("toUpperCase")}),define("ember-awesome-macros/string/trim",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString2)("trim")}),define("ember-awesome-macros/string/underscore",["exports","ember-awesome-macros/string/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.normalizeString)(Ember.String.underscore)}),define("ember-awesome-macros/subtract",["exports","ember-awesome-macros/difference"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-awesome-macros/sum",["exports","ember-awesome-macros/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.reduceKeys)(function(e,t){return e+t})}),define("ember-awesome-macros/tag",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i]
|
||
return(0,t.default)(function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n]
|
||
return e.reduce(function(e,t,n){return e+r[n-1]+t})}).apply(void 0,n)}}),define("ember-awesome-macros/to-str",["exports","ember-awesome-macros/to-string"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-awesome-macros/to-string",["exports","ember-awesome-macros/-utils"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.safelyCreateComputed)("toString")}),define("ember-awesome-macros/type-of",["exports","ember-macro-helpers/curried-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}
|
||
e.default=(0,t.default)(function(e){return void 0===e?"undefined":r(e)})}),define("ember-awesome-macros/unless",["exports","ember-awesome-macros"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,r,n){return(0,t.conditional)(e,n,r)}}),define("ember-awesome-macros/writable",["exports","ember-awesome-macros/-utils","ember-macro-helpers/writable"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.deprecate)(r.default,"writable","ember-macro-helpers/writable")}),define("ember-cli-app-version/initializer-factory",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,n){var i=!1
|
||
return function(){if(!i&&e&&n){var o=t(e)
|
||
r.register(o,n),i=!0}}}
|
||
var t=Ember.String.classify,r=Ember.libraries}),define("ember-cli-app-version/utils/regexp",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
e.versionRegExp=/\d[.]\d[.]\d/,e.shaRegExp=/[a-z\d]{8}/}),define("ember-cli-chart/components/ember-chart",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Component.extend({tagName:"canvas",attributeBindings:["width","height"],didInsertElement:function(){this._super.apply(this,arguments)
|
||
var e=this.get("element"),t=this.get("data"),r=this.get("type"),n=this.get("options"),i=new Chart(e,{type:r,data:t,options:n})
|
||
this.set("chart",i)},willDestroyElement:function(){this._super.apply(this,arguments),this.get("chart").destroy()},didUpdateAttrs:function(){this._super.apply(this,arguments),this.updateChart()},updateChart:function(){var e=this.get("chart"),t=this.get("data"),r=this.get("options"),n=this.get("animate")
|
||
e&&(e.config.data=t,e.config.options=r,n?e.update():e.update(0))}})}),define("ember-load-initializers/index",["exports"],function(e){"use strict"
|
||
function t(e){var t=require(e,null,null,!0)
|
||
if(!t)throw new Error(e+" must export an initializer.")
|
||
var r=t.default
|
||
return r.name||(r.name=e.slice(e.lastIndexOf("/")+1)),r}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,r){for(var n=r+"/initializers/",i=r+"/instance-initializers/",o=[],a=[],s=Object.keys(requirejs._eak_seen),u=0;u<s.length;u++){var c=s[u]
|
||
0===c.lastIndexOf(n,0)?o.push(c):0===c.lastIndexOf(i,0)&&a.push(c)}(function(e,r){for(var n=0;n<r.length;n++)e.initializer(t(r[n]))})(e,o),function(e,r){for(var n=0;n<r.length;n++)e.instanceInitializer(t(r[n]))}(e,a)}}),define("ember-macro-helpers/-build-computed",["exports"],function(e){"use strict"
|
||
function t(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t]
|
||
return r}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var r=e.collapseKeys,n=e.getValue,i=e.flattenKeys,o=e.isLazy
|
||
return function(){for(var e=arguments.length,a=Array(e),s=0;s<e;s++)a[s]=arguments[s]
|
||
var u=function(e){return{keys:e.slice(0,-1),callback:e[e.length-1]}}(a),c=u.keys,l=u.callback,f=r(c)
|
||
var h=function(e){var r=e.incomingCallback,n=e.createArgs,i=void 0
|
||
"function"==typeof r?i=function(e){return r.apply(this,n(this,e))}:(i={},r.get&&(i.get=function(e){return r.get.apply(this,n(this,e))}),r.set&&(i.set=function(e,i){var o
|
||
return(o=r.set).call.apply(o,[this,i].concat(t(n(this,e))))}))
|
||
return i}({incomingCallback:l,createArgs:function(e,t){var r=f.map(function(r){return{context:e,macro:r,key:t}}),i=void 0
|
||
return o?(i=r.slice()).splice(0,0,n):i=r.map(n),i}})
|
||
return Ember.computed.apply(void 0,t(i(c)).concat([h]))}},e.buildCurriedComputed=function(e){return function(t){return function(){return e.apply(void 0,Array.prototype.slice.call(arguments).concat([t])).readOnly()}}}}),define("ember-macro-helpers/-constants",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
e.ARRAY_EACH="@each.",e.ARRAY_LENGTH="[]"}),define("ember-macro-helpers/collapse-key",["exports","ember-macro-helpers/expand-property","ember-macro-helpers/-constants"],function(e,t,r){"use strict"
|
||
function n(e){if("string"!=typeof e)return[e]
|
||
var i=(0,t.default)(e)
|
||
if(i.length>1)return function(e){return e.map(n).reduce(function(e,t){var r=t.filter(function(t){return-1===e.indexOf(t)})
|
||
return e.concat(r)},[])}(i)
|
||
var o=e.indexOf(r.ARRAY_EACH)
|
||
return-1===o&&(o=e.indexOf(r.ARRAY_LENGTH)),0===o?[""]:o>0?[e.slice(0,o-1)]:(0,t.default)(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n}),define("ember-macro-helpers/collapse-keys",["exports","ember-macro-helpers/collapse-key"],function(e,t){"use strict"
|
||
function r(e){var r=[],n=[]
|
||
return e.forEach(function(e){var i=(0,t.default)(e)
|
||
r=r.concat(i)
|
||
var o=void 0
|
||
o=n.length?n[n.length-1]+1:0,n=n.concat(i.map(function(){return o}))}),{collapsedKeys:r,keyMap:n}}Object.defineProperty(e,"__esModule",{value:!0}),e.collapseKeysWithMap=r,e.default=function(e){return r(e).collapsedKeys}}),define("ember-macro-helpers/computed-unsafe",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/get-value-unsafe","ember-macro-helpers/flatten-keys-unsafe"],function(e,t,r,n){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
e.default=(0,t.default)({collapseKeys:function(e){return e},getValue:r.default,flattenKeys:n.default})}),define("ember-macro-helpers/computed",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/collapse-keys","ember-macro-helpers/get-value","ember-macro-helpers/flatten-keys"],function(e,t,r,n,i){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)({collapseKeys:r.default,getValue:n.default,flattenKeys:i.default})}),define("ember-macro-helpers/create-class-computed",["exports","ember-macro-helpers/get-value","ember-macro-helpers/collapse-keys","ember-macro-helpers/flatten-keys","ember-macro-helpers/-constants"],function(e,t,r,n,i){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,s){return function(){for(var l=arguments.length,f=Array(l),h=0;h<l;h++)f[h]=arguments[h]
|
||
var d=(0,r.collapseKeysWithMap)(f),p=d.collapsedKeys,m=d.keyMap
|
||
var y=[]
|
||
function g(r,n){var i=this,o=y.map(function(r,o){return e[o]&&(r=(0,t.default)({context:i,macro:r,key:n})),r}),u=s.apply(this,o)
|
||
a(this,"computed",u)}var b={}
|
||
p.forEach(function(t,r){var n=e[r]
|
||
n||(t=function(e,t){if("string"==typeof e){var r=f[m[t]]
|
||
if(-1!==r.indexOf(i.ARRAY_EACH)||-1!==r.indexOf(i.ARRAY_LENGTH))return r}return e}(t,r))
|
||
var o=function(e,t){return"string"==typeof e?"context."+e:"nonStrings."+t}(t,r)
|
||
y.push(o),n&&(b["key"+r+"DidChange"]=Ember.observer(o,g))})
|
||
var v=c.extend(b,{onInit:Ember.on("init",function(){g.call(this)})}),_=Ember.computed.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t]
|
||
return r}return Array.from(e)}((0,n.default)(f)).concat([function(e){var r=this,n=function(e,t,r,n){var i=u.get(e)
|
||
i||(i=new o,u.set(e,i))
|
||
var a=i.get(n)
|
||
if(a)return a
|
||
a=t.create({key:r,context:e,nonStrings:Ember.Object.create()}),i.set(n,a),e instanceof Ember.Component&&e.one("willDestroyElement",function(){a.destroy()})
|
||
return a}(this,v,e,_),i=p.reduce(function(n,i,o){return"string"!=typeof i&&(n[o.toString()]=(0,t.default)({context:r,macro:i,key:e})),n},{})
|
||
return Ember.setProperties(n.nonStrings,i),Ember.get(n,"computed")}])).readOnly()
|
||
return _}}
|
||
var o=Ember.WeakMap,a=Ember.defineProperty,s=Ember.meta,u=new o
|
||
var c=Ember.Object.extend({computedDidChange:Ember.observer("computed",function(){var e=this.context,t=this.key
|
||
if(e.isDestroying)this.destroy()
|
||
else{var r=s(e)
|
||
if(r.readableLastRendered){var n=r.readableLastRendered()
|
||
if(n&&Object.hasOwnProperty.call(n,t))return}e.notifyPropertyChange(t)}})})}),define("ember-macro-helpers/curried-computed",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/computed"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.buildCurriedComputed)(r.default)}),define("ember-macro-helpers/expand-property-list",["exports","ember-macro-helpers/expand-property"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e.reduce(function(e,r){return e.concat((0,t.default)(r))},[])}}),define("ember-macro-helpers/expand-property",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var r=[]
|
||
return t(e,function(e){r=r.concat(e)}),r}
|
||
var t=Ember.expandProperties}),define("ember-macro-helpers/flatten-keys-unsafe",["exports","ember-macro-helpers/flatten-keys"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return(0,t.default)(e).reduce(function(e,t){return-1!==t.indexOf(" ")||e.push(t),e},[])}}),define("ember-macro-helpers/flatten-keys",["exports","ember-macro-helpers/is-computed"],function(e,t){"use strict"
|
||
function r(e,r){if((0,t.default)(e)){var i=e._dependentKeys
|
||
if(void 0===i)return
|
||
return n(i,r)}if("string"!=typeof e)return e
|
||
r.push(e)}function n(e,t){e.forEach(function(e){r(e,t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var t=[]
|
||
n(e.slice(0,-1),t)
|
||
var i=e[e.length-1]
|
||
if(i){var o=r(i,t)
|
||
o&&(o.get&&r(o.get,t),o.set&&r(o.set,t))}return t}}),define("ember-macro-helpers/get-value-unsafe",["exports","ember-macro-helpers/get-value"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=(0,t.default)(e)
|
||
return void 0!==r?r:e.macro}}),define("ember-macro-helpers/get-value",["exports","ember-macro-helpers/is-computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.context,n=e.macro,i=e.key
|
||
return(0,t.default)(n)?n._getter.call(r,i):"string"!=typeof n?n:Ember.isBlank(n)?r:Ember.get(r,n)}})
|
||
define("ember-macro-helpers/is-computed",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e instanceof t}
|
||
var t=Ember.ComputedProperty}),define("ember-macro-helpers/lazy-computed",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/collapse-keys","ember-macro-helpers/get-value","ember-macro-helpers/flatten-keys"],function(e,t,r,n,i){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)({collapseKeys:r.default,getValue:n.default,flattenKeys:i.default,isLazy:!0})}),define("ember-macro-helpers/lazy-curried-computed",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/lazy-computed"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.buildCurriedComputed)(r.default)}),define("ember-macro-helpers/literal",["exports","ember-macro-helpers/raw"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-macro-helpers/normalize-array-key",["exports","ember-macro-helpers/-constants"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]
|
||
if("string"!=typeof e)return e
|
||
var n=void 0,i=e.indexOf(t.ARRAY_EACH)
|
||
if(-1!==i){var o=e.split("."),a=o[o.length-1]
|
||
n=0===a.indexOf("{")?a.substring(1,a.length-1).split(","):[a]}else i=e.indexOf(t.ARRAY_LENGTH),n=[]
|
||
0===i?e="":i>0&&(e=e.slice(0,i-1)),r.forEach(function(e){void 0!==e&&-1===n.indexOf(e)&&n.push(e)})
|
||
var s=void 0
|
||
return 0===n.length?s=t.ARRAY_LENGTH:(s=t.ARRAY_EACH,1===n.length?s+=n[0]:s+="{"+n.join(",")+"}"),Ember.isBlank(e)?s:e+"."+s}}),define("ember-macro-helpers/raw",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return Ember.computed(function(){return e}).readOnly()}}),define("ember-macro-helpers/reads",["exports","ember-macro-helpers/writable"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-macro-helpers/writable",["exports","ember-macro-helpers/computed"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,n){var i={get:function(e){return e}}
|
||
return n&&("object"===(void 0===n?"undefined":r(n))&&n.set?i.set=n.set:i.set=function(){return n.apply(this,arguments)}),(0,t.default)(e,i)}
|
||
var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}),define("ember-promise-helpers/helpers/await",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
var t=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=Ember.RSVP.Promise
|
||
e.default=Ember.Helper.extend({valueBeforeSettled:null,compute:function(e){var r=this,n=t(e,1)[0]
|
||
return n&&"function"==typeof n.then?this.ensureLatestPromise(n,function(e){e.then(function(e){r.setValue(e,n)}).catch(function(){r.setValue(null,n)})}):n},ensureLatestPromise:function(e,t){return this._wasSettled&&e===this._promise?this._value:(this._unsettle(),this._promise=e,t.call(this,r.resolve(e)),this.get("valueBeforeSettled"))},_settle:function(e){this.allowUpdates(e)&&(this._wasSettled=!0,this.recompute())},_unsettle:function(){this._wasSettled=!1,this._promise=null},setValue:function(e,t){this.allowUpdates(t)&&(this._value=e,this._settle(t))},allowUpdates:function(e){return this._promise===e}})}),define("ember-promise-helpers/helpers/is-fulfilled",["exports","ember-promise-helpers/helpers/await"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({compute:function(e){var t=this,r=e[0]
|
||
return this.ensureLatestPromise(r,function(e){e.then(function(){t.setValue(!0,r)}).catch(function(){t.setValue(!1,r)})})}})}),define("ember-promise-helpers/helpers/is-pending",["exports","ember-promise-helpers/helpers/await"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({valueBeforeSettled:!0,compute:function(e){var t=this,r=e[0]
|
||
return this.ensureLatestPromise(r,function(e){e.catch(function(){}).finally(function(){t.setValue(!1,r)})})}})}),define("ember-promise-helpers/helpers/is-rejected",["exports","ember-promise-helpers/helpers/await"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({compute:function(e){var t=this,r=e[0]
|
||
return this.ensureLatestPromise(r,function(e){e.then(function(){t.setValue(!1,r)}).catch(function(){t.setValue(!0,r)})})}})}),define("ember-promise-helpers/helpers/promise-all",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Helper.extend({compute:function(e){var t=Array.isArray(e[0])?e[0]:e
|
||
return Ember.RSVP.all(t)}})}),define("ember-promise-helpers/helpers/promise-hash",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Helper.extend({compute:function(e,t){return Ember.RSVP.hash(t)}})}),define("ember-promise-helpers/helpers/promise-rejected-reason",["exports","ember-promise-helpers/helpers/await"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({compute:function(e){var t=this,r=e[0]
|
||
return this.ensureLatestPromise(r,function(e){e.then(function(){t.setValue(null,r)}).catch(function(e){t.setValue(e,r)})})}})}),define("ember-resolver/features",[],function(){"use strict"}),define("ember-resolver/index",["exports","ember-resolver/resolvers/classic"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-resolver/resolver",["exports","ember-resolver/resolvers/classic"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("ember-resolver/resolvers/classic/container-debug-adapter",["exports","ember-resolver/resolvers/classic/index"],function(e,t){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0})
|
||
var r=Ember.ContainerDebugAdapter
|
||
function n(e,t,r){var n=t.match(new RegExp("^/?"+r+"/(.+)/"+e+"$"))
|
||
if(null!==n)return n[1]}e.default=r.extend({_moduleRegistry:null,init:function(){this._super.apply(this,arguments),this._moduleRegistry||(this._moduleRegistry=new t.ModuleRegistry)},canCatalogEntriesByType:function(e){return"model"===e||this._super.apply(this,arguments)},catalogEntriesByType:function(e){for(var t=this._moduleRegistry.moduleNames(),r=Ember.A(),i=this.namespace.modulePrefix,o=0,a=t.length;o<a;o++){var s=t[o]
|
||
if(-1!==s.indexOf(e)){var u=n(e,s,this.namespace.podModulePrefix||i)
|
||
u||(u=s.split(e+"s/").pop()),r.addObject(u)}}return r}})}),define("ember-resolver/resolvers/classic/index",["exports","ember-resolver/utils/class-factory","ember-resolver/utils/make-dictionary"],function(e,t,r){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.ModuleRegistry=void 0,void 0===requirejs.entries&&(requirejs.entries=requirejs._eak_seen)
|
||
var n=e.ModuleRegistry=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._entries=t||requirejs.entries}return e.prototype.moduleNames=function(){return Object.keys(this._entries)},e.prototype.has=function(e){return e in this._entries},e.prototype.get=function(e){return require(e)},e}(),i=Ember.String,o=i.underscore,a=i.classify,s=i.dasherize,u=Ember.get
|
||
function c(e){Ember.assert("`modulePrefix` must be defined",this.namespace.modulePrefix)
|
||
var r=this.findModuleName(e)
|
||
if(r){var n=this._extractDefaultExport(r,e)
|
||
if(void 0===n)throw new Error(" Expected to find: '"+e.fullName+"' within '"+r+"' but got 'undefined'. Did you forget to 'export default' within '"+r+"'?")
|
||
return this.shouldWrapInClassFactory(n,e)&&(n=(0,t.default)(n)),n}return this._super(e)}var l=Ember.DefaultResolver.extend({resolveOther:c,parseName:function(e){if(!0===e.parsedName)return e
|
||
var t=void 0,r=void 0,n=void 0,i=e.split("@")
|
||
if("helper:@content-helper"!==e&&2===i.length){var o=i[0].split(":")
|
||
if(2===o.length)t=o[1],r=o[0],n=i[1]
|
||
else{var s=i[1].split(":")
|
||
t=i[0],r=s[0],n=s[1]}"template"===r&&0===t.lastIndexOf("components/",0)&&(n="components/"+n,t=t.slice(11))}else r=(i=e.split(":"))[0],n=i[1]
|
||
var c=n,l=u(this,"namespace")
|
||
return{parsedName:!0,fullName:e,prefix:t||this.prefix({type:r}),type:r,fullNameWithoutType:c,name:n,root:l,resolveMethodName:"resolve"+a(r)}},resolveTemplate:c,pluralizedTypes:null,moduleRegistry:null,makeToString:function(e,t){return this.namespace.modulePrefix+"@"+t+":"},shouldWrapInClassFactory:function(){return!1},init:function(){this._super(),this.moduleBasedResolver=!0,this._moduleRegistry||(this._moduleRegistry=new n),this._normalizeCache=(0,r.default)(),this.pluralizedTypes=this.pluralizedTypes||(0,r.default)(),this.pluralizedTypes.config||(this.pluralizedTypes.config="config"),this._deprecatedPodModulePrefix=!1},normalize:function(e){return this._normalizeCache[e]||(this._normalizeCache[e]=this._normalize(e))},_normalize:function(e){var t=e.split(":")
|
||
return t.length>1?"helper"===t[0]?t[0]+":"+t[1].replace(/_/g,"-"):t[0]+":"+s(t[1].replace(/\./g,"/")):e},pluralize:function(e){return this.pluralizedTypes[e]||(this.pluralizedTypes[e]=e+"s")},podBasedLookupWithPrefix:function(e,t){var r=t.fullNameWithoutType
|
||
return"template"===t.type&&(r=r.replace(/^components\//,"")),e+"/"+r+"/"+t.type},podBasedModuleName:function(e){var t=this.namespace.podModulePrefix||this.namespace.modulePrefix
|
||
return this.podBasedLookupWithPrefix(t,e)},podBasedComponentsInSubdir:function(e){var t=this.namespace.podModulePrefix||this.namespace.modulePrefix
|
||
if(t+="/components","component"===e.type||/^components/.test(e.fullNameWithoutType))return this.podBasedLookupWithPrefix(t,e)},resolveEngine:function(e){var t=e.fullNameWithoutType+"/engine"
|
||
if(this._moduleRegistry.has(t))return this._extractDefaultExport(t)},resolveRouteMap:function(e){var t=e.fullNameWithoutType,r=t+"/routes"
|
||
if(this._moduleRegistry.has(r)){var n=this._extractDefaultExport(r)
|
||
return Ember.assert("The route map for "+t+" should be wrapped by 'buildRoutes' before exporting.",n.isRouteMap),n}},mainModuleName:function(e){var t=e.prefix+"/"+e.type
|
||
if("main"===e.fullNameWithoutType)return t},defaultModuleName:function(e){return e.prefix+"/"+this.pluralize(e.type)+"/"+e.fullNameWithoutType},prefix:function(e){var t=this.namespace.modulePrefix
|
||
return this.namespace[e.type+"Prefix"]&&(t=this.namespace[e.type+"Prefix"]),t},moduleNameLookupPatterns:Ember.computed(function(){return[this.podBasedModuleName,this.podBasedComponentsInSubdir,this.mainModuleName,this.defaultModuleName]}).readOnly(),findModuleName:function(e,t){for(var r=this.get("moduleNameLookupPatterns"),n=void 0,i=0,o=r.length;i<o;i++){var a=r[i].call(this,e)
|
||
if(a&&(a=this.chooseModuleName(a,e)),a&&this._moduleRegistry.has(a)&&(n=a),t||this._logLookup(n,e,a),n)return n}},chooseModuleName:function(e,t){var r=this,n=o(e)
|
||
if(e!==n&&this._moduleRegistry.has(e)&&this._moduleRegistry.has(n))throw new TypeError("Ambiguous module names: '"+e+"' and '"+n+"'")
|
||
if(this._moduleRegistry.has(e))return e
|
||
if(this._moduleRegistry.has(n))return n
|
||
var i=e.replace(/\/-([^/]*)$/,"/_$1")
|
||
if(this._moduleRegistry.has(i))return Ember.deprecate('Modules should not contain underscores. Attempted to lookup "'+e+'" which was not found. Please rename "'+i+'" to "'+e+'" instead.',!1,{id:"ember-resolver.underscored-modules",until:"3.0.0"}),i
|
||
Ember.runInDebug(function(){"helper"===t.type&&/[a-z]+[A-Z]+/.test(e)&&(r._camelCaseHelperWarnedNames=r._camelCaseHelperWarnedNames||[],!(r._camelCaseHelperWarnedNames.indexOf(t.fullName)>-1)&&r._moduleRegistry.has(s(e))&&(r._camelCaseHelperWarnedNames.push(t.fullName),Ember.warn('Attempted to lookup "'+t.fullName+'" which was not found. In previous versions of ember-resolver, a bug would have caused the module at "'+s(e)+'" to be returned for this camel case helper name. This has been fixed. Use the dasherized name to resolve the module that would have been returned in previous versions.',!1,{id:"ember-resolver.camelcase-helper-names",until:"3.0.0"})))})},lookupDescription:function(e){var t=this.parseName(e)
|
||
return this.findModuleName(t,!0)},_logLookup:function(e,t,r){if(Ember.ENV.LOG_MODULE_RESOLVER||t.root.LOG_RESOLVER){var n=void 0,i=e?"[✓]":"[ ]"
|
||
n=t.fullName.length>60?".":new Array(60-t.fullName.length).join("."),r||(r=this.lookupDescription(t)),console&&console.info&&console.info(i,t.fullName,n,r)}},knownForType:function(e){for(var t=this._moduleRegistry.moduleNames(),n=(0,r.default)(),i=0,o=t.length;i<o;i++){var a=t[i],s=this.translateToContainerFullname(e,a)
|
||
s&&(n[s]=!0)}return n},translateToContainerFullname:function(e,t){var r=this.prefix({type:e}),n=r+"/",i="/"+e,o=t.indexOf(n),a=t.indexOf(i)
|
||
if(0===o&&a===t.length-i.length&&t.length>n.length+i.length)return e+":"+t.slice(o+n.length,a)
|
||
var s=r+"/"+this.pluralize(e)+"/"
|
||
return 0===t.indexOf(s)&&t.length>s.length?e+":"+t.slice(s.length):void 0},_extractDefaultExport:function(e){var t=require(e,null,null,!0)
|
||
return t&&t.default&&(t=t.default),t}})
|
||
l.reopenClass({moduleBasedResolver:!0}),e.default=l}),define("ember-resolver/utils/class-factory",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return{create:function(t){return"function"==typeof e.extend?e.extend(t):e}}}}),define("ember-resolver/utils/make-dictionary",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e=Object.create(null)
|
||
return e._dict=null,delete e._dict,e}}),define("ember-truth-helpers/helpers/and",["exports","ember-truth-helpers/utils/truth-convert"],function(e,t){"use strict"
|
||
function r(e){for(var r=0,n=e.length;r<n;r++)if(!1===(0,t.default)(e[r]))return e[r]
|
||
return e[e.length-1]}Object.defineProperty(e,"__esModule",{value:!0}),e.and=r,e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/helpers/equal",["exports"],function(e){"use strict"
|
||
function t(e){return e[0]===e[1]}Object.defineProperty(e,"__esModule",{value:!0}),e.equal=t,e.default=Ember.Helper.helper(t)}),define("ember-truth-helpers/helpers/gt",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.gt=r
|
||
var t=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()
|
||
function r(e,r){var n=t(e,2),i=n[0],o=n[1]
|
||
return r.forceNumber&&("number"!=typeof i&&(i=Number(i)),"number"!=typeof o&&(o=Number(o))),i>o}e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/helpers/gte",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.gte=r
|
||
var t=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()
|
||
function r(e,r){var n=t(e,2),i=n[0],o=n[1]
|
||
return r.forceNumber&&("number"!=typeof i&&(i=Number(i)),"number"!=typeof o&&(o=Number(o))),i>=o}e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/helpers/is-array",["exports"],function(e){"use strict"
|
||
function t(e){for(var t=0,r=e.length;t<r;t++)if(!1===Ember.isArray(e[t]))return!1
|
||
return!0}Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=t,e.default=Ember.Helper.helper(t)}),define("ember-truth-helpers/helpers/is-equal",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.isEqual=r
|
||
var t=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()
|
||
function r(e){var r=t(e,2),n=r[0],i=r[1]
|
||
return Ember.isEqual(n,i)}e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/helpers/lt",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.lt=r
|
||
var t=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()
|
||
function r(e,r){var n=t(e,2),i=n[0],o=n[1]
|
||
return r.forceNumber&&("number"!=typeof i&&(i=Number(i)),"number"!=typeof o&&(o=Number(o))),i<o}e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/helpers/lte",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.lte=r
|
||
var t=function(){return function(e,t){if(Array.isArray(e))return e
|
||
if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0
|
||
try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t)
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()
|
||
function r(e,r){var n=t(e,2),i=n[0],o=n[1]
|
||
return r.forceNumber&&("number"!=typeof i&&(i=Number(i)),"number"!=typeof o&&(o=Number(o))),i<=o}e.default=Ember.Helper.helper(r)})
|
||
define("ember-truth-helpers/helpers/not-equal",["exports"],function(e){"use strict"
|
||
function t(e){return e[0]!==e[1]}Object.defineProperty(e,"__esModule",{value:!0}),e.notEqualHelper=t,e.default=Ember.Helper.helper(t)}),define("ember-truth-helpers/helpers/not",["exports","ember-truth-helpers/utils/truth-convert"],function(e,t){"use strict"
|
||
function r(e){for(var r=0,n=e.length;r<n;r++)if(!0===(0,t.default)(e[r]))return!1
|
||
return!0}Object.defineProperty(e,"__esModule",{value:!0}),e.not=r,e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/helpers/or",["exports","ember-truth-helpers/utils/truth-convert"],function(e,t){"use strict"
|
||
function r(e){for(var r=0,n=e.length;r<n;r++)if(!0===(0,t.default)(e[r]))return e[r]
|
||
return e[e.length-1]}Object.defineProperty(e,"__esModule",{value:!0}),e.or=r,e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/helpers/xor",["exports","ember-truth-helpers/utils/truth-convert"],function(e,t){"use strict"
|
||
function r(e){return(0,t.default)(e[0])!==(0,t.default)(e[1])}Object.defineProperty(e,"__esModule",{value:!0}),e.xor=r,e.default=Ember.Helper.helper(r)}),define("ember-truth-helpers/utils/truth-convert",["exports"],function(e){"use strict"
|
||
Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var t=e&&Ember.get(e,"isTruthy")
|
||
if("boolean"==typeof t)return t
|
||
return Ember.isArray(e)?0!==Ember.get(e,"length"):!!e}})
|
||
|
||
//# sourceMappingURL=vendor-e4541c9dd8db8779c164a8fec4722c05.map |