/* Copyright (c) 2022 Synology Inc. All rights reserved. */
Ext.ns("SYNO.SDS.C2FS.Utils.LocalStatusWatch"),SYNO.SDS.C2FS.Utils.LocalStatusWatch.WatchStoreInterface=class e{constructor(){if(this.constructor===e)throw new Error("Abstract class cannot be initiated")}get paths(){throw new Error("Abstract method not implemented")}getLocalStatusCallback(e,t){throw new Error("Abstract method not implemented")}},Ext.ns("SYNO.SDS.C2FS.Utils.LocalStatusWatch"),Ext.define("SYNO.SDS.C2FS.Utils.LocalStatusWatch.Watcher",{extend:"Ext.Component",initComponent:function(...e){SYNO.SDS.C2FS.Utils.LocalStatusWatch.Watcher.superclass.initComponent.apply(this,e),this._pathToStores=new Map,this._webapiTask=this.addWebAPITask(this._getWebAPIRequestConfig())},watchByFilePaths(e,t){if(!(t instanceof SYNO.SDS.C2FS.Utils.LocalStatusWatch.WatchStoreInterface))throw new TypeError(`Invalid argument: ${t}`);e.forEach(e=>{this._pathToStores.has(e)?this._pathToStores.get(e).add(t):this._pathToStores.set(e,new Set([t]))}),this.hasMoreWatches()&&(this._updateWebAPIWatchingFiles(),this._webapiTask.start())},stopWatchingByWatchStore(e){if(!(e instanceof SYNO.SDS.C2FS.Utils.LocalStatusWatch.WatchStoreInterface))throw new TypeError(`Invalid argument: ${e}`);e.paths.forEach(t=>{this._removeStores(t,[e])}),this.hasMoreWatches()?this._updateWebAPIWatchingFiles():this._webapiTask.stop()},hasMoreWatches(){return 0!==this._pathToStores.size},_updateWebAPIWatchingFiles(){this._webapiTask.apply(this._getWebAPIRequestConfig())},_getWebAPIRequestConfig(){return{interval:5e3,api:"SYNO.C2FS.File",method:"get_local_status",version:1,params:{paths:this._getWatchFilePaths()},scope:this,callback:this._getLocalStatusCallback}},_getWatchFilePaths(){return Array.from(this._pathToStores.keys())},_getLocalStatusCallback(e,t,r,i){if(e){for(const[e,r]of Object.entries(t)){const t=this._pathToStores.get(e).filter(t=>{try{return t.getLocalStatusCallback(e,r)}catch(e){return SYNO.Debug(e),!0}});this._removeStores(e,t)}this.hasMoreWatches()?this._updateWebAPIWatchingFiles():this._webapiTask.stop()}else SYNO.Debug("Failed to do webapi SYNO.C2FS.File.get_local_status:1, "+`params: [${r}], resp: [${t}].`)},_removeStores:function(e,t){const r=this._pathToStores.get(e);void 0!==r&&(t.forEach(e=>{r.delete(e)}),0===r.size&&this._pathToStores.delete(e))}}),Ext.apply(SYNO.SDS.C2FS.Utils.LocalStatusWatch,{_watcher:null,watchByFilePaths(e,t){const r=SYNO.SDS.C2FS.Utils.LocalStatusWatch;null===r._watcher&&(r._watcher=new SYNO.SDS.C2FS.Utils.LocalStatusWatch.Watcher),r._watcher.watchByFilePaths(e,t)},stopWatchingByWatchStore(e){const t=SYNO.SDS.C2FS.Utils.LocalStatusWatch;null!==t._watcher&&(t._watcher.stopWatchingByWatchStore(e),t._watcher.hasMoreWatches()||(t._watcher=null))}}),Ext.ns("SYNO.SDS.C2FS"),SYNO.SDS.C2FS.Helper={PKG_ID:"HybridShare",GLOBAL_CONF:{},T:function(e,t){return _TT("SYNO.SDS.C2FS.Application",e,t)||_T(e,t)||String.format("{0}",t)},pkgVersion:function(){return Object.prototype.hasOwnProperty.call(SYNO.SDS.Config.FnMap["SYNO.SDS.C2FS.Application"],"config")&&Object.prototype.hasOwnProperty.call(SYNO.SDS.Config.FnMap["SYNO.SDS.C2FS.Application"].config,"version")?SYNO.SDS.Config.FnMap["SYNO.SDS.C2FS.Application"].config.version:""},setGlobalConf:function(e){SYNO.SDS.C2FS.Helper.GLOBAL_CONF=e},getGlobalConf:function(e,t){const r=SYNO.SDS.C2FS.Helper.GLOBAL_CONF[e];return void 0!==r?r:t},getMaxC2fsNumFromGlobalConf:function(e){return SYNO.SDS.C2FS.Helper.getGlobalConf("max_c2fs_num",e)},maxC2fsNum:function(){return SYNO.SDS.Utils.isInVirtualDSM()?SYNO.SDS.C2FS.Helper.getMaxC2fsNumFromGlobalConf(8):SYNO.SDS.C2FS.Helper.getMaxC2fsNumFromGlobalConf(parseInt(_D("max_c2fs_num")))},toolTipRenderer:function(e,t,r){if(!e||"-"===e)return"-";const i=Ext.util.Format.htmlEncode(e),n=Ext.util.Format.htmlEncode(i);return String.format('{1}',n,i)},getSelectedObjectFromCombobox:function(e){return e&&Object.prototype.hasOwnProperty.call(e,"selectedIndex")&&Object.prototype.hasOwnProperty.call(e,"store")?e.getStore().getAt(e.selectedIndex)||e.getStore().getById(e.getValue()):null},popupErrorMessage:function(e,t,r){const i=SYNO.SDS.C2FS.Helper.ErrorMap.T(t)||SYNO.SDS.C2FS.Helper.T("common","error_system");if(!e||!e.getMsgBox)return!1;e.getMsgBox().alert(e.title,i,r||Ext.emptyFn)},popupFeasibilityCheckMsg:function(e,t,r){let i=SYNO.SDS.C2FS.Helper.T("common","error_system");return t&&t.hard?(i=SYNO.SDS.C2FS.Helper.T("share","edit_hard_check_fail"),i+="
"+SYNO.SDS.Utils.GetFeasibilityCheckMsgJoin(t.hard)+"",void e.getMsgBox().alert("warning_msg",i)):t&&t.soft?(i=SYNO.SDS.C2FS.Helper.T("share","edit_soft_check_fail"),i+="
"+SYNO.SDS.Utils.GetFeasibilityCheckMsgJoin(t.soft)+"",void e.getMsgBox().confirm("warning_msg",i,function(e){"yes"===e&&r()},e)):void e.getMsgBox().alert("warning_msg",i)},timeRender:function(e,t,r){const i={s:1,m:2,h:3,d:4};(r=i[r]?i[r]:i.d)<(t=i[t]?i[t]:i.s)&&(r=[t,t=r][0]);const n=[];let s=0,o=0,a=0;return r>i.s&&(s=e/60,e%=60),r>i.m&&(o=s/60,s%=60),r>i.h&&(a=o/24,o%=24),e=Math.floor(e),s=Math.floor(s),o=Math.floor(o),a=Math.floor(a),t<=i.d&&0!==a&&n.push(String.format("{0} {1}",a,1===a?SYNO.SDS.C2FS.Helper.T("common","time_day"):SYNO.SDS.C2FS.Helper.T("common","time_days"))),t<=i.h&&0!==o&&n.push(String.format("{0} {1}",o,1===o?SYNO.SDS.C2FS.Helper.T("common","time_hour"):SYNO.SDS.C2FS.Helper.T("common","time_hours"))),t<=i.m&&0!==s&&n.push(String.format("{0} {1}",s,1===s?SYNO.SDS.C2FS.Helper.T("common","time_minute"):SYNO.SDS.C2FS.Helper.T("common","time_minutes"))),t<=i.s&&0!==e&&n.push(String.format("{0} {1}",e,1===e?SYNO.SDS.C2FS.Helper.T("common","time_second"):SYNO.SDS.C2FS.Helper.T("common","time_seconds"))),0===n.length&&(t===i.d&&n.push(String.format("{0} {1}",a,SYNO.SDS.C2FS.Helper.T("common","time_day"))),t===i.h&&n.push(String.format("{0} {1}",o,SYNO.SDS.C2FS.Helper.T("common","time_hour"))),t===i.m&&n.push(String.format("{0} {1}",s,SYNO.SDS.C2FS.Helper.T("common","time_minute"))),t===i.s&&n.push(String.format("{0} {1}",e,SYNO.SDS.C2FS.Helper.T("common","time_second")))),n.join(" ")},approximateTime:(e,t)=>e?(t||(t=4),[86400,3600,60,1].reduce((r,i)=>t?(r+=e-e%i,e%=i,r>0&&t--,r):r,0)):0,percentRender:function(e,t,r){return parseFloat((100*e/t).toFixed(r||2))+"%"},capacityRender:function(e,t){let r=SYNO.SDS.C2FS.Helper.T("common","size_kb"),i=e;return i<0&&(i=0),i>=1024&&(i/=1024,r=SYNO.SDS.C2FS.Helper.T("common","size_mb")),i>=1024&&(i/=1024,r=SYNO.SDS.C2FS.Helper.T("common","size_gb")),i>=1024&&(i/=1024,r=SYNO.SDS.C2FS.Helper.T("common","size_tb")),i.toFixed(Number.isInteger(t)&&t>=0?t:2)+" "+r},addAlignedBullet:e=>String.format('
=0;i--){for(var c=t.words[i],f=h-1;f>=0;f--){var u=c>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===i&&0===f)&&(n=this.mul(n,r[o]),a=0,o=0)):a=0}h=26}return n},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},s.mont=function(e){return new M(e)},n(M,E),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:25}],16:[function(e,t,r){t.exports={newInvalidAsn1Error:function(e){var t=new Error;return t.name="InvalidAsn1Error",t.message=e||"",t}}},{}],17:[function(e,t,r){var i=e("./errors"),n=e("./types"),s=e("./reader"),o=e("./writer");for(var a in t.exports={Reader:s,Writer:o},n)n.hasOwnProperty(a)&&(t.exports[a]=n[a]);for(var h in i)i.hasOwnProperty(h)&&(t.exports[h]=i[h])},{"./errors":16,"./reader":18,"./types":19,"./writer":20}],18:[function(e,t,r){var i=e("assert"),n=e("safer-buffer").Buffer,s=e("./types"),o=e("./errors").newInvalidAsn1Error;function a(e){if(!e||!n.isBuffer(e))throw new TypeError("data must be a node Buffer");this._buf=e,this._size=e.length,this._len=0,this._offset=0}Object.defineProperty(a.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(a.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(a.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),a.prototype.readByte=function(e){if(this._size-this._offset<1)return null;var t=255&this._buf[this._offset];return e||(this._offset+=1),t},a.prototype.peek=function(){return this.readByte(!0)},a.prototype.readLength=function(e){if(void 0===e&&(e=this._offset),e>=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if(128==(128&t)){if(0===(t&=127))throw o("Indefinite length not supported");if(t>4)throw o("encoding too long");if(this._size-e =0;i--){for(var c=t.words[i],f=h-1;f>=0;f--){var u=c>>f&1;n!==r[0]&&(n=this.sqr(n)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===i&&0===f)&&(n=this.mul(n,r[o]),a=0,o=0)):a=0}h=26}return n},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new N(e)},n(N,k),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:25}],24:[function(e,t,r){var i;function n(e){this.rand=e}if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r=18?(s-=18,o+=1,this.words[o]|=n>>>26):s+=8;else for(i=(e.length-t)%2==0?t+1:t;i>>=1)n++;return 1<o)for(this.length-=o,c=0;c=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function o(e,t){var n=function(e){var t=s(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),a=new i(e).mul(n.blinder).umod(t.modulus),h=a.toRed(i.mont(t.prime1)),c=a.toRed(i.mont(t.prime2)),f=t.coefficient,u=t.prime1,l=t.prime2,d=h.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),m=d.isub(p).imul(f).umod(u).imul(l);return p.iadd(m).imul(n.unblinder).umod(t.modulus).toArrayLike(r,"be",o)}o.getr=s,t.exports=o}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":23,buffer:72,randombytes:186}],47:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":48}],48:[function(e,t,r){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],49:[function(e,t,r){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],50:[function(e,t,r){var i=e("safe-buffer").Buffer,n=e("create-hash"),s=e("readable-stream"),o=e("inherits"),a=e("./sign"),h=e("./verify"),c=e("./algorithms.json");function f(e){s.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){s.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=n(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new f(e)}function d(e){return new u(e)}Object.keys(c).forEach(function(e){c[e].id=i.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]}),o(f,s.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=i.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),i=a(r,e,this._hashType,this._signType,this._tag);return t?i.toString(t):i},o(u,s.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=i.from(e,t)),this._hash.update(e),this},u.prototype.verify=function(e,t,r){"string"==typeof t&&(t=i.from(t,r)),this.end();var n=this._hash.digest();return h(t,n,e,this._signType,this._tag)},t.exports={Sign:l,Verify:d,createSign:l,createVerify:d}},{"./algorithms.json":48,"./sign":51,"./verify":52,"create-hash":78,inherits:143,"readable-stream":67,"safe-buffer":189}],51:[function(e,t,r){var i=e("safe-buffer").Buffer,n=e("create-hmac"),s=e("browserify-rsa"),o=e("elliptic").ec,a=e("bn.js"),h=e("parse-asn1"),c=e("./curves.json");function f(e,t,r,s){if((e=i.from(e.toArray())).length=0;c--)if(f[c]!==u[c])return!1;for(c=f.length-1;c>=0;c--)if(a=f[c],!S(e[a],t[a],r,i))return!1;return!0}(e,t,r,i))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function v(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 w(e,t,r,i){var n;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=function(e){var t;try{e()}catch(e){t=e}return t}(t),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),e&&!n&&g(n,r,"Missing expected exception"+i);var s="string"==typeof i,a=!e&&n&&!r;if((!e&&o.isError(n)&&s&&v(n,r)||a)&&g(n,r,"Got unwanted exception"+i),e&&n&&r&&!v(n,r)||!e&&n)throw n}l.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(b((t=this).actual),128)+" "+t.operator+" "+m(b(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var i=new Error;if(i.stack){var n=i.stack,s=p(r),o=n.indexOf("\n"+s);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},o.inherits(l.AssertionError,Error),l.fail=g,l.ok=y,l.equal=function(e,t,r){e!=t&&g(e,t,r,"==",l.equal)},l.notEqual=function(e,t,r){e==t&&g(e,t,r,"!=",l.notEqual)},l.deepEqual=function(e,t,r){S(e,t,!1)||g(e,t,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(e,t,r){S(e,t,!0)||g(e,t,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(e,t,r){S(e,t,!1)&&g(e,t,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function e(t,r,i){S(t,r,!0)&&g(t,r,i,"notDeepStrictEqual",e)},l.strictEqual=function(e,t,r){e!==t&&g(e,t,r,"===",l.strictEqual)},l.notStrictEqual=function(e,t,r){e===t&&g(e,t,r,"!==",l.notStrictEqual)},l.throws=function(e,t,r){w(!0,e,t,r)},l.doesNotThrow=function(e,t,r){w(!1,e,t,r)},l.ifError=function(e){if(e)throw e},l.strict=i(function e(t,r){t||g(t,!0,r,"==",e)},l,{equal:l.strictEqual,deepEqual:l.deepStrictEqual,notEqual:l.notStrictEqual,notDeepEqual:l.notDeepStrictEqual}),l.strict.strict=l.strict;var E=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":166,"util/":71}],69:[function(e,t,r){"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}},{}],70:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],71:[function(e,t,r){(function(t,i){(function(){
// distribute, sublicense, and/or sell copies of the Software, and to permit
var n=/%[sdj%]/g;r.format=function(e){if(!g(e)){for(var t=[],r=0;r=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(t)?i.showHidden=t:t&&r._extend(i,t),y(i.showHidden)&&(i.showHidden=!1),y(i.depth)&&(i.depth=2),y(i.colors)&&(i.colors=!1),y(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=h),f(i,e,i.depth)}function h(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function f(e,t,i){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(i,e);return g(n)||(n=f(e,n,i)),n}var s=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}(e,t);if(s)return s;var o=Object.keys(t),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),w(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return u(t);if(0===o.length){if(E(t)){var h=t.name?": "+t.name:"";return e.stylize("[Function"+h+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(v(t))return e.stylize(Date.prototype.toString.call(t),"date");if(w(t))return u(t)}var c,_="",M=!1,k=["{","}"];(d(t)&&(M=!0,k=["[","]"]),E(t))&&(_=" [Function"+(t.name?": "+t.name:"")+"]");return S(t)&&(_=" "+RegExp.prototype.toString.call(t)),v(t)&&(_=" "+Date.prototype.toUTCString.call(t)),w(t)&&(_=" "+u(t)),0!==o.length||M&&0!=t.length?i<0?S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=M?function(e,t,r,i,n){for(var s=[],o=0,a=t.length;o=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,_,k)):k[0]+_+k[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,r,i,n,s){var o,a,h;if((h=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?a=h.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):h.set&&(a=e.stylize("[Setter]","special")),O(i,n)||(o="["+n+"]"),a||(e.seen.indexOf(h.value)<0?(a=m(r)?f(e,h.value,null):f(e,h.value,r-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),y(o)){if(s&&n.match(/^\d+$/))return a;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function m(e){return null===e}function b(e){return"number"==typeof e}function g(e){return"string"==typeof e}function y(e){return void 0===e}function S(e){return _(e)&&"[object RegExp]"===M(e)}function _(e){return"object"==typeof e&&null!==e}function v(e){return _(e)&&"[object Date]"===M(e)}function w(e){return _(e)&&("[object Error]"===M(e)||e instanceof Error)}function E(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}r.debuglog=function(e){if(y(s)&&(s=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){t.pid;o[e]=function(){r.format.apply(r,arguments)}}else o[e]=function(){};return o[e]},r.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=m,r.isNullOrUndefined=function(e){return null==e},r.isNumber=b,r.isString=g,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=y,r.isRegExp=S,r.isObject=_,r.isDate=v,r.isError=w,r.isFunction=E,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":70,_process:178,inherits:69}],72:[function(e,t,r){(function(t){(function(){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh e.length)throw new RangeError("Index out of range")}function A(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,s){return t=+t,r>>>=0,s||A(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function I(e,t,r,n,s){return t=+t,r>>>=0,s||A(e,0,r,8),i.write(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>0)>>0},r.sum64_4_lo=function(e,t,r,i,n,s,o,a){return t+i+s+a>>>0},r.sum64_5_hi=function(e,t,r,i,n,s,o,a,h,c){var f=0,u=t;return f+=(u=u+i>>>0)>>0)>>0)