diff --git a/chain-post/index.html b/chain-post/index.html index 9f53338..034e28c 100644 --- a/chain-post/index.html +++ b/chain-post/index.html @@ -140,6 +140,6 @@ - + diff --git a/chain-post/js/doc.js b/chain-post/js/doc.js index bc8ee88..67ee4f1 100644 --- a/chain-post/js/doc.js +++ b/chain-post/js/doc.js @@ -5,6 +5,7 @@ const htmlAccountsList = `accounts-list` let sprintf = require(`sprintf-js`).sprintf , jQuery = require(`jquery`) + , urlParse = require(`url-parse`) , tool = require(`./tool`) , Storage = require(`./storage`).Storage , adapter = require(`./adapter`) @@ -297,21 +298,40 @@ function setHandlerLoadFacebook() { , facebookUrl = inputElement.val().replace(`www.facebook.com`, `m.facebook.com`) , photoUrl = null , buttonElement = jQuery(this).find(`.btn-primary`) + , onePhotoMode = false + , defaultTags = `facebook` ; buttonElement.prop(constant.htmlNames.disabledPropName, true); - if (false === facebookUrl.startsWith(`https://m.facebook.com/photo.php`)) { - console.error(sprintf(`Only facebook photo supported, received: "%s".`, facebookUrl)); - buttonElement.prop(constant.htmlNames.disabledPropName, false); + if (facebookUrl.startsWith(`https://m.facebook.com/photo.php`)) { + onePhotoMode = true; + } + if (facebookUrl.startsWith(`https://m.facebook.com/permalink.php`)) { + let parsed = urlParse(facebookUrl) + , queryParts = parsed.query.slice(1).split(`&`) + , queryParams = {} + , urlPattern = `https://m.facebook.com/%s/posts/pcb.%s/` + ; - return false; + for (let i in queryParts) { + let [key, val] = queryParts[i].split(`=`); + queryParams[key] = decodeURIComponent(val); + } + + facebookUrl = sprintf(urlPattern, queryParams.id, queryParams.story_fbid); } if (false === facebookUrl.includes(`locale=`)) { - facebookUrl += `&locale=ru_RU`; + let localeString = `locale=ru_RU`; + if (facebookUrl.endsWith(`/`)) { + localeString = `?` + localeString; + } else { + localeString = `&` + localeString; + } + facebookUrl += localeString; } - function fbProcess(config) { + function fbOnePhotoProcess(config) { // console.log(config); let el = jQuery( `
` ); @@ -337,10 +357,64 @@ function setHandlerLoadFacebook() { ); } - jQuery(constant.htmlNavigation.titleBlock).val(postTitle); - jQuery(constant.htmlNavigation.bodyBlock).val(postBody); - jQuery(constant.htmlNavigation.tagsBlock).val(`facebook`); - jQuery(constant.htmlNavigation.imagesBlock).val(JSON.stringify([photoUrl.replace(/&/g, `&`)])); + fbFillSubmitFormAndCloseModal( + postTitle, + postBody, + defaultTags, + JSON.stringify([photoUrl.replace(/&/g, `&`)]) + ); + } + function fbStoryProcess(content) { + let postTitle = `` + , postBody = `` + , postImages = `` + ; + + let textTitles = content.match(/"title":{"text":"(.+?)"/g) + , titles = [] + ; + for (let i in textTitles) { + let titleObj = JSON.parse(sprintf(`{%s}}`, textTitles[i])); + + titles.push(titleObj.title.text); + } + if (titles.length > 1) { + postTitle = titles[1]; + } else if (titles.length > 0) { + postTitle = titles[0]; + } + + let images = content.match(/"full_width_image":{"uri":"(.+?)"/g) + , imagesUrls = [] + ; + for (let i in images) { + let imageObj = JSON.parse(sprintf(`{%s}}`, images[i])); + + imagesUrls.push(imageObj.full_width_image.uri); + } + if (imagesUrls.length > 0) { + postImages = JSON.stringify(imagesUrls); + } + + let textBody = content.match(/"message":{"text":"(.+?)"/); + if (textBody && textBody.length > 1) { + let textObj = JSON.parse(sprintf(`{"body":"%s"}`, textBody[1])); + + postBody = sprintf( + constant.htmlPieces.facebookPostBodyPattern, + textObj.body, + imagesUrls.join(`\n\n`), + facebookUrl.replace(`m.facebook.com`, `www.facebook.com`) + ); + } + + fbFillSubmitFormAndCloseModal(postTitle, postBody, defaultTags, postImages); + } + function fbFillSubmitFormAndCloseModal(title, body, tags, images) { + jQuery(constant.htmlNavigation.titleBlock).val(title); + jQuery(constant.htmlNavigation.bodyBlock).val(body); + jQuery(constant.htmlNavigation.tagsBlock).val(tags); + jQuery(constant.htmlNavigation.imagesBlock).val(images); jQuery(`#facebookModal .close`).trigger(`click`); inputElement.val(``); @@ -350,22 +424,24 @@ function setHandlerLoadFacebook() { jQuery.getJSON( `https://allorigins.me/get?url=` + encodeURIComponent(facebookUrl) + `&callback=?`, function(data) { - // console.log(data.contents); - - let el = jQuery( `
` ); - el.html(data.contents); - - photoUrl = jQuery(`meta[property="og:image"]`, el).attr(`content`).replace(/&/g, `&`); - - let fbData = jQuery(`script:contains('require("MRenderingScheduler").getInstance().schedule({"id":"MPhotoContent"')`, el) - .text() - .replace( - `require("MRenderingScheduler").getInstance().schedule`, - `fbProcess` - ) - ; - - eval(fbData); + if (onePhotoMode) { + let el = jQuery(`
`); + el.html(data.contents); + + photoUrl = jQuery(`meta[property="og:image"]`, el).attr(`content`).replace(/&/g, `&`); + + let fbData = jQuery(`script:contains('require("MRenderingScheduler").getInstance().schedule({"id":"MPhotoContent"')`, el) + .text() + .replace( + `require("MRenderingScheduler").getInstance().schedule`, + `fbOnePhotoProcess` + ) + ; + + eval(fbData); + } else { + fbStoryProcess(data.contents); + } } ); }); diff --git a/chain-post/js/main.min.js b/chain-post/js/main.min.js index 6aec60f..f34d0f6 100644 --- a/chain-post/js/main.min.js +++ b/chain-post/js/main.min.js @@ -1 +1 @@ -!function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var f="function"==typeof require&&require;if(!s&&f)return f(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[a]={exports:{}};t[a][0].call(u.exports,function(e){return i(t[a][1][e]||e)},u,u.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a0&&(s[1][1].extensions=[[0,{beneficiaries:a}]]),s}buildPostBody(e){let t=this.constructor.getPlaceholders();for(let r in t)e=e.replace(new RegExp(r,"g"),t[r]);return c.stripPlaceholders(e)+a.postBodySign}async broadcastSend(e,t,r,n){for(;!0===this.connection.config.get(i);)console.log(this.name+":broadcastSend: wait execution for 1 sec"),await f(1e3);this.reconnect();let o=this;o.connection.config.set(i,!0),o.connection.api.getContent(t,r,function(t,a){if(t)return c.handlePublishError(o.name,t),void o.connection.config.set(i,!1);a.permlink===r&&(r=r+"-"+Math.floor(Date.now()/1e3),n[0][1].permlink=r,n[1][1].permlink=r),o.connection.broadcast.send({extensions:[],operations:n},{posting:e},function(e,t){o.connection.config.set(i,!1),e?c.handlePublishError(o.name,e):c.handleSuccessfulPost(o.name,t)})})}}class l extends u{constructor(){super(),this.name=a.adapterSteem,this.connection=e("@steemit/steem-js"),!1===this.connection.config.get(i)&&this.reconnect()}static getCurrency(){return"SBD"}static getPlaceholders(){return Object.assign({},super.getPlaceholders(),a.steemPlaceholders)}reconnect(){this.connection.api.setOptions({url:"https://api.steemit.com"}),this.connection.config.set("address_prefix","STM"),this.connection.config.set("chain_id","0000000000000000000000000000000000000000000000000000000000000000")}}class h extends u{constructor(){super(),this.name=a.adapterGolos,this.connection=e("golos-js")}static getCurrency(){return"GBG"}static getPlaceholders(){return Object.assign({},super.getPlaceholders(),a.golosPlaceholders)}static buildBeneficiaries(e){let t=super.buildBeneficiaries(e);return"as_golosio"in e&&e.as_golosio&&t.push({account:"golosio",weight:1e3}),"for_vik"in e&&e.for_vik&&(t.push({account:"vik",weight:100*e.for_vik}),t.push({account:"netfriend",weight:1e3})),t}}class d extends u{constructor(){super(),this.name=a.adapterVox,this.connection=e("@steemit/steem-js"),!1===this.connection.config.get(i)&&this.reconnect()}static getCurrency(){return"GOLD"}static getPlaceholders(){return Object.assign({},super.getPlaceholders(),a.voxPlaceholders)}static buildBeneficiaries(e){let t=super.buildBeneficiaries(e);return"for_ds"in e&&e.for_ds&&t.push({account:"denis-skripnik",weight:100}),t}static buildJsonMetadata(e,t){let r=super.buildJsonMetadata(e,t);return"for_ds"in t&&t.for_ds&&(r.tags=e.concat(["dpos-post"])),r}reconnect(){this.connection.api.setOptions({url:"wss://vox.community/ws"}),this.connection.config.set("address_prefix","VOX"),this.connection.config.set("chain_id","88a13f63de69c3a927594e07d991691c20e4cf1f34f83ae9bd26441db42a8acd")}}class p extends u{constructor(){super(),this.name=a.adapterWls,this.connection=e("wlsjs-staging"),this.connection.api.setOptions({url:"https://rpc.wls.services"})}static getCurrency(){return"WLS"}static getPlaceholders(){return Object.assign({},super.getPlaceholders(),a.wlsPlaceholders)}}class b extends u{constructor(){super(),this.name=a.adapterSerey,this.connection=e("@steemit/steem-js"),!1===this.connection.config.get(i)&&this.reconnect()}static getCurrency(){return"SRD"}static getPlaceholders(){return Object.assign({},super.getPlaceholders(),a.sereyPlaceholders)}static getPercentSteemDollars(){return 0}reconnect(){this.connection.api.setOptions({url:"wss://serey.io/wss"}),this.connection.config.set("address_prefix","SRY"),this.connection.config.set("chain_id","3b9a062c4c1f4338f6932ec8bfc083d99369df7479467bbab1811976181b0daf")}}class m extends u{constructor(){super(),this.name=a.adapterWeku,this.connection=e("@steemit/steem-js"),!1===this.connection.config.get(i)&&this.reconnect()}static getCurrency(){return"WKD"}static getPlaceholders(){return Object.assign({},super.getPlaceholders(),a.wekuPlaceholders)}static buildBeneficiaries(e){return[]}static buildJsonMetadata(e,t){let r=super.buildJsonMetadata(e,t);return r.tags=["community-deals"].concat(e),r}reconnect(){this.connection.api.setOptions({url:"wss://news.weku.io:8190"}),this.connection.config.set("address_prefix","WKA"),this.connection.config.set("chain_id","b24e09256ee14bab6d58bfa3a4e47b0474a73ef4d6c47eeea007848195fa085e")}}class y extends u{constructor(){super(),this.name=a.adapterSmoke,this.connection=e("@steemit/steem-js"),!1===this.connection.config.get(i)&&this.reconnect()}static getCurrency(){return"SMOKE"}static getPlaceholders(){return Object.assign({},super.getPlaceholders(),a.smokePlaceholders)}reconnect(){this.connection.api.setOptions({url:"https://rpc.smoke.io"}),this.connection.config.set("address_prefix","SMK"),this.connection.config.set("chain_id","1ce08345e61cd3bf91673a47fc507e7ed01550dab841fd9cdb0ab66ef576aaf0")}buildOperations(e,t,r,n,i){let o=super.buildOperations(e,t,r,n,i);return o.splice(1,1),o}}t.exports={isWif:function(t){return e("golos-js").auth.isWif(t)},AbstractAdapter:u}},{"./constant":3,"./tool":6,"@steemit/steem-js":46,"golos-js":221,"sleep-promise":439,"sprintf-js":440,"wlsjs-staging":485}],2:[function(e,t,r){let n=e("./doc"),i=e("./constant");jQuery(document).ready(function(e){e('[data-toggle="tooltip"]').tooltip();let t={};t[i.adapterSteem]={title:"Steem",title_style:"width: 235px;"},t[i.adapterGolos]={title:"Golos",title_style:"width: 225px;",append_html:'\n
\n \n \n
\n\n
\n
\n
\n \n \n
\n
\n \n \n \n \n
\n '},t[i.adapterWls]={title:"Whaleshares",title_style:"width: 315px;"},t[i.adapterSerey]={title:"Serey",title_style:"width: 230px;"},t[i.adapterWeku]={title:"Weku",title_style:"width: 225px;"},t[i.adapterSmoke]={title:"Smoke",title_style:"width: 240px;"},t[i.adapterVox]={title:"Vox",title_style:"width: 270px;",append_html:'\n
\n \n \n
\n '};let r={},o=[];r[i.adapterSteem]=o,r[i.adapterGolos]=[{type:"checkbox",html_id:i.adapterGolos+"-as-golosio",key:"as_golosio"},{type:"int",html_id:i.adapterGolos+"-for-vik",key:"for_vik"}],r[i.adapterWls]=o,r[i.adapterSerey]=o,r[i.adapterWeku]=o,r[i.adapterSmoke]=o,r[i.adapterVox]=[{type:"checkbox",html_id:i.adapterVox+"-for-ds",key:"for_ds"}],n.addSections(t),n.fillAccountsList(),n.setHandlerAddAccount(),n.setHandlerChangeAccount(),n.setHandlerChangeGolosVik(),n.setHandlerPostPublish(r),n.setHandlerLoadFacebook(),n.setHandlerResetButton()})},{"./constant":3,"./doc":4}],3:[function(e,t,r){const n={publishAdaptersCount:"pac"},i={"{f_zavz9t}":"---\n
\n### [![](https://s19.postimg.cc/855m162ab/27cb8858fa0dfe41d2b1190533c8af9a63-32x32.png)](https://steemit.com/@zavz9t)   [![](https://i.postimg.cc/FHPx155H/WLS-32.png)](https://whaleshares.io/@zavz9t)   [![](https://s19.postimg.cc/7tsr21vrn/1480-32x32.png)](https://golos.io/@zavz9t)   [![VOX](https://s19.postimg.cc/fgjyfjt4j/vox-32.png)](https://vox.community/@zavz9t)   [![Serey](https://i.postimg.cc/XNfxDkn4/serey-32.png)](https://serey.io/@zavz9t)   [![Weku](https://i.postimg.cc/P5j6LdMG/weku-32.png)](https://deals.weku.io/@zavz9t)\n
\n","{f_lego-cat}":"---\n
\n### [![](https://s19.postimg.cc/855m162ab/27cb8858fa0dfe41d2b1190533c8af9a63-32x32.png)](https://steemit.com/@lego-cat)   [![](https://i.postimg.cc/FHPx155H/WLS-32.png)](https://whaleshares.io/@lego-cat)   [![](https://s19.postimg.cc/7tsr21vrn/1480-32x32.png)](https://golos.io/@lego-cat)   [![VOX](https://s19.postimg.cc/fgjyfjt4j/vox-32.png)](https://vox.community/@lego-cat)   [![Serey](https://i.postimg.cc/XNfxDkn4/serey-32.png)](https://serey.io/@lego-cat)   [![Weku](https://i.postimg.cc/P5j6LdMG/weku-32.png)](https://deals.weku.io/@lego-cat)\n
\n","{f_v-mi}":"---\n
\n### [![](https://s19.postimg.cc/855m162ab/27cb8858fa0dfe41d2b1190533c8af9a63-32x32.png)](https://steemit.com/@v-mi)   [![](https://i.postimg.cc/FHPx155H/WLS-32.png)](https://whaleshares.io/@v-mi)   [![](https://s19.postimg.cc/7tsr21vrn/1480-32x32.png)](https://golos.io/@v-mi)   [![VOX](https://s19.postimg.cc/fgjyfjt4j/vox-32.png)](https://vox.community/@v-mi)   [![Serey](https://i.postimg.cc/XNfxDkn4/serey-32.png)](https://serey.io/@v-mi)\n
\n","{f_a-s}":"---\n
\n### [![](https://s19.postimg.cc/855m162ab/27cb8858fa0dfe41d2b1190533c8af9a63-32x32.png)](https://steemit.com/@alba-stories)   [![](https://i.postimg.cc/FHPx155H/WLS-32.png)](https://whaleshares.io/@alba-stories)   [![](https://s19.postimg.cc/7tsr21vrn/1480-32x32.png)](https://golos.io/@alba-stories)   [![VOX](https://s19.postimg.cc/fgjyfjt4j/vox-32.png)](https://vox.community/@alba-stories)   [![Serey](https://i.postimg.cc/XNfxDkn4/serey-32.png)](https://serey.io/@alba-stories)\n
\n","{f_cc_ua}":"---\n\n## Декілька слів про те, куди Ви попали\n\nДаний розділ починався з того, що я ділився горнятками кави, які я отримував і бачив у різноманітних закладах. Оскільки вони часто бували яскравими та веселими, то я вирішив ними ділитися з тими, кому це цікаво. Пізніше, я побачив, що є багато різноманітних горняток навколо, то я почав ділитися і ними також, а назва залишилася, як ознака того, з чого все почалося 😉\n\n
![](https://s19.postimg.cc/bw7u1jeyr/shutterstock_1012867498.jpg)
\n","{f_cc_ru}":"\n*ваш @zavz9t*\n\n---\n\n## Несколько слов о том, куда Вы попали\n\nДанный раздел начинался с того, что я делился чашечками кофе, которые я видел в различных заведениях. Поскольку они были весёлыми и забавными, то я решил ними делиться с теми, кому интересно. Позже я увидел много интересных чашек без кофе и не смог пройти мимо, а название осталось как воспоминание о том, с чего все началось 😉\n\n
![](https://s19.postimg.cc/bw7u1jeyr/shutterstock_1012867498.jpg)
\n\n---\n\n
![](https://i.postimg.cc/05thg3rP/Ukraine-_Flag-16.png) Український варіант постів можна знайти в блозі @zavz9t
\n","{f_cc_en}":"\n*best regards, @zavz9t*\n\n---\n\n## Several words about this section\n\nThis section started from cups with coffee which I saw in different places. They were funny and interesting so I decided share them with you. Afterwards I saw many interesting mugs and cups without coffee, but decided share them too. But section name remained the same 😉\n\n
![](https://s19.postimg.cc/bw7u1jeyr/shutterstock_1012867498.jpg)
\n\n---\n\n
![](https://i.postimg.cc/05thg3rP/Ukraine-_Flag-16.png) Український варіант постів можна знайти в блозі @zavz9t
\n","{f_ad_ua}":'---\n\n### Декілька слів про розділ\n\nВ книжці **"Бог завжди подорожує інкогніто"** я прочитав про метод підвищення/формування самооцінки, вона ж впевненість у собі: протягом 100 днів записувати мінімум 3 речі, якими пишаєшся, завдяки яким - день не пройшов дарма. Мене це зацікавило, то я вирішив спробувати.\n\n
**Подивимось що з цього вийде 🙂**
\n\n---\n\n
[Джерело картинки](https://pixabay.com/en/list-icon-symbol-paper-sign-flat-2389219/)
\n',"{f_bl_ua}":"---\n\n### Декілька слів про те, де ви є 😉\n\nВ якийсь момент я усвідомив, що проходжу повз цікаві речі і навіть їх не помічаю. Враження, що працює автопілот...\n\nЦе мені не сподобалося, тому я вирішив щось змінити! Тому почав уважніше ставитися до того, що знаходиться і відбувається навколо мене. Завдяки цьому, я відкрив для себе новий світ, яким і ділюся з вами 😊\n","{f_bl_ru}":"\n*ваш @zavz9t*\n\n---\n\n### Несколько слов о том, куда Вы попали\n\nОднажды я обратил внимание, что прохожу мимо очень интересных вещей даже не обращая на них внимание...\n\nТогда я решил это исправить, в результате открыл для себя много интересного! А когда открыл, то решил поделиться ☺️\n\n---\n\n
![](https://i.postimg.cc/05thg3rP/Ukraine-_Flag-16.png) Український варіант постів можна знайти в блозі @zavz9t
\n","{f_bl_en}":"\n*best regards, @zavz9t*\n\n---\n\n### Several words about this section\n\nOnce I noticed that I do not saw many interesting things when I walking outside...\n\nI decided to change this and discovered a new world that surrounds me! Today I share it with you ☺️\n\n---\n\n
![](https://i.postimg.cc/05thg3rP/Ukraine-_Flag-16.png) Український варіант постів можна знайти в блозі @zavz9t
\n"},o={"{img_p_4}":"https://steemitimages.com/400x0/","{img_p_8}":"https://steemitimages.com/800x0/","{f_bl_ru}":"\n*ваш @lego-cat*\n\n---\n\n### Несколько слов о том, куда Вы попали\n\nОднажды я обратил внимание, что прохожу мимо очень интересных вещей даже не обращая на них внимание...\n\nТогда я решил это исправить, в результате открыл для себя много интересного! А когда открыл, то решил поделиться ☺️\n\n---\n\n
![](https://i.postimg.cc/05thg3rP/Ukraine-_Flag-16.png) Пости даного розділу можна прочитати українською мовою в блозі @lego-cat
\n","{f_bl_en}":"\n\n---\n\n### Several words about this section\n\nOnce I noticed that I do not saw many interesting things when I walking outside...\n\nI decided to change this and discovered a new world that surrounds me! Today I share it with you ☺️\n"},a={"{img_p_4}":"https://imgp.golos.io/400x0/","{img_p_8}":"https://imgp.golos.io/800x0/","{f_bl_ru}":"*ваш @lego-cat*\n\n---\n\n### Несколько слов о том, куда Вы попали\n\nОднажды я обратил внимание, что прохожу мимо очень интересных вещей даже не обращая на них внимание...\n\nТогда я решил это исправить, в результате открыл для себя много интересного! А когда открыл, то решил поделиться ☺️\n\n---\n\n
![](https://i.postimg.cc/05thg3rP/Ukraine-_Flag-16.png) Пости даного розділу можна прочитати українською мовою в блозі @lego-cat
\n","{f_bl_en}":"\n\n---\n\n### Several words about this section\n\nOnce I noticed that I do not saw many interesting things when I walking outside...\n\nI decided to change this and discovered a new world that surrounds me! Today I share it with you ☺️\n\n"},s={"{img_p_4}":"https://whaleshares.io/imageproxy/400x0/","{img_p_8}":"https://whaleshares.io/imageproxy/800x0/"},f={"{img_p_4}":"https://serey.io/imageproxy/400x0/","{img_p_8}":"https://serey.io/imageproxy/800x0/"},c={"{img_p_4}":"https://smoke.io/smokeimageproxy/400x0/","{img_p_8}":"https://smoke.io/smokeimageproxy/800x0/"},u={golos:"https://golos.io",steem:"https://steemit.com",vox:"https://vox.community",wls:"https://whaleshares.io",serey:"https://serey.io",weku:"https://deals.weku.io",smoke:"https://smoke.io"},l={titleBlock:"#title",bodyBlock:"#body",tagsBlock:"#tags",imagesBlock:"#images",submitButton:"#submit-btn",resetButton:"#reset-btn",resultBlock:"#result",resultLastItem:"#result div:last",golosVik:"#golos-vik-enable",golosVikValue:"#golos-for-vik",golosVikSettings:".golos-vik-settings",facebookLoadForm:"#facebook-load-form"},h={invalidClassName:"is-invalid",disabledPropName:"disabled",loadingClassName:"loading",invisibleClassName:"invisible"},d={adapterSection:'\n
\n\n

%2$s %2$s Account

\n\n
\n \n
\n\n
\n \n
\n\n
\n
\n
\n
\n
@
\n
\n \n
\n Username cannot be blank.\n
\n
\n
\n
\n \n
\n WIF is empty or has invalid value.\n
\n
\n
\n \n
\n
\n ',publishSuccess:'\n ',publishError:'\n ',publishWarning:'\n ',facebookPostBodyPattern:"%s\n\n%s\n\n---\n\n
[Original Post at Facebook](%s)
"};t.exports={storageKeys:n,placeholders:i,steemPlaceholders:o,golosPlaceholders:a,wlsPlaceholders:s,voxPlaceholders:{},sereyPlaceholders:f,wekuPlaceholders:{},smokePlaceholders:c,postBodySign:"\n\n---\n\n######
https://i.postimg.cc/Kzt4Myqq/chain-post-logo-32.png *published by @chain-post*   [![Steem](https://i.postimg.cc/MpFVhrVH/steem-16.png) ![Golos](https://i.postimg.cc/rpRxcCNJ/golos-16.png) ![WLS](https://i.postimg.cc/h4yw3Khq/WLS-16.png) ![Serey](https://i.postimg.cc/TwSs1cz3/serey-16.png) ![Weku](https://i.postimg.cc/wTJfT1Lc/weku-16.png) ![Smoke](https://i.postimg.cc/1zsb19rP/smoke-16.png)](https://zavz9t.github.io/chain-post/)
\n",adapterSteem:"steem",adapterGolos:"golos",adapterWls:"wls",adapterVox:"vox",adapterSerey:"serey",adapterWeku:"weku",adapterSmoke:"smoke",adapterToHost:u,htmlNavigation:l,htmlNames:h,htmlPieces:d}},{}],4:[function(require,module,exports){const htmlAccountsList="accounts-list",htmlUsername="username",htmlWif="wif";let sprintf=require("sprintf-js").sprintf,jQuery=require("jquery"),tool=require("./tool"),Storage=require("./storage").Storage,adapter=require("./adapter"),constant=require("./constant");function addSections(e){let t=tool.parseFunctionName(arguments.callee.toString());if(!e||e.length<1)return void console.log(t+": No sections was received.");let r=jQuery("#form");if(!r||r.length<1)console.log(sprintf('%s: Container by id "%s" was not found.',t,"form"));else for(let t in e){let n=sprintf(constant.htmlPieces.adapterSection,t,e[t].title,e[t].title_style,constant.adapterToHost[t]),i="append_html";i in e[t]&&(n+=e[t][i]),jQuery(r).append(n)}}function fillAccountsList(){jQuery(sprintf(".%s",htmlAccountsList)).each(function(){let e=tool.getElementSection(this),t=Storage.getAccounts(e);if(t){t.sort();for(let r in t)addAccountToList(e,t[r])}})}function addAccountToList(e,t,r){let n=jQuery(sprintf("#%s-%s",e,htmlAccountsList)),i=!1;n.children().each(function(){jQuery(this).attr("value")===t&&(i=!0)}),!1===i?(n.append(sprintf('',t)),r&&n.val(t)):r&&n.val(t)}function setHandlerAddAccount(){jQuery(".btn-add-account").on("click",function(e){e.preventDefault(),e.stopPropagation();let t=jQuery(this),r=tool.getElementSection(this),n=jQuery(sprintf("#%s-%s",r,htmlUsername)),i=jQuery(sprintf("#%s-%s",r,htmlWif));t.prop(constant.htmlNames.disabledPropName,!0),n.removeClass(constant.htmlNames.invalidClassName),i.removeClass(constant.htmlNames.invalidClassName);let o=!0,a=n.val(),s=i.val();if(a||(n.addClass(constant.htmlNames.invalidClassName),o=!1),s&&!1!==adapter.isWif(s)||(i.addClass(constant.htmlNames.invalidClassName),o=!1),!1===o)return t.prop(constant.htmlNames.disabledPropName,!1),!1;adapter.AbstractAdapter.factory(r).isWifValid(a,s,function(e,r,n){Storage.addAccount(e,r,n),addAccountToList(e,r,!0),t.prop(constant.htmlNames.disabledPropName,!1),console.log(e,"User WIF is correct.")},function(e){console.error(e),t.prop(constant.htmlNames.disabledPropName,!1),i.addClass(constant.htmlNames.invalidClassName)})})}function setHandlerChangeAccount(){jQuery(sprintf(".%s",htmlAccountsList)).on("change",function(e){e.preventDefault(),e.stopPropagation();let t=tool.getElementSection(this),r=jQuery(sprintf("#%s-%s",t,htmlUsername)),n=jQuery(sprintf("#%s-%s",t,htmlWif));r.removeClass(constant.htmlNames.invalidClassName),n.removeClass(constant.htmlNames.invalidClassName);let i=jQuery(this).val();if(!i)return r.val(""),n.val(""),!1;let o=Storage.getAccountWif(t,i);r.val(i),n.val(o)})}function setHandlerChangeGolosVik(){jQuery(constant.htmlNavigation.golosVik).on("change",function(e){e.preventDefault(),e.stopPropagation(),jQuery(this).is(":checked")?(jQuery(constant.htmlNavigation.golosVikValue).val(10),jQuery(constant.htmlNavigation.golosVikSettings).removeClass(constant.htmlNames.invisibleClassName)):(jQuery(constant.htmlNavigation.golosVikValue).val(""),jQuery(constant.htmlNavigation.golosVikSettings).addClass(constant.htmlNames.invisibleClassName))})}function setHandlerPostPublish(e){jQuery("#form").on("submit",function(t){t.preventDefault(),t.stopPropagation();let r=jQuery(constant.htmlNavigation.submitButton),n=!0,i=jQuery(constant.htmlNavigation.titleBlock),o=i.val().trim(),a=jQuery(constant.htmlNavigation.bodyBlock),s=a.val(),f=jQuery(constant.htmlNavigation.tagsBlock),c=tool.handleTags(f.val().trim()),u=jQuery(constant.htmlNavigation.imagesBlock).val();if(u&&(u=JSON.parse(u)),tool.startPublishing(r),i.removeClass(constant.htmlNames.invalidClassName),a.removeClass(constant.htmlNames.invalidClassName),f.removeClass(constant.htmlNames.invalidClassName),o||(i.addClass(constant.htmlNames.invalidClassName),tool.scrollTo(constant.htmlNavigation.titleBlock),n=!1),s||(a.addClass(constant.htmlNames.invalidClassName),n&&tool.scrollTo(constant.htmlNavigation.bodyBlock),n=!1),(!c||c.length<1)&&(f.addClass(constant.htmlNames.invalidClassName),n&&tool.scrollTo(constant.htmlNavigation.tagsBlock),n=!1),!1!==n){tool.scrollTo(constant.htmlNavigation.resultBlock);for(let t in e){let r=tool.stripAccount(jQuery(sprintf("#%s-username",t)).val()),n=tool.stripWif(jQuery(sprintf("#%s-wif",t)).val()),i=tool.handleTags(jQuery(sprintf("#%s-tags",t)).val());if(r&&n){tool.increasePublishAdapters();let a=adapter.AbstractAdapter.factory(t),f={images:u};if(e[t]&&e[t].length>0)for(let r in e[t]){let n=null,i=jQuery("#"+e[t][r].html_id);switch(e[t][r].type){case"checkbox":n=i.is(":checked");break;case"int":n=1*i.val();break;case"text":n=i.val();break;default:throw sprintf('Option type "%s" is not implemented yet...',e[t][r].type)}f[e[t][r].key]=n}a.publish(n,r,o,s,i||c,f)}}tool.finishPublishing()}else tool.finishPublishing()})}function setHandlerLoadFacebook(){jQuery(constant.htmlNavigation.facebookLoadForm).on("submit",function(e){e.preventDefault(),e.stopPropagation();let inputElement=jQuery(this).find("input"),facebookUrl=inputElement.val().replace("www.facebook.com","m.facebook.com"),photoUrl=null,buttonElement=jQuery(this).find(".btn-primary");if(buttonElement.prop(constant.htmlNames.disabledPropName,!0),!1===facebookUrl.startsWith("https://m.facebook.com/photo.php"))return console.error(sprintf('Only facebook photo supported, received: "%s".',facebookUrl)),buttonElement.prop(constant.htmlNames.disabledPropName,!1),!1;function fbProcess(e){let t=jQuery("
");t.html(e.content.__html);let r=jQuery("#voice_replace_id",t),n=r.text().replace("—","").trim();r.remove(),jQuery("img.img",t).each(function(){jQuery(this).remove()});let i=jQuery(".msg div",t).html().replace(/
/g,"

");i&&(i=sprintf(constant.htmlPieces.facebookPostBodyPattern,i,photoUrl,facebookUrl.replace("m.facebook.com","www.facebook.com"))),jQuery(constant.htmlNavigation.titleBlock).val(n),jQuery(constant.htmlNavigation.bodyBlock).val(i),jQuery(constant.htmlNavigation.tagsBlock).val("facebook"),jQuery(constant.htmlNavigation.imagesBlock).val(JSON.stringify([photoUrl.replace(/&/g,"&")])),jQuery("#facebookModal .close").trigger("click"),inputElement.val(""),buttonElement.prop(constant.htmlNames.disabledPropName,!1)}!1===facebookUrl.includes("locale=")&&(facebookUrl+="&locale=ru_RU"),jQuery.getJSON("https://allorigins.me/get?url="+encodeURIComponent(facebookUrl)+"&callback=?",function(data){let el=jQuery("
");el.html(data.contents),photoUrl=jQuery('meta[property="og:image"]',el).attr("content").replace(/&/g,"&");let fbData=jQuery('script:contains(\'require("MRenderingScheduler").getInstance().schedule({"id":"MPhotoContent"\')',el).text().replace('require("MRenderingScheduler").getInstance().schedule',"fbProcess");eval(fbData)})})}function setHandlerResetButton(){jQuery(constant.htmlNavigation.resetButton).on("click",function(e){e.preventDefault(),e.stopPropagation(),location.reload()})}module.exports={addSections:addSections,fillAccountsList:fillAccountsList,setHandlerAddAccount:setHandlerAddAccount,setHandlerChangeAccount:setHandlerChangeAccount,setHandlerChangeGolosVik:setHandlerChangeGolosVik,setHandlerPostPublish:setHandlerPostPublish,setHandlerLoadFacebook:setHandlerLoadFacebook,setHandlerResetButton:setHandlerResetButton}},{"./adapter":1,"./constant":3,"./storage":5,"./tool":6,jquery:241,"sprintf-js":440}],5:[function(e,t,r){const n="accounts",i="u-s";e("sprintf-js").sprintf;let o=e("local-storage"),a=e("fingerprintjs2sync"),s=e("crypto-js");class f{static addAccount(e,t,r){let i=o.get(n);i||(i={}),i[e]||(i[e]={}),i[e][t]=s.AES.encrypt(r,f.getSecretKey()).toString(),o.set(n,i)}static getAccountWif(e,t){let r=o.get(n);return r&&r[e]&&r[e][t]?s.AES.decrypt(r[e][t],f.getSecretKey()).toString(s.enc.Utf8):null}static getAccounts(e){let t=o.get(n);return t&&t[e]?Object.keys(t[e]):[]}static getSecretKey(){let e=o.get(i);return e||(e=(new a).getSync().fprint,o.set(i,e)),e}}t.exports={Storage:f}},{"crypto-js":124,fingerprintjs2sync:187,"local-storage":244,"sprintf-js":440}],6:[function(e,t,r){let n=e("sprintf-js").sprintf,i=e("jquery"),o=e("./constant"),a=e("sessionstorage");function s(e,t,r){t=void 0===t?"-":t,r=void 0===r?"ru--":r;let n={"ые":"yie","щ":"shch","ш":"sh","ч":"ch","ц":"cz","й":"ij","ё":"yo","э":"ye","ю":"yu","я":"ya","х":"kh","ж":"zh","а":"a","б":"b","в":"v","ґ":"g","г":"g","д":"d","е":"e","є":"e","з":"z","и":"i","і":"i","ї":"i","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","ъ":"xx","ы":"y","ь":"x"};if(!e)return"";let i=e.toLowerCase().replace(/[\s,\.\/]/g,t),o=i;for(let e in n)i=i.replace(new RegExp(e,"gu"),n[e]);let a=!1;return o!==i&&(a=!0),(i=i.replace(new RegExp("[^a-z0-9\\"+t+"]","g"),"").replace(new RegExp(t+"+","g"),t))[0]===t&&(i=i.substring(1)),i[i.length-1]===t&&(i=i.substring(0,i.length-1)),a&&(i=r+i),i}function f(){let e=a.getItem(o.storageKeys.publishAdaptersCount);e&&0!==e?e--:e=0,a.setItem(o.storageKeys.publishAdaptersCount,e)}function c(){return 0!=1*a.getItem(o.storageKeys.publishAdaptersCount)}function u(){!1===c()&&(i(o.htmlNavigation.submitButton).prop(o.htmlNames.disabledPropName,!1),i(o.htmlNavigation.submitButton).removeClass(o.htmlNames.loadingClassName))}function l(e,t){console.warn(t),i(o.htmlNavigation.resultBlock).append(n(o.htmlPieces.publishWarning,e,t)),u(),h(o.htmlNavigation.resultLastItem)}function h(e){i("html, body").stop().animate({scrollTop:i(e).offset().top-160},1e3)}function d(e){let t=e.substr("function ".length);return t.substr(0,t.indexOf("("))}t.exports={stripAndTransliterate:s,stripAccount:function(e){return e.toLowerCase().replace(/\s+/g,"").replace(/@/g,"")},stripWif:function(e){return e.replace(/\s+/g,"")},buildDefaultPermlink:function(e,t,r){return r=r||new Date,e=e.replace(/@/g,""),(t=t.replace(/@/g,""))+"-"+e+"-"+r.getUTCFullYear()+"-"+(r.getUTCMonth()+1)+"-"+r.getUTCDate()+"-"+r.getHours()+"-"+r.getMinutes()+"-"+r.getSeconds()},isTest:function(e){return e=e||window.location.href,new URL(e).searchParams.get("test")},handleTags:function(e){if(!(e=e.replace(/,/g," ").replace(/\s+/g," ").trim()))return"";e=e.split(" ");let t=[];for(let r in e)t.push(s(e[r]));return t},stripPlaceholders:function(e){return e.replace(/{.*}/g,"")},scrollTo:h,increasePublishAdapters:function(){let e=a.getItem(o.storageKeys.publishAdaptersCount);e?e++:e=1,a.setItem(o.storageKeys.publishAdaptersCount,e)},decreasePublishAdapters:f,areAdaptersPublishing:c,startPublishing:function(e){i(e).prop(o.htmlNames.disabledPropName,!0),i(e).addClass(o.htmlNames.loadingClassName)},finishPublishing:u,handleSuccessfulPost:function(e,t){f(),console.log(e,t);let r=d(arguments.callee.toString()),a=void 0;if(!(e in o.adapterToHost))return void l(e,n('%s: Received section "%s" is not implemented yet!',r,e));for(let e in t.operations)if("comment"===t.operations[e][0]){a=t.operations[e][1];break}if(!a)return void l(e,n('%s: Operation "comment" for section "%s" was not found in result.',r,e));let s=n("%s/%s/@%s/%s",o.adapterToHost[e],a.parent_permlink,a.author,a.permlink);i(o.htmlNavigation.resultBlock).append(n(o.htmlPieces.publishSuccess,e,s)),u(),h(o.htmlNavigation.resultLastItem)},handlePublishError:function(e,t){f(),console.error(e,t),i(o.htmlNavigation.resultBlock).append(n(o.htmlPieces.publishError,e,t)),u(),h(o.htmlNavigation.resultLastItem)},getElementSection:function(e){return i(e).attr("id").match(/[^-]+/).toString()},parseFunctionName:d}},{"./constant":3,jquery:241,sessionstorage:430,"sprintf-js":440}],7:[function(e,t,r){var n,i;n="undefined"!=typeof self?self:this,i=function(r){r.PrivateKey=i,r.PublicKey=o,r.generateKeys=function(){return a(n.ecc.ecdsa.generateKeys(n.ecc.curves.k256))},r.keysFromPassword=function(e,t){var r=n.codec.steemit.keysFromPassword(e,t);return{owner:a(r.owner),memo:a(r.memo),posting:a(r.posting),active:a(r.active)}},r.sha256=function(e){return f(n.hash.sha256.hash(s(e)))},r.ripemd160=function(e){return f(n.hash.ripemd160.hash(s(e)))},r.hexify=function(e){for(var t="",r=new Uint8Array(e),n=0;n>>n:e[t/32|0]>>>n)&(1<0&&t&&(e[n-1]=r.bitArray.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:function(e,t,r){return 32===e?t:(r?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,t){if(r.bitArray.bitLength(e)!==r.bitArray.bitLength(t))return!1;var n,i=0;for(n=0;n=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(o=0;o>>t),n=e[o]<<32-t;return a=e.length?e[e.length-1]:0,s=r.bitArray.getPartial(a),i.push(r.bitArray.partial(t+s&31,t+s>32?n:i.pop(),1)),i},_xor4:function(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]},byteswapM:function(e){var t,r;for(t=0;t>>24|r>>>8&65280|(65280&r)<<8|r<<24;return e}},r.cipher.aes=function(e){this._tables[0][0][0]||this._precompute();var t,n,i,o,a,s=this._tables[0][4],f=this._tables[1],c=e.length,u=1;if(4!==c&&6!==c&&8!==c)throw new r.exception.invalid("invalid aes key size");for(this._key=[o=e.slice(0),a=[]],t=c;t<4*c+28;t++)i=o[t-1],(t%c==0||8===c&&t%c==4)&&(i=s[i>>>24]<<24^s[i>>16&255]<<16^s[i>>8&255]<<8^s[255&i],t%c==0&&(i=i<<8^i>>>24^u<<24,u=u<<1^283*(u>>7))),o[t]=o[t-c]^i;for(n=0;t;n++,t--)i=o[3&n?t:t-4],a[n]=t<=4||n<4?i:f[0][s[i>>>24]]^f[1][s[i>>16&255]]^f[2][s[i>>8&255]]^f[3][s[255&i]]},r.cipher.aes.prototype={encrypt:function(e){return this._crypt(e,0)},decrypt:function(e){return this._crypt(e,1)},_tables:[[[],[],[],[],[]],[[],[],[],[],[]]],_precompute:function(){var e,t,r,n,i,o,a,s,f=this._tables[0],c=this._tables[1],u=f[4],l=c[4],h=[],d=[];for(e=0;e<256;e++)d[(h[e]=e<<1^283*(e>>7))^e]=e;for(t=r=0;!u[t];t^=n||1,r=d[r]||1)for(o=(o=r^r<<1^r<<2^r<<3^r<<4)>>8^255&o^99,u[t]=o,l[o]=t,s=16843009*h[i=h[n=h[t]]]^65537*i^257*n^16843008*t,a=257*h[o]^16843008*o,e=0;e<4;e++)f[e][t]=a=a<<24^a>>>8,c[e][o]=s=s<<24^s>>>8;for(e=0;e<5;e++)f[e]=f[e].slice(0),c[e]=c[e].slice(0)},_crypt:function(e,t){if(4!==e.length)throw new r.exception.invalid("invalid aes block size");var n,i,o,a,s=this._key[t],f=e[0]^s[0],c=e[t?3:1]^s[1],u=e[2]^s[2],l=e[t?1:3]^s[3],h=s.length/4-2,d=4,p=[0,0,0,0],b=this._tables[t],m=b[0],y=b[1],g=b[2],v=b[3],_=b[4];for(a=0;a>>24]^y[c>>16&255]^g[u>>8&255]^v[255&l]^s[d],i=m[c>>>24]^y[u>>16&255]^g[l>>8&255]^v[255&f]^s[d+1],o=m[u>>>24]^y[l>>16&255]^g[f>>8&255]^v[255&c]^s[d+2],l=m[l>>>24]^y[f>>16&255]^g[c>>8&255]^v[255&u]^s[d+3],d+=4,f=n,c=i,u=o;for(a=0;a<4;a++)p[t?3&-a:a]=_[f>>>24]<<24^_[c>>16&255]<<16^_[u>>8&255]<<8^_[255&l]^s[d++],n=f,f=c,c=u,u=l,l=n;return p}},r.bn=function(e){this.initWith(e)},r.bn.prototype={radix:24,maxMul:8,_class:r.bn,copy:function(){return new this._class(this)},initWith:function(e){var t,r=0;switch(typeof e){case"object":this.limbs=e.limbs.slice(0);break;case"number":this.limbs=[e],this.normalize();break;case"string":for(e=e.replace(/^0x/,""),this.limbs=[],t=this.radix/4,r=0;r=this.limbs.length?0:this.limbs[e]},greaterEquals:function(e){"number"==typeof e&&(e=new this._class(e));var t,r,n,i=0,o=0;for(t=Math.max(this.limbs.length,e.limbs.length)-1;t>=0;t--)i|=(r=this.getLimb(t))-(n=e.getLimb(t))&~(o|=n-r&~i);return(o|~i)>>>31},toString:function(){this.fullReduce();var e,t,r="",n=this.limbs;for(e=0;e>n;return r&&o.push(r),this},halveM:function(){var e,t,r=0,n=this.radix,i=this.limbs;for(e=i.length-1;e>=0;e--)t=i[e],i[e]=t+r>>1,r=(1&t)<0;i--)e.halveM(),n.greaterEquals(e)&&n.subM(e).normalize();return n.trim()},inverseMod:function(e){var t,n,i=new r.bn(1),o=new r.bn(0),a=new r.bn(this),s=new r.bn(e),f=1;if(!(1&e.limbs[0]))throw new r.exception.invalid("inverseMod: p must be odd");do{for(1&a.limbs[0]&&(a.greaterEquals(s)||(t=a,a=s,s=t,t=i,i=o,o=t),a.subM(s),a.normalize(),i.greaterEquals(o)||i.addM(e),i.subM(o)),a.halveM(),1&i.limbs[0]&&i.addM(e),i.normalize(),i.halveM(),n=f=0;n>n+1!=0);n++)o=o.square();return i},mulmod:function(e,t){return this.mod(t).mul(e.mod(t)).mod(t)},powermod:function(e,t){if(e=new r.bn(e),1==(1&(t=new r.bn(t)).limbs[0])){var n=this.montpowermod(e,t);if(0!=n)return n}var i,o,a=e.normalize().trim().limbs,s=new this._class(1),f=this;for(i=0;i>o+1!=0);o++)f=f.mulmod(f,t);return s},montpowermod:function(e,t){e=new r.bn(e).normalize().trim(),t=new r.bn(t);var n,i,o,a,s,f=this.radix,c=new this._class(1),u=this.copy(),l=e.bitLength();for(o=new r.bn({limbs:t.copy().normalize().trim().limbs.map(function(){return 0})}),a=this.radix;a>0;a--)if(1==(t.limbs[t.limbs.length-1]>>a&1)){o.limbs[o.limbs.length-1]=1<0&&(c.limbs[n-1]|=(c.limbs[n]&u)<>a+1;return c.greaterEquals(t)&&c.subM(t),c};u=g(u),c=g(c);var _,w={},x=(1<>r};for(n=e.bitLength()-1;n>=0;)if(0==k(e,n))c=v(c,c),n-=1;else{for(var S=n-s+1;0==k(e,S);)S++;var E=0;for(i=S;i<=n;i++)E+=k(e,i)<=0;t--)o=n.concat(o,[n.partial(Math.min(this.radix,e),this.getLimb(t))]),e-=this.radix;return o},bitLength:function(){this.fullReduce();for(var e=this.radix*(this.limbs.length-1),t=this.limbs[this.limbs.length-1];t;t>>>=1)e++;return e+7&-8}},r.bn.fromBits=function(e){var t=new this,n=[],i=r.bitArray,o=this.prototype,a=Math.min(this.bitLength||4294967296,i.bitLength(e)),s=a%o.radix||o.radix;for(n[0]=i.extract(e,0,s);si;){for(r=o.pop(),n=o.length,t=0;t=(r=4)?t:new Array(r-t.length+1).join("0")+t)+" ");void 0===typeof console&&(console=console||{log:function(){}}),console.log(i.toUpperCase())}},r.codec.utf8String={fromBits:function(e){var t,n,i="",o=r.bitArray.bitLength(e);for(t=0;t>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(i))},toBits:function(e){e=unescape(encodeURIComponent(e));var t,n=[],i=0;for(t=0;t=0;n--)for(i=r.bn.prototype.radix-4;i>=0;i-=4)o=o.doubl().doubl().doubl().doubl().add(a[e[n]>>i&15]);return o},mult2:function(e,t,n,i){"number"==typeof e?e=[e]:void 0!==e.limbs&&(e=e.normalize().limbs),"number"==typeof n?n=[n]:void 0!==n.limbs&&(n=n.normalize().limbs);var o,a,s,f,c=new r.ecc.point(this.curve).toJac(),u=t.multiples(),l=i.multiples();for(o=Math.max(e.length,n.length)-1;o>=0;o--)for(s=0|e[o],f=0|n[o],a=r.bn.prototype.radix-4;a>=0;a-=4)c=c.doubl().doubl().doubl().doubl().add(u[s>>a&15]).add(l[f>>a&15]);return c},negate:function(){return this.toAffine().negate().toJac()},isValid:function(){var e=this.z.square(),t=e.square(),r=t.mul(e);return this.y.square().equals(this.curve.b.mul(r).add(this.x.mul(this.curve.a.mul(t).add(this.x.square()))))}},r.ecc.curve=function(e,t,n,i,o,a){this.field=e,this.r=new r.bn(t),this.a=new e(n),this.b=new e(i),this.G=new r.ecc.point(this,new e(o),new e(a))},r.ecc.curve.prototype.fromBits=function(e){var t=r.bitArray,n=this.field.prototype.exponent+7&-8,i=new r.ecc.point(this,this.field.fromBits(t.bitSlice(e,0,n)),this.field.fromBits(t.bitSlice(e,n,2*n)));if(!i.isValid())throw new r.exception.corrupt("not on the curve!");return i},r.ecc.curves={c192:new r.ecc.curve(r.bn.prime.p192,"0xffffffffffffffffffffffff99def836146bc9b1b4d22831",-3,"0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1","0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012","0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811"),c224:new r.ecc.curve(r.bn.prime.p224,"0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d",-3,"0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4","0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21","0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34"),c256:new r.ecc.curve(r.bn.prime.p256,"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",-3,"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b","0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296","0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),c384:new r.ecc.curve(r.bn.prime.p384,"0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973",-3,"0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef","0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7","0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),c521:new r.ecc.curve(r.bn.prime.p521,"0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",-3,"0x051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","0xC6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","0x11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650"),k192:new r.ecc.curve(r.bn.prime.p192k,"0xfffffffffffffffffffffffe26f2fc170f69466a74defd8d",0,3,"0xdb4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d","0x9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"),k224:new r.ecc.curve(r.bn.prime.p224k,"0x010000000000000000000000000001dce8d2ec6184caf0a971769fb1f7",0,5,"0xa1455b334df099df30fc28a169a467e9e47075a90f7e650eb6b7a45c","0x7e089fed7fba344282cafbd6f7e319f7c0b0bd59e2ca4bdb556d61a5"),k256:new r.ecc.curve(r.bn.prime.p256k,"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",0,7,"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},r.ecc.curveName=function(e){var t;for(t in r.ecc.curves)if(r.ecc.curves.hasOwnProperty(t)&&r.ecc.curves[t]===e)return t;throw new r.exception.invalid("no such curve")},r.ecc.deserialize=function(e){if(!e||!e.curve||!r.ecc.curves[e.curve])throw new r.exception.invalid("invalid serialization");if(-1===["elGamal","ecdsa"].indexOf(e.type))throw new r.exception.invalid("invalid type");var t=r.ecc.curves[e.curve];if(e.secretKey){if(!e.exponent)throw new r.exception.invalid("invalid exponent");var n=new r.bn(e.exponent);return new r.ecc[e.type].secretKey(t,n)}if(!e.point)throw new r.exception.invalid("invalid point");var i=t.fromBits(r.codec.hex.toBits(e.point));return new r.ecc[e.type].publicKey(t,i)},r.ecc.basicKey={publicKey:function(e,t){this._curve=e,this._curveBitLength=e.r.bitLength(),t instanceof Array?this._point=e.fromBits(t):this._point=t,this.serialize=function(){var t=r.ecc.curveName(e);return{type:this.getType(),secretKey:!1,point:r.codec.hex.fromBits(this._point.toBits()),curve:t}},this.get=function(){var e=this._point.toBits(),t=r.bitArray.bitLength(e);return{x:r.bitArray.bitSlice(e,0,t/2),y:r.bitArray.bitSlice(e,t/2)}}},secretKey:function(e,t){this._curve=e,this._curveBitLength=e.r.bitLength(),this._exponent=t,this.serialize=function(){var t=this.get(),n=r.ecc.curveName(e);return{type:this.getType(),secretKey:!0,exponent:r.codec.hex.fromBits(t),curve:n}},this.get=function(){return this._exponent.toBits()}}},r.ecc.basicKey.generateKeys=function(e){return function(t,n,i){if("number"==typeof(t=t||256)&&void 0===(t=r.ecc.curves["c"+t]))throw new r.exception.invalid("no such curve");i=i||r.bn.random(t.r,n);var o=t.G.mult(i);return{pub:new r.ecc[e].publicKey(t,o),sec:new r.ecc[e].secretKey(t,i)}}},r.ecc.elGamal={generateKeys:r.ecc.basicKey.generateKeys("elGamal"),publicKey:function(e,t){r.ecc.basicKey.publicKey.apply(this,arguments)},secretKey:function(e,t){r.ecc.basicKey.secretKey.apply(this,arguments)}},r.ecc.elGamal.publicKey.prototype={kem:function(e){var t=r.bn.random(this._curve.r,e),n=this._curve.G.mult(t).toBits();return{key:r.hash.sha256.hash(this._point.mult(t).toBits()),tag:n}},getType:function(){return"elGamal"}},r.ecc.elGamal.secretKey.prototype={unkem:function(e){return r.hash.sha256.hash(this._curve.fromBits(e).mult(this._exponent).toBits())},dh:function(e){return r.hash.sha256.hash(e._point.mult(this._exponent).toBits())},dhJavaEc:function(e){return e._point.mult(this._exponent).x.toBits()},getType:function(){return"elGamal"}},r.ecc.ecdsa={generateKeys:r.ecc.basicKey.generateKeys("ecdsa")},r.ecc.ecdsa.publicKey=function(e,t){r.ecc.basicKey.publicKey.apply(this,arguments)},r.ecc.ecdsa.publicKey.prototype={verify:function(e,t,n){r.bitArray.bitLength(e)>this._curveBitLength&&(e=r.bitArray.clamp(e,this._curveBitLength));var i=r.bitArray,o=this._curve.r,a=this._curveBitLength,s=r.bn.fromBits(i.bitSlice(t,0,a)),f=r.bn.fromBits(i.bitSlice(t,a,2*a)),c=n?f:f.inverseMod(o),u=r.bn.fromBits(e).mul(c).mod(o),l=s.mul(c).mod(o),h=this._curve.G.mult2(u,l,this._point).x;if(s.equals(0)||f.equals(0)||s.greaterEquals(o)||f.greaterEquals(o)||!h.equals(s)){if(void 0===n)return this.verify(e,t,!0);throw new r.exception.corrupt("signature didn't check out")}return!0},getType:function(){return"ecdsa"}},r.ecc.ecdsa.secretKey=function(e,t){r.ecc.basicKey.secretKey.apply(this,arguments)},r.ecc.ecdsa.secretKey.prototype={sign:function(e,t,n,i){r.bitArray.bitLength(e)>this._curveBitLength&&(e=r.bitArray.clamp(e,this._curveBitLength));var o=this._curve.r,a=o.bitLength(),s=i||r.bn.random(o.sub(1),t).add(1),f=this._curve.G.mult(s).x.mod(o),c=r.bn.fromBits(e).add(f.mul(this._exponent)),u=n?c.inverseMod(o).mul(s).mod(o):c.mul(s.inverseMod(o)).mod(o);return r.bitArray.concat(f.toBits(a),u.toBits(a))},getType:function(){return"ecdsa"}},function(){r.hash.ripemd160=function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},r.hash.ripemd160.hash=function(e){return(new r.hash.ripemd160).update(e).finalize()},r.hash.ripemd160.prototype={reset:function(){return this._h=e.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=r.codec.utf8String.toBits(e));var t,n=this._buffer=r.bitArray.concat(this._buffer,e),i=this._length,o=this._length=i+r.bitArray.bitLength(e);if(o>9007199254740991)throw new r.exception.invalid("Cannot hash more than 2^53 - 1 bits");for(t=512+i-(512+i&511);t<=o;t+=512){for(var a=n.splice(0,16),s=0;s<16;++s)a[s]=m(a[s]);y.call(this,a)}return this},finalize:function(){var e=r.bitArray.concat(this._buffer,[r.bitArray.partial(1,1)]),t=(this._length+1)%512,n=(t>448?512:448)-t%448,i=n%32;for(i>0&&(e=r.bitArray.concat(e,[r.bitArray.partial(i,0)]));n>=32;n-=32)e.push(0);for(e.push(m(0|this._length)),e.push(m(Math.floor(this._length/4294967296)));e.length;){for(var o=e.splice(0,16),a=0;a<16;++a)o[a]=m(o[a]);y.call(this,o)}var s=this._h;this.reset();for(a=0;a<5;++a)s[a]=m(s[a]);return s}};for(var e=[1732584193,4023233417,2562383102,271733878,3285377520],t=[0,1518500249,1859775393,2400959708,2840853838],n=[1352829926,1548603684,1836072691,2053994217,0],i=4;i>=0;--i)for(var o=1;o<16;++o)t.splice(i,0,t[i]),n.splice(i,0,n[i]);var a=[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],s=[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],f=[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],c=[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];function u(e,t,r){return e^t^r}function l(e,t,r){return e&t|~e&r}function h(e,t,r){return(e|~t)^r}function d(e,t,r){return e&r|t&~r}function p(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}function m(e){return(255&e)<<24|(65280&e)<<8|(e&255<<16)>>>8|(e&255<<24)>>>24}function y(e){for(var r,i=this._h[0],o=this._h[1],m=this._h[2],y=this._h[3],g=this._h[4],v=this._h[0],_=this._h[1],w=this._h[2],x=this._h[3],k=this._h[4],S=0;S<16;++S)r=b(i+u(o,m,y)+e[a[S]]+t[S],f[S])+g,i=g,g=y,y=b(m,10),m=o,o=r,r=b(v+p(_,w,x)+e[s[S]]+n[S],c[S])+k,v=k,k=x,x=b(w,10),w=_,_=r;for(;S<32;++S)r=b(i+l(o,m,y)+e[a[S]]+t[S],f[S])+g,i=g,g=y,y=b(m,10),m=o,o=r,r=b(v+d(_,w,x)+e[s[S]]+n[S],c[S])+k,v=k,k=x,x=b(w,10),w=_,_=r;for(;S<48;++S)r=b(i+h(o,m,y)+e[a[S]]+t[S],f[S])+g,i=g,g=y,y=b(m,10),m=o,o=r,r=b(v+h(_,w,x)+e[s[S]]+n[S],c[S])+k,v=k,k=x,x=b(w,10),w=_,_=r;for(;S<64;++S)r=b(i+d(o,m,y)+e[a[S]]+t[S],f[S])+g,i=g,g=y,y=b(m,10),m=o,o=r,r=b(v+l(_,w,x)+e[s[S]]+n[S],c[S])+k,v=k,k=x,x=b(w,10),w=_,_=r;for(;S<80;++S)r=b(i+p(o,m,y)+e[a[S]]+t[S],f[S])+g,i=g,g=y,y=b(m,10),m=o,o=r,r=b(v+u(_,w,x)+e[s[S]]+n[S],c[S])+k,v=k,k=x,x=b(w,10),w=_,_=r;r=this._h[1]+m+x,this._h[1]=this._h[2]+y+k,this._h[2]=this._h[3]+g+v,this._h[3]=this._h[4]+i+_,this._h[4]=this._h[0]+o+w,this._h[0]=r}}(),r.hash.sha256=function(e){this._key[0]||this._precompute(),e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},r.hash.sha256.hash=function(e){return(new r.hash.sha256).update(e).finalize()},r.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=r.codec.utf8String.toBits(e));var t,n=this._buffer=r.bitArray.concat(this._buffer,e),i=this._length,o=this._length=i+r.bitArray.bitLength(e);if(o>9007199254740991)throw new r.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(t=512+i-(512+i&511);t<=o;t+=512)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(t=512+i-(512+i&511);t<=o;t+=512)this._block(n.splice(0,16));return this},finalize:function(){var e,t=this._buffer,n=this._h;for(e=(t=r.bitArray.concat(t,[r.bitArray.partial(1,1)])).length+2;15&e;e++)t.push(0);for(t.push(Math.floor(this._length/4294967296)),t.push(0|this._length);t.length;)this._block(t.splice(0,16));return this.reset(),n},_init:[],_key:[],_precompute:function(){var e,t,r=0,n=2;function i(e){return 4294967296*(e-Math.floor(e))|0}for(;r<64;n++){for(t=!0,e=2;e*e<=n;e++)if(n%e==0){t=!1;break}t&&(r<8&&(this._init[r]=i(Math.pow(n,.5))),this._key[r]=i(Math.pow(n,1/3)),r++)}},_block:function(e){var t,r,n,i,o=this._h,a=this._key,s=o[0],f=o[1],c=o[2],u=o[3],l=o[4],h=o[5],d=o[6],p=o[7];for(t=0;t<64;t++)t<16?r=e[t]:(n=e[t+1&15],i=e[t+14&15],r=e[15&t]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+e[15&t]+e[t+9&15]|0),r=r+p+(l>>>6^l>>>11^l>>>25^l<<26^l<<21^l<<7)+(d^l&(h^d))+a[t],p=d,d=h,h=l,l=u+r|0,u=c,c=f,s=r+((f=s)&c^u&(f^c))+(f>>>2^f>>>13^f>>>22^f<<30^f<<19^f<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+f|0,o[2]=o[2]+c|0,o[3]=o[3]+u|0,o[4]=o[4]+l|0,o[5]=o[5]+h|0,o[6]=o[6]+d|0,o[7]=o[7]+p|0}},r.prng=function(e){this._pools=[new r.hash.sha256],this._poolEntropy=[0],this._reseedCount=0,this._robins={},this._eventId=0,this._collectorIds={},this._collectorIdNext=0,this._strength=0,this._poolStrength=0,this._nextReseed=0,this._key=[0,0,0,0,0,0,0,0],this._counter=[0,0,0,0],this._cipher=void 0,this._defaultParanoia=e,this._collectorsStarted=!1,this._callbacks={progress:{},seeded:{}},this._callbackI=0,this._NOT_READY=0,this._READY=1,this._REQUIRES_RESEED=2,this._MAX_WORDS_PER_BURST=65536,this._PARANOIA_LEVELS=[0,48,64,96,128,192,256,384,512,768,1024],this._MILLISECONDS_PER_RESEED=3e4,this._BITS_PER_RESEED=80},r.prng.prototype={randomWords:function(e,t){var n,i,o=[],a=this.isReady(t);if(a===this._NOT_READY)throw new r.exception.notReady("generator isn't seeded");for(a&this._REQUIRES_RESEED&&this._reseedFromPools(!(a&this._READY)),n=0;n0;)t++,a>>>=1;this._pools[c].update([i,this._eventId++,2,t,f,e.length].concat(e))}break;case"string":void 0===t&&(t=e.length),this._pools[c].update([i,this._eventId++,3,t,f,e.length]),this._pools[c].update(e);break;default:l=1}if(l)throw new r.exception.bug("random: addEntropy only supports number, array of numbers or string");this._poolEntropy[c]+=t,this._poolStrength+=t,u===this._NOT_READY&&(this.isReady()!==this._NOT_READY&&this._fireEvent("seeded",Math.max(this._strength,this._poolStrength)),this._fireEvent("progress",this.getProgress()))},isReady:function(e){var t=this._PARANOIA_LEVELS[void 0!==e?e:this._defaultParanoia];return this._strength&&this._strength>=t?this._poolEntropy[0]>this._BITS_PER_RESEED&&(new Date).valueOf()>this._nextReseed?this._REQUIRES_RESEED|this._READY:this._READY:this._poolStrength>=t?this._REQUIRES_RESEED|this._NOT_READY:this._NOT_READY},getProgress:function(e){var t=this._PARANOIA_LEVELS[e||this._defaultParanoia];return this._strength>=t?1:this._poolStrength>t?1:this._poolStrength/t},startCollectors:function(){if(!this._collectorsStarted){if(this._eventListener={loadTimeCollector:this._bind(this._loadTimeCollector),mouseCollector:this._bind(this._mouseCollector),keyboardCollector:this._bind(this._keyboardCollector),accelerometerCollector:this._bind(this._accelerometerCollector),touchCollector:this._bind(this._touchCollector)},window.addEventListener)window.addEventListener("load",this._eventListener.loadTimeCollector,!1),window.addEventListener("mousemove",this._eventListener.mouseCollector,!1),window.addEventListener("keypress",this._eventListener.keyboardCollector,!1),window.addEventListener("devicemotion",this._eventListener.accelerometerCollector,!1),window.addEventListener("touchmove",this._eventListener.touchCollector,!1);else{if(!document.attachEvent)throw new r.exception.bug("can't attach event");document.attachEvent("onload",this._eventListener.loadTimeCollector),document.attachEvent("onmousemove",this._eventListener.mouseCollector),document.attachEvent("keypress",this._eventListener.keyboardCollector)}this._collectorsStarted=!0}},stopCollectors:function(){this._collectorsStarted&&(window.removeEventListener?(window.removeEventListener("load",this._eventListener.loadTimeCollector,!1),window.removeEventListener("mousemove",this._eventListener.mouseCollector,!1),window.removeEventListener("keypress",this._eventListener.keyboardCollector,!1),window.removeEventListener("devicemotion",this._eventListener.accelerometerCollector,!1),window.removeEventListener("touchmove",this._eventListener.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this._eventListener.loadTimeCollector),document.detachEvent("onmousemove",this._eventListener.mouseCollector),document.detachEvent("keypress",this._eventListener.keyboardCollector)),this._collectorsStarted=!1)},addEventListener:function(e,t){this._callbacks[e][this._callbackI++]=t},removeEventListener:function(e,t){var r,n,i=this._callbacks[e],o=[];for(n in i)i.hasOwnProperty(n)&&i[n]===t&&o.push(n);for(r=0;r=1<this._strength&&(this._strength=i),this._reseedCount++,this._reseed(n)},_keyboardCollector:function(){this._addCurrentTimeToEntropy(1)},_mouseCollector:function(e){var t,r;try{t=e.x||e.clientX||e.offsetX||0,r=e.y||e.clientY||e.offsetY||0}catch(e){t=0,r=0}0!=t&&0!=r&&this.addEntropy([t,r],2,"mouse"),this._addCurrentTimeToEntropy(0)},_touchCollector:function(e){var t=e.touches[0]||e.changedTouches[0],r=t.pageX||t.clientX,n=t.pageY||t.clientY;this.addEntropy([r,n],1,"touch"),this._addCurrentTimeToEntropy(0)},_loadTimeCollector:function(){this._addCurrentTimeToEntropy(2)},_addCurrentTimeToEntropy:function(e){"undefined"!=typeof window&&window.performance&&"function"==typeof window.performance.now?this.addEntropy(window.performance.now(),e,"loadtime"):this.addEntropy((new Date).valueOf(),e,"loadtime")},_accelerometerCollector:function(e){var t=e.accelerationIncludingGravity.x||e.accelerationIncludingGravity.y||e.accelerationIncludingGravity.z;if(window.orientation){var r=window.orientation;"number"==typeof r&&this.addEntropy(r,1,"accelerometer")}t&&this.addEntropy(t,2,"accelerometer"),this._addCurrentTimeToEntropy(0)},_fireEvent:function(e,t){var n,i=r.random._callbacks[e],o=[];for(n in i)i.hasOwnProperty(n)&&o.push(i[n]);for(n=0;n=0;s--){for(var f=new r.bn(s),c=o.power(f),u=0;t.greaterEquals(c);)t.subM(c),t.normalize(),u++;s===i-1&&0===u||(a+=r.codec.base58.alpha[u])}return a}},r.codec.base58Check={defaultChecksumFn:function(e){return r.bitArray.bitSlice(r.hash.sha256.hash(r.hash.sha256.hash(e)),0,32)},fromBits:function(e,t,n){n=n||r.codec.base58Check.defaultChecksumFn;for(var i=r.bitArray.concat([r.bitArray.partial(8,e)],t),o=n(i),a=r.bitArray.concat(i,o),s=r.codec.base58.fromBits(a),f=0;0==r.bitArray.extract(a,f,8);)s="1"+s,f+=8;return s},toBits:function(e,t){t=t||r.codec.base58Check.defaultChecksumFn;var n=r.codec.base58.toBits(e),i=r.bitArray.bitLength(n),o=r.bitArray.bitSlice(n,0,i-32),a=r.bitArray.bitSlice(n,i-32),s=t(o);if(!r.bitArray.equal(s,a))throw new Error("Checksums do not match");return o}},r.codec.steemit={ROLES:["owner","memo","active","posting"],MAINNET:{pubHeader:0,privHeader:128,pubPrefix:"STM"},TESTNET:{pubHeader:0,privHeader:128,pubPrefix:"TST"},keyChecksum:function(e){return r.bitArray.bitSlice(r.hash.ripemd160.hash(e),0,32)},keysFromPassword:function(e,t){for(var n={},i=r.ecc.curves.k256,o=0;othis._curveBitLength&&(t=r.bitArray.clamp(t,this._curveBitLength));;){var o=r.ecc.curves.k256,a=o.r,s=a.bitLength(),f=i||r.bn.random(a.sub(1),n).add(1),c=o.G.mult(f);if(i&&(i=i.add(1)),!c.isIdentity){var u=c.x.mod(a),l=r.bn.fromBits(t).add(u.mul(e._exponent)).mul(f.inverseMod(a)).mod(a),h=31;!0&c.y.limbs[0]&&h++;var d=u.toBits(s),p=l.toBits(s),b=r.bitArray.extract(d,0,8),m=r.bitArray.extract(d,8,8),y=r.bitArray.extract(p,0,8),g=r.bitArray.extract(p,8,8);if(!(128&b)&&(0!=b||128&m)&&!(128&y)&&(0!=y||128&g)){var v=r.bitArray.concat(u.toBits(s),l.toBits(s));return r.bitArray.concat([r.bitArray.partial(8,h)],v)}}}},recoverPublicKey:function(e,t){var n=r.ecc.curves.k256,i=n.r,o=n.G,a=r.bitArray.extract(t,0,8)-31,s=r.bn.fromBits(e),f=r.bn.fromBits(r.bitArray.bitSlice(t,8,264)),c=r.bn.fromBits(r.bitArray.bitSlice(t,264));if(a<0||a>4)throw new Error("Corrupt signature: recovery parameter is wrong");for(var u=1==(1&a),l=0;l<=1;l++){var h=f.add(i.mul(l)),d=r.codec.steemit._yFromX(h,u),p=new r.ecc.point(n,h,d),b=f.inverseMod(i),m=new r.bn(0).sub(s).mod(i),y=o.mult2(m,c,p).mult(b),g=new r.ecc.ecdsa.publicKey(n,y);try{return g.verify(e,r.bitArray.bitSlice(t,8)),g}catch(e){}}throw new Error("public key was unrecoverable")},serializePublicKey:function(e,t){t=t||r.codec.steemit.MAINNET;var n=e.get(),i=t.pubHeader;return 1&r.bn.fromBits(n.y).limbs[0]?i|=3:i|=2,t.pubPrefix+r.codec.base58Check.fromBits(i,n.x,r.codec.steemit.keyChecksum)},deserializePublicKey:function(e,t){t=t||r.codec.steemit.MAINNET;var n=r.ecc.curves.k256;if(0!==e.indexOf(t.pubPrefix))throw new Error('Public key is not in correct format, it should begin with "'+t.pubPrefix+'"');var i=r.codec.base58Check.toBits(e.slice(3),r.codec.steemit.keyChecksum),o=r.bitArray.extract(i,0,8),a=3==o;if((o&t.pubHeader)!==t.pubHeader)throw new Error("public key has invalid header");if(0==(3&o)&&0==(2&o))throw new Error("public key has invalid header: should set 0x2 or 0x3, but got 0x"+o.toString(16));var s=r.bitArray.bitSlice(i,8),f=r.bn.fromBits(s),c=r.codec.steemit._yFromX(f,a);return new r.ecc.ecdsa.publicKey(n,new r.ecc.point(n,f,c))},serializePrivateKey:function(e,t){return t=t||r.codec.steemit.MAINNET,r.codec.base58Check.fromBits(t.privHeader,e.get())},deserializePrivateKey:function(e,t){t=t||r.codec.steemit.MAINNET.privHeader;var n=r.ecc.curves.k256,i=r.codec.base58Check.toBits(e),o=r.bitArray.extract(i,0,8);if(o!==t)throw new Error("private key has invalid header: wanted 0x"+t.toString(16)+", got 0x"+o.toString(16));var a=r.bitArray.bitSlice(i,8);return new r.ecc.ecdsa.secretKey(n,r.bn.fromBits(a))},_yFromX:function(e,t){var n=r.ecc.curves.k256,i=r.codec.steemit._getPident(),o=e.powermod(3,n.field.modulus).add(e.mulmod(n.a,n.field.modulus)).add(n.b).mod(n.field.modulus).powermod(i,n.field.modulus),a=o.mod(2).equals(1);return a&&t||!a&&!t?o:n.field.modulus.sub(o).normalize()},_getPident:function(){return r.codec.steemit.PIDENT||(r.codec.steemit.PIDENT=r.ecc.curves.k256.field.modulus.add(1).normalize().halveM().halveM().normalize()),r.codec.steemit.PIDENT}},r}();function i(e,t){this.getPublicKey=function(){return t||(t=n.ecc.ecdsa.generateKeys(n.ecc.curves.k256,void 0,n.bn.fromBits(e.get())).pub),new o(t)},this.sign=function(t){return f(n.codec.steemit.signRecoverably(e,s(t)))}}function o(e){this._p=e}function a(e){return{private:n.codec.steemit.serializePrivateKey(e.sec),public:n.codec.steemit.serializePublicKey(e.pub)}}function s(e){if(e instanceof ArrayBuffer)return n.codec.arrayBuffer.toBits(e);throw new Error("You must supply an ArrayBuffer")}function f(e){return n.codec.arrayBuffer.fromBits(e,0,0)}r.sjcl=n,i.from=function(e,t){return new i(n.codec.steemit.deserializePrivateKey(e,t))},o.from=function(e){return new o(n.codec.steemit.deserializePublicKey(e))},o.recover=function(e,t){return new o(n.codec.steemit.recoverPublicKey(s(e),s(t)))},o.prototype={toString:function(){return n.codec.steemit.serializePublicKey(this._p)},verify:function(e,t){try{var r=n.bitArray.bitSlice(s(t),8);return this._p.verify(s(e),r),!0}catch(e){return!1}}}},"object"==typeof r&&"string"!=typeof r.nodeName?i(r):(n.steemit=n.steemit||{},i(n.steemit.crypto={}))},{crypto:115}],8:[function(e,t,r){(function(t){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{f(n.next(e))}catch(e){o(e)}}function s(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,s)}f((n=n.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=n[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]6e4)throw new c("Signature expired");l=u(n.timestamp,n.account,e.method,n.params,s),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,r(l,n.signatures,n.account)];case 2:return a.sent(),[3,4];case 3:throw h=a.sent(),new c("Verification failed",h);case 4:return[2,i]}})})}}).call(this,e("buffer").Buffer)},{"@steemit/libcrypto":7,buffer:105,crypto:115}],9:[function(e,t,r){t.exports={transport:"http",websocket:"wss://gtg.steem.house:8090",uri:"https://api.steemit.com",url:"",dev_uri:"https://api.steemitdev.com",stage_uri:"https://api.steemitstage.com",address_prefix:"STM",chain_id:"0000000000000000000000000000000000000000000000000000000000000000"}},{}],10:[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;r0&&void 0!==arguments[0]?arguments[0]:{};!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,e));return r._setTransport(e),r._setLogger(e),r.options=e,r.seqNo=0,f.default.forEach(function(e){var t=e.method_name||(0,u.camelCase)(e.method),n=e.params||[];r[t+"With"]=function(t,i){return r.send(e.api,{method:e.method,params:n.map(function(e){return t[e]})},i)},r[t]=function(){for(var e=arguments.length,i=Array(e),o=0;o1&&"function"==typeof this.__logger[e]){var t=Array.prototype.slice.call(arguments,1);this.__logger[e].apply(this.__logger,t)}else this.__logger.log.apply(this.__logger,arguments)}},{key:"start",value:function(){return this.transport.start()}},{key:"stop",value:function(){return this.transport.stop()}},{key:"send",value:function(e,t,r){var n=r;if(this.__logger){var i=Math.random(),o=this;this.log("xmit:"+i+":",t),n=function(e,t){e?o.log("error","rsp:"+i+":\n\n",e,t):o.log("rsp:"+i+":",t),r&&r.apply(o,arguments)}}return this.transport.send(e,t,n)}},{key:"call",value:function(e,t,r){if("http"===this._transportType){var n=++this.seqNo;(0,d.jsonRpc)(this.options.uri,{method:e,params:t,id:n}).then(function(e){r(null,e)},function(e){r(e)})}else r(new Error("RPC methods can only be called when using http transport"))}},{key:"signedCall",value:function(e,t,r,n,i){if("http"===this._transportType){var o=++this.seqNo,a=void 0;try{a=(0,p.sign)({method:e,params:t,id:o},r,[n])}catch(e){return void i(e)}(0,d.jsonRpc)(this.options.uri,a).then(function(e){i(null,e)},function(e){i(e)})}else i(new Error("RPC methods can only be called when using http transport"))}},{key:"setOptions",value:function(e){Object.assign(this.options,e),this._setLogger(e),this._setTransport(e),this.transport.setOptions(e)}},{key:"setWebSocket",value:function(e){this.setOptions({websocket:e})}},{key:"setUri",value:function(e){this.setOptions({uri:e})}},{key:"streamBlockNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=this,r=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;"function"==typeof e&&(r=e,e="head");var i="",o=!0;return function s(){o&&t.getDynamicGlobalPropertiesAsync().then(function(t){var o="irreversible"===e?t.last_irreversible_block_num:t.head_block_number;if(o!==i)if(i)for(var f=i;f0&&void 0!==arguments[0]?arguments[0]:"head",r=arguments[1];"function"==typeof t&&(r=t,t="head");var n="",i="",o=this.streamBlockNumber(t,function(t,a){if(t)return o(),void r(t);(n=a)!==i&&(i=n,e.getBlock(n,r))});return o}},{key:"streamTransactions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=arguments[1];"function"==typeof e&&(t=e,e="head");var r=this.streamBlock(e,function(e,n){if(e)return r(),void t(e);n&&n.transactions&&n.transactions.forEach(function(e){t(null,e)})});return r}},{key:"streamOperations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=arguments[1];"function"==typeof e&&(t=e,e="head");var r=this.streamTransactions(e,function(e,n){if(e)return r(),void t(e);n.operations.forEach(function(e){t(null,e)})});return r}},{key:"broadcastTransactionSynchronousWith",value:function(e,t){var r=e.trx;return this.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[r]},function(e,n){if(e){var i=h.ops.signed_transaction,o=i.toObject(r),a=i.toBuffer(r);e.digest=l.hash.sha256(a).toString("hex"),e.transaction_id=a.toString("hex"),e.transaction=JSON.stringify(o),t(e,"")}else t("",n)})}}]),t}(),y=new m(s.default);(t.exports=y).Steem=m},{"../auth/ecc":16,"../auth/serializer":30,"../config":44,"../utils":47,"./methods":11,"./transports":14,"./transports/http":13,"@steemit/rpc-auth":8,bluebird:72,events:184}],11:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=[{api:"database_api",method:"set_subscribe_callback",params:["callback","clearFilter"]},{api:"database_api",method:"set_pending_transaction_callback",params:["cb"]},{api:"database_api",method:"set_block_applied_callback",params:["cb"]},{api:"database_api",method:"cancel_all_subscriptions"},{api:"database_api",method:"get_trending_tags",params:["afterTag","limit"]},{api:"database_api",method:"get_tags_used_by_author",params:["author"]},{api:"database_api",method:"get_post_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_comment_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_discussions_by_trending",params:["query"]},{api:"database_api",method:"get_discussions_by_trending30",params:["query"]},{api:"database_api",method:"get_discussions_by_created",params:["query"]},{api:"database_api",method:"get_discussions_by_active",params:["query"]},{api:"database_api",method:"get_discussions_by_cashout",params:["query"]},{api:"database_api",method:"get_discussions_by_payout",params:["query"]},{api:"database_api",method:"get_discussions_by_votes",params:["query"]},{api:"database_api",method:"get_discussions_by_children",params:["query"]},{api:"database_api",method:"get_discussions_by_hot",params:["query"]},{api:"database_api",method:"get_discussions_by_feed",params:["query"]},{api:"database_api",method:"get_discussions_by_blog",params:["query"]},{api:"database_api",method:"get_discussions_by_comments",params:["query"]},{api:"database_api",method:"get_discussions_by_promoted",params:["query"]},{api:"database_api",method:"get_block_header",params:["blockNum"]},{api:"database_api",method:"get_block",params:["blockNum"]},{api:"database_api",method:"get_ops_in_block",params:["blockNum","onlyVirtual"]},{api:"database_api",method:"get_state",params:["path"]},{api:"database_api",method:"get_trending_categories",params:["after","limit"]},{api:"database_api",method:"get_best_categories",params:["after","limit"]},{api:"database_api",method:"get_active_categories",params:["after","limit"]},{api:"database_api",method:"get_recent_categories",params:["after","limit"]},{api:"database_api",method:"get_config"},{api:"database_api",method:"get_dynamic_global_properties"},{api:"database_api",method:"get_chain_properties"},{api:"database_api",method:"get_feed_history"},{api:"database_api",method:"get_current_median_history_price"},{api:"database_api",method:"get_witness_schedule"},{api:"database_api",method:"get_hardfork_version"},{api:"database_api",method:"get_next_scheduled_hardfork"},{api:"account_by_key_api",method:"get_key_references",params:["key"]},{api:"database_api",method:"get_accounts",params:["names"]},{api:"database_api",method:"get_account_references",params:["accountId"]},{api:"database_api",method:"lookup_account_names",params:["accountNames"]},{api:"database_api",method:"lookup_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_account_count"},{api:"database_api",method:"get_conversion_requests",params:["accountName"]},{api:"database_api",method:"get_account_history",params:["account","from","limit"]},{api:"database_api",method:"get_owner_history",params:["account"]},{api:"database_api",method:"get_recovery_request",params:["account"]},{api:"database_api",method:"get_escrow",params:["from","escrowId"]},{api:"database_api",method:"get_withdraw_routes",params:["account","withdrawRouteType"]},{api:"database_api",method:"get_account_bandwidth",params:["account","bandwidthType"]},{api:"database_api",method:"get_savings_withdraw_from",params:["account"]},{api:"database_api",method:"get_savings_withdraw_to",params:["account"]},{api:"database_api",method:"get_order_book",params:["limit"]},{api:"database_api",method:"get_open_orders",params:["owner"]},{api:"database_api",method:"get_liquidity_queue",params:["startAccount","limit"]},{api:"database_api",method:"get_transaction_hex",params:["trx"]},{api:"database_api",method:"get_transaction",params:["trxId"]},{api:"database_api",method:"get_required_signatures",params:["trx","availableKeys"]},{api:"database_api",method:"get_potential_signatures",params:["trx"]},{api:"database_api",method:"verify_authority",params:["trx"]},{api:"database_api",method:"verify_account_authority",params:["nameOrId","signers"]},{api:"database_api",method:"get_active_votes",params:["author","permlink"]},{api:"database_api",method:"get_account_votes",params:["voter"]},{api:"database_api",method:"get_content",params:["author","permlink"]},{api:"database_api",method:"get_content_replies",params:["author","permlink"]},{api:"database_api",method:"get_discussions_by_author_before_date",params:["author","startPermlink","beforeDate","limit"]},{api:"database_api",method:"get_replies_by_last_update",params:["startAuthor","startPermlink","limit"]},{api:"database_api",method:"get_witnesses",params:["witnessIds"]},{api:"database_api",method:"get_witness_by_account",params:["accountName"]},{api:"database_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"database_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_witness_count"},{api:"database_api",method:"get_active_witnesses"},{api:"database_api",method:"get_miner_queue"},{api:"database_api",method:"get_reward_fund",params:["name"]},{api:"database_api",method:"get_vesting_delegations",params:["account","from","limit"]},{api:"login_api",method:"login",params:["username","password"]},{api:"login_api",method:"get_api_by_name",params:["database_api"]},{api:"login_api",method:"get_version"},{api:"follow_api",method:"get_followers",params:["following","startFollower","followType","limit"]},{api:"follow_api",method:"get_following",params:["follower","startFollowing","followType","limit"]},{api:"follow_api",method:"get_follow_count",params:["account"]},{api:"follow_api",method:"get_feed_entries",params:["account","entryId","limit"]},{api:"follow_api",method:"get_feed",params:["account","entryId","limit"]},{api:"follow_api",method:"get_blog_entries",params:["account","entryId","limit"]},{api:"follow_api",method:"get_blog",params:["account","entryId","limit"]},{api:"follow_api",method:"get_account_reputations",params:["lowerBoundName","limit"]},{api:"follow_api",method:"get_reblogged_by",params:["author","permlink"]},{api:"follow_api",method:"get_blog_authors",params:["blogAccount"]},{api:"network_broadcast_api",method:"broadcast_transaction",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_with_callback",params:["confirmationCallback","trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_synchronous",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_block",params:["b"]},{api:"network_broadcast_api",method:"set_max_block_age",params:["maxBlockAge"]},{api:"market_history_api",method:"get_ticker",params:[]},{api:"market_history_api",method:"get_volume",params:[]},{api:"market_history_api",method:"get_order_book",method_name:"getMarketOrderBook",params:["limit"]},{api:"market_history_api",method:"get_trade_history",params:["start","end","limit"]},{api:"market_history_api",method:"get_recent_trades",params:["limit"]},{api:"market_history_api",method:"get_market_history",params:["bucket_seconds","start","end"]},{api:"market_history_api",method:"get_market_history_buckets",params:[]}]},{}],12:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!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,e));return r.options=e,r.id=0,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,o.default),n(t,[{key:"setOptions",value:function(e){Object.assign(this.options,e),this.stop()}},{key:"listenTo",value:function(e,t,r){return e.addEventListener?e.addEventListener(t,r):e.on(t,r),function(){e.removeEventListener?e.removeEventListener(t,r):e.removeListener(t,r)}}},{key:"send",value:function(){}},{key:"start",value:function(){}},{key:"stop",value:function(){}}]),t}();r.default=s,i.default.promisifyAll(s.prototype)},{bluebird:72,events:184}],13:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!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({id:0},e)));return r._requests=new Map,r.inFlight=0,r.isOpen=!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,s.default),n(t,[{key:"start",value:function(){var e=this;return this.startPromise?this.startPromise:(this.startPromise=new i.default(function(t,r){e.ws=new c(e.options.websocket),e.ws.onerror=function(t){e.startPromise=null,r(t)},e.ws.onopen=function(){e.isOpen=!0,e.ws.onerror=e.onError.bind(e),e.ws.onmessage=e.onMessage.bind(e),e.ws.onclose=e.onClose.bind(e),t()}}),this.startPromise)}},{key:"stop",value:function(){u("Stopping..."),this.startPromise=null,this.isOpen=!1,this._requests.clear(),this.ws&&(this.ws.onerror=this.ws.onmessage=this.ws.onclose=null,this.ws.close(),this.ws=null)}},{key:"send",value:function(e,t,r){var n=this;return u("Steem::send",e,t),this.start().then(function(){var o={};new i.default(function(e,t){o.resolve=function(t){e(t),r(null,t)},o.reject=function(e){t(e),r(e)}}),n.options.useAppbaseApi&&(e="condenser_api");var a={deferral:o,startedAt:Date.now(),message:{id:t.id||n.id++,method:"call",jsonrpc:"2.0",params:[e,t.method,t.params]}};return n.inFlight++,n._requests.set(a.message.id,a),n.ws.send(JSON.stringify(a.message)),o})}},{key:"onError",value:function(e){var t=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.deferral.reject(e)}}catch(e){r=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}this.stop()}},{key:"onClose",value:function(){var e=new Error("Connection was closed"),t=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.deferral.reject(e)}}catch(e){r=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}this._requests.clear()}},{key:"onMessage",value:function(e){var t=JSON.parse(e.data);if(u("-- Steem.onMessage --\x3e",t.id),!this._requests.has(t.id))throw new Error("Panic: no request in queue for message id "+t.id);var r=this._requests.get(t.id);this._requests.delete(t.id);var n=t.error;if(n){var i=new Error((n.message||"Failed to complete operation")+" (see err.payload for the full error payload)");i.payload=t,r.deferral.reject(i)}else this.emit("track-performance",r.message.method,Date.now()-r.startedAt),r.deferral.resolve(t.result)}}]),t}();r.default=l},{"./base":12,bluebird:72,debug:150,"detect-node":158,ws:75}],16:[function(e,t,r){"use strict";t.exports={Address:e("./src/address"),Aes:e("./src/aes"),PrivateKey:e("./src/key_private"),PublicKey:e("./src/key_public"),Signature:e("./src/signature"),brainKey:e("./src/brain_key"),key_utils:e("./src/key_utils"),hash:e("./src/hash"),ecc_config:e("../../config")}},{"../../config":44,"./src/address":17,"./src/aes":18,"./src/brain_key":19,"./src/hash":23,"./src/key_private":24,"./src/key_public":25,"./src/key_utils":26,"./src/signature":27}],17:[function(e,t,r){(function(r){"use strict";var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:o.get("address_prefix"),t=a.ripemd160(this.addy),n=r.concat([this.addy,t.slice(0,4)]);return e+s.encode(n)}}],[{key:"fromBuffer",value:function(t){var r=a.sha512(t);return new e(a.ripemd160(r))}},{key:"fromString",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.get("address_prefix"),f=t.slice(0,n.length);i.equal(n,f,"Expecting key to begin with "+n+", instead got "+f);var c=t.slice(n.length),u=(c=new r(s.decode(c),"binary")).slice(-4);c=c.slice(0,-4);var l=a.ripemd160(c);return l=l.slice(0,4),i.deepEqual(u,l,"Checksum did not match"),new e(c)}},{key:"fromPublic",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,o=a.sha256(t.toBuffer(n)),s=a.ripemd160(o),f=new r(1);f.writeUInt8(255&i,0);var c=r.concat([f,s]),u=a.sha256(c);u=a.sha256(u);var l=r.concat([c,u.slice(0,4)]);return new e(a.ripemd160(l))}}]),e}();t.exports=f}).call(this,e("buffer").Buffer)},{"../../../config":44,"./hash":23,assert:62,bs58:103,buffer:105}],18:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.encrypt=function(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){if(null===d){var e=n.default.randomUint8Array(2);d=parseInt(e[0]<<8|e[1],10)}var t=l.fromNumber(Date.now()),r=++d%65535;return(t=t.shiftLeft(16).or(l.fromNumber(r))).toString()}();return h(e,t,i,r)},r.decrypt=function(e,t,r,n,i){return h(e,t,r,n,i).message};var n=u(e("secure-random")),i=u(e("bytebuffer")),o=u(e("browserify-aes")),a=u(e("assert")),s=u(e("./key_public")),f=u(e("./key_private")),c=u(e("./hash"));function u(e){return e&&e.__esModule?e:{default:e}}var l=i.default.Long;function h(e,r,n,s,f){if(!(e=p(e)))throw new TypeError("private_key is required");if(!(r=b(r)))throw new TypeError("public_key is required");if(!(n=m(n)))throw new TypeError("nonce is required");if(!t.isBuffer(s)){if("string"!=typeof s)throw new TypeError("message should be buffer or string");s=new t(s,"binary")}if(f&&"number"!=typeof f)throw new TypeError("checksum should be a number");var u=e.get_shared_secret(r),l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeUint64(n),l.append(u.toString("binary"),"binary"),l=new t(l.copy(0,l.offset).toBinary(),"binary");var h=c.default.sha512(l),d=h.slice(32,48),g=h.slice(0,32),v=c.default.sha256(h);if(v=v.slice(0,4),v=i.default.fromBinary(v.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN).readUint32(),f){if(v!==f)throw new Error("Invalid key");s=function(e,r,n){(0,a.default)(e,"Missing cipher text"),e=y(e);var i=o.default.createDecipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(s,g,d)}else s=function(e,r,n){(0,a.default)(e,"Missing plain text"),e=y(e);var i=o.default.createCipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(s,g,d);return{nonce:n,message:s,checksum:v}}var d=null,p=function(e){return e?e.d?e:f.default.fromWif(e):e},b=function(e){return e?e.Q?e:s.default.fromString(e):e},m=function(e){return e?l.isLong(e)?e:l.fromString(e):e},y=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(this,e("buffer").Buffer)},{"./hash":23,"./key_private":24,"./key_public":25,assert:62,"browserify-aes":78,buffer:105,bytebuffer:106,"secure-random":429}],19:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.normalize=function(e){if("string"!=typeof e)throw new Error("string required for brain_key");return(e=e.trim()).split(/[\t\n\v\f\r ]+/).join(" ")}},{}],20:[function(e,t,r){(function(r){"use strict";var n=e("assert"),i=e("./hash"),o=e("./enforce_types"),a=e("bigi"),s=e("./ecsignature");function f(e,t,s,f,c){o("Buffer",t),o(a,s),c&&(t=i.sha256(r.concat([t,new r(c)]))),n.equal(t.length,32,"Hash must be 256 bit");var u=s.toBuffer(32),l=new r(32),h=new r(32);h.fill(1),l.fill(0),l=i.HmacSHA256(r.concat([h,new r([0]),u,t]),l),h=i.HmacSHA256(h,l),l=i.HmacSHA256(r.concat([h,new r([1]),u,t]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l);for(var d=a.fromBuffer(h);d.signum()<=0||d.compareTo(e.n)>=0||!f(d);)l=i.HmacSHA256(r.concat([h,new r([0])]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l),d=a.fromBuffer(h);return d}function c(e,t,r,n){var i=e.n,o=e.G,a=r.r,s=r.s;if(a.signum()<=0||a.compareTo(i)>=0)return!1;if(s.signum()<=0||s.compareTo(i)>=0)return!1;var f=s.modInverse(i),c=t.multiply(f).mod(i),u=a.multiply(f).mod(i),l=o.multiplyTwo(c,n,u);return!e.isInfinity(l)&&l.affineX.mod(i).equals(a)}function u(e,t,r,i){n.strictEqual(3&i,i,"Recovery param is more than two bits");var o=e.n,a=e.G,s=r.r,f=r.s;n(s.signum()>0&&s.compareTo(o)<0,"Invalid r value"),n(f.signum()>0&&f.compareTo(o)<0,"Invalid s value");var c=1&i,u=i>>1?s.add(o):s,l=e.pointFromX(c,u),h=l.multiply(o);n(e.isInfinity(h),"nR is not a valid curve point");var d=t.negate().mod(o),p=s.modInverse(o),b=l.multiplyTwo(f,a,d).multiply(p);return e.validate(b),b}t.exports={calcPubKeyRecoveryParam:function(e,t,r,n){for(var i=0;i<4;i++)if(u(e,t,r,i).equals(n))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:f,recoverPubKey:u,sign:function(e,t,r,n){var i,o,c=a.fromBuffer(t),u=e.n,l=e.G,h=(f(e,t,r,function(t){var n=l.multiply(t);return!e.isInfinity(n)&&0!==(i=n.affineX.mod(u)).signum()&&0!==(o=t.modInverse(u).multiply(c.add(r.multiply(i))).mod(u)).signum()},n),u.shiftRight(1));return o.compareTo(h)>0&&(o=u.subtract(o)),new s(i,o)},verify:function(e,t,r,n){return c(e,a.fromBuffer(t),r,n)},verifyRaw:c}}).call(this,e("buffer").Buffer)},{"./ecsignature":21,"./enforce_types":22,"./hash":23,assert:62,bigi:70,buffer:105}],21:[function(e,t,r){(function(r){"use strict";var n=e("assert"),i=e("./enforce_types"),o=e("bigi");function a(e,t){i(o,e),i(o,t),this.r=e,this.s=t}a.parseCompact=function(e){n.equal(e.length,65,"Invalid signature length");var t=e.readUInt8(0)-27;return n.equal(t,7&t,"Invalid signature parameter"),{compressed:!!(4&t),i:t&=3,signature:new a(o.fromBuffer(e.slice(1,33)),o.fromBuffer(e.slice(33)))}},a.fromDER=function(e){n.equal(e.readUInt8(0),48,"Not a DER sequence"),n.equal(e.readUInt8(1),e.length-2,"Invalid sequence length"),n.equal(e.readUInt8(2),2,"Expected a DER integer");var t=e.readUInt8(3);n(t>0,"R length is zero");var r=4+t;n.equal(e.readUInt8(r),2,"Expected a DER integer (2)");var i=e.readUInt8(r+1);n(i>0,"S length is zero");var s=e.slice(4,r),f=e.slice(r+2);r+=2+i,t>1&&0===s.readUInt8(0)&&n(128&s.readUInt8(1),"R value excessively padded"),i>1&&0===f.readUInt8(0)&&n(128&f.readUInt8(1),"S value excessively padded"),n.equal(r,e.length,"Invalid DER encoding");var c=o.fromDERInteger(s),u=o.fromDERInteger(f);return n(c.signum()>=0,"R value is negative"),n(u.signum()>=0,"S value is negative"),new a(c,u)},a.parseScriptSignature=function(e){var t=e.readUInt8(e.length-1),r=-129&t;return n(r>0&&r<4,"Invalid hashType"),{signature:a.fromDER(e.slice(0,-1)),hashType:t}},a.prototype.toCompact=function(e,t){t&&(e+=4),e+=27;var n=new r(65);return n.writeUInt8(e,0),this.r.toBuffer(32).copy(n,1),this.s.toBuffer(32).copy(n,33),n},a.prototype.toDER=function(){var e=this.r.toDERInteger(),t=this.s.toDERInteger(),n=[];return n.push(2,e.length),(n=n.concat(e)).push(2,t.length),(n=n.concat(t)).unshift(48,n.length),new r(n)},a.prototype.toScriptSignature=function(e){var t=new r(1);return t.writeUInt8(e,0),r.concat([this.toDER(),t])},t.exports=a}).call(this,e("buffer").Buffer)},{"./enforce_types":22,assert:62,bigi:70,buffer:105}],22:[function(e,t,r){(function(e){"use strict";function r(e){var t=e.toString().match(/function (.*?)\(/);return t?t[1]:null}t.exports=function(t,n){switch(t){case"Array":if(Array.isArray(n))return;break;case"Boolean":if("boolean"==typeof n)return;break;case"Buffer":if(e.isBuffer(n))return;break;case"Number":if("number"==typeof n)return;break;case"String":if("string"==typeof n)return;break;default:if(r(n.constructor)===r(t))return}throw new TypeError("Expected "+(r(t)||t)+", got "+n)}}).call(this,{isBuffer:e("../../../../../../is-buffer/index.js")})},{"../../../../../../is-buffer/index.js":239}],23:[function(e,t,r){"use strict";var n=o(e("create-hash")),i=o(e("create-hmac"));function o(e){return e&&e.__esModule?e:{default:e}}t.exports={sha1:function(e,t){return(0,n.default)("sha1").update(e).digest(t)},sha256:function(e,t){return(0,n.default)("sha256").update(e).digest(t)},sha512:function(e,t){return(0,n.default)("sha512").update(e).digest(t)},HmacSHA256:function(e,t){return(0,i.default)("sha256",t).update(e).digest()},ripemd160:function(e){return(0,n.default)("rmd160").update(e).digest()}}},{"create-hash":110,"create-hmac":112}],24:[function(e,t,r){(function(r){"use strict";var n=function(){function e(e,t){for(var r=0;r=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(n);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new e(i)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toPublicKey",value:function(){return this.toPublic()}}],[{key:"fromBuffer",value:function(t){if(!r.isBuffer(t))throw new Error("Expecting paramter to be a Buffer type");if(32!==t.length&&console.log("WARN: Expecting 32 bytes, instead got "+t.length+", stack trace:",(new Error).stack),0===t.length)throw new Error("Empty buffer");return new e(s.fromBuffer(t))}},{key:"fromSeed",value:function(t){if("string"!=typeof t)throw new Error("seed must be of type string");return e.fromBuffer(u.sha256(t))}},{key:"isWif",value:function(e){try{return this.fromWif(e),!0}catch(e){return!1}}},{key:"fromWif",value:function(t){var n=new r(f.decode(t)),i=n.readUInt8(0);c.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),a=n.slice(-4),s=u.sha256(o);if(s=(s=u.sha256(s)).slice(0,4),a.toString()!==s.toString())throw new Error("Invalid WIF key (checksum miss-match)");return o=o.slice(1),e.fromBuffer(o)}},{key:"fromHex",value:function(t){return e.fromBuffer(new r(t,"hex"))}}]),e}();t.exports=d;var p=function(e){return null==e?e:e.Q?e:l.fromStringOrThrow(e)}}).call(this,e("buffer").Buffer)},{"./hash":23,"./key_public":25,assert:62,bigi:70,bs58:103,buffer:105,ecurve:165}],25:[function(e,t,r){(function(r){"use strict";var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:this.Q.compressed;return this.Q.getEncoded(e)}},{key:"toUncompressed",value:function(){var t=this.Q.getEncoded(!1),r=o.Point.decodeFrom(a,t);return e.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var e=this.toBuffer(),t=f.sha512(e);return f.ripemd160(t)}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");return this.toPublicKeyString(e)}},{key:"toPublicKeyString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");if(this.pubdata)return e+this.pubdata;var t=this.toBuffer(),n=f.ripemd160(t),i=r.concat([t,n.slice(0,4)]);return this.pubdata=s.encode(i),e+this.pubdata}},{key:"toAddressString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix"),t=this.toBuffer(),n=f.sha512(t),i=f.ripemd160(n),o=f.ripemd160(i);return i=r.concat([i,o.slice(0,4)]),e+s.encode(i)}},{key:"toPtsAddy",value:function(){var e=this.toBuffer(),t=f.sha256(e),n=f.ripemd160(t);n=r.concat([new r([56]),n]);var i=f.sha256(n);return i=f.sha256(i),n=r.concat([n,i.slice(0,4)]),s.encode(n)}},{key:"child",value:function(t){u(r.isBuffer(t),"Buffer required: offset"),u.equal(t.length,32,"offset length"),t=r.concat([this.toBuffer(),t]),t=f.sha256(t);var n=i.fromBuffer(t);if(n.compareTo(h)>=0)throw new Error("Child offset went out of bounds, try again");var o=l.multiply(n),s=this.Q.add(o);if(a.isInfinity(s))throw new Error("Child offset derived to an invalid key, try again");return e.fromPoint(s)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(t){return e.fromBuffer(new r(t,"binary"))}},{key:"fromBuffer",value:function(t){return new e(o.Point.decodeFrom(a,t))}},{key:"fromPoint",value:function(t){return new e(t)}},{key:"fromString",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix");try{return e.fromStringOrThrow(t,r)}catch(e){return null}}},{key:"fromStringOrThrow",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix"),i=t.slice(0,n.length);u.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),t=t.slice(n.length);var o=(t=new r(s.decode(t),"binary")).slice(-4);t=t.slice(0,-4);var a=f.ripemd160(t);return a=a.slice(0,4),u.deepEqual(o,a,"Checksum did not match"),e.fromBuffer(t)}},{key:"fromHex",value:function(t){return e.fromBuffer(new r(t,"hex"))}},{key:"fromStringHex",value:function(t){return e.fromString(new r(t,"hex"))}}]),e}();t.exports=d}).call(this,e("buffer").Buffer)},{"../../../config":44,"./hash":23,assert:62,bigi:70,bs58:103,buffer:105,ecurve:165}],26:[function(e,t,r){(function(r){"use strict";var n=e("./key_private"),i=e("./hash"),o=e("secure-random"),a=0,s=0,f=o.randomBuffer(101);t.exports={addEntropy:function(){s++;for(var e=arguments.length,t=Array(e),r=0;r9007199254740991&&(f[h]=0)}}catch(e){i=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}},random32ByteBuffer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.browserEntropy();if("string"!=typeof e)throw new Error("string required for entropy");if(e.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var t=Date.now();Date.now()-t<250;)e=i.sha256(e);var n=[];return n.push(e),n.push(o.randomBuffer(32)),i.sha256(r.concat(n))},get_random_key:function(e){return n.fromBuffer(this.random32ByteBuffer(e))},browserEntropy:function(){var e=Array(f).join();try{e+=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var t,n=0;n2&&void 0!==arguments[2]?arguments[2]:["owner","active","posting","memo"]).forEach(function(n){r[n]=this.toWif(e,t,n),r[n+"Pubkey"]=this.wifToPublic(r[n])}.bind(this)),r},p.isWif=function(e){var t=!1;try{var n=new r(i.decode(e)),o=n.slice(0,-4),a=n.slice(-4),s=d.sha256(o);s=(s=d.sha256(s)).slice(0,4),a.toString()==s.toString()&&(t=!0)}catch(e){}return t},p.toWif=function(e,t,n){var o=(e+n+t).trim().split(/[\t\n\v\f\r ]+/).join(" "),a=d.sha256(o),s=r.concat([new r([128]),a]),f=d.sha256(s);f=(f=d.sha256(f)).slice(0,4);var c=r.concat([s,f]);return i.encode(c)},p.wifIsValid=function(e,t){return this.wifToPublic(e)==t},p.wifToPublic=function(e){var t=l.fromWif(e);return t=t.toPublic().toString()},p.isPubkey=function(e,t){return null!=h.fromString(e,t)},p.signTransaction=function(e,t){var n=[];e.signatures&&(n=[].concat(e.signatures));var i=new r(f.get("chain_id"),"hex"),o=b.toBuffer(e);for(var a in t){var s=u.signBuffer(r.concat([i,o]),t[a]);n.push(s.toBuffer())}return m.toObject(Object.assign(e,{signatures:n}))},t.exports=p}).call(this,e("buffer").Buffer)},{"../config":44,"./ecc/src/hash":23,"./ecc/src/key_private":24,"./ecc/src/key_public":25,"./ecc/src/signature":27,"./serializer/src/operations":36,bigi:70,bs58:103,buffer:105,ecurve:165}],29:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});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};r.decode=u,r.encode=l;var i=f(e("bytebuffer")),o=f(e("assert")),a=f(e("bs58")),s=e("./ecc");function f(e){return e&&e.__esModule?e:{default:e}}var c=e("./serializer").ops.encrypted_memo;function u(e,r){if((0,o.default)(r,"memo is required"),o.default.equal(void 0===r?"undefined":n(r),"string","memo"),!/^#/.test(r))return r;r=r.substring(1),(0,o.default)(e,"private_key is required"),d(),e=p(e),r=a.default.decode(r);var f=r=c.fromBuffer(new t(r,"binary")),u=f.from,l=f.to,h=f.nonce,b=f.check,m=f.encrypted,y=e.toPublicKey().toString()===u.toString()?l.toString():u.toString();r=s.Aes.decrypt(e,y,h,m,b);var g=i.default.fromBinary(r.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);try{return g.mark(),"#"+g.readVString()}catch(e){return g.reset(),"#"+(r=new t(g.toString("binary"),"binary").toString("utf-8"))}}function l(e,r,f,u){if((0,o.default)(f,"memo is required"),o.default.equal(void 0===f?"undefined":n(f),"string","memo"),!/^#/.test(f))return f;f=f.substring(1),(0,o.default)(e,"private_key is required"),(0,o.default)(r,"public_key is required"),d(),e=p(e),r=b(r);var l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeVString(f),f=new t(l.copy(0,l.offset).toBinary(),"binary");var h=s.Aes.encrypt(e,r,f,u),m=h.nonce,y=h.message,g=h.checksum;return f=c.fromObject({from:e.toPublicKey(),to:r,nonce:m,check:g,encrypted:y}),f=c.toBuffer(f),"#"+a.default.encode(new t(f,"binary"))}var h=void 0;function d(){if(void 0===h){var e=void 0;h=!0;try{var t="5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw";e=u(t,l(t,"STM8m5UgaFAAYQRuaNejYdS8FVLVp9Ss3K1qAVk5de6F8s3HnVbvA","#memo爱"))}catch(e){console.error(e)}finally{h="#memo爱"===e}}if(!1===h)throw new Error("This environment does not support encryption.")}var p=function(e){return e?e.d?e:s.PrivateKey.fromWif(e):e},b=function(e){return e?e.Q?e:s.PublicKey.fromString(e):e}}).call(this,e("buffer").Buffer)},{"./ecc":16,"./serializer":30,assert:62,bs58:103,buffer:105,bytebuffer:106}],30:[function(e,t,r){"use strict";t.exports={Serializer:e("./src/serializer"),fp:e("./src/fast_parser"),types:e("./src/types"),ops:e("./src/operations"),template:e("./src/template"),number_utils:e("./src/number_utils")}},{"./src/fast_parser":33,"./src/number_utils":34,"./src/operations":36,"./src/serializer":37,"./src/template":38,"./src/types":39}],31:[function(e,t,r){"use strict";var n;t.exports=n={},n.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},n.operations={vote:0,comment:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,limit_order_create:5,limit_order_cancel:6,feed_publish:7,convert:8,account_create:9,account_update:10,witness_update:11,account_witness_vote:12,account_witness_proxy:13,pow:14,custom:15,report_over_production:16,delete_comment:17,custom_json:18,comment_options:19,set_withdraw_vesting_route:20,limit_order_create2:21,challenge_authority:22,prove_authority:23,request_account_recovery:24,recover_account:25,change_recovery_account:26,escrow_transfer:27,escrow_dispute:28,escrow_release:29,pow2:30,escrow_approve:31,transfer_to_savings:32,transfer_from_savings:33,cancel_transfer_from_savings:34,custom_binary:35,decline_voting_rights:36,reset_account:37,set_reset_account:38,claim_reward_balance:39,delegate_vesting_shares:40,account_create_with_delegation:41,fill_convert_request:42,author_reward:43,curation_reward:44,comment_reward:45,liquidity_reward:46,interest:47,fill_vesting_withdraw:48,fill_order:49,shutdown_witness:50,fill_transfer_from_savings:51,hardfork:52,comment_payout_update:53,return_vesting_delegation:54,comment_benefactor_reward:55},n.object_type={null:0,base:1}},{}],32:[function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;ro.length;)e.writeUint8(0)}}},{key:"public_key",value:function(t,r){if(t){if(!r)return n=e.fixed_data(t,33),i.PublicKey.fromBuffer(n);var n=r.toBuffer();t.append(n.toString("binary"),"binary")}}},{key:"ripemd160",value:function(t,r){if(t)return r?void e.fixed_data(t,20,r):e.fixed_data(t,20)}},{key:"time_point_sec",value:function(e,t){return t?(t=Math.ceil(t/1e3),void e.writeInt32(t)):(t=e.readInt32(),new Date(1e3*t))}}]),e}();t.exports=o}).call(this,e("buffer").Buffer)},{"../../ecc":16,buffer:105}],34:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});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"==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};r.toImpliedDecimal=function(e,t){"number"==typeof e?((0,s.default)(e<=9007199254740991,"overflow"),e=""+e):e.toString&&(e=e.toString());(0,s.default)("string"==typeof e,"number should be an actual number or string: "+(void 0===e?"undefined":i(e))),e=e.trim(),(0,s.default)(/^[0-9]*\.?[0-9]*$/.test(e),"Invalid decimal number "+e);var r=e.split("."),o=n(r,2),a=o[0],f=void 0===a?"":a,c=o[1],u=void 0===c?"":c,l=t-u.length;(0,s.default)(l>=0,"Too many decimal digits in "+e+" to create an implied decimal of "+t);for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{use_default:!1,annotate:!1},r={},n=null;try{if(!this.types)return r;for(var i=this.keys,f=0;fc?1:f6)throw new Error("Symbols are not longer than 6 characters "+a+"-"+a.length);e.writeInt64(f.to_long(i.replace(".","")));var s=i.indexOf("."),c=-1===s?0:i.length-s-1;e.writeUint8(c),e.append(a.toUpperCase(),"binary");for(var u=0;u<7-a.length;u++)e.writeUint8(0)},fromObject:function(e){return e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0.000 STEEM":e}},h.uint8={fromByteBuffer:function(e){return e.readUint8()},appendByteBuffer:function(e,t){f.require_range(0,255,t,"uint8 "+t),e.writeUint8(t)},fromObject:function(e){return f.require_range(0,255,e,"uint8 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(0,255,e,"uint8 "+e),parseInt(e))}},h.uint16={fromByteBuffer:function(e){return e.readUint16()},appendByteBuffer:function(e,t){f.require_range(0,65535,t,"uint16 "+t),e.writeUint16(t)},fromObject:function(e){return f.require_range(0,65535,e,"uint16 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(0,65535,e,"uint16 "+e),parseInt(e))}},h.uint32={fromByteBuffer:function(e){return e.readUint32()},appendByteBuffer:function(e,t){f.require_range(0,4294967295,t,"uint32 "+t),e.writeUint32(t)},fromObject:function(e){return f.require_range(0,4294967295,e,"uint32 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(0,4294967295,e,"uint32 "+e),parseInt(e))}};var p=-1*Math.pow(2,31),b=Math.pow(2,31)-1;h.varint32={fromByteBuffer:function(e){return e.readVarint32()},appendByteBuffer:function(e,t){f.require_range(p,b,t,"uint32 "+t),e.writeVarint32(t)},fromObject:function(e){return f.require_range(p,b,e,"uint32 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(p,b,e,"uint32 "+e),parseInt(e))}},h.int16={fromByteBuffer:function(e){return e.readInt16()},appendByteBuffer:function(e,t){e.writeInt16(t)},fromObject:function(e){return e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:parseInt(e)}},h.int64={fromByteBuffer:function(e){return e.readInt64()},appendByteBuffer:function(e,t){f.required(t),e.writeInt64(f.to_long(t))},fromObject:function(e){return f.required(e),f.to_long(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0":(f.required(e),f.to_long(e).toString())}},h.uint64={fromByteBuffer:function(e){return e.readUint64()},appendByteBuffer:function(e,t){e.writeUint64(f.to_long(f.unsigned(t)))},fromObject:function(e){return f.to_long(f.unsigned(e))},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0":f.to_long(e).toString()}},h.string={fromByteBuffer:function(e){return new n(e.readVString(),"utf8")},appendByteBuffer:function(e,t){f.required(t),e.writeVString(t.toString())},fromObject:function(e){return f.required(e),new n(e,"utf8")},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"":e.toString("utf8")}},h.string_binary={fromByteBuffer:function(e){var t,r=e.readVarint32();return t=e.copy(e.offset,e.offset+r),e.skip(r),new n(t.toBinary(),"binary")},appendByteBuffer:function(e,t){e.writeVarint32(t.length),e.append(t.toString("binary"),"binary")},fromObject:function(e){return f.required(e),new n(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"":e.toString()}},h.bytes=function(e){return{fromByteBuffer:function(t){if(void 0===e){var r,i=t.readVarint32();return r=t.copy(t.offset,t.offset+i),t.skip(i),new n(r.toBinary(),"binary")}return r=t.copy(t.offset,t.offset+e),t.skip(e),new n(r.toBinary(),"binary")},appendByteBuffer:function(t,r){f.required(r),"string"==typeof r&&(r=new n(r,"hex")),void 0===e&&t.writeVarint32(r.length),t.append(r.toString("binary"),"binary")},fromObject:function(e){return f.required(e),n.isBuffer(e)?e:new n(e,"hex")},toObject:function(t){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t){return new Array(e).join("00")}return f.required(t),t.toString("hex")}}},h.bool={fromByteBuffer:function(e){return 1===e.readUint8()},appendByteBuffer:function(e,t){e.writeUint8(JSON.parse(t)?1:0)},fromObject:function(e){return!!JSON.parse(e)},toObject:function(e){return(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==e)&&!!JSON.parse(e)}},h.void={fromByteBuffer:function(e){throw new Error("(void) undefined type")},appendByteBuffer:function(e,t){throw new Error("(void) undefined type")},fromObject:function(e){throw new Error("(void) undefined type")},toObject:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==e)throw new Error("(void) undefined type")}},h.array=function(e){return{fromByteBuffer:function(t){var r=t.readVarint32();d&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0r;i++)n.push(e.fromByteBuffer(t));return g(n,e)},appendByteBuffer:function(t,r){f.required(r),r=g(r,e),t.writeVarint32(r.length);for(var n,i=0;i1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===t)return[e.toObject(t,r)];f.required(t),t=g(t,e);for(var n,i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e)return new Date(0).toISOString().split(".")[0];if(f.required(e),"string"==typeof e)return e;if(e.getTime)return e.toISOString().split(".")[0];var t=parseInt(e);return f.require_range(0,4294967295,t,"uint32 "+e),new Date(1e3*t).toISOString().split(".")[0]}},h.set=function(e){return{validate:function(t){for(var r,n={},o=0;o=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return g(t,e)},fromByteBuffer:function(t){var r=t.readVarint32();return d&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0r;i++)n.push(e.fromByteBuffer(t));return n}())},appendByteBuffer:function(t,r){r||(r=[]),t.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return r.use_default&&void 0===t?[e.toObject(t,r)]:(t||(t=[]),this.validate(function(){for(var n,i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{},i=l.object_type[r];return n.use_default&&void 0===e?t+"."+i+".0":(f.required(e),void 0!==e.resolve&&(e=e.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(e)&&(e=f.get_instance(t,r,e)),t+"."+i+"."+e)}};var t,r},h.object_id_type={fromByteBuffer:function(e){return c.fromByteBuffer(e)},appendByteBuffer:function(e,t){f.required(t),void 0!==t.resolve&&(t=t.resolve),(t=c.fromString(t)).appendByteBuffer(e)},fromObject:function(e){return f.required(e),void 0!==e.resolve&&(e=e.resolve),c.fromString(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0.0.0":(f.required(e),void 0!==e.resolve&&(e=e.resolve),(e=c.fromString(e)).toString())}},h.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(e){var t=e.readUint32();return{type:t&this.TYPE,id:t&this.ID}},appendByteBuffer:function(e,t){f.required(t),"string"===t&&(t=h.vote_id.fromObject(t));var r=t.id<<8|t.type;e.writeUint32(r)},fromObject:function(e){if(f.required(e,"(type vote_id)"),"object"===(void 0===e?"undefined":i(e)))return f.required(e.type,"type"),f.required(e.id,"id"),e;f.require_test(/^[0-9]+:[0-9]+$/,e,"vote_id format "+e);var t=e.split(":"),r=o(t,2),n=r[0],a=r[1];return f.require_range(0,255,n,"vote type "+e),f.require_range(0,16777215,a,"vote id "+e),{type:n,id:a}},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0:0":(f.required(e),"string"==typeof e&&(e=h.vote_id.fromObject(e)),e.type+":"+e.id)},compare:function(e,t){return"object"!==(void 0===e?"undefined":i(e))&&(e=h.vote_id.fromObject(e)),"object"!==(void 0===t?"undefined":i(t))&&(t=h.vote_id.fromObject(t)),parseInt(e.id)-parseInt(t.id)}},h.optional=function(e){return f.required(e,"st_operation"),{fromByteBuffer:function(t){if(1===t.readUint8())return e.fromByteBuffer(t)},appendByteBuffer:function(t,r){null!==r&&void 0!==r?(t.writeUint8(1),e.appendByteBuffer(t,r)):t.writeUint8(0)},fromObject:function(t){if(void 0!==t)return e.fromObject(t)},toObject:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.use_default||void 0!==t?e.toObject(t,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.static_variant=function(e){return{nosort:!0,st_operations:e,opTypeId:function(e){var t=0,r=void 0;if("number"==typeof e)r=e;else{var n=!0,i=!1,o=void 0;try{for(var a,s=this.st_operations[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){if(a.value.operation_name===e){r=t;break}t++}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}}return r},fromByteBuffer:function(e){var t=e.readVarint32(),r=this.st_operations[t];return d&&console.error("static_variant id 0x"+t.toString(16)+" ("+t+")"),f.required(r,"operation "+t),[t,r.fromByteBuffer(e)]},appendByteBuffer:function(e,t){f.required(t);var r=this.opTypeId(t[0]),n=this.st_operations[r];f.required(n,"operation "+r),e.writeVarint32(r),n.appendByteBuffer(e,t[1])},fromObject:function(e){f.required(e);var t=this.opTypeId(e[0]),r=this.st_operations[t];return f.required(r,"operation "+t),[t,r.fromObject(e[1])]},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.use_default&&void 0===e)return[this.st_operations[0].operation_name,this.st_operations[0].toObject(void 0,t)];f.required(e);var r=this.opTypeId(e[0]),n=this.st_operations[r];return f.required(n,"operation "+r),[n.operation_name,n.toObject(e[1],t)]},compare:function(e,t){return m(this.opTypeId(e[0]),this.opTypeId(t[0]))}}},h.map=function(e,t){return{validate:function(t){if(!Array.isArray(t))throw new Error("expecting array");for(var r,n={},o=0;o=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return g(t,e)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0i;o++)n.push([e.fromByteBuffer(r),t.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if(n.use_default&&void 0===r)return[[e.toObject(void 0,n),t.toObject(void 0,n)]];f.required(r),r=this.validate(r);for(var i,o=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?a.ecc_config.get("address_prefix")+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(f.required(e),e.toString())},compare:function(e,t){return 1*m(e.toString(),t.toString())}},h.address={_to_address:function(e){return f.required(e),e.addy?e:a.Address.fromString(e)},fromByteBuffer:function(e){return new a.Address(u.ripemd160(e))},appendByteBuffer:function(e,t){u.ripemd160(e,h.address._to_address(t).toBuffer())},fromObject:function(e){return h.address._to_address(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?a.ecc_config.get("address_prefix")+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":h.address._to_address(e).toString()},compare:function(e,t){return-1*m(e.toString(),t.toString())}};var m=function(e,t){return e>t?1:e1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))throw new Error("value required "+t+" "+e);return e},require_long:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!c.isLong(e))throw new Error("Long value required "+t+" "+e);return e},string:function(e){if(i(e))return e;if("string"!=typeof e)throw new Error("string required: "+e);return e},number:function(e){if(i(e))return e;if("number"!=typeof e)throw new Error("number required: "+e);return e},whole_number:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if(/\./.test(e))throw new Error("whole number required "+t+" "+e);return e},unsigned:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if(/-/.test(e))throw new Error("unsigned required "+t+" "+e);return e},is_digits:function(e){return"numeric"==typeof e||/^[0-9]+$/.test(e)},to_number:o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(e)?e:(n.no_overflow53(e,t),"number"==typeof e?e:parseInt(e))},to_long:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(e)?e:c.isLong(e)?e:(n.no_overflow64(e,t),"number"==typeof e&&(e=""+e),c.fromString(e))},to_string:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if("string"==typeof e)return e;if("number"==typeof e)return n.no_overflow53(e,t),""+e;if(c.isLong(e))return e.toString();throw"unsupported type "+t+": ("+(void 0===e?"undefined":f(e))+") "+e},require_test:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(t))return t;if(!e.test(t))throw new Error("unmatched "+e+" "+r+" "+t);return t},require_match:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(t))return t;var n=t.match(e);if(null===n)throw new Error("unmatched "+e+" "+r+" "+t);return n},require_range:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;o(r);if(rt)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;var o=u.object_type[t];if(!o)throw new Error("Unknown object type: "+t+", "+n+", "+r);if(!new RegExp(e+"."+o+".[0-9]+$").test(r))throw new Error("Expecting "+t+" in format "+e+"."+o+".[0-9]+ instead of "+r+" "+n+" "+r);return r},get_instance:function(e,t,r,n){return i(r)?r:(a(e,t,r,n),o(r.split(".")[2]))},require_relative_type:function(e,t,r){return a(0,e,t,r),t},get_relative_instance:function(e,t,r){return i(t)?t:(a(0,e,t,r),o(t.split(".")[2]))},require_protocol_type:function(e,t,r){return a(1,e,t,r),t},get_protocol_instance:function(e,t,r){return i(t)?t:(a(1,e,t,r),o(t.split(".")[2]))},get_protocol_type:s=function(e,t){if(i(e))return e;(void 0)(e,t);var r=e.split(".");return o(r[1])},get_protocol_type_name:function(e,t){if(i(e))return e;var r=s(e,t);return Object.keys(u.object_type)[r]},require_implementation_type:function(e,t,r){return a(2,e,t,r),t},get_implementation_instance:function(e,t,r){return i(t)?t:(a(2,e,t,r),o(t.split(".")[2]))},no_overflow53:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("number"!=typeof e)if("string"!=typeof e){if(!c.isLong(e))throw"unsupported type "+t+": ("+(void 0===e?"undefined":f(e))+") "+e;n.no_overflow53(e.toInt(),t)}else{parseInt(e);if(e>9007199254740991||e<-9007199254740991)throw new Error("overflow "+t+" "+e)}else if(e>9007199254740991||e<-9007199254740991)throw new Error("overflow "+t+" "+e)},no_overflow64:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!c.isLong(e))if(void 0===e.t||void 0===e.s)if("string"!=typeof e){if("number"!=typeof e)throw"unsupported type "+t+": ("+(void 0===e?"undefined":f(e))+") "+e;if(e>9007199254740991||e<-9007199254740991)throw new Error("overflow "+t+" "+e)}else{for(e=e.replace(/^0+/,"");/0$/.test(e);)e=e.substring(0,e.length-1);if(/\.$/.test(e)&&(e=e.substring(0,e.length-1)),""===e&&(e="0"),c.fromString(e).toString()!==e.trim())throw new Error("overflow "+t+" "+e)}else n.no_overflow64(e.toString(),t)}}},{"./ChainTypes":31,bytebuffer:106}],41:[function(e,t,r){"use strict";var n,i=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")}}(),o=e("../api"),a=(n=o)&&n.__esModule?n:{default:n};t.exports=function(e){e.addAccountAuth=function(t,r){var n=t.signingKey,o=t.username,s=t.authorizedUsername,f=t.role,c=void 0===f?"posting":f,u=t.weight;a.default.getAccounts([o],function(t,o){var a=i(o,1)[0];if(t)return r(new Error(t),null);if(!a)return r(new Error("Invalid account name"),null);var f=a[c];if(-1!==f.account_auths.map(function(e){return e[0]}).indexOf(s))return r(null,null);u=u||a[c].weight_threshold,f.account_auths.push([s,u]);var l="owner"===c?f:void 0,h="active"===c?f:void 0,d="posting"===c?f:void 0;e.accountUpdate(n,a.name,l,h,d,a.memo_key,a.json_metadata,r)})},e.removeAccountAuth=function(t,r){var n=t.signingKey,o=t.username,s=t.authorizedUsername,f=t.role,c=void 0===f?"posting":f;a.default.getAccounts([o],function(t,o){var a=i(o,1)[0];if(t)return r(new Error(t),null);if(!a)return r(new Error("Invalid account name"),null);for(var f=a[c],u=f.account_auths.length,l=0;l1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{},s=o.gprops,f=o.feed_price,c=o.open_orders,u=o.savings_withdraws,l=o.vesting_steem,h=[],d=i.name,p=void 0,b=void 0;return l&&f||(s&&f?l=t(i,s):h.push(e.getStateAsync("/@{username}").then(function(e){s=e.props,f=e.feed_price,l=t(i,s)}))),c?p=r(c,1e3):h.push(e.getOpenOrdersAsync(d).then(function(e){p=r(e,1e3)})),u?b=n(u):h.push(e.getSavingsWithdrawFromAsync(d).then(function(e){b=n(e)})),Promise.all(h).then(function(){var e=void 0,t=f,r=t.base,n=t.quote;/ SBD$/.test(r)&&/ STEEM$/.test(n)&&(e=parseFloat(r.split(" ")[0]));var o=i.savings_balance,s=i.savings_sbd_balance,c=parseFloat(i.balance.split(" ")[0]),u=parseFloat(o.split(" ")[0]),h=parseFloat(i.sbd_balance),d=parseFloat(s.split(" ")[0]),m=0,y=(new Date).getTime();(i.other_history||[]).reduce(function(e,t){if("convert"!==(0,a.default)(t,[1,"op",0],""))return e;if(new Date((0,a.default)(t,[1,"timestamp"])).getTime()+3024e516)return i+"be shorter.";/\./.test(e)&&(i="Each account segment should ");var a=e.split(".");for(t=0,n=a.length;t=3))return i+"be longer"}return null};var n=/_([a-z])/g},{}],48:[function(e,t,r){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":49,"./asn1/base":51,"./asn1/constants":55,"./asn1/decoders":57,"./asn1/encoders":60,"bn.js":73}],49:[function(e,t,r){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;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":48,inherits:238,vm:445}],50:[function(e,t,r){var n=e("inherits"),i=e("../base").Reporter,o=e("buffer").Buffer;function a(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof s||(e=new s(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=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),r.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new o(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):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":51,buffer:105,inherits:238}],51:[function(e,t,r){var n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":50,"./node":52,"./reporter":53}],52:[function(e,t,r){var n=e("../base").Reporter,i=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,a=e("minimalistic-assert"),s=["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"],f=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(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=c;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};u.forEach(function(r){t[r]=e[r]});var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;f.forEach(function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},c.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&&(a(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof 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){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),s.forEach(function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}}),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var f=null;if(null!==r.explicit?f=r.explicit:null!==r.implicit?f=r.implicit:null!==r.tag&&(f=r.tag),null!==f||r.any){if(a=this._peekTag(e,f,r.any),e.isError(a))return a}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){var u=this._decodeTag(e,r.explicit);if(e.isError(u))return u;e=u}var l=e.offset;if(null===r.use&&null===r.choice){if(r.any)c=e.save();var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(c):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;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 d=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.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)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(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},c.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 f=s._decode(e,t);if(e.isError(f))return!1;n={type:o,value:f},i=!0}catch(t){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.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}},c.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)a=i.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 n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var f=this.clone();f._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},f))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,u=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,s,u,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.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)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":51,"minimalistic-assert":389}],53:[function(e,t,r){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,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:238}],54:[function(e,t,r){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":55}],55:[function(e,t,r){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":54}],56:[function(e,t,r){var n=e("inherits"),i=e("../../asn1"),o=i.base,a=i.bignum,s=i.constants.der;function f(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 u(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 l(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=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)return(o=new i(2))[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var f=1,c=n.length;c>=256;c>>=8)f++;(o=new i(2+f))[0]=a,o[1]=128|f;c=1+f;for(var u=n.length;u>0;c--,u>>=8)o[c]=255&u;return this._createEncoderBuffer([o,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=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n=128;a>>=7)o++}var s=new i(o),f=s.length-1;for(n=e.length-1;n>=0;n--){a=e[n];for(s[f--]=127&a;(a>>=7)>0;)s[f--]=128|127&a}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(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]);n=1;for(var a=e;a>=256;a>>=8)n++;for(a=(o=new Array(n)).length-1;a>=0;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},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,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=0;c--)if(u[c]!==l[c])return!1;for(c=u.length-1;c>=0;c--)if(f=u[c],!g(e[f],t[f],r,n))return!1;return!0}(e,t,r,a))}return r?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function _(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,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&&m(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!e&&o.isError(i),f=!e&&i&&!r;if((s&&a&&_(i,r)||f)&&m(i,r,"Got unwanted exception"+n),e&&i&&r&&!_(i,r)||!e&&i)throw i}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=p(b((t=this).actual),128)+" "+t.operator+" "+p(b(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=d(r),a=i.indexOf("\n"+o);if(a>=0){var s=i.indexOf("\n",a+1);i=i.substring(s+1)}this.stack=i}}},o.inherits(l.AssertionError,Error),l.fail=m,l.ok=y,l.equal=function(e,t,r){e!=t&&m(e,t,r,"==",l.equal)},l.notEqual=function(e,t,r){e==t&&m(e,t,r,"!=",l.notEqual)},l.deepEqual=function(e,t,r){g(e,t,!1)||m(e,t,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(e,t,r){g(e,t,!0)||m(e,t,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(e,t,r){g(e,t,!1)&&m(e,t,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function e(t,r,n){g(t,r,!0)&&m(t,r,n,"notDeepStrictEqual",e)},l.strictEqual=function(e,t,r){e!==t&&m(e,t,r,"===",l.strictEqual)},l.notStrictEqual=function(e,t,r){e===t&&m(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};var x=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":65}],63:[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}},{}],64:[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}},{}],65:[function(e,t,r){(function(t,n){var i=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;r=o)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}}),f=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),u(n,e,n.depth)}function f(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(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 y(i)||(i=u(e,i,n)),i}var o=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(b(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)),x(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(t);if(0===a.length){if(k(t)){var f=t.name?": "+t.name:"";return e.stylize("[Function"+f+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(x(t))return l(t)}var c,_="",S=!1,E=["{","}"];(d(t)&&(S=!0,E=["[","]"]),k(t))&&(_=" [Function"+(t.name?": "+t.name:"")+"]");return v(t)&&(_=" "+RegExp.prototype.toString.call(t)),w(t)&&(_=" "+Date.prototype.toUTCString.call(t)),x(t)&&(_=" "+l(t)),0!==a.length||S&&0!=t.length?n<0?v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=S?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a=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,_,E)):E[0]+_+E[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var a,s,f;if((f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),A(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(f.value)<0?(s=b(r)?u(e,f.value,null):u(e,f.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")),g(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 d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function b(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function g(e){return void 0===e}function v(e){return _(e)&&"[object RegExp]"===S(e)}function _(e){return"object"==typeof e&&null!==e}function w(e){return _(e)&&"[object Date]"===S(e)}function x(e){return _(e)&&("[object Error]"===S(e)||e instanceof Error)}function k(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(g(o)&&(o=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=s,s.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]},s.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=b,r.isNullOrUndefined=function(e){return null==e},r.isNumber=m,r.isString=y,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=g,r.isRegExp=v,r.isObject=_,r.isDate=w,r.isError=x,r.isFunction=k,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");var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){var e,t;console.log("%s - %s",(e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":"),[e.getDate(),B[e.getMonth()],t].join(" ")),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!_(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":64,_process:404,inherits:63}],66:[function(e,t,r){var n=e("safe-buffer").Buffer;t.exports=function(e){for(var t={},r=e.length,i=e.charAt(0),o=0;o>=8;for(;c>0;)o.push(255&c),c>>=8}for(var u=0;e[u]===i&&u0;)n.push(s%r),s=s/r|0}for(var f="",c=0;0===t[c]&&c=0;--u)f+=e[n[u]];return f},decodeUnsafe:s,decode:function(e){var t=s(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}},{"safe-buffer":428}],67:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){for(var t,r=c(e),n=r[0],a=r[1],s=new o(function(e,t,r){return 3*(t+r)/4-r}(0,n,a)),f=0,u=a>0?n-4:n,l=0;l>16&255,s[f++]=t>>8&255,s[f++]=255&t;2===a&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,s[f++]=255&t);1===a&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,s[f++]=t>>8&255,s[f++]=255&t);return s},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],68:[function(e,t,r){function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}var i=n.prototype;i.__bigi=e("../package.json").version,n.isBigInteger=function(e,t){return e&&e.__bigi&&(!t||e.__bigi===i.__bigi)},n.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this[e++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},n.prototype.DB=26,n.prototype.DM=67108863;var o=n.prototype.DV=1<<26;n.prototype.FV=Math.pow(2,52),n.prototype.F1=26,n.prototype.F2=0;var a,s,f="0123456789abcdefghijklmnopqrstuvwxyz",c=new Array;for(a="0".charCodeAt(0),s=0;s<=9;++s)c[a++]=s;for(a="a".charCodeAt(0),s=10;s<36;++s)c[a++]=s;for(a="A".charCodeAt(0),s=10;s<36;++s)c[a++]=s;function u(e){return f.charAt(e)}function l(e,t){var r=c[e.charCodeAt(t)];return null==r?-1:r}function h(e){var t=new n;return t.fromInt(e),t}function d(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 p(e){this.m=e}function b(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=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 w(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function x(){}function k(e){return e}function S(e){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}p.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},p.prototype.revert=function(e){return e},p.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},p.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},p.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},b.prototype.convert=function(e){var t=new n;return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(n.ZERO)>0&&this.m.subTo(t,t),t},b.prototype.revert=function(e){var t=new n;return e.copyTo(t),this.reduce(t),t},b.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[r=t+this.m.t]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},b.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},b.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},i.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},i.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+o:this.t=0},i.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 i=e.length,o=!1,a=0;--i>=0;){var s=8==r?255&e[i]:l(e,i);s<0?"-"==e.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<>this.DB-a):this[this.t-1]|=s<=this.DB&&(a-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},i.dlShiftTo=function(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s},i.drShiftTo=function(e,t){for(var r=e;r=0;--r)t[r+a+1]=this[r]>>i|s,s=(this[r]&o)<=0;--r)t[r]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},i.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;for(var a=r+1;a>n;n>0&&(t[this.t-r-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()},i.multiplyTo=function(e,t){var r=this.abs(),i=e.abs(),o=r.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()},i.divRemTo=function(e,t,r){var i=e.abs();if(!(i.t<=0)){var o=this.abs();if(o.t0?(i.lShiftTo(c,a),o.lShiftTo(c,r)):(i.copyTo(a),o.copyTo(r));var u=a.t,l=a[u-1];if(0!=l){var h=l*(1<1?a[u-2]>>this.F2:0),p=this.FV/h,b=(1<=0&&(r[r.t++]=1,r.subTo(v,r)),n.ONE.dlShiftTo(u,v),v.subTo(a,a);a.t=0;){var _=r[--y]==l?this.DM:Math.floor(r[y]*p+(r[y-1]+m)*b);if((r[y]+=a.am(0,_,r,g,0,u))<_)for(a.dlShiftTo(g,v),r.subTo(v,r);r[y]<--_;)r.subTo(v,r)}null!=t&&(r.drShiftTo(u,t),s!=f&&n.ZERO.subTo(t,t)),r.t=u,r.clamp(),c>0&&r.rShiftTo(c,r),s<0&&n.ZERO.subTo(r,r)}}},i.invDigit=function(){if(this.t<1)return 0;var e=this[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},i.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.exp=function(e,t){if(e>4294967295||e<1)return n.ONE;var r=new n,i=new n,o=t.convert(this),a=d(e)-1;for(o.copyTo(r);--a>=0;)if(t.sqrTo(r,i),(e&1<0)t.mulTo(i,o,r);else{var s=r;r=i,i=s}return t.revert(r)},i.toString=function(e){var t;if(this.s<0)return"-"+this.negate().toString(e);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<0)for(s>s)>0&&(i=!0,o=u(r));a>=0;)s>(s+=this.DB-t)):(r=this[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=u(r));return i?o:"0"},i.negate=function(){var e=new n;return n.ZERO.subTo(this,e),e},i.abs=function(){return this.s<0?this.negate():this},i.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[r]-e[r]))return t;return 0},i.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this[this.t-1]^this.s&this.DM)},i.byteLength=function(){return this.bitLength()>>3},i.mod=function(e){var t=new n;return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(n.ZERO)>0&&e.subTo(t,t),t},i.modPowInt=function(e,t){var r;return r=e<256||t.isEven()?new p(t):new b(t),this.exp(e,r)},x.prototype.convert=k,x.prototype.revert=k,x.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},x.prototype.sqrTo=function(e,t){e.squareTo(t)},S.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=new n;return e.copyTo(t),this.reduce(t),t},S.prototype.revert=function(e){return e},S.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)},S.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},S.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var E=[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,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/E[E.length-1];i.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},i.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),i=h(r),o=new n,a=new n,s="";for(this.divRemTo(i,o,a);o.signum()>0;)s=(r+a.intValue()).toString(e).substr(1)+s,o.divRemTo(i,o,a);return a.intValue().toString(e)+s},i.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),o=!1,a=0,s=0,f=0;f=r&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),o&&n.ZERO.subTo(this,this)},i.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(n.ONE.shiftLeft(e-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(n.ONE.shiftLeft(e-1),this);else{var i=new Array,o=7&e;i.length=1+(e>>3),t.nextBytes(i),o>0?i[0]&=(1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()},i.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},i.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},i.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[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(t-this.t,0);n0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r},i.millerRabin=function(e){var t=this.subtract(n.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);(e=e+1>>1)>E.length&&(e=E.length);for(var o=new n(null),a=[],s=0;s>24},i.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.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>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this[e]&(1<>(n+=this.DB-8)):(r=this[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},i.equals=function(e){return 0==this.compareTo(e)},i.min=function(e){return this.compareTo(e)<0?this:e},i.max=function(e){return this.compareTo(e)>0?this:e},i.and=function(e){var t=new n;return this.bitwiseTo(e,m,t),t},i.or=function(e){var t=new n;return this.bitwiseTo(e,y,t),t},i.xor=function(e){var t=new n;return this.bitwiseTo(e,g,t),t},i.andNot=function(e){var t=new n;return this.bitwiseTo(e,v,t),t},i.not=function(){for(var e=new n,t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var l=new n;for(i.sqrTo(s[1],l);f<=u;)s[f]=new n,i.mulTo(l,s[f-2],s[f]),f+=2}var m,y,g=e.t-1,v=!0,_=new n;for(o=d(e[g])-1;g>=0;){for(o>=c?m=e[g]>>o-c&u:(m=(e[g]&(1<0&&(m|=e[g-1]>>this.DB+o-c)),f=r;0==(1&m);)m>>=1,--f;if((o-=f)<0&&(o+=this.DB,--g),v)s[m].copyTo(a),v=!1;else{for(;f>1;)i.sqrTo(a,_),i.sqrTo(_,a),f-=2;f>0?i.sqrTo(a,_):(y=a,a=_,_=y),i.mulTo(_,s[m],a)}for(;g>=0&&0==(e[g]&1<=0?(r.subTo(i,r),t&&o.subTo(s,o),a.subTo(f,a)):(i.subTo(r,i),t&&s.subTo(o,s),f.subTo(a,f))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;f.compareTo(e)>=0;)f.subTo(e,f);for(;f.signum()<0;)f.addTo(e,f);return f},i.pow=function(e){return this.exp(e,new x)},i.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(i0&&(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},i.isProbablePrime=function(e){var t,r=this.abs();if(1==r.t&&r[0]<=E[E.length-1]){for(t=0;t0;)d(e)}function d(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var r=e.shift(),n=e.shift();t.call(r,n)}}f.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},f.prototype.hasCustomScheduler=function(){return this._customScheduler},f.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},f.prototype.disableTrampolineIfNecessary=function(){s.hasDevTools&&(this._trampolineEnabled=!1)},f.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},f.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},f.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout(function(){e(t)},0);else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.hasDevTools?(f.prototype.invokeLater=function(e,t,r){this._trampolineEnabled?c.call(this,e,t,r):this._schedule(function(){setTimeout(function(){e.call(t,r)},100)})},f.prototype.invoke=function(e,t,r){this._trampolineEnabled?u.call(this,e,t,r):this._schedule(function(){e.call(t,r)})},f.prototype.settlePromises=function(e){this._trampolineEnabled?l.call(this,e):this._schedule(function(){e._settlePromises()})}):(f.prototype.invokeLater=c,f.prototype.invoke=u,f.prototype.settlePromises=l),f.prototype._drainQueues=function(){h(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,h(this._lateQueue)},f.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},f.prototype._reset=function(){this._isTickUsed=!1},r.exports=f,r.exports.firstLineError=i},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},f=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var c=r(o),u=new e(t);u._propagateFrom(this,1);var l=this._target();if(u._setBoundTo(c),c instanceof e){var h={promiseRejectionQueued:!1,promise:u,target:l,bindingPromise:c};l._then(t,a,void 0,u,h),c._then(s,f,void 0,u,h),u._setOnCancel(c)}else u._resolveCallback(l);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var i=e("./promise")();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(e){}return i},t.exports=i},{"./promise":22}],5:[function(e,t,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){var r,n=e("./util"),i=n.canEvaluate;n.isIdentifier;function o(e,r){var i;if(null!=e&&(i=e[r]),"function"!=typeof i){var o="Object "+n.classString(e)+" has no method '"+n.toString(r)+"'";throw new t.TypeError(o)}return i}function a(e){return o(e,this.pop()).apply(e,this)}function s(e){return e[this]}function f(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(a,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=f;else if(i){var n=r(e);t=null!==n?n:s}else t=s;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){"use strict";t.exports=function(t,r,n,i){var o=e("./util"),a=o.tryCatch,s=o.errorObj,f=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),f.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var r=0;r=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=function(){if(t)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,f=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=f,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=i,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){var i,o,a,s=r._getDomain,f=r._async,c=t("./errors").Warning,u=t("./util"),l=t("./es5"),h=u.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,p=/\((?:timers\.js):\d+:\d+\)/,b=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,m=null,y=null,g=!1,v=!(0==u.env("BLUEBIRD_DEBUG")),_=!(0==u.env("BLUEBIRD_WARNINGS")||!v&&!u.env("BLUEBIRD_WARNINGS")),w=!(0==u.env("BLUEBIRD_LONG_STACK_TRACES")||!v&&!u.env("BLUEBIRD_LONG_STACK_TRACES")),x=0!=u.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(_||!!u.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},r.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var e=this;setTimeout(function(){e._notifyUnhandledRejection()},1)}},r.prototype._notifyUnhandledRejectionIsHandled=function(){K("rejectionHandled",i,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),K("unhandledRejection",o,e,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(e,t,r){return U(e,t,r||this)},r.onPossiblyUnhandledRejection=function(e){var t=s();o="function"==typeof e?null===t?e:u.domainBind(t,e):void 0},r.onUnhandledRejectionHandled=function(e){var t=s();i="function"==typeof e?null===t?e:u.domainBind(t,e):void 0};var k=function(){};r.longStackTraces=function(){if(f.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!Y.longStackTraces&&G()){var e=r.prototype._captureStackTrace,t=r.prototype._attachExtraTrace,i=r.prototype._dereferenceTrace;Y.longStackTraces=!0,k=function(){if(f.haveItemsQueued()&&!Y.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=e,r.prototype._attachExtraTrace=t,r.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),f.enableTrampoline(),Y.longStackTraces=!1},r.prototype._captureStackTrace=q,r.prototype._attachExtraTrace=N,r.prototype._dereferenceTrace=F,n.activateLongStackTraces(),f.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return Y.longStackTraces&&G()};var S=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return u.global.dispatchEvent(e),function(e,t){var r={detail:t,cancelable:!0};l.defineProperty(r,"promise",{value:t.promise}),l.defineProperty(r,"reason",{value:t.reason});var n=new CustomEvent(e.toLowerCase(),r);return!u.global.dispatchEvent(n)}}if("function"==typeof Event){e=new Event("CustomEvent");return u.global.dispatchEvent(e),function(e,t){var r=new Event(e.toLowerCase(),{cancelable:!0});return r.detail=t,l.defineProperty(r,"promise",{value:t.promise}),l.defineProperty(r,"reason",{value:t.reason}),!u.global.dispatchEvent(r)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),u.global.dispatchEvent(e),function(e,t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e.toLowerCase(),!1,!0,t),!u.global.dispatchEvent(r)}}catch(e){}return function(){return!1}}(),E=u.isNode?function(){return e.emit.apply(e,arguments)}:u.global?function(e){var t="on"+e.toLowerCase(),r=u.global[t];return!!r&&(r.apply(u.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function B(e,t){return{promise:t}}var A={promiseCreated:B,promiseFulfilled:B,promiseRejected:B,promiseResolved:B,promiseCancelled:B,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:B},T=function(e){var t=!1;try{t=E.apply(null,arguments)}catch(e){f.throwLater(e),t=!0}var r=!1;try{r=S(e,A[e].apply(null,arguments))}catch(e){f.throwLater(e),r=!0}return r||t};function j(){return!1}function C(e,t,r){var n=this;try{e(t,r,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+u.toString(e));n._attachCancellationCallback(e)})}catch(e){return e}}function M(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?u.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function I(){return this._onCancelField}function O(e){this._onCancelField=e}function P(){this._cancellationParent=void 0,this._onCancelField=void 0}function R(e,t){if(0!=(1&t)){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}r.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?r.longStackTraces():!e.longStackTraces&&r.hasLongStackTraces()&&k()),"warnings"in e){var t=e.warnings;Y.warnings=!!t,x=Y.warnings,u.isObject(t)&&"wForgottenReturn"in t&&(x=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!Y.cancellation){if(f.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=P,r.prototype._propagateFrom=R,r.prototype._onCancel=I,r.prototype._setOnCancel=O,r.prototype._attachCancellationCallback=M,r.prototype._execute=C,L=R,Y.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!Y.monitoring?(Y.monitoring=!0,r.prototype._fireEvent=T):!e.monitoring&&Y.monitoring&&(Y.monitoring=!1,r.prototype._fireEvent=j)),r},r.prototype._fireEvent=j,r.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(e){},r.prototype._attachCancellationCallback=function(e){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._dereferenceTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(e,t){};var L=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)};function D(){var e=this._boundTo;return void 0!==e&&e instanceof r?e.isFulfilled()?e.value():void 0:e}function q(){this._trace=new Q(this._peekContext())}function N(e,t){if(h(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=H(e);u.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),u.notEnumerableProp(e,"__stackCleaned__",!0)}}}function F(){this._trace=void 0}function U(e,t,n){if(Y.warnings){var i,o=new c(e);if(t)n._attachExtraTrace(o);else if(Y.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var a=H(o);o.stack=a.message+"\n"+a.stack.join("\n")}T("warning",o)||V(o,"",!0)}}function z(e){for(var t=[],r=0;r0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:z(t)}}function V(e,t,r){if("undefined"!=typeof console){var n;if(u.isObject(e)){var i=e.stack;n=t+y(i,e)}else n=t+String(e);"function"==typeof a?a(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function K(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){f.throwLater(e)}"unhandledRejection"===e?T(e,r,n)||i||V(r,"Unhandled rejection "):T(e,n)}function W(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():u.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+function(e){if(e.length<41)return e;return e.substr(0,38)+"..."}(t)+">, no stack trace)"}function G(){return"function"==typeof Z}var X=function(){return!1},J=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function $(e){var t=e.match(J);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function Q(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);Z(this,Q),t>32&&this.uncycle()}u.inherits(Q,Error),n.CapturedTrace=Q,Q.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var s=n>0?t[n-1]:this;a=0;--c)t[c]._length=f,f++;return}}}},Q.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=H(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(z(i.stack.split("\n"))),i=i._parent;!function(e){for(var t=e[0],r=1;r=0;--s)if(n[s]===o){a=s;break}for(s=a;s>=0;--s){var f=n[s];if(t[i]!==f)break;t.pop(),i--}t=n}}(n),function(e){for(var t=0;t=0)return m=/@/,y=t,g=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return"stack"in i||!n||"number"!=typeof Error.stackTraceLimit?(y=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?W(t):t.toString()},null):(m=e,y=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(e){console.warn(e)},u.isNode&&e.stderr.isTTY?a=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:u.isNode||"string"!=typeof(new Error).stack||(a=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var Y={warnings:_,longStackTraces:!1,cancellation:!1,monitoring:!1};return w&&r.longStackTraces(),{longStackTraces:function(){return Y.longStackTraces},warnings:function(){return Y.warnings},cancellation:function(){return Y.cancellation},monitoring:function(){return Y.monitoring},propagateFromFunction:function(){return L},boundValueFunction:function(){return D},checkForgottenReturns:function(e,t,r,n,i){if(void 0===e&&null!==t&&x){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),f=z(s),c=f.length-1;c>=0;--c){var u=f[c];if(!p.test(u)){var l=u.match(b);l&&(o="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(f.length>0){var h=f[0];for(c=0;c0&&(a="\n"+s[c-1]);break}}}var d="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(d,!0,t)}},setBounds:function(e,t){if(G()){for(var r,n,i=e.stack.split("\n"),o=t.stack.split("\n"),a=-1,s=-1,f=0;f=s||(X=function(e){if(d.test(e))return!0;var t=$(e);return!!(t&&t.fileName===r&&a<=t.line&&t.line<=s)})}},warn:U,deprecated:function(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),U(r)},CapturedTrace:Q,fireDomEvent:S,fireGlobalEvent:E}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,r){"use strict";t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();return this.caught(r,function(){return n})}}},{}],11:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return r(e,n,t,t)}}},{}],12:[function(e,t,r){"use strict";var n,i,o=e("./es5"),a=o.freeze,s=e("./util"),f=s.inherits,c=s.notEnumerableProp;function u(e,t){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:t),c(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return f(r,Error),r}var l=u("Warning","warning"),h=u("CancellationError","cancellation error"),d=u("TimeoutError","timeout error"),p=u("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=u("TypeError","type error"),i=u("RangeError","range error")}for(var b="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function l(){return d.call(this,this.promise._target()._settledValue())}function h(e){if(!u(this,e))return a.e=e,a}function d(e){var i=this.promise,s=this.handler;if(!this.called){this.called=!0;var f=this.isFinallyHandler()?s.call(i._boundValue()):s.call(i._boundValue(),e);if(f===n)return f;if(void 0!==f){i._setReturnedNonUndefined();var d=r(f,i);if(d instanceof t){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new o("late cancellation observer");return i._attachExtraTrace(p),a.e=p,a}d.isPending()&&d._attachCancellationCallback(new c(this))}return d._then(l,h,void 0,this,void 0)}}}return i.isRejected()?(u(this),a.e=e,a):(u(this),e)}return f.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){u(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new f(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,d,d)},t.prototype.tap=function(e){return this._passThrough(e,1,d)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,d);var n,o=new Array(r-1),a=0;for(n=0;n0&&"function"==typeof arguments[t]&&(e=arguments[t]);var n=[].slice.call(arguments);e&&n.pop();var i=new r(n).promise();return void 0!==e?i.spread(e):i}}},{"./util":36}],18:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){var s=t._getDomain,f=e("./util"),c=f.tryCatch,u=f.errorObj,l=t._async;function h(e,t,r,n){this.constructor$(e),this._promise._captureStackTrace();var i=s();this._callback=null===i?t:f.domainBind(i,t),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],l.invoke(this._asyncInit,this,void 0)}function d(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+f.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+f.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+f.classString(i.concurrency)));a=i.concurrency}return new h(e,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,o).promise()}f.inherits(h,r),h.prototype._asyncInit=function(){this._init$(void 0,-2)},h.prototype._init=function(){},h.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),s=this._preservedValues,f=this._limit;if(r<0){if(n[r=-1*r-1]=e,f>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(f>=1&&this._inFlight>=f)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var l=this._promise,h=this._callback,d=l._boundValue();l._pushContext();var p=c(h).call(d,e,r,o),b=l._popContext();if(a.checkForgottenReturns(p,b,null!==s?"Promise.filter":"Promise.map",l),p===u)return this._reject(p.e),!0;var m=i(p,this._promise);if(m instanceof t){var y=(m=m._target())._bitField;if(0==(50397184&y))return f>=1&&this._inFlight++,n[r]=m,m._proxy(this,-1*(r+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(m._reason()),!0):(this._cancel(),!0);p=m._value()}n[r]=p}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},h.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],u=arguments[2];n=a.isArray(c)?s(e).apply(u,c):s(e).call(u,c)}else n=s(e)();var l=f._popContext();return o.checkForgottenReturns(n,l,"Promise.try",f),f._resolveFromSyncValue(n),f},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){"use strict";var n=e("./util"),i=n.maybeWrapAsError,o=e("./errors").OperationalError,a=e("./es5");var s=/^(?:name|message|stack|cause)$/;function f(e){var t;if(function(e){return e instanceof Error&&a.getPrototypeOf(e)===Error.prototype}(e)){(t=new o(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=a.keys(e),i=0;i1){var r,n=new Array(t-1),i=0;for(r=0;r0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+c.classString(e);arguments.length>1&&(r+=", "+c.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},j.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},j.prototype.spread=function(e){return"function"!=typeof e?o("expecting a function but got "+c.classString(e)):this.all()._then(e,void 0,void 0,y,void 0)},j.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},j.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new _(this).promise()},j.prototype.error=function(e){return this.caught(c.originatesFromRejection,e)},j.getNewLibraryCopy=r.exports,j.is=function(e){return e instanceof j},j.fromNode=j.fromCallback=function(e){var t=new j(m);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=T(e)(B(t,r));return n===A&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},j.all=function(e){return new _(e).promise()},j.cast=function(e){var t=v(e);return t instanceof j||((t=new j(m))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},j.resolve=j.fulfilled=j.cast,j.reject=j.rejected=function(e){var t=new j(m);return t._captureStackTrace(),t._rejectCallback(e,!0),t},j.setScheduler=function(e){if("function"!=typeof e)throw new p("expecting a function but got "+c.classString(e));return h.setScheduler(e)},j.prototype._then=function(e,t,r,n,i){var o=void 0!==i,a=o?i:new j(m),f=this._target(),u=f._bitField;o||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&u)?this._boundValue():f===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var l=s();if(0!=(50397184&u)){var d,p,y=f._settlePromiseCtx;0!=(33554432&u)?(p=f._rejectionHandler0,d=e):0!=(16777216&u)?(p=f._fulfillmentHandler0,d=t,f._unsetRejectionIsUnhandled()):(y=f._settlePromiseLateCancellationObserver,p=new b("late cancellation observer"),f._attachExtraTrace(p),d=t),h.invoke(y,f,{handler:null===l?d:"function"==typeof d&&c.domainBind(l,d),promise:a,receiver:n,value:p})}else f._addCallbacks(e,t,a,n,l);return a},j.prototype._length=function(){return 65535&this._bitField},j.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},j.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},j.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},j.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},j.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},j.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},j.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},j.prototype._isFinal=function(){return(4194304&this._bitField)>0},j.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},j.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},j.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},j.prototype._setAsyncGuaranteed=function(){h.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},j.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==f)return void 0===t&&this._isBound()?this._boundValue():t},j.prototype._promiseAt=function(e){return this[4*e-4+2]},j.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},j.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},j.prototype._boundValue=function(){},j.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(t,r,n,i,null)},j.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=f),this._addCallbacks(r,n,i,o,null)},j.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:c.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:c.domainBind(i,t));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof e&&(this[a+0]=null===i?e:c.domainBind(i,e)),"function"==typeof t&&(this[a+1]=null===i?t:c.domainBind(i,t))}return this._setLength(o+1),o},j.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},j.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(n(),!1);var r=v(e,this);if(!(r instanceof j))return this._fulfill(e);t&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var a=this._length();a>0&&i._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():h.settlePromises(this),this._dereferenceTrace())}},j.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return h.fatalError(e,c.isNode);(65535&t)>0?h.settlePromises(this):this._ensurePossibleRejectionHandled()}},j.prototype._fulfillPromises=function(e,t){for(var r=1;r0){if(0!=(16842752&e)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},j.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},j.defer=j.pending=function(){return k.deprecated("Promise.defer","new Promise"),{promise:new j(m),resolve:C,reject:M}},c.notEnumerableProp(j,"_makeSelfResolutionError",n),t("./method")(j,m,v,o,k),t("./bind")(j,m,v,k),t("./cancel")(j,_,o,k),t("./direct_resolve")(j),t("./synchronous_inspection")(j),t("./join")(j,_,v,m,h,s),j.Promise=j,j.version="3.5.2",t("./map.js")(j,_,o,v,m,k),t("./call_get.js")(j),t("./using.js")(j,o,v,x,m,k),t("./timers.js")(j,m,k),t("./generators.js")(j,o,m,v,a,k),t("./nodeify.js")(j),t("./promisify.js")(j,m),t("./props.js")(j,_,v,o),t("./race.js")(j,m,v,o),t("./reduce.js")(j,_,o,v,m,k),t("./settle.js")(j,_,k),t("./some.js")(j,_,o),t("./filter.js")(j,m),t("./each.js")(j,m),t("./any.js")(j),c.toFastProperties(j),c.toFastProperties(j.prototype),I({a:1}),I({b:2}),I({c:3}),I(1),I(function(){}),I(void 0),I(!1),I(new j(m)),k.setBounds(l.firstLineError,c.lastLineError),j}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o){var a=e("./util");a.isArray;function s(e){var n=this._promise=new t(r);e instanceof t&&n._propagateFrom(e,3),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(r,o){var s=n(this._values,this._promise);if(s instanceof t){var f=(s=s._target())._bitField;if(this._values=s,0==(50397184&f))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&f))return 0!=(16777216&f)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=a.asArray(s)))0!==s.length?this._iterate(s):-5===o?this._resolveEmptyArray():this._resolve(function(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var c=i("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(c,!1)}},s.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r=this._length){var r;if(this._isMap)r=function(e){for(var t=new o,r=e.length/2|0,n=0;n>1},t.prototype.props=function(){return l(this)},t.props=function(e){return l(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){"use strict";function n(e){this._capacity=e,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(e){return this._capacity=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var r=new i;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},o.prototype._promiseRejected=function(e,t){var r=new i;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){"use strict";t.exports=function(t,r,n){var i=e("./util"),o=e("./errors").RangeError,a=e("./errors").AggregateError,s=i.isArray,f={};function c(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(e),i=r.promise();return r.setHowMany(t),r.init(),i}i.inherits(c,r),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=s(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(e){this._howMany=e},c.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(f),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new a,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(e){this._values.push(e)},c.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return u(e,t)},t.prototype.some=function(e){return u(this,e)},t._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(e,t,r){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){"use strict";t.exports=function(t,r){var n=e("./util"),i=n.errorObj,o=n.isObject;var a={}.hasOwnProperty;return function(e,s){if(o(e)){if(e instanceof t)return e;var f=function(e){try{return function(e){return e.then}(e)}catch(e){return i.e=e,i}}(e);if(f===i){s&&s._pushContext();var c=t.reject(f.e);return s&&s._popContext(),c}if("function"==typeof f)return function(e){try{return a.call(e,"_promise0")}catch(e){return!1}}(e)?(c=new t(r),e._then(c._fulfill,c._reject,void 0,c,null),c):function(e,o,a){var s=new t(r),f=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var c=!0,u=n.tryCatch(o).call(e,function(e){s&&(s._resolveCallback(e),s=null)},function(e){s&&(s._rejectCallback(e,c,!0),s=null)});return c=!1,s&&u===i&&(s._rejectCallback(u.e,!0,!0),s=null),f}(e,f,s)}return e}}},{"./util":36}],34:[function(e,t,r){"use strict";t.exports=function(t,r,n){var i=e("./util"),o=t.TimeoutError;function a(e){this.handle=e}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(e){return f(+this).thenReturn(e)},f=t.delay=function(e,i){var o,f;return void 0!==i?(o=t.resolve(i)._then(s,null,null,e,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(r),f=setTimeout(function(){o._fulfill()},+e),n.cancellation()&&o._setOnCancel(new a(f)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(e){return f(e,this)};function c(e){return clearTimeout(this.handle),e}function u(e){throw clearTimeout(this.handle),e}t.prototype.timeout=function(e,t){var r,s;e=+e;var f=new a(setTimeout(function(){r.isPending()&&function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),i.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()}(r,t,s)},e));return n.cancellation()?(s=this.then(),(r=s._then(c,u,void 0,f,void 0))._setOnCancel(f)):r=this._then(c,u,void 0,f,void 0),r}}},{"./util":36}],35:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){var s=e("./util"),f=e("./errors").TypeError,c=e("./util").inherits,u=s.errorObj,l=s.tryCatch,h={};function d(e){setTimeout(function(){throw e},0)}function p(e,r){var i=0,a=e.length,s=new t(o);return function o(){if(i>=a)return s._fulfill();var f=function(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}(e[i++]);if(f instanceof t&&f._isDisposable()){try{f=n(f._getDisposer().tryDispose(r),e.promise)}catch(e){return d(e)}if(f instanceof t)return f._then(o,d,null,null,null)}o()}(),s}function b(e,t,r){this._data=e,this._promise=t,this._context=r}function m(e,t,r){this.constructor$(e,t,r)}function y(e){return b.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function g(e){this.length=e,this.promise=null,this[e-1]=null}b.prototype.data=function(){return this._data},b.prototype.promise=function(){return this._promise},b.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},b.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==h?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},b.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},c(m,b),m.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},g.prototype._resultCancelled=function(){for(var e=this.length,r=0;r0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new m(e,this,i());throw new f}}},{"./errors":12,"./util":36}],36:[function(t,r,i){"use strict";var o=t("./es5"),a="undefined"==typeof navigator,s={e:{}},f,c="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:void 0!==this?this:null;function u(){try{var e=f;return f=null,e.apply(this,arguments)}catch(e){return s.e=e,s}}function l(e){return f=e,u}var h=function(e,t){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function d(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function p(e){return"function"==typeof e||"object"==typeof e&&null!==e}function b(e){return d(e)?new Error(A(e)):e}function m(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=w.test(e+"")&&o.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}}function k(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.foo}return n(),n(),e}var S=/^[a-z$_][a-z$_0-9]*$/i;function E(e){return S.test(e)}function B(e,t,r){for(var n=new Array(e),i=0;i10||H[0]>0),z.isNode&&z.toFastProperties(e);try{throw new Error}catch(e){z.lastLineError=e}r.exports=z},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{_process:404,timers:443}],73:[function(e,t,r){!function(t,r){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.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 a;"object"==typeof t?t.exports=o:r.BN=o,o.BN=o,o.wordSize=26;try{a=e("buffer").Buffer}catch(e){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function f(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},o.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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("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 i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.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,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","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"],u=[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],l=[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 h(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,f=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&f,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,f=0|u}return 0!==f?r.words[c]=0|f:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-f.length]+f+r:f+r,(i+=2)>=26&&(i-=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 h=u[e],d=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?b+r:c[h-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,f="le"===t,c=new e(o),u=this.clone();if(f){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=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},o.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},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,m=0|a[2],y=8191&m,g=m>>>13,v=0|a[3],_=8191&v,w=v>>>13,x=0|a[4],k=8191&x,S=x>>>13,E=0|a[5],B=8191&E,A=E>>>13,T=0|a[6],j=8191&T,C=T>>>13,M=0|a[7],I=8191&M,O=M>>>13,P=0|a[8],R=8191&P,L=P>>>13,D=0|a[9],q=8191&D,N=D>>>13,F=0|s[0],U=8191&F,z=F>>>13,H=0|s[1],V=8191&H,K=H>>>13,W=0|s[2],G=8191&W,X=W>>>13,J=0|s[3],$=8191&J,Q=J>>>13,Z=0|s[4],Y=8191&Z,ee=Z>>>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],fe=8191&se,ce=se>>>13,ue=0|s[8],le=8191&ue,he=ue>>>13,de=0|s[9],pe=8191&de,be=de>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(b,U)|0,o=Math.imul(b,z);var ye=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(g,U)|0,o=Math.imul(g,z),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,K)|0;var ge=(c+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(_,U),i=(i=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,K)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,X)|0;var ve=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,Q)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,z))+Math.imul(S,U)|0,o=Math.imul(S,z),n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,K)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Q)|0;var _e=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,K)|0,n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,Q)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,ee)|0;var we=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,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(j,U),i=(i=Math.imul(j,z))+Math.imul(C,U)|0,o=Math.imul(C,z),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,Q)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var xe=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(O,U)|0,o=Math.imul(O,z),n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(C,V)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var ke=(c+(n=n+Math.imul(l,fe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(h,fe)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,z))+Math.imul(L,U)|0,o=Math.imul(L,z),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,Q)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,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(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(b,fe)|0,o=o+Math.imul(b,ce)|0;var Se=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,he)|0)+Math.imul(h,le)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(q,U),i=(i=Math.imul(q,z))+Math.imul(N,U)|0,o=Math.imul(N,z),n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,K)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(j,$)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,Q)|0,n=n+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,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(y,fe)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,he)|0;var Ee=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,be)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(q,V),i=(i=Math.imul(q,K))+Math.imul(N,V)|0,o=Math.imul(N,K),n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(L,G)|0,o=o+Math.imul(L,X)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,Q)|0,n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,ce)|0,n=n+Math.imul(y,le)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,he)|0;var Be=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(q,G),i=(i=Math.imul(q,X))+Math.imul(N,G)|0,o=Math.imul(N,X),n=n+Math.imul(R,$)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(w,le)|0,o=o+Math.imul(w,he)|0;var Ae=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,be)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(q,$),i=(i=Math.imul(q,Q))+Math.imul(N,$)|0,o=Math.imul(N,Q),n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,ae)|0,n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(S,le)|0,o=o+Math.imul(S,he)|0;var Te=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,be)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(q,Y),i=(i=Math.imul(q,ee))+Math.imul(N,Y)|0,o=Math.imul(N,ee),n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(L,re)|0,o=o+Math.imul(L,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(j,fe)|0,i=(i=i+Math.imul(j,ce)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(B,le)|0,i=(i=i+Math.imul(B,he)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,he)|0;var je=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,be)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,be)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(q,re),i=(i=Math.imul(q,ne))+Math.imul(N,re)|0,o=Math.imul(N,ne),n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(L,oe)|0,o=o+Math.imul(L,ae)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,he)|0)+Math.imul(C,le)|0,o=o+Math.imul(C,he)|0;var Ce=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,be)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(q,oe),i=(i=Math.imul(q,ae))+Math.imul(N,oe)|0,o=Math.imul(N,ae),n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(L,fe)|0,o=o+Math.imul(L,ce)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,he)|0;var Me=(c+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(q,fe),i=(i=Math.imul(q,ce))+Math.imul(N,fe)|0,o=Math.imul(N,ce),n=n+Math.imul(R,le)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(L,le)|0,o=o+Math.imul(L,he)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,be)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(q,le),i=(i=Math.imul(q,he))+Math.imul(N,le)|0,o=Math.imul(N,he);var Oe=(c+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(L,pe)|0))<<13)|0;c=((o=o+Math.imul(L,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Pe=(c+(n=Math.imul(q,pe))|0)+((8191&(i=(i=Math.imul(q,be))+Math.imul(N,pe)|0))<<13)|0;return c=((o=Math.imul(N,be))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,f[0]=me,f[1]=ye,f[2]=ge,f[3]=ve,f[4]=_e,f[5]=we,f[6]=xe,f[7]=ke,f[8]=Se,f[9]=Ee,f[10]=Be,f[11]=Ae,f[12]=Te,f[13]=je,f[14]=Ce,f[15]=Me,f[16]=Ie,f[17]=Oe,f[18]=Pe,0!==c&&(f[19]=c,r.length++),r};function p(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(d=h),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?h(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>>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):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&s}return f&&0!==u&&(f.words[f.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(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 i=67108863^67108863>>>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},o.prototype.isubn=function(e){if(n("number"==typeof e),n(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>26)-(f/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,f=n.length-i.length;if("mod"!==t){(s=new o(null)).length=f+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.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)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),f=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),l=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;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||f.isOdd())&&(s.iadd(u),f.isub(l)),s.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(f)):(r.isub(t),s.isub(i),f.isub(a))}return{a:s,b:f,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.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)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new x(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.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=t0?r.isub(this.p):r.strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},i(g,y),g.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},g.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new g;else if("p224"===e)t=new v;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return m[e]=t,t},x.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),f=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(f);)u.redIAdd(f);for(var l=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var b=d,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m=0;n--){for(var c=t.words[n],u=f-1;u>=0;u--){var l=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}f=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,x),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 o(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),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:75}],74:[function(e,t,r){var n;function i(e){this.rand=e}if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^u[p>>>16&255]^l[b>>>8&255]^h[255&m]^t[y++],a=c[p>>>24]^u[b>>>16&255]^l[m>>>8&255]^h[255&d]^t[y++],s=c[b>>>24]^u[m>>>16&255]^l[d>>>8&255]^h[255&p]^t[y++],f=c[m>>>24]^u[d>>>16&255]^l[p>>>8&255]^h[255&b]^t[y++],d=o,p=a,b=s,m=f;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[b>>>8&255]<<8|n[255&m])^t[y++],a=(n[p>>>24]<<24|n[b>>>16&255]<<16|n[m>>>8&255]<<8|n[255&d])^t[y++],s=(n[b>>>24]<<24|n[m>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[y++],f=(n[m>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&b])^t[y++],[o>>>=0,a>>>=0,s>>>=0,f>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],f=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,f=0;f<256;++f){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var u=e[a],l=e[u],h=e[l],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*l^257*u^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=u^e[e[e[h^u]]],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>>24,a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t==4&&(a=f.SBOX[a>>>24]<<24|f.SBOX[a>>>16&255]<<16|f.SBOX[a>>>8&255]<<8|f.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],u=0;u>>24]]^f.INV_SUB_MIX[1][f.SBOX[h>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[h>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,f.SUB_MIX,f.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,f.INV_SUB_MIX,f.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":428}],77:[function(e,t,r){var n=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=e("inherits"),s=e("./ghash"),f=e("buffer-xor"),c=e("./incr32");function u(e,t,r,a){o.call(this);var f=i.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(f);this._ghash=new s(u),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 f=8*o,u=i.alloc(8);u.writeUIntBE(f,0,8),n.update(u),e._finID=n.state;var l=i.from(e._finID);return c(l),l}(this,r,u),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(u,o),u.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},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=f(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;i16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)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},l.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":76,"./authCipher":77,"./modes":89,"./streamCipher":92,"cipher-base":107,evp_bytestokey:185,inherits:238,"safe-buffer":428}],80:[function(e,t,r){var n=e("./modes"),i=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./streamCipher"),s=e("cipher-base"),f=e("./aes"),c=e("evp_bytestokey");function u(e,t,r){s.call(this),this._cache=new h,this._cipher=new f.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}e("inherits")(u,s),u.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 l=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 u(s.module,t,r)}u.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(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.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>>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;++t0;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":428}],82:[function(e,t,r){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)}}},{}],83:[function(e,t,r){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":104}],84:[function(e,t,r){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":104,"safe-buffer":428}],85:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t,r){for(var n,i,a,s=-1,f=0;++s<8;)n=e._cipher.encryptBlock(e._prev),i=t&1<<7-s?128:0,f+=(128&(a=n[0]^i))>>s%8,e._prev=o(e._prev,r?i:a);return f}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o}r.encrypt=function(e,t,r){for(var o=t.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new n(i(t));return r}t.exports=o,o.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":73,buffer:105,randombytes:412}],97:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":98}],98:[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"}}},{}],99:[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"}},{}],100:[function(e,t,r){(function(r){var n=e("create-hash"),i=e("stream"),o=e("inherits"),a=e("./sign"),s=e("./verify"),f=e("./algorithms.json");function c(e){i.Writable.call(this);var t=f[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){i.Writable.call(this);var t=f[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 c(e)}function h(e){return new u(e)}Object.keys(f).forEach(function(e){f[e].id=new r(f[e].id,"hex"),f[e.toLowerCase()]=f[e]}),o(c,i.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(u,i.Writable),u.prototype._write=function(e,t,r){this._hash.update(e),r()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},u.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return s(t,i,e,this._signType,this._tag)},t.exports={Sign:l,Verify:h,createSign:l,createVerify:h}}).call(this,e("buffer").Buffer)},{"./algorithms.json":98,"./sign":101,"./verify":102,buffer:105,"create-hash":110,inherits:238,stream:441}],101:[function(e,t,r){(function(r){var n=e("create-hmac"),i=e("browserify-rsa"),o=e("elliptic").ec,a=e("bn.js"),s=e("parse-asn1"),f=e("./curves.json");function c(e,t,i,o){if((e=new r(e.toArray())).length0&&r.ishrn(n),r}function l(e,t,i){var o,a;do{for(o=new r(0);8*o.length=t)throw new Error("invalid sig")}t.exports=function(e,t,f,c,u){var l=o(f);if("ec"===l.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new i(n),s=r.data.subjectPrivateKey.data;return o.verify(t,e,s)}(e,t,l)}if("dsa"===l.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,a=r.data.q,f=r.data.g,c=r.data.pub_key,u=o.signature.decode(e,"der"),l=u.s,h=u.r;s(l,a),s(h,a);var d=n.mont(i),p=l.invm(a);return 0===f.toRed(d).redPow(new n(t).mul(p).mod(a)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(h)}(e,t,l)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=r.concat([u,t]);for(var h=l.modulus.byteLength(),d=[1],p=0;t.length+d.length+2o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=a(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(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),U(r=+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=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var o,a=1,s=e.length,f=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,f/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=r;os&&(r=s-f),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a>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 S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(f=(31&c)<<6|63&o)>127&&(u=f);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(f=(15&c)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(f=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&f<1114112&&(u=f)}null===u?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=l}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nthis.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 T(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return B(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),""},s.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);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,f=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),l=0;l>>=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 y(this,e,t,r);case"utf8":case"utf-8":return g(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function B(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(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 O(e,t,r,n,o){return t=+t,r>>>=0,o||I(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function P(e,t,r,n,o){return t=+t,r>>>=0,o||I(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(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},s.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n)||M(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},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);M(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},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&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 q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function U(e){return e!=e}},{"base64-js":67,ieee754:237}],106:[function(e,t,r){var n,i;n=this,i=function(e){"use strict";var t=function(e,r,i){if(void 0===e&&(e=t.DEFAULT_CAPACITY),void 0===r&&(r=t.DEFAULT_ENDIAN),void 0===i&&(i=t.DEFAULT_NOASSERT),!i){if((e|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===e?n:new ArrayBuffer(e),this.view=0===e?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=e,this.littleEndian=r,this.noAssert=i};t.VERSION="5.0.1",t.LITTLE_ENDIAN=!0,t.BIG_ENDIAN=!1,t.DEFAULT_CAPACITY=16,t.DEFAULT_ENDIAN=t.BIG_ENDIAN,t.DEFAULT_NOASSERT=!1,t.Long=e||null;var r=t.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(e){var t=0;return function(){return t1024&&(t.push(i.apply(String,e)),e.length=0),Array.prototype.push.apply(e,arguments)}}function s(e,t,r,n,i){var o,a,s=8*i-n-1,f=(1<>1,u=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=256*o+e[t+l],l+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+l],l+=h,u-=8);if(0===o)o=1-c;else{if(o===f)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)}function f(e,t,r,n,i,o){var a,s,f,c=8*o-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+l>=1?h/f:h*Math.pow(2,1-l))*f>=2&&(a++,f/=2),a+l>=u?(s=0,a=u):a+l>=1?(s=(t*f-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*b}t.accessor=function(){return Uint8Array},t.allocate=function(e,r,n){return new t(e,r,n)},t.concat=function(e,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,a=0,s=0,f=e.length;s0&&(a+=o);if(0===a)return new t(0,n,i);var c,u=new t(a,n,i);for(s=0;s0&&(a.buffer=e.buffer,a.offset=e.byteOffset,a.limit=e.byteOffset+e.byteLength,a.view=new Uint8Array(e.buffer));else if(e instanceof ArrayBuffer)a=new t(0,i,o),e.byteLength>0&&(a.buffer=e,a.offset=0,a.limit=e.byteLength,a.view=e.byteLength>0?new Uint8Array(e):null);else{if("[object Array]"!==Object.prototype.toString.call(e))throw TypeError("Illegal buffer");(a=new t(e.length,i,o)).limit=e.length;for(var s=0;s>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,i=t,o=e.length,a=o>>3,s=0;for(t+=this.writeVarint32(o,t);a--;)n=1&!!e[s++]|(1&!!e[s++])<<1|(1&!!e[s++])<<2|(1&!!e[s++])<<3|(1&!!e[s++])<<4|(1&!!e[s++])<<5|(1&!!e[s++])<<6|(1&!!e[s++])<<7,this.writeByte(n,t++);if(s>3,a=0,s=[];for(e+=n.length;o--;)r=this.readByte(e++),s[a++]=!!(1&r),s[a++]=!!(2&r),s[a++]=!!(4&r),s[a++]=!!(8&r),s[a++]=!!(16&r),s[a++]=!!(32&r),s[a++]=!!(64&r),s[a++]=!!(128&r);if(a>f++&1)}return t&&(this.offset=e),s},r.readBytes=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+"+e+") <= "+this.buffer.byteLength)}var n=this.slice(t,t+e);return r&&(this.offset+=e),n},r.writeBytes=r.append,r.writeInt8=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,r&&(this.offset+=1),this},r.writeByte=r.writeInt8,r.readInt8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=this.view[e];return 128==(128&r)&&(r=-(255-r+1)),t&&(this.offset+=1),r},r.readByte=r.readInt8,r.writeUint8=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=1;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=1,this.view[t]=e,r&&(this.offset+=1),this},r.writeUInt8=r.writeUint8,r.readUint8=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=this.view[e];return t&&(this.offset+=1),r},r.readUInt8=r.readUint8,r.writeInt16=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),r&&(this.offset+=2),this},r.writeShort=r.writeInt16,r.readInt16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[e],r|=this.view[e+1]<<8):(r=this.view[e]<<8,r|=this.view[e+1]),32768==(32768&r)&&(r=-(65535-r+1)),t&&(this.offset+=2),r},r.readShort=r.readInt16,r.writeUint16=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=2;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=2,this.littleEndian?(this.view[t+1]=(65280&e)>>>8,this.view[t]=255&e):(this.view[t]=(65280&e)>>>8,this.view[t+1]=255&e),r&&(this.offset+=2),this},r.writeUInt16=r.writeUint16,r.readUint16=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[e],r|=this.view[e+1]<<8):(r=this.view[e]<<8,r|=this.view[e+1]),t&&(this.offset+=2),r},r.readUInt16=r.readUint16,r.writeInt32=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),r&&(this.offset+=4),this},r.writeInt=r.writeInt32,r.readInt32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0),r|=0,t&&(this.offset+=4),r},r.readInt=r.readInt32,r.writeUint32=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,this.littleEndian?(this.view[t+3]=e>>>24&255,this.view[t+2]=e>>>16&255,this.view[t+1]=e>>>8&255,this.view[t]=255&e):(this.view[t]=e>>>24&255,this.view[t+1]=e>>>16&255,this.view[t+2]=e>>>8&255,this.view[t+3]=255&e),r&&(this.offset+=4),this},r.writeUInt32=r.writeUint32,r.readUint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0):(r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0),t&&(this.offset+=4),r},r.readUInt32=r.readUint32,e&&(r.writeInt64=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=t.low,a=t.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},r.writeLong=r.writeInt64,r.readInt64=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0,t+=4,i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0,t+=4,n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0);var o=new e(n,i,!1);return r&&(this.offset+=8),o},r.readLong=r.readInt64,r.writeUint64=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof t)t=e.fromNumber(t);else if("string"==typeof t)t=e.fromString(t);else if(!(t&&t instanceof e))throw TypeError("Illegal value: "+t+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=t.low,a=t.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},r.writeUInt64=r.writeUint64,r.readUint64=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[t+2]<<16,n|=this.view[t+1]<<8,n|=this.view[t],n+=this.view[t+3]<<24>>>0,t+=4,i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0,t+=4,n=this.view[t+1]<<16,n|=this.view[t+2]<<8,n|=this.view[t+3],n+=this.view[t]<<24>>>0);var o=new e(n,i,!0);return r&&(this.offset+=8),o},r.readUInt64=r.readUint64),r.writeFloat32=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=4;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=4,f(this.view,e,t,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var r=s(this.view,e,this.littleEndian,23,4);return t&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof e)throw TypeError("Illegal value: "+e+" (not a number)");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}t+=8;var n=this.buffer.byteLength;return t>n&&this.resize((n*=2)>t?n:t),t-=8,f(this.view,e,t,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=s(this.view,e,this.littleEndian,52,8);return t&&(this.offset+=8),r},r.readDouble=r.readFloat64,t.MAX_VARINT32_BYTES=5,t.calculateVarint32=function(e){return(e>>>=0)<128?1:e<16384?2:e<1<<21?3:e<1<<28?4:5},t.zigZagEncode32=function(e){return((e|=0)<<1^e>>31)>>>0},t.zigZagDecode32=function(e){return e>>>1^-(1&e)|0},r.writeVarint32=function(e,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=t.calculateVarint32(e);r+=o;var a=this.buffer.byteLength;for(r>a&&this.resize((a*=2)>r?a:r),r-=o,e>>>=0;e>=128;)i=127&e|128,this.view[r++]=i,e>>>=7;return this.view[r++]=e,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(e,r){return this.writeVarint32(t.zigZagEncode32(e),r)},r.readVarint32=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r,n=0,i=0;do{if(!this.noAssert&&e>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}r=this.view[e++],n<5&&(i|=(127&r)<<7*n),++n}while(0!=(128&r));return i|=0,t?(this.offset=e,i):{value:i,length:n}},r.readVarint32ZigZag=function(e){var r=this.readVarint32(e);return"object"==typeof r?r.value=t.zigZagDecode32(r.value):r=t.zigZagDecode32(r),r},e&&(t.MAX_VARINT64_BYTES=10,t.calculateVarint64=function(t){"number"==typeof t?t=e.fromNumber(t):"string"==typeof t&&(t=e.fromString(t));var r=t.toInt()>>>0,n=t.shiftRightUnsigned(28).toInt()>>>0,i=t.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?r<16384?r<128?1:2:r<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},t.zigZagEncode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftLeft(1).xor(t.shiftRight(63)).toUnsigned()},t.zigZagDecode64=function(t){return"number"==typeof t?t=e.fromNumber(t,!1):"string"==typeof t?t=e.fromString(t,!1):!1!==t.unsigned&&(t=t.toSigned()),t.shiftRightUnsigned(1).xor(t.and(e.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=e.fromNumber(r);else if("string"==typeof r)r=e.fromString(r);else if(!(r&&r instanceof e))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=e.fromNumber(r,!1):"string"==typeof r?r=e.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=t.calculateVarint64(r),a=r.toInt()>>>0,s=r.shiftRightUnsigned(28).toInt()>>>0,f=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var c=this.buffer.byteLength;switch(n>c&&this.resize((c*=2)>n?c:n),n-=o,o){case 10:this.view[n+9]=f>>>7&1;case 9:this.view[n+8]=9!==o?128|f:127&f;case 8:this.view[n+7]=8!==o?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==o?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==o?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==o?128|s:127&s;case 4:this.view[n+3]=4!==o?a>>>21|128:a>>>21&127;case 3:this.view[n+2]=3!==o?a>>>14|128:a>>>14&127;case 2:this.view[n+1]=2!==o?a>>>7|128:a>>>7&127;case 1:this.view[n]=1!==o?128|a:127&a}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(e,r){return this.writeVarint64(t.zigZagEncode64(e),r)},r.readVarint64=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=0,o=0,a=0,s=0;if(i=127&(s=this.view[t++]),128&s&&(i|=(127&(s=this.view[t++]))<<7,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[t++]))<<14,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[t++]))<<21,(128&s||this.noAssert&&void 0===s)&&(o=127&(s=this.view[t++]),(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[t++]))<<7,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[t++]))<<14,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[t++]))<<21,(128&s||this.noAssert&&void 0===s)&&(a=127&(s=this.view[t++]),(128&s||this.noAssert&&void 0===s)&&(a|=(127&(s=this.view[t++]))<<7,128&s||this.noAssert&&void 0===s))))))))))throw Error("Buffer overrun");var f=e.fromBits(i|o<<28,o>>>4|a<<24,!1);return r?(this.offset=t,f):{value:f,length:t-n}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof e?n.value=t.zigZagDecode64(n.value):n=t.zigZagDecode64(n),n}),r.writeCString=function(e,t){var r=void 0===t;r&&(t=this.offset);var n,i=e.length;if(!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");for(n=0;n>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}i=u.calculateUTF16asUTF8(o(e))[1],t+=i+1;var a=this.buffer.byteLength;return t>a&&this.resize((a*=2)>t?a:t),t-=i+1,u.encodeUTF16toUTF8(o(e),function(e){this.view[t++]=e}.bind(this)),this.view[t++]=0,r?(this.offset=t,this):i},r.readCString=function(e){var t=void 0===e;if(t&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r,n=e,i=-1;return u.decodeUTF8toUTF16(function(){if(0===i)return null;if(e>=this.limit)throw RangeError("Illegal range: Truncated data, "+e+" < "+this.limit);return 0===(i=this.view[e++])?null:i}.bind(this),r=a(),!0),t?(this.offset=e,r()):{string:r(),length:e-n}},r.writeIString=function(e,t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("string"!=typeof e)throw TypeError("Illegal str: Not a string");if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var n,i=t;n=u.calculateUTF16asUTF8(o(e),this.noAssert)[1],t+=4+n;var a=this.buffer.byteLength;if(t>a&&this.resize((a*=2)>t?a:t),t-=4+n,this.littleEndian?(this.view[t+3]=n>>>24&255,this.view[t+2]=n>>>16&255,this.view[t+1]=n>>>8&255,this.view[t]=255&n):(this.view[t]=n>>>24&255,this.view[t+1]=n>>>16&255,this.view[t+2]=n>>>8&255,this.view[t+3]=255&n),t+=4,u.encodeUTF16toUTF8(o(e),function(e){this.view[t++]=e}.bind(this)),t!==i+4+n)throw RangeError("Illegal range: Truncated data, "+t+" == "+(t+4+n));return r?(this.offset=t,this):t-i},r.readIString=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+4) <= "+this.buffer.byteLength)}var n=e,i=this.readUint32(e),o=this.readUTF8String(i,t.METRICS_BYTES,e+=4);return e+=o.length,r?(this.offset=e,o.string):{string:o.string,length:e-n}},t.METRICS_CHARS="c",t.METRICS_BYTES="b",r.writeUTF8String=function(e,t){var r,n=void 0===t;if(n&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}var i=t;r=u.calculateUTF16asUTF8(o(e))[1],t+=r;var a=this.buffer.byteLength;return t>a&&this.resize((a*=2)>t?a:t),t-=r,u.encodeUTF16toUTF8(o(e),function(e){this.view[t++]=e}.bind(this)),n?(this.offset=t,this):t-i},r.writeString=r.writeUTF8String,t.calculateUTF8Chars=function(e){return u.calculateUTF16asUTF8(o(e))[0]},t.calculateUTF8Bytes=function(e){return u.calculateUTF16asUTF8(o(e))[1]},t.calculateString=t.calculateUTF8Bytes,r.readUTF8String=function(e,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=t.METRICS_CHARS),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");if(e|=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,s=0,f=n;if(r===t.METRICS_CHARS){if(o=a(),u.decodeUTF8(function(){return s>>=0)<0||n+e>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+e+") <= "+this.buffer.byteLength)}var c=n+e;if(u.decodeUTF8toUTF16(function(){return n>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,a,s=r;i=u.calculateUTF16asUTF8(o(e),this.noAssert)[1],a=t.calculateVarint32(i),r+=a+i;var f=this.buffer.byteLength;if(r>f&&this.resize((f*=2)>r?f:r),r-=a+i,r+=this.writeVarint32(i,r),u.encodeUTF16toUTF8(o(e),function(e){this.view[r++]=e}.bind(this)),r!==s+i+a)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+a));return n?(this.offset=r,this):r-s},r.readVString=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=this.readVarint32(e),o=this.readUTF8String(i.value,t.METRICS_BYTES,e+=i.length);return e+=o.length,r?(this.offset=e,o.string):{string:o.string,length:e-n}},r.append=function(e,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof t||(e=t.wrap(e,r));var o=e.limit-e.offset;if(o<=0)return this;n+=o;var a=this.buffer.byteLength;return n>a&&this.resize((a*=2)>n?a:n),n-=o,this.view.set(e.view.subarray(e.offset,e.limit),n),e.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(e,t){return e.append(this,t),this},r.assert=function(e){return this.noAssert=!e,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(e){var r=new t(0,this.littleEndian,this.noAssert);return e?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}if(0===e&&t===this.buffer.byteLength)return this;var r=t-e;if(0===r)return this.buffer=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(e,t)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=e),this.offset=0,this.limit=r,this},r.copy=function(e,r){if(void 0===e&&(e=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(e===r)return new t(0,this.littleEndian,this.noAssert);var n=r-e,i=new t(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=e),this.copyTo(i,0,e,r),i},r.copyTo=function(e,r,n,i){var o,a;if(!this.noAssert&&!t.isByteBuffer(e))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(a=void 0===r)?e.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>e.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+e.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?e:(e.ensureCapacity(r+s),e.view.set(this.view.subarray(n,i),r),o&&(this.offset+=s),a&&(e.offset+=s),this)},r.ensureCapacity=function(e){var t=this.buffer.byteLength;return te?t:e):this},r.fill=function(e,t,r){var n=void 0===t;if(n&&(t=this.offset),"string"==typeof e&&e.length>0&&(e=e.charCodeAt(0)),void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal value: "+e+" (not an integer)");if(e|=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t>=r)return this;for(;t>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=e,this},r.order=function(e){if(!this.noAssert&&"boolean"!=typeof e)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!e,this},r.LE=function(e){return this.littleEndian=void 0===e||!!e,this},r.BE=function(e){return this.littleEndian=void 0!==e&&!e,this},r.prepend=function(e,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}e instanceof t||(e=t.wrap(e,r));var o=e.limit-e.offset;if(o<=0)return this;var a=o-n;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),f=new Uint8Array(s);f.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=s,this.view=f,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,n+=a}else new Uint8Array(this.buffer);return this.view.set(e.view.subarray(e.offset,e.limit),n-o),e.offset=e.limit,i&&(this.offset-=o),this},r.prependTo=function(e,t){return e.prepend(this,t),this},r.printDebug=function(e){"function"!=typeof e&&(e=console.log.bind(console)),e(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal capacity: "+e+" (not an integer)");if((e|=0)<0)throw RangeError("Illegal capacity: 0 <= "+e)}if(this.buffer.byteLength>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}return e===t?this:(Array.prototype.reverse.call(this.view.subarray(e,t)),this)},r.skip=function(e){if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal length: "+e+" (not an integer)");e|=0}var t=this.offset+e;if(!this.noAssert&&(t<0||t>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+e+" <= "+this.buffer.byteLength);return this.offset=t,this},r.slice=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var r=this.clone();return r.offset=e,r.limit=t,r},r.toBuffer=function(e){var t=this.offset,r=this.limit;if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal limit: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(!e&&0===t&&r===this.buffer.byteLength)return this.buffer;if(t===r)return n;var i=new ArrayBuffer(r-t);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(t,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(e,t,r){if(void 0===e)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof e&&(r=t=e="utf8"),e){case"utf8":return this.toUTF8(t,r);case"base64":return this.toBase64(t,r);case"hex":return this.toHex(t,r);case"binary":return this.toBinary(t,r);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+e)}};var c=function(){for(var e={},t=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=t.length;n>2&63]),i=(3&n)<<4,null!==(n=e())?(r(t[63&((i|=n>>4&15)|n>>4&15)]),i=(15&n)<<2,null!==(n=e())?(r(t[63&(i|n>>6&3)]),r(t[63&n])):(r(t[63&i]),r(61))):(r(t[63&i]),r(61),r(61))},e.decode=function(e,t){var n,i,o;function a(e){throw Error("Illegal character code: "+e)}for(;null!==(n=e());)if(void 0===(i=r[n])&&a(n),null!==(n=e())&&(void 0===(o=r[n])&&a(n),t(i<<2>>>0|(48&o)>>4),null!==(n=e()))){if(void 0===(i=r[n])){if(61===n)break;a(n)}if(t((15&o)<<4>>>0|(60&i)>>2),null!==(n=e())){if(void 0===(o=r[n])){if(61===n)break;a(n)}t((3&i)<<6>>>0|o)}}},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)},e}();r.toBase64=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),t|=0,(e|=0)<0||t>this.capacity||e>t)throw RangeError("begin, end");var r;return c.encode(function(){return ethis.capacity()||e>t)throw RangeError("begin, end");if(e===t)return"";for(var r=[],n=[];e=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},t.fromBinary=function(e,r){if("string"!=typeof e)throw TypeError("str");for(var n,i=0,o=e.length,a=new t(o,r);i255)throw RangeError("illegal char code: "+n);a.view[i++]=n}return a.limit=o,a},r.toDebug=function(e){for(var t,r=-1,n=this.buffer.byteLength,i="",o="",a="";r32&&t<127?String.fromCharCode(t):".")),++r,e&&r>0&&r%16==0&&r!==n){for(;i.length<51;)i+=" ";a+=i+o+"\n",i=o=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":e||0!==r&&r!==n?" ":""}if(e&&" "!==i){for(;i.length<51;)i+=" ";a+=i+o+"\n"}return e?a:i},t.fromDebug=function(e,r,n){for(var i,o,a=e.length,s=new t((a+1)/3|0,r,n),f=0,c=0,u=!1,l=!1,h=!1,d=!1,p=!1;f":if(!n){if(d){p=!0;break}d=!0}s.limit=c,u=!1;break;case"'":if(!n){if(h){p=!0;break}h=!0}s.markedOffset=c,u=!1;break;case" ":u=!1;break;default:if(!n&&u){p=!0;break}if(o=parseInt(i+e.charAt(f++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[c++]=o,u=!0}if(p)throw TypeError("Illegal str: Invalid symbol at "+f)}if(!n){if(!l||!d)throw TypeError("Illegal str: Missing offset or limit");if(c>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}for(var r,n=new Array(t-e);e255))throw TypeError("Illegal str: Contains non-hex characters");a.view[f++]=i}return a.limit=f,a};var u=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(e,t){var r=null;for("number"==typeof e&&(r=e,e=function(){return null});null!==r||null!==(r=e());)r<128?t(127&r):r<2048?(t(r>>6&31|192),t(63&r|128)):r<65536?(t(r>>12&15|224),t(r>>6&63|128),t(63&r|128)):(t(r>>18&7|240),t(r>>12&63|128),t(r>>6&63|128),t(63&r|128)),r=null},decodeUTF8:function(e,t){for(var r,n,i,o,a=function(e){e=e.slice(0,e.indexOf(null));var t=Error(e.toString());throw t.name="TruncatedError",t.bytes=e,t};null!==(r=e());)if(0==(128&r))t(r);else if(192==(224&r))null===(n=e())&&a([r,n]),t((31&r)<<6|63&n);else if(224==(240&r))(null===(n=e())||null===(i=e()))&&a([r,n,i]),t((15&r)<<12|(63&n)<<6|63&i);else{if(240!=(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=e())||null===(i=e())||null===(o=e()))&&a([r,n,i,o]),t((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},UTF16toUTF8:function(e,t){for(var r,n=null;null!==(r=null!==n?n:e());)r>=55296&&r<=57343&&null!==(n=e())&&n>=56320&&n<=57343?(t(1024*(r-55296)+n-56320+65536),n=null):t(r);null!==n&&t(n)},UTF8toUTF16:function(e,t){var r=null;for("number"==typeof e&&(r=e,e=function(){return null});null!==r||null!==(r=e());)r<=65535?t(r):(t(55296+((r-=65536)>>10)),t(r%1024+56320)),r=null},encodeUTF16toUTF8:function(t,r){e.UTF16toUTF8(t,function(t){e.encodeUTF8(t,r)})},decodeUTF8toUTF16:function(t,r){e.decodeUTF8(t,function(t){e.UTF8toUTF16(t,r)})},calculateCodePoint:function(e){return e<128?1:e<2048?2:e<65536?3:4},calculateUTF8:function(e){for(var t,r=0;null!==(t=e());)r+=t<128?1:t<2048?2:t<65536?3:4;return r},calculateUTF16asUTF8:function(t){var r=0,n=0;return e.UTF16toUTF8(t,function(e){++r,n+=e<128?1:e<2048?2:e<65536?3:4}),[r,n]}};return e}();return r.toUTF8=function(e,t){if(void 0===e&&(e=this.offset),void 0===t&&(t=this.limit),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof t||t%1!=0)throw TypeError("Illegal end: Not an integer");if(t>>>=0,e<0||e>t||t>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+t+" <= "+this.buffer.byteLength)}var r;try{u.decodeUTF8toUTF16(function(){return er)?t=("rmd160"===e?new f:c(e)).update(t).digest():t.lengths?t=e(t):t.length-1};u.prototype.append=function(e,t){e=s(e),t=f(t);var r=this.map[e];this.map[e]=r?r+","+t:t},u.prototype.delete=function(e){delete this.map[s(e)]},u.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},u.prototype.set=function(e,t){this.map[s(e)]=f(t)},u.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),c(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),c(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),c(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},b.call(m.prototype),b.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var a=[301,302,303,307,308];g.redirect=function(e,t){if(-1===a.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.Headers=u,e.Request=m,e.Response=g,e.fetch=function(e,r){return new Promise(function(n,i){var o=new m(e,r),a=new XMLHttpRequest;a.onload=function(){var e,t,r={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new u,e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;n(new g(i,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&t.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function d(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&n(e))this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!i(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,n=l(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=h(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function g(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}}(void 0!==n?n:this);var i=n.fetch;i.fetch=i,i.Response=n.Response,i.Headers=n.Headers,i.Request=n.Request,t.exports=i},{}],115:[function(e,t,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var n=e("browserify-sign/algos"),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return o};var a=e("pbkdf2");r.pbkdf2=a.pbkdf2,r.pbkdf2Sync=a.pbkdf2Sync;var s=e("browserify-cipher");r.Cipher=s.Cipher,r.createCipher=s.createCipher,r.Cipheriv=s.Cipheriv,r.createCipheriv=s.createCipheriv,r.Decipher=s.Decipher,r.createDecipher=s.createDecipher,r.Decipheriv=s.Decipheriv,r.createDecipheriv=s.createDecipheriv,r.getCiphers=s.getCiphers,r.listCiphers=s.listCiphers;var f=e("diffie-hellman");r.DiffieHellmanGroup=f.DiffieHellmanGroup,r.createDiffieHellmanGroup=f.createDiffieHellmanGroup,r.getDiffieHellman=f.getDiffieHellman,r.createDiffieHellman=f.createDiffieHellman,r.DiffieHellman=f.DiffieHellman;var c=e("browserify-sign");r.createSign=c.createSign,r.Sign=c.Sign,r.createVerify=c.createVerify,r.Verify=c.Verify,r.createECDH=e("create-ecdh");var u=e("public-encrypt");r.publicEncrypt=u.publicEncrypt,r.privateEncrypt=u.privateEncrypt,r.publicDecrypt=u.publicDecrypt,r.privateDecrypt=u.privateDecrypt;var l=e("randomfill");r.randomFill=l.randomFill,r.randomFillSync=l.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={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,ALPN_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}},{"browserify-cipher":93,"browserify-sign":100,"browserify-sign/algos":97,"create-ecdh":109,"create-hash":110,"create-hmac":112,"diffie-hellman":159,pbkdf2:398,"public-encrypt":405,randombytes:412,randomfill:413}],116:[function(e,t,r){var n,i;n=this,i=function(e){return function(){var t=e,r=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],f=[],c=[],u=[],l=[],h=[],d=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var b=e[r],m=e[b],y=e[m],g=257*e[p]^16843008*p;a[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,f[r]=g<<8|g>>>24,c[r]=g;g=16843009*y^65537*m^257*b^16843008*r;u[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,h[p]=g<<8|g>>>24,d[p]=g,r?(r=b^e[e[e[y^b]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],b=n.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a6&&a%r==4&&(s=i[s>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s]):(s=i[(s=s<<8|s>>>24)>>>24]<<24|i[s>>>16&255]<<16|i[s>>>8&255]<<8|i[255&s],s^=p[a/r|0]<<24),o[a]=o[a-r]^s}for(var f=this._invKeySchedule=[],c=0;c>>24]]^l[i[s>>>16&255]]^h[i[s>>>8&255]]^d[i[255&s]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,f,c,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,u,l,h,d,o);r=e[t+1];e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var f=this._nRounds,c=e[t]^r[0],u=e[t+1]^r[1],l=e[t+2]^r[2],h=e[t+3]^r[3],d=4,p=1;p>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&h]^r[d++],m=n[u>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&c]^r[d++],y=n[l>>>24]^i[h>>>16&255]^o[c>>>8&255]^a[255&u]^r[d++],g=n[h>>>24]^i[c>>>16&255]^o[u>>>8&255]^a[255&l]^r[d++];c=b,u=m,l=y,h=g}b=(s[c>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^r[d++],m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^r[d++],y=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&u])^r[d++],g=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[d++];e[t]=b,e[t+1]=m,e[t+2]=y,e[t+3]=g},keySize:8});t.AES=r._createHelper(b)}(),e.AES},"object"==typeof r?t.exports=r=i(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118,"./enc-base64":119,"./evpkdf":121,"./md5":126}],117:[function(e,t,r){var n,i;n=this,i=function(e){e.lib.Cipher||function(t){var r=e,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc,f=(s.Utf8,s.Base64),c=r.algo.EvpKDF,u=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?v:y}return function(t){return{encrypt:function(r,n,i){return e(n).encrypt(t,r,n,i)},decrypt:function(r,n,i){return e(n).decrypt(t,r,n,i)}}}}()}),l=(n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),r.mode={}),h=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=l.CBC=function(){var e=h.extend();function r(e,r,n){var i=this._iv;if(i){var o=i;this._iv=t}else o=this._prevBlock;for(var a=0;a>>2];e.sigBytes-=t}},b=(n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:d,padding:p}),reset:function(){u.reset.call(this);var e=this.cfg,t=e.iv,r=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=r.createEncryptor;else{n=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==n?this._mode.init(this,t&&t.words):(this._mode=n.call(r,this,t&&t.words),this._mode.__creator=n)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{t=this._process(!0);e.unpad(t)}return t},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),m=(r.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;if(r)var n=o.create([1398893684,1701076831]).concat(r).concat(t);else n=t;return n.toString(f)},parse:function(e){var t=f.parse(e),r=t.words;if(1398893684==r[0]&&1701076831==r[1]){var n=o.create(r.slice(2,4));r.splice(0,4),t.sigBytes-=16}return b.create({ciphertext:t,salt:n})}},y=n.SerializableCipher=i.extend({cfg:i.extend({format:m}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var i=e.createEncryptor(r,n),o=i.finalize(t),a=i.cfg;return b.create({ciphertext:o,key:r,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:n.format})},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),g=(r.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=o.random(8));var i=c.create({keySize:t+r}).compute(e,n),a=o.create(i.words.slice(t),4*r);return i.sigBytes=4*t,b.create({key:i,iv:a,salt:n})}},v=n.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:g}),encrypt:function(e,t,r,n){var i=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=i.iv;var o=y.encrypt.call(this,e,t,i.key,n);return o.mixIn(i),o},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var i=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=i.iv,y.decrypt.call(this,e,t,i.key,n)}})}()},"object"==typeof r?t.exports=r=i(e("./core"),e("./evpkdf")):"function"==typeof define&&define.amd?define(["./core","./evpkdf"],i):i(n.CryptoJS)},{"./core":118,"./evpkdf":121}],118:[function(e,t,r){var n,i;n=this,i=function(){var e=e||function(e,t){var r=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},i=n.lib={},o=i.Base={extend:function(e){var t=r(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,i=e.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[n+o>>>2]|=a<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r,n=[],i=function(t){t=t;var r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=i/(4*o),f=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*o,c=e.min(4*f,i);if(f){for(var u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var f=n.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var t=e.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-a%4*2;i[o>>>2]|=(s|f)<<24-o%4*8,o++}return r.create(i,o)}(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64},"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)},{"./core":118}],120:[function(e,t,r){var n,i;n=this,i=function(e){return function(){var t=e,r=t.lib.WordArray,n=t.enc;n.Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return r.create(n,2*t)}};function i(e){return e<<8&4278255360|e>>>8&16711935}n.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o>>1]|=i(e.charCodeAt(o)<<16-o%2*16);return r.create(n,2*t)}}}(),e.enc.Utf16},"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)},{"./core":118}],121:[function(e,t,r){var n,i;n=this,i=function(e){var t,r,n,i,o,a,s;return r=(t=e).lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=r.hasher.create(),o=i.create(),a=o.words,s=r.keySize,f=r.iterations;a.lengthi&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),s=o.words,f=a.words,c=0;c>>2]|=e[i]<<24-i%4*8;r.call(this,n,t)}else r.apply(this,arguments)}).prototype=t}}(),e.lib.WordArray},"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)},{"./core":118}],126:[function(e,t,r){var n,i;n=this,i=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var f=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],f=e[t+1],d=e[t+2],p=e[t+3],b=e[t+4],m=e[t+5],y=e[t+6],g=e[t+7],v=e[t+8],_=e[t+9],w=e[t+10],x=e[t+11],k=e[t+12],S=e[t+13],E=e[t+14],B=e[t+15],A=o[0],T=o[1],j=o[2],C=o[3];T=h(T=h(T=h(T=h(T=l(T=l(T=l(T=l(T=u(T=u(T=u(T=u(T=c(T=c(T=c(T=c(T,j=c(j,C=c(C,A=c(A,T,j,C,a,7,s[0]),T,j,f,12,s[1]),A,T,d,17,s[2]),C,A,p,22,s[3]),j=c(j,C=c(C,A=c(A,T,j,C,b,7,s[4]),T,j,m,12,s[5]),A,T,y,17,s[6]),C,A,g,22,s[7]),j=c(j,C=c(C,A=c(A,T,j,C,v,7,s[8]),T,j,_,12,s[9]),A,T,w,17,s[10]),C,A,x,22,s[11]),j=c(j,C=c(C,A=c(A,T,j,C,k,7,s[12]),T,j,S,12,s[13]),A,T,E,17,s[14]),C,A,B,22,s[15]),j=u(j,C=u(C,A=u(A,T,j,C,f,5,s[16]),T,j,y,9,s[17]),A,T,x,14,s[18]),C,A,a,20,s[19]),j=u(j,C=u(C,A=u(A,T,j,C,m,5,s[20]),T,j,w,9,s[21]),A,T,B,14,s[22]),C,A,b,20,s[23]),j=u(j,C=u(C,A=u(A,T,j,C,_,5,s[24]),T,j,E,9,s[25]),A,T,p,14,s[26]),C,A,v,20,s[27]),j=u(j,C=u(C,A=u(A,T,j,C,S,5,s[28]),T,j,d,9,s[29]),A,T,g,14,s[30]),C,A,k,20,s[31]),j=l(j,C=l(C,A=l(A,T,j,C,m,4,s[32]),T,j,v,11,s[33]),A,T,x,16,s[34]),C,A,E,23,s[35]),j=l(j,C=l(C,A=l(A,T,j,C,f,4,s[36]),T,j,b,11,s[37]),A,T,g,16,s[38]),C,A,w,23,s[39]),j=l(j,C=l(C,A=l(A,T,j,C,S,4,s[40]),T,j,a,11,s[41]),A,T,p,16,s[42]),C,A,y,23,s[43]),j=l(j,C=l(C,A=l(A,T,j,C,_,4,s[44]),T,j,k,11,s[45]),A,T,B,16,s[46]),C,A,d,23,s[47]),j=h(j,C=h(C,A=h(A,T,j,C,a,6,s[48]),T,j,g,10,s[49]),A,T,E,15,s[50]),C,A,m,21,s[51]),j=h(j,C=h(C,A=h(A,T,j,C,k,6,s[52]),T,j,p,10,s[53]),A,T,w,15,s[54]),C,A,f,21,s[55]),j=h(j,C=h(C,A=h(A,T,j,C,v,6,s[56]),T,j,B,10,s[57]),A,T,y,15,s[58]),C,A,S,21,s[59]),j=h(j,C=h(C,A=h(A,T,j,C,b,6,s[60]),T,j,x,10,s[61]),A,T,d,15,s[62]),C,A,_,21,s[63]),o[0]=o[0]+A|0,o[1]=o[1]+T|0,o[2]=o[2]+j|0,o[3]=o[3]+C|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var o=t.floor(n/4294967296),a=n;r[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(r.length+1),this._process();for(var s=this._hash,f=s.words,c=0;c<4;c++){var u=f[c];f[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,r,n,i,o,a){var s=e+(t&r|~t&n)+i+a;return(s<>>32-o)+t}function u(e,t,r,n,i,o,a){var s=e+(t&n|r&~n)+i+a;return(s<>>32-o)+t}function l(e,t,r,n,i,o,a){var s=e+(t^r^n)+i+a;return(s<>>32-o)+t}function h(e,t,r,n,i,o,a){var s=e+(r^(t|~n))+i+a;return(s<>>32-o)+t}r.MD5=o._createHelper(f),r.HmacMD5=o._createHmacHelper(f)}(Math),e.MD5},"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)},{"./core":118}],127:[function(e,t,r){var n,i;n=this,i=function(e){return e.mode.CFB=function(){var t=e.lib.BlockCipherMode.extend();function r(e,t,r,n){var i=this._iv;if(i){var o=i.slice(0);this._iv=void 0}else o=this._prevBlock;n.encryptBlock(o,0);for(var a=0;a>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var n=t.Encryptor=t.extend({processBlock:function(e,t){var n=this._cipher,i=n.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(e){0===(e[0]=r(e[0]))&&(e[1]=r(e[1]))}(a);var s=a.slice(0);n.encryptBlock(s,0);for(var f=0;f>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923},"object"==typeof r?t.exports=r=i(e("./core"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118}],133:[function(e,t,r){var n,i;n=this,i=function(e){return e.pad.Iso10126={pad:function(t,r){var n=4*r,i=n-t.sigBytes%n;t.concat(e.lib.WordArray.random(i-1)).concat(e.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Iso10126},"object"==typeof r?t.exports=r=i(e("./core"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118}],134:[function(e,t,r){var n,i;n=this,i=function(e){return e.pad.Iso97971={pad:function(t,r){t.concat(e.lib.WordArray.create([2147483648],1)),e.pad.ZeroPadding.pad(t,r)},unpad:function(t){e.pad.ZeroPadding.unpad(t),t.sigBytes--}},e.pad.Iso97971},"object"==typeof r?t.exports=r=i(e("./core"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118}],135:[function(e,t,r){var n,i;n=this,i=function(e){return e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding},"object"==typeof r?t.exports=r=i(e("./core"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118}],136:[function(e,t,r){var n,i;n=this,i=function(e){return e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){for(var t=e.words,r=e.sigBytes-1;!(t[r>>>2]>>>24-r%4*8&255);)r--;e.sigBytes=r+1}},e.pad.ZeroPadding},"object"==typeof r?t.exports=r=i(e("./core"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118}],137:[function(e,t,r){var n,i;n=this,i=function(e){var t,r,n,i,o,a,s,f;return r=(t=e).lib,n=r.Base,i=r.WordArray,o=t.algo,a=o.SHA1,s=o.HMAC,f=o.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r=this.cfg,n=s.create(r.hasher,e),o=i.create(),a=i.create([1]),f=o.words,c=a.words,u=r.keySize,l=r.iterations;f.length>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)s.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],f=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),l=c>>>16|4294901760&u,h=u<<16|65535&c;n[0]^=c,n[1]^=l,n[2]^=u,n[3]^=h,n[4]^=c,n[5]^=l,n[6]^=u,n[7]^=h;for(i=0;i<4;i++)s.call(this)}},_doProcessBlock:function(e,t){var r=this._X;s.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),e[t+i]^=n[i]},blockSize:4,ivSize:2});function s(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0;for(r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,s=n>>>16,f=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=f^c}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=r._createHelper(a)}(),e.RabbitLegacy},"object"==typeof r?t.exports=r=i(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118,"./enc-base64":119,"./evpkdf":121,"./md5":126}],139:[function(e,t,r){var n,i;n=this,i=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=[],i=[],o=[],a=t.algo.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(r=0;r<4;r++)s.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],f=o[1],c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),u=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),l=c>>>16|4294901760&u,h=u<<16|65535&c;i[0]^=c,i[1]^=l,i[2]^=u,i[3]^=h,i[4]^=c,i[5]^=l,i[6]^=u,i[7]^=h;for(r=0;r<4;r++)s.call(this)}},_doProcessBlock:function(e,t){var r=this._X;s.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),e[t+i]^=n[i]},blockSize:4,ivSize:2});function s(){for(var e=this._X,t=this._C,r=0;r<8;r++)i[r]=t[r];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0;for(r=0;r<8;r++){var n=e[r]+t[r],a=65535&n,s=n>>>16,f=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&n)*n|0)+((65535&n)*n|0);o[r]=f^c}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=r._createHelper(a)}(),e.Rabbit},"object"==typeof r?t.exports=r=i(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118,"./enc-base64":119,"./evpkdf":121,"./md5":126}],140:[function(e,t,r){var n,i;n=this,i=function(e){return function(){var t=e,r=t.lib.StreamCipher,n=t.algo,i=n.RC4=r.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var f=n[i];n[i]=n[o],n[o]=f}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}t.RC4=r._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});t.RC4Drop=r._createHelper(a)}(),e.RC4},"object"==typeof r?t.exports=r=i(e("./core"),e("./enc-base64"),e("./md5"),e("./evpkdf"),e("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],i):i(n.CryptoJS)},{"./cipher-core":117,"./core":118,"./enc-base64":119,"./evpkdf":121,"./md5":126}],141:[function(e,t,r){var n,i;n=this,i=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=i.create([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]),f=i.create([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=i.create([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]),u=i.create([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]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),h=i.create([1352829926,1548603684,1836072691,2053994217,0]),d=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,a,d,_,w,x,k,S,E,B,A,T=this._hash.words,j=l.words,C=h.words,M=s.words,I=f.words,O=c.words,P=u.words;x=o=T[0],k=a=T[1],S=d=T[2],E=_=T[3],B=w=T[4];for(r=0;r<80;r+=1)A=o+e[t+M[r]]|0,A+=r<16?p(a,d,_)+j[0]:r<32?b(a,d,_)+j[1]:r<48?m(a,d,_)+j[2]:r<64?y(a,d,_)+j[3]:g(a,d,_)+j[4],A=(A=v(A|=0,O[r]))+w|0,o=w,w=_,_=v(d,10),d=a,a=A,A=x+e[t+I[r]]|0,A+=r<16?g(k,S,E)+C[0]:r<32?y(k,S,E)+C[1]:r<48?m(k,S,E)+C[2]:r<64?b(k,S,E)+C[3]:p(k,S,E)+C[4],A=(A=v(A|=0,P[r]))+B|0,x=B,B=E,E=v(S,10),S=k,k=A;A=T[1]+d+E|0,T[1]=T[2]+_+B|0,T[2]=T[3]+w+x|0,T[3]=T[4]+o+k|0,T[4]=T[0]+a+S|0,T[0]=A},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(t.length+1),this._process();for(var i=this._hash,o=i.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,r){return e^t^r}function b(e,t,r){return e&t|~e&r}function m(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function v(e,t){return e<>>32-t}r.RIPEMD160=o._createHelper(d),r.HmacRIPEMD160=o._createHmacHelper(d)}(Math),e.RIPEMD160},"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)},{"./core":118}],142:[function(e,t,r){var n,i;n=this,i=function(e){var t,r,n,i,o,a;return r=(t=e).lib,n=r.WordArray,i=r.Hasher,o=[],a=t.algo.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],f=r[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var u=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=u<<1|u>>>31}var l=(n<<5|n>>>27)+f+o[c];l+=c<20?1518500249+(i&a|~i&s):c<40?1859775393+(i^a^s):c<60?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,f=s,s=a,a=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+f|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=i._createHelper(a),t.HmacSHA1=i._createHmacHelper(a),e.SHA1},"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)},{"./core":118}],143:[function(e,t,r){var n,i;n=this,i=function(e){var t,r,n,i,o;return r=(t=e).lib.WordArray,n=t.algo,i=n.SHA256,o=n.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}}),t.SHA224=i._createHelper(o),t.HmacSHA224=i._createHmacHelper(o),e.SHA224},"object"==typeof r?t.exports=r=i(e("./core"),e("./sha256")):"function"==typeof define&&define.amd?define(["./core","./sha256"],i):i(n.CryptoJS)},{"./core":118,"./sha256":144}],144:[function(e,t,r){var n,i;n=this,i=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[],f=[];!function(){function e(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)e(n)&&(i<8&&(s[i]=r(t.pow(n,.5))),f[i]=r(t.pow(n,1/3)),i++),n++}();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],l=r[6],h=r[7],d=0;d<64;d++){if(d<16)c[d]=0|e[t+d];else{var p=c[d-15],b=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,m=c[d-2],y=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;c[d]=b+c[d-7]+y+c[d-16]}var g=n&i^n&o^i&o,v=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),_=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&u^~s&l)+f[d]+c[d];h=l,l=u,u=s,s=a+_|0,a=o,o=i,i=n,n=_+(v+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+u|0,r[6]=r[6]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=t.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});r.SHA256=o._createHelper(u),r.HmacSHA256=o._createHmacHelper(u)}(Math),e.SHA256},"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)},{"./core":118}],145:[function(e,t,r){var n,i;n=this,i=function(e){return function(t){var r=e,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.x64.Word,s=r.algo,f=[],c=[],u=[];!function(){for(var e=1,t=0,r=0;r<24;r++){f[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)c[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,o=0;o<24;o++){for(var s=0,l=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=r[i]).high^=a,T.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var d=0,p=0,b=0;b<5;b++){d^=(T=r[h+5*b]).high,p^=T.low}var m=l[h];m.high=d,m.low=p}for(h=0;h<5;h++){var y=l[(h+4)%5],g=l[(h+1)%5],v=g.high,_=g.low;for(d=y.high^(v<<1|_>>>31),p=y.low^(_<<1|v>>>31),b=0;b<5;b++){(T=r[h+5*b]).high^=d,T.low^=p}}for(var w=1;w<25;w++){var x=(T=r[w]).high,k=T.low,S=f[w];if(S<32)d=x<>>32-S,p=k<>>32-S;else d=k<>>64-S,p=x<>>64-S;var E=l[c[w]];E.high=d,E.low=p}var B=l[0],A=r[0];B.high=A.high,B.low=A.low;for(h=0;h<5;h++)for(b=0;b<5;b++){var T=r[w=h+5*b],j=l[w],C=l[(h+1)%5+5*b],M=l[(h+2)%5+5*b];T.high=j.high^~C.high&M.high,T.low=j.low^~C.low&M.low}T=r[0];var I=u[s];T.high^=I.high,T.low^=I.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((n+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,f=s/8,c=[],u=0;u>>24)|4278255360&(h<<24|h>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(h)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});r.SHA3=o._createHelper(h),r.HmacSHA3=o._createHmacHelper(h)}(Math),e.SHA3},"object"==typeof r?t.exports=r=i(e("./core"),e("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],i):i(n.CryptoJS)},{"./core":118,"./x64-core":149}],146:[function(e,t,r){var n,i;n=this,i=function(e){var t,r,n,i,o,a,s;return r=(t=e).x64,n=r.Word,i=r.WordArray,o=t.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}}),t.SHA384=a._createHelper(s),t.HmacSHA384=a._createHmacHelper(s),e.SHA384},"object"==typeof r?t.exports=r=i(e("./core"),e("./x64-core"),e("./sha512")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],i):i(n.CryptoJS)},{"./core":118,"./sha512":147,"./x64-core":149}],147:[function(e,t,r){var n,i;n=this,i=function(e){return function(){var t=e,r=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var f=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[];!function(){for(var e=0;e<80;e++)c[e]=s()}();var u=a.SHA512=r.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],o=r[2],a=r[3],s=r[4],u=r[5],l=r[6],h=r[7],d=n.high,p=n.low,b=i.high,m=i.low,y=o.high,g=o.low,v=a.high,_=a.low,w=s.high,x=s.low,k=u.high,S=u.low,E=l.high,B=l.low,A=h.high,T=h.low,j=d,C=p,M=b,I=m,O=y,P=g,R=v,L=_,D=w,q=x,N=k,F=S,U=E,z=B,H=A,V=T,K=0;K<80;K++){var W=c[K];if(K<16)var G=W.high=0|e[t+2*K],X=W.low=0|e[t+2*K+1];else{var J=c[K-15],$=J.high,Q=J.low,Z=($>>>1|Q<<31)^($>>>8|Q<<24)^$>>>7,Y=(Q>>>1|$<<31)^(Q>>>8|$<<24)^(Q>>>7|$<<25),ee=c[K-2],te=ee.high,re=ee.low,ne=(te>>>19|re<<13)^(te<<3|re>>>29)^te>>>6,ie=(re>>>19|te<<13)^(re<<3|te>>>29)^(re>>>6|te<<26),oe=c[K-7],ae=oe.high,se=oe.low,fe=c[K-16],ce=fe.high,ue=fe.low;G=(G=(G=Z+ae+((X=Y+se)>>>0>>0?1:0))+ne+((X=X+ie)>>>0>>0?1:0))+ce+((X=X+ue)>>>0>>0?1:0);W.high=G,W.low=X}var le,he=D&N^~D&U,de=q&F^~q&z,pe=j&M^j&O^M&O,be=C&I^C&P^I&P,me=(j>>>28|C<<4)^(j<<30|C>>>2)^(j<<25|C>>>7),ye=(C>>>28|j<<4)^(C<<30|j>>>2)^(C<<25|j>>>7),ge=(D>>>14|q<<18)^(D>>>18|q<<14)^(D<<23|q>>>9),ve=(q>>>14|D<<18)^(q>>>18|D<<14)^(q<<23|D>>>9),_e=f[K],we=_e.high,xe=_e.low,ke=H+ge+((le=V+ve)>>>0>>0?1:0),Se=ye+be;H=U,V=z,U=N,z=F,N=D,F=q,D=R+(ke=(ke=(ke=ke+he+((le=le+de)>>>0>>0?1:0))+we+((le=le+xe)>>>0>>0?1:0))+G+((le=le+X)>>>0>>0?1:0))+((q=L+le|0)>>>0>>0?1:0)|0,R=O,L=P,O=M,P=I,M=j,I=C,j=ke+(me+pe+(Se>>>0>>0?1:0))+((C=le+Se|0)>>>0>>0?1:0)|0}p=n.low=p+C,n.high=d+j+(p>>>0>>0?1:0),m=i.low=m+I,i.high=b+M+(m>>>0>>0?1:0),g=o.low=g+P,o.high=y+O+(g>>>0

>>0?1:0),_=a.low=_+L,a.high=v+R+(_>>>0>>0?1:0),x=s.low=x+q,s.high=w+D+(x>>>0>>0?1:0),S=u.low=S+F,u.high=k+N+(S>>>0>>0?1:0),B=l.low=B+z,l.high=E+U+(B>>>0>>0?1:0),T=h.low=T+V,h.high=A+H+(T>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(n+128>>>10<<5)]=r,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});t.SHA512=r._createHelper(u),t.HmacSHA512=r._createHmacHelper(u)}(),e.SHA512},"object"==typeof r?t.exports=r=i(e("./core"),e("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],i):i(n.CryptoJS)},{"./core":118,"./x64-core":149}],148:[function(e,t,r){var n,i;n=this,i=function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=r.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var c=i[o]=[],u=f[o];for(r=0;r<24;r++)c[r/6|0]|=t[(s[r]-1+u)%28]<<31-r%6,c[4+(r/6|0)]|=t[28+(s[r+24]-1+u)%28]<<31-r%6;c[0]=c[0]<<1|c[0]>>>31;for(r=1;r<7;r++)c[r]=c[r]>>>4*(r-1)+3;c[7]=c[7]<<5|c[7]>>>27}var l=this._invSubKeys=[];for(r=0;r<16;r++)l[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,f=0;f<8;f++)s|=c[f][((a^i[f])&u[f])>>>0];this._lBlock=a,this._rBlock=o^s}var l=this._lBlock;this._lBlock=this._rBlock,this._rBlock=l,h.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":151,_process:404}],151:[function(e,t,r){var n;function i(e){function t(){if(t.enabled){var e=t,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=a.r28shl(r,s),i=a.r28shl(i,s),a.pc2(r,i,e.keys,o)}},f.prototype._update=function(e,t,r,n){var i=this._desState,o=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,s,n+4)},f.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,o=h}a.rip(s,o,n,i)},f.prototype._decrypt=function(e,t,r,n,i){for(var o=r,s=t,f=e.keys.length-2;f>=0;f-=2){var c=e.keys[f],u=e.keys[f+1];a.expand(o,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var l=a.substitute(c,u),h=o;o=(s^a.permute(l))>>>0,s=h}a.rip(o,s,n,i)}},{"../des":152,inherits:238,"minimalistic-assert":389}],156:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits"),o=e("../des"),a=o.Cipher,s=o.DES;function f(e){a.call(this,e);var t=new function(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}(this.type,this.options.key);this._edeState=t}i(f,a),t.exports=f,f.create=function(e){return new f(e)},f.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},f.prototype._pad=s.prototype._pad,f.prototype._unpad=s.prototype._unpad},{"../des":152,inherits:238,"minimalistic-assert":389}],157:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(e,t,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(e,t,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var o=0,a=0,s=n.length>>>1,f=0;f>>n[f]&1;for(f=s;f>>n[f]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(e>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>o[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(f),t.cmp(f)){if(!t.cmp(c))for(;r.mod(u).cmp(l);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(m(p=r.shrn(1))&&m(r)&&y(p)&&y(r)&&a.test(p)&&a.test(r))return r}}},{"bn.js":73,"miller-rabin":388,randombytes:412}],162:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],163:[function(e,t,r){var n=e("assert"),i=e("bigi"),o=e("./point");function a(e,t,r,n,a,s,f){this.p=e,this.a=t,this.b=r,this.G=o.fromAffine(this,n,a),this.n=s,this.h=f,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=e.add(i.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}a.prototype.pointFromX=function(e,t){var r=t.pow(3).add(this.a.multiply(t)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!e&&(n=this.p.subtract(n)),o.fromAffine(this,t,n)},a.prototype.isInfinity=function(e){return e===this.infinity||0===e.z.signum()&&0!==e.y.signum()},a.prototype.isOnCurve=function(e){if(this.isInfinity(e))return!0;var t=e.affineX,r=e.affineY,n=this.a,i=this.b,o=this.p;if(t.signum()<0||t.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var a=r.square().mod(o),s=t.pow(3).add(n.multiply(t)).add(i).mod(o);return a.equals(s)},a.prototype.validate=function(e){n(!this.isInfinity(e),"Point is at infinity"),n(this.isOnCurve(e),"Point is not on the curve");var t=e.multiply(this.n);return n(this.isInfinity(t),"Point is not a scalar multiple of G"),!0},t.exports=a},{"./point":167,assert:62,bigi:70}],164:[function(e,t,r){t.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}},{}],165:[function(e,t,r){var n=e("./point"),i=e("./curve"),o=e("./names");t.exports={Curve:i,Point:n,getCurveByName:o}},{"./curve":163,"./names":166,"./point":167}],166:[function(e,t,r){var n=e("bigi"),i=e("./curves.json"),o=e("./curve");t.exports=function(e){var t=i[e];if(!t)return null;var r=new n(t.p,16),a=new n(t.a,16),s=new n(t.b,16),f=new n(t.n,16),c=new n(t.h,16),u=new n(t.Gx,16),l=new n(t.Gy,16);return new o(r,a,s,u,l,f,c)}},{"./curve":163,"./curves.json":164,bigi:70}],167:[function(e,t,r){var n=e("assert"),i=e("safe-buffer").Buffer,o=e("bigi"),a=o.valueOf(3);function s(e,t,r,i){n.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=e,this.x=t,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(s.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(s.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(s.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),s.fromAffine=function(e,t,r){return new s(e,t,r,o.ONE)},s.prototype.equals=function(e){return e===this||(this.curve.isInfinity(this)?this.curve.isInfinity(e):this.curve.isInfinity(e)?this.curve.isInfinity(this):0===e.y.multiply(this.z).subtract(this.y.multiply(e.z)).mod(this.curve.p).signum()&&0===e.x.multiply(this.z).subtract(this.x.multiply(e.z)).mod(this.curve.p).signum())},s.prototype.negate=function(){var e=this.curve.p.subtract(this.y);return new s(this.curve,this.x,e,this.z)},s.prototype.add=function(e){if(this.curve.isInfinity(this))return e;if(this.curve.isInfinity(e))return this;var t=this.x,r=this.y,n=e.x,i=e.y.multiply(this.z).subtract(r.multiply(e.z)).mod(this.curve.p),o=n.multiply(this.z).subtract(t.multiply(e.z)).mod(this.curve.p);if(0===o.signum())return 0===i.signum()?this.twice():this.curve.infinity;var f=o.square(),c=f.multiply(o),u=t.multiply(f),l=i.square().multiply(this.z),h=l.subtract(u.shiftLeft(1)).multiply(e.z).subtract(c).multiply(o).mod(this.curve.p),d=u.multiply(a).multiply(i).subtract(r.multiply(c)).subtract(l.multiply(i)).multiply(e.z).add(i.multiply(c)).mod(this.curve.p),p=c.multiply(this.z).multiply(e.z).mod(this.curve.p);return new s(this.curve,h,d,p)},s.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var e=this.x,t=this.y,r=t.multiply(this.z).mod(this.curve.p),n=r.multiply(t).mod(this.curve.p),i=this.curve.a,o=e.square().multiply(a);0!==i.signum()&&(o=o.add(this.z.square().multiply(i)));var f=(o=o.mod(this.curve.p)).square().subtract(e.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),c=o.multiply(a).multiply(e).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(o.pow(3)).mod(this.curve.p),u=r.pow(3).shiftLeft(3).mod(this.curve.p);return new s(this.curve,f,c,u)},s.prototype.multiply=function(e){if(this.curve.isInfinity(this))return this;if(0===e.signum())return this.curve.infinity;for(var t=e,r=t.multiply(a),n=this.negate(),i=this,o=r.bitLength()-2;o>0;--o){var s=r.testBit(o),f=t.testBit(o);i=i.twice(),s!==f&&(i=i.add(s?this:n))}return i},s.prototype.multiplyTwo=function(e,t,r){for(var n=Math.max(e.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(t);n>=0;){var a=e.testBit(n),s=r.testBit(n);i=i.twice(),a?i=s?i.add(o):i.add(this):s&&(i=i.add(t)),--n}return i},s.prototype.getEncoded=function(e){if(null==e&&(e=this.compressed),this.curve.isInfinity(this))return i.alloc(1,0);var t,r=this.affineX,n=this.affineY,o=this.curve.pLength;return e?(t=i.allocUnsafe(1+o)).writeUInt8(n.isEven()?2:3,0):((t=i.allocUnsafe(1+o+o)).writeUInt8(4,0),n.toBuffer(o).copy(t,1+o)),r.toBuffer(o).copy(t,1),t},s.decodeFrom=function(e,t){var r,i=t.readUInt8(0),a=4!==i,f=Math.floor((e.p.bitLength()+7)/8),c=o.fromBuffer(t.slice(1,1+f));if(a){n.equal(t.length,f+1,"Invalid sequence length"),n(2===i||3===i,"Invalid sequence tag");var u=3===i;r=e.pointFromX(u,c)}else{n.equal(t.length,1+f+f,"Invalid sequence length");var l=o.fromBuffer(t.slice(1+f));r=s.fromAffine(e,c,l)}return r.compressed=a,r},s.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=s},{assert:62,bigi:70,"safe-buffer":428}],168:[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.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":183,"./elliptic/curve":171,"./elliptic/curves":174,"./elliptic/ec":175,"./elliptic/eddsa":178,"./elliptic/utils":182,brorand:74}],169:[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 f(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=f,f.prototype.point=function(){throw new Error("Not implemented")},f.prototype.validate=function(){throw new Error("Not implemented")},f.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1),i=(1<=f;t--)c=(c<<1)+n[t];a.push(c)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(f=0;f=0;c--){for(t=0;c>=0&&0===a[c];c--)t++;if(c>=0&&t++,f=f.dblp(t),c<0)break;var u=a[c];s(0!==u),f="affine"===e.type?u>0?f.mixedAdd(i[u-1>>1]):f.mixedAdd(i[-u-1>>1].neg()):u>0?f.add(i[u-1>>1]):f.add(i[-u-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,f=this._wnafT2,c=this._wnafT3,u=0,l=0;l=1;l-=2){var d=l-1,p=l;if(1===s[d]&&1===s[p]){var b=[t[d],null,null,t[p]];0===t[d].y.cmp(t[p].y)?(b[1]=t[d].add(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].add(t[p].neg())):(b[1]=t[d].toJ().mixedAdd(t[p]),b[2]=t[d].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],y=a(r[d],r[p]);u=Math.max(y[0].length,u),c[d]=new Array(u),c[p]=new Array(u);for(var g=0;g=0;l--){for(var k=0;l>=0;){var S=!0;for(g=0;g=0&&k++,w=w.dblp(k),l<0)break;for(g=0;g0?E=f[g][B-1>>1]:B<0&&(E=f[g][-B-1>>1].neg()),w="affine"===E.type?w.mixedAdd(E):w.add(E))}}for(l=0;l=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":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.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),f=i.redMul(a),c=o.redMul(s),u=i.redMul(s),l=a.redMul(o);return this.curve.point(f,c,l,u)},u.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(),f=a.redSub(s).redISub(s);e=n.redSub(i).redISub(o).redMul(f),t=a.redMul(c.redSub(o)),r=a.redMul(f)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),f=c.redSub(s).redSub(s);e=this.curve._mulC(n.redISub(c)).redMul(f),t=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(f)}return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.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),f=r.redAdd(t),c=o.redMul(a),u=s.redMul(f),l=o.redMul(f),h=a.redMul(s);return this.curve.point(c,u,h,l)},u.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),f=i.redSub(s),c=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),l=n.redMul(f).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=f.redMul(c)):(t=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(f).redMul(c)),this.curve.point(l,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.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},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.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}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},{"../../elliptic":168,"../curve":171,"bn.js":73,inherits:238}],171:[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":169,"./edwards":170,"./mont":172,"./short":173}],172:[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 f(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(f,a),t.exports=f,f.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),f.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},f.prototype.point=function(e,t){return new c(this,e,t)},f.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()?"":""},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()),f=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,f)},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":168,"../curve":171,"bn.js":73,inherits:238}],173:[function(e,t,r){"use strict";var n=e("../curve"),i=e("../../elliptic"),o=e("bn.js"),a=e("inherits"),s=n.base,f=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 u(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 l(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],f(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,f,c,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new o(1),b=new o(0),m=new o(0),y=new o(1),g=0;0!==h.cmpn(0);){var v=d.div(h);c=d.sub(v.mul(h)),u=m.sub(v.mul(p));var _=y.sub(v.mul(b));if(!n&&c.cmp(l)<0)t=f.neg(),r=p,n=c.neg(),i=u;else if(n&&2==++g)break;f=c,d=h,h=c,m=p,p=u,y=b,b=_}a=c.neg(),s=u;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),f=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:f.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":""},u.prototype.isInfinity=function(){return this.inf},u.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)},u.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)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.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)},u.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)},u.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)},u.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))},u.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},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(l,s.BasePoint),c.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.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)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.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),f=o.redSub(a);if(0===s.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),l=n.redMul(c),h=f.redSqr().redIAdd(u).redISub(l).redISub(l),d=f.redMul(l.redISub(h)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(h,d,p)},l.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 f=a.redSqr(),c=f.redMul(a),u=r.redMul(f),l=s.redSqr().redIAdd(c).redISub(u).redISub(u),h=s.redMul(u.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},l.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=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":168,"../curve":171,"bn.js":73,inherits:238}],174:[function(e,t,r){"use strict";var n,i=r,o=e("hash.js"),a=e("../elliptic"),s=a.utils.assert;function f(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 f(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=f,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":168,"./precomputed/secp256k1":181,"hash.js":224}],175:[function(e,t,r){"use strict";var n=e("bn.js"),i=e("hmac-drbg"),o=e("../../elliptic"),a=o.utils.assert,s=e("./key"),f=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 i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},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,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),u=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),h=0;;h++){var d=o.k?o.k(h):new n(u.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var b=p.getX(),m=b.umod(this.n);if(0!==m.cmpn(0)){var y=d.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new f({r:m,s:y,recoveryParam:g})}}}}}},c.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new f(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),u=c.mul(e).umod(this.n),l=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,r.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,r.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},c.prototype.recoverPubKey=function(e,t,r,i){a((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,s=new n(e),c=t.r,u=t.s,l=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),l):this.curve.pointFromX(c,l);var d=t.r.invm(o),p=o.sub(s).mul(d).umod(o),b=u.mul(d).umod(o);return this.g.mulAdd(p,c,b)},c.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(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":168,"./key":176,"./signature":177,"bn.js":73,"hmac-drbg":236}],176:[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""}},{"../../elliptic":168,"bn.js":73}],177:[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>>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 f=s(e,r);if(e.length!==f+r.place)return!1;var c=e.slice(r.place,f+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=f(t),r=f(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":168,"bn.js":73}],178:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("../../elliptic"),o=i.utils,a=o.assert,s=o.parseBytes,f=e("./key"),c=e("./signature");function u(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(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=u,u.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()),f=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:f,Rencoded:o})},u.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)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=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,f=1;f0||t.cmpn(-i)>0;){var o,a,s,f=e.andln(3)+n&3,c=t.andln(3)+i&3;3===f&&(f=-1),3===c&&(c=-1),o=0==(1&f)?0:3!=(s=e.andln(7)+n&7)&&5!==s||2!==c?f:-f,r[0].push(o),a=0==(1&c)?0:3!=(s=t.andln(7)+i&7)&&5!==s||2!==f?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":73,"minimalistic-assert":389,"minimalistic-crypto-utils":390}],183:[function(e,t,r){t.exports={_from:"elliptic@^6.0.0",_id:"elliptic@6.4.1",_inBundle:!1,_integrity:"sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.0.0",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.0.0",saveSpec:null,fetchSpec:"^6.0.0"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",_shasum:"c2d0b7776911b86722c632c3c06c60f2f819939a",_spec:"elliptic@^6.0.0",_where:"/home/projects/zavz9t.github.io/chain-post/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!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.4.1"}},{}],184:[function(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},o=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var s,f=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),s=0===c.x}catch(e){s=!1}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,r,i){var o,a,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]):(a=e._events=n(null),e._eventsCount=0),s){if("function"==typeof s?s=a[t]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&&(o=u(e))&&o>0&&s.length>o){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",f.name,f.message)}}else s=a[t]=r,++e._eventsCount;return e}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t1&&(t=arguments[1]),t instanceof Error)throw t;var f=new Error('Unhandled "error" event. ('+t+")");throw f.context=t,f}if(!(r=a[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=m(e,n),o=0;o=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n=0;o--)this.removeListener(e,t[o]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],185:[function(e,t,r){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),f=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var u=new i;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var l=0;if(a>0){var h=s.length-a;l=Math.min(a,c.length),c.copy(s,h,0,l),a-=l}if(l0){var d=f.length-o,p=Math.min(o,c.length-l);c.copy(f,d,l,l+p),o-=p}}return c.fill(0),{key:s,iv:f}}},{"md5.js":387,"safe-buffer":428}],186:[function(e,t,r){!function(e){"use strict";function n(t){var r=t&&t.Promise||e.Promise,n=t&&t.XMLHttpRequest||e.XMLHttpRequest,i=e;return function(){var e=Object.create(i,{fetch:{value:void 0,writable:!0}});return function(e){if(!e.fetch){var t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=function(e){return e&&DataView.prototype.isPrototypeOf(e)},a=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};h.prototype.append=function(e,t){e=c(e),t=u(t);var r=this.map[e];this.map[e]=r?r+","+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=u(t)},h.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},h.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),l(e)},h.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),l(e)},h.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),l(e)},t.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var s=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},y.call(g.prototype),y.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},_.error=function(){var e=new _(null,{status:0,statusText:""});return e.type="error",e};var f=[301,302,303,307,308];_.redirect=function(e,t){if(-1===f.indexOf(t))throw new RangeError("Invalid status code");return new _(null,{status:t,headers:{location:e}})},e.Headers=h,e.Request=g,e.Response=_,e.fetch=function(e,i){return new r(function(r,o){var a=new g(e,i),s=new n;s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}}),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new _(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(a.method,a.url,!0),"include"===a.credentials&&(s.withCredentials=!0),"responseType"in s&&t.blob&&(s.responseType="blob"),a.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),s.send(void 0===a._bodyInit?null:a._bodyInit)})},e.fetch.polyfill=!0}function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var r={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(r[Symbol.iterator]=function(){return r}),r}function h(e){this.map={},e instanceof h?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function d(e){if(e.bodyUsed)return r.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new r(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function b(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(t.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(t.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(t.arrayBuffer&&t.blob&&o(e))this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!t.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e)&&!a(e))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=m(e)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return r.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return r.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return r.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||r.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var e,t,n,i=d(this);if(i)return i;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=p(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return r.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function _(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}}(void 0!==e?e:this),{fetch:e.fetch,Headers:e.Headers,Request:e.Request,Response:e.Response}}()}"function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof r?t.exports=n:e.fetchPonyfill=n}("undefined"==typeof self?this:self)},{}],187:[function(e,t,r){!function(e,r,n){"use strict";"function"==typeof define&&define.amd?define(n):void 0!==t&&t.exports?t.exports=n():r.exports?r.exports=n():r.Fingerprint2=n()}(0,this,function(){"use strict";var e=function(t){if(!(this instanceof e))return new e(t);this.options=this.extend(t,{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",detectScreenOrientation:!0,sortPluginsFor:[/palemoon/i],userDefinedFonts:[]}),this.nativeForEach=Array.prototype.forEach,this.nativeMap=Array.prototype.map};return e.prototype={extend:function(e,t){if(null==e)return t;for(var r in e)null!=e[r]&&t[r]!==e[r]&&(t[r]=e[r]);return t},getSync:function(){var e=[];e=this.userAgentKey(e),e=this.languageKey(e),e=this.colorDepthKey(e),e=this.pixelRatioKey(e),e=this.hardwareConcurrencyKey(e),e=this.screenResolutionKey(e),e=this.availableScreenResolutionKey(e),e=this.timezoneOffsetKey(e),e=this.sessionStorageKey(e),e=this.localStorageKey(e),e=this.indexedDbKey(e),e=this.addBehaviorKey(e),e=this.openDatabaseKey(e),e=this.cpuClassKey(e),e=this.platformKey(e),e=this.doNotTrackKey(e),e=this.pluginsKey(e),e=this.canvasKey(e),e=this.webglKey(e),e=this.adBlockKey(e),e=this.hasLiedLanguagesKey(e),e=this.hasLiedResolutionKey(e),e=this.hasLiedOsKey(e),e=this.hasLiedBrowserKey(e),e=this.touchSupportKey(e),e=this.customEntropyFunction(e);var t=this.fontsKey(e),r=[];return this.each(t,function(e){var t=e.value;void 0!==e.value.join&&(t=e.value.join(";")),r.push(t)}),{fprint:this.x64hash128(r.join("~~~"),31),newKeys:t}},customEntropyFunction:function(e){return"function"==typeof this.options.customFunction&&e.push({key:"custom",value:this.options.customFunction()}),e},userAgentKey:function(e){return this.options.excludeUserAgent||e.push({key:"user_agent",value:this.getUserAgent()}),e},getUserAgent:function(){return navigator.userAgent},languageKey:function(e){return this.options.excludeLanguage||e.push({key:"language",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),e},colorDepthKey:function(e){return this.options.excludeColorDepth||e.push({key:"color_depth",value:screen.colorDepth||-1}),e},pixelRatioKey:function(e){return this.options.excludePixelRatio||e.push({key:"pixel_ratio",value:this.getPixelRatio()}),e},getPixelRatio:function(){return window.devicePixelRatio||""},screenResolutionKey:function(e){return this.options.excludeScreenResolution?e:this.getScreenResolution(e)},getScreenResolution:function(e){var t;return void 0!==(t=this.options.detectScreenOrientation&&screen.height>screen.width?[screen.height,screen.width]:[screen.width,screen.height])&&e.push({key:"resolution",value:t}),e},availableScreenResolutionKey:function(e){return this.options.excludeAvailableScreenResolution?e:this.getAvailableScreenResolution(e)},getAvailableScreenResolution:function(e){var t;return screen.availWidth&&screen.availHeight&&(t=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]),void 0!==t&&e.push({key:"available_resolution",value:t}),e},timezoneOffsetKey:function(e){return this.options.excludeTimezoneOffset||e.push({key:"timezone_offset",value:(new Date).getTimezoneOffset()}),e},sessionStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasSessionStorage()&&e.push({key:"session_storage",value:1}),e},localStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasLocalStorage()&&e.push({key:"local_storage",value:1}),e},indexedDbKey:function(e){return!this.options.excludeIndexedDB&&this.hasIndexedDB()&&e.push({key:"indexed_db",value:1}),e},addBehaviorKey:function(e){return document.body&&!this.options.excludeAddBehavior&&document.body.addBehavior&&e.push({key:"add_behavior",value:1}),e},openDatabaseKey:function(e){return!this.options.excludeOpenDatabase&&window.openDatabase&&e.push({key:"open_database",value:1}),e},cpuClassKey:function(e){return this.options.excludeCpuClass||e.push({key:"cpu_class",value:this.getNavigatorCpuClass()}),e},platformKey:function(e){return this.options.excludePlatform||e.push({key:"navigator_platform",value:this.getNavigatorPlatform()}),e},doNotTrackKey:function(e){return this.options.excludeDoNotTrack||e.push({key:"do_not_track",value:this.getDoNotTrack()}),e},canvasKey:function(e){return!this.options.excludeCanvas&&this.isCanvasSupported()&&e.push({key:"canvas",value:this.getCanvasFp()}),e},webglKey:function(e){return this.options.excludeWebGL?e:this.isWebGlSupported()?(e.push({key:"webgl",value:this.getWebglFp()}),e):e},adBlockKey:function(e){return this.options.excludeAdBlock||e.push({key:"adblock",value:this.getAdBlock()}),e},hasLiedLanguagesKey:function(e){return this.options.excludeHasLiedLanguages||e.push({key:"has_lied_languages",value:this.getHasLiedLanguages()}),e},hasLiedResolutionKey:function(e){return this.options.excludeHasLiedResolution||e.push({key:"has_lied_resolution",value:this.getHasLiedResolution()}),e},hasLiedOsKey:function(e){return this.options.excludeHasLiedOs||e.push({key:"has_lied_os",value:this.getHasLiedOs()}),e},hasLiedBrowserKey:function(e){return this.options.excludeHasLiedBrowser||e.push({key:"has_lied_browser",value:this.getHasLiedBrowser()}),e},fontsKey:function(e){var t=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];this.options.extendedJsFonts&&(r=r.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"])),r=r.concat(this.options.userDefinedFonts);var n=document.getElementsByTagName("body")[0],i=document.createElement("div"),o=document.createElement("div"),a={},s={},f=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize="72px",e.style.lineHeight="normal",e.innerHTML="mmmmmmmmmmlli",e},c=function(e,t){var r=f();return r.style.fontFamily="'"+e+"',"+t,r},u=function(e){for(var r=!1,n=0;nt.name?1:e.name=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if(void 0!==r){if((r=r.toLowerCase()).indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(r.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(r.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if(0===r.indexOf("win")&&0===r.indexOf("linux")&&r.indexOf("mac")>=0&&"other"!==e)return!0}return n.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||(n.indexOf("linux")>=0||n.indexOf("android")>=0||n.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||(n.indexOf("mac")>=0||n.indexOf("ipad")>=0||n.indexOf("ipod")>=0||n.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||0===n.indexOf("win")&&0===n.indexOf("linux")&&n.indexOf("mac")>=0&&"other"!==e||void 0===navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e},getHasLiedBrowser:function(){var e,t=navigator.userAgent.toLowerCase(),r=navigator.productSub;if(("Chrome"===(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other")||"Safari"===e||"Opera"===e)&&"20030107"!==r)return!0;var n,i=eval.toString().length;if(37===i&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===i&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===i&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;try{throw"a"}catch(e){try{e.toSource(),n=!0}catch(e){n=!1}}return!(!n||"Firefox"===e||"Other"===e)},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},isWebGlSupported:function(){if(!this.isCanvasSupported())return!1;var e,t=document.createElement("canvas");try{e=t.getContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(t){e=!1}return!!window.WebGLRenderingContext&&!!e},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},hasSwfObjectLoaded:function(){return void 0!==window.swfobject},hasMinFlashInstalled:function(){return swfobject.hasFlashPlayerVersion("9.0.0")},addFlashDivNode:function(){var e=document.createElement("div");e.setAttribute("id",this.options.swfContainerId),document.body.appendChild(e)},getWebglCanvas:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t},each:function(e,t,r){if(null!==e)if(this.nativeForEach&&e.forEach===this.nativeForEach)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,i=e.length;n>>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]]},x64Multiply:function(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]]},x64Rotl:function(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])},x64LeftShift:function(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=this.x64Multiply(e,[4283543511,3981806797]),e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[3301882366,444984403]),this.x64Xor(e,[0,e[0]>>>1])},x64hash128: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],f=[2277735313,289559509],c=[1291169091,658871167],u=0;u>>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)}},e.VERSION="1.5.1",e})},{}],188:[function(e,t,r){t.exports={websocket:"wss://ws.golos.io",address_prefix:"GLS",chain_id:"782a3039b478c839e4cb0c941ff4eaeb7df40bdd68bd441afd444b9da763de12",broadcast_transaction_with_callback:!1}},{}],189:[function(e,t,r){(function(n){"use strict";var i=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")}}(),o=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};!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,e));return(0,c.default)(e,w),r.options=(0,f.default)(e),r.id=0,r.inFlight=0,r.currentP=s.default.fulfilled(),r.isOpen=!1,r.releases=[],r.requests={},r.callbacks={},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.default),o(t,[{key:"setWebSocket",value:function(e){console.warn("golos.api.setWebSocket(url) is now deprecated instead use golos.config.set('websocket',url)"),g("Setting WS",e),h.default.set("websocket",e),this.stop()}},{key:"start",value:function(){var e=this;if(this.startP)return this.startP;var t=new s.default(function(r,n){if(t===e.startP){var i=h.default.get("websocket");e.ws=new _(i);var o=e.listenTo(e.ws,"open",function(){v("Opened WS connection with",i),e.isOpen=!0,o(),r()}),a=e.listenTo(e.ws,"close",function(){v("Closed WS connection with",i),e.isOpen=!1,delete e.ws,e.stop(),t.isPending()&&n(new Error("The WS connection was closed before this operation was made"))}),s=e.listenTo(e.ws,"message",function(t){v("Received message",t.data);var r=JSON.parse(t.data),n=r.id,i=e.requests[n]||e.callbacks[n];i?(delete e.requests[n],e.onMessage(r,i)):v("Golos.onMessage error: unknown request ",n)});e.releases=e.releases.concat([o,a,s])}});return this.startP=t,t}},{key:"stop",value:function(){g("Stopping..."),this.ws&&this.ws.close(),delete this.startP,delete this.ws,this.releases.forEach(function(e){return e()}),this.releases=[]}},{key:"listenTo",value:function(e,t,r){return m("Adding listener for",t,"from",e.constructor.name),e.addEventListener?e.addEventListener(t,r):e.on(t,r),function(){m("Removing listener for",t,"from",e.constructor.name),e.removeEventListener?e.removeEventListener(t,r):e.removeListener(t,r)}}},{key:"onMessage",value:function(e,t){var r=t.api,n=t.data,i=t.resolve,o=t.reject;t.start_time;v("-- Golos.onMessage --\x3e",e.id);var a=e.error;if(a){var s=new Error((a.message||"Failed to complete operation")+" (see err.payload for the full error payload)");return s.payload=e,void o(s)}y("Resolved",r,n,"->",e),x.includes(n.method)?this.callbacks[e.id].cb(null,e.result):(delete this.requests[e.id],i(e.result))}},{key:"send",value:function(e,t,r){var n=this;g("Golos::send",e,t);var i=t.id||this.id++,o=this.start();return this.currentP=o.then(function(){return new s.default(function(o,a){if(n.ws){var s=JSON.stringify({id:i,method:"call",jsonrpc:"2.0",params:[e,t.method,t.params]});v("Sending message",s),x.includes(t.method)?n.callbacks[i]={api:e,data:t,cb:r}:n.requests[i]={api:e,data:t,resolve:o,reject:a,start_time:Date.now()},n.ws.send(s)}else a(new Error("The WS connection was closed while this request was pending"))})}).nodeify(r),this.currentP}},{key:"streamBlockNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=this,r=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;"function"==typeof e&&(r=e,e="head");var i="",o=!0;return function a(){o&&t.getDynamicGlobalPropertiesAsync().then(function(t){var o="irreversible"===e?t.last_irreversible_block_num:t.head_block_number;if(o!==i)if(i)for(var f=i;f0&&void 0!==arguments[0]?arguments[0]:"head",r=arguments[1];"function"==typeof t&&(r=t,t="head");var n="",i="",o=this.streamBlockNumber(t,function(t,a){if(t)return o(),void r(t);(n=a)!==i&&(i=n,e.getBlock(n,r))});return o}},{key:"streamTransactions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=arguments[1];"function"==typeof e&&(t=e,e="head");var r=this.streamBlock(e,function(e,n){if(e)return r(),void t(e);n&&n.transactions&&n.transactions.forEach(function(e){t(null,e)})});return r}},{key:"streamOperations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=arguments[1];"function"==typeof e&&(t=e,e="head");var r=this.streamTransactions(e,function(e,n){if(e)return r(),void t(e);n.operations.forEach(function(e){t(null,e)})});return r}}]),t}());d.default.forEach(function(e){var t=e.method_name||(0,p.camelCase)(e.method),r=e.params||[],n={};e.has_default_values&&r.forEach(function(e){var t=e.split("="),r=i(t,2),o=r[0],a=r[1];n[o]=a?JSON.parse(a):""}),k.prototype[t+"With"]=function(t,n){var i=r.map(function(e){return t[e.split("=")[0]]});return this.send(e.api,{method:e.method,params:i},n)},k.prototype[t]=function(){for(var e={},o=arguments.length,a=Array(o),s=0;s0&&void 0!==arguments[0]?arguments[0]:o.get("address_prefix"),t=a.ripemd160(this.addy),n=r.concat([this.addy,t.slice(0,4)]);return e+s.encode(n)}}],[{key:"fromBuffer",value:function(t){var r=a.sha512(t);return new e(a.ripemd160(r))}},{key:"fromString",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.get("address_prefix"),f=t.slice(0,n.length);i.equal(n,f,"Expecting key to begin with "+n+", instead got "+f);var c=t.slice(n.length),u=(c=new r(s.decode(c),"binary")).slice(-4);c=c.slice(0,-4);var l=a.ripemd160(c);return l=l.slice(0,4),i.deepEqual(u,l,"Checksum did not match"),new e(c)}},{key:"fromPublic",value:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,o=a.sha256(t.toBuffer(n)),s=a.ripemd160(o),f=new r(1);f.writeUInt8(255&i,0);var c=r.concat([f,s]),u=a.sha256(c);u=a.sha256(u);var l=r.concat([c,u.slice(0,4)]);return new e(a.ripemd160(l))}}]),e}();t.exports=f}).call(this,e("buffer").Buffer)},{"../../../config":219,"./hash":198,assert:62,bs58:103,buffer:105}],193:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.encrypt=function(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){if(null===d){var e=n.default.randomUint8Array(2);d=parseInt(e[0]<<8|e[1],10)}var t=l.fromNumber(Date.now()),r=++d%65535;return(t=t.shiftLeft(16).or(l.fromNumber(r))).toString()}();return h(e,t,i,r)},r.decrypt=function(e,t,r,n,i){return h(e,t,r,n,i).message};var n=u(e("secure-random")),i=u(e("bytebuffer")),o=u(e("browserify-aes")),a=u(e("assert")),s=u(e("./key_public")),f=u(e("./key_private")),c=u(e("./hash"));function u(e){return e&&e.__esModule?e:{default:e}}var l=i.default.Long;function h(e,r,n,s,f){if(!(e=p(e)))throw new TypeError("private_key is required");if(!(r=b(r)))throw new TypeError("public_key is required");if(!(n=m(n)))throw new TypeError("nonce is required");if(!t.isBuffer(s)){if("string"!=typeof s)throw new TypeError("message should be buffer or string");s=new t(s,"binary")}if(f&&"number"!=typeof f)throw new TypeError("checksum should be a number");var u=e.get_shared_secret(r),l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeUint64(n),l.append(u.toString("binary"),"binary"),l=new t(l.copy(0,l.offset).toBinary(),"binary");var h=c.default.sha512(l),d=h.slice(32,48),g=h.slice(0,32),v=c.default.sha256(h);if(v=v.slice(0,4),v=i.default.fromBinary(v.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN).readUint32(),f){if(v!==f)throw new Error("Invalid key");s=function(e,r,n){(0,a.default)(e,"Missing cipher text"),e=y(e);var i=o.default.createDecipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(s,g,d)}else s=function(e,r,n){(0,a.default)(e,"Missing plain text"),e=y(e);var i=o.default.createCipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(s,g,d);return{nonce:n,message:s,checksum:v}}var d=null,p=function(e){return e?e.d?e:f.default.fromWif(e):e},b=function(e){return e?e.Q?e:s.default.fromString(e):e},m=function(e){return e?l.isLong(e)?e:l.fromString(e):e},y=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(this,e("buffer").Buffer)},{"./hash":198,"./key_private":199,"./key_public":200,assert:62,"browserify-aes":78,buffer:105,bytebuffer:106,"secure-random":429}],194:[function(e,t,r){arguments[4][19][0].apply(r,arguments)},{dup:19}],195:[function(e,t,r){(function(r){"use strict";var n=e("assert"),i=e("./hash"),o=e("./enforce_types"),a=e("bigi"),s=e("./ecsignature");function f(e,t,s,f,c){o("Buffer",t),o(a,s),c&&(t=i.sha256(r.concat([t,new r(c)]))),n.equal(t.length,32,"Hash must be 256 bit");var u=s.toBuffer(32),l=new r(32),h=new r(32);h.fill(1),l.fill(0),l=i.HmacSHA256(r.concat([h,new r([0]),u,t]),l),h=i.HmacSHA256(h,l),l=i.HmacSHA256(r.concat([h,new r([1]),u,t]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l);for(var d=a.fromBuffer(h);d.signum()<=0||d.compareTo(e.n)>=0||!f(d);)l=i.HmacSHA256(r.concat([h,new r([0])]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l),d=a.fromBuffer(h);return d}function c(e,t,r,n){var i=e.n,o=e.G,a=r.r,s=r.s;if(a.signum()<=0||a.compareTo(i)>=0)return!1;if(s.signum()<=0||s.compareTo(i)>=0)return!1;var f=s.modInverse(i),c=t.multiply(f).mod(i),u=a.multiply(f).mod(i),l=o.multiplyTwo(c,n,u);return!e.isInfinity(l)&&l.affineX.mod(i).equals(a)}function u(e,t,r,i){n.strictEqual(3&i,i,"Recovery param is more than two bits");var o=e.n,a=e.G,s=r.r,f=r.s;n(s.signum()>0&&s.compareTo(o)<0,"Invalid r value"),n(f.signum()>0&&f.compareTo(o)<0,"Invalid s value");var c=1&i,u=i>>1?s.add(o):s,l=e.pointFromX(c,u),h=l.multiply(o);n(e.isInfinity(h),"nR is not a valid curve point");var d=t.negate().mod(o),p=s.modInverse(o),b=l.multiplyTwo(f,a,d).multiply(p);return e.validate(b),b}t.exports={calcPubKeyRecoveryParam:function(e,t,r,n){for(var i=0;i<4;i++)if(u(e,t,r,i).equals(n))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:f,recoverPubKey:u,sign:function(e,t,r,n){var i,o,c=a.fromBuffer(t),u=e.n,l=e.G,h=(f(e,t,r,function(t){var n=l.multiply(t);return!e.isInfinity(n)&&0!==(i=n.affineX.mod(u)).signum()&&0!==(o=t.modInverse(u).multiply(c.add(r.multiply(i))).mod(u)).signum()},n),u.shiftRight(1));return o.compareTo(h)>0&&(o=u.subtract(o)),new s(i,o)},verify:function(e,t,r,n){return c(e,a.fromBuffer(t),r,n)},verifyRaw:c}}).call(this,e("buffer").Buffer)},{"./ecsignature":196,"./enforce_types":197,"./hash":198,assert:62,bigi:70,buffer:105}],196:[function(e,t,r){arguments[4][21][0].apply(r,arguments)},{"./enforce_types":197,assert:62,bigi:70,buffer:105,dup:21}],197:[function(e,t,r){(function(e){"use strict";function r(e){var t=e.toString().match(/function (.*?)\(/);return t?t[1]:null}t.exports=function(t,n){switch(t){case"Array":if(Array.isArray(n))return;break;case"Boolean":if("boolean"==typeof n)return;break;case"Buffer":if(e.isBuffer(n))return;break;case"Number":if("number"==typeof n)return;break;case"String":if("string"==typeof n)return;break;default:if(r(n.constructor)===r(t))return}throw new TypeError("Expected "+(r(t)||t)+", got "+n)}}).call(this,{isBuffer:e("../../../../../is-buffer/index.js")})},{"../../../../../is-buffer/index.js":239}],198:[function(e,t,r){"use strict";var n=o(e("create-hash")),i=o(e("create-hmac"));function o(e){return e&&e.__esModule?e:{default:e}}t.exports={sha1:function(e,t){return(0,n.default)("sha1").update(e).digest(t)},sha256:function(e,t){return(0,n.default)("sha256").update(e).digest(t)},sha512:function(e,t){return(0,n.default)("sha512").update(e).digest(t)},HmacSHA256:function(e,t){return(0,i.default)("sha256",t).update(e).digest()},ripemd160:function(e){return(0,n.default)("rmd160").update(e).digest()}}},{"create-hash":110,"create-hmac":112}],199:[function(e,t,r){(function(r){"use strict";var n=function(){function e(e,t){for(var r=0;r=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(n);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new e(i)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toPublicKey",value:function(){return this.toPublic()}}],[{key:"fromBuffer",value:function(t){if(!r.isBuffer(t))throw new Error("Expecting paramter to be a Buffer type");if(32!==t.length&&console.log("WARN: Expecting 32 bytes, instead got "+t.length+", stack trace:",(new Error).stack),0===t.length)throw new Error("Empty buffer");return new e(s.fromBuffer(t))}},{key:"fromSeed",value:function(t){if("string"!=typeof t)throw new Error("seed must be of type string");return e.fromBuffer(u.sha256(t))}},{key:"isWif",value:function(e){try{return this.fromWif(e),!0}catch(e){return!1}}},{key:"fromWif",value:function(t){var n=new r(f.decode(t)),i=n.readUInt8(0);c.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),a=n.slice(-4),s=u.sha256(o);if(s=(s=u.sha256(s)).slice(0,4),a.toString()!==s.toString())throw new Error("Invalid WIF key (checksum miss-match)");return o=o.slice(1),e.fromBuffer(o)}},{key:"fromHex",value:function(t){return e.fromBuffer(new r(t,"hex"))}}]),e}();t.exports=d;var p=function(e){return null==e?e:e.Q?e:l.fromStringOrThrow(e)}}).call(this,e("buffer").Buffer)},{"./hash":198,"./key_public":200,assert:62,bigi:70,bs58:103,buffer:105,ecurve:165}],200:[function(e,t,r){(function(r){"use strict";var n=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:this.Q?this.Q.compressed:null;return null===this.Q?r.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(e)}},{key:"toUncompressed",value:function(){var t=this.Q.getEncoded(!1),r=o.Point.decodeFrom(a,t);return e.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var e=this.toBuffer(),t=f.sha512(e);return f.ripemd160(t)}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");return this.toPublicKeyString(e)}},{key:"toPublicKeyString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");if(this.pubdata)return e+this.pubdata;var t=this.toBuffer(),n=f.ripemd160(t),i=r.concat([t,n.slice(0,4)]);return this.pubdata=s.encode(i),e+this.pubdata}},{key:"toAddressString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix"),t=this.toBuffer(),n=f.sha512(t),i=f.ripemd160(n),o=f.ripemd160(i);return i=r.concat([i,o.slice(0,4)]),e+s.encode(i)}},{key:"toPtsAddy",value:function(){var e=this.toBuffer(),t=f.sha256(e),n=f.ripemd160(t);n=r.concat([new r([56]),n]);var i=f.sha256(n);return i=f.sha256(i),n=r.concat([n,i.slice(0,4)]),s.encode(n)}},{key:"child",value:function(t){u(r.isBuffer(t),"Buffer required: offset"),u.equal(t.length,32,"offset length"),t=r.concat([this.toBuffer(),t]),t=f.sha256(t);var n=i.fromBuffer(t);if(n.compareTo(h)>=0)throw new Error("Child offset went out of bounds, try again");var o=l.multiply(n),s=this.Q.add(o);if(a.isInfinity(s))throw new Error("Child offset derived to an invalid key, try again");return e.fromPoint(s)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(t){return e.fromBuffer(new r(t,"binary"))}},{key:"fromBuffer",value:function(t){return"000000000000000000000000000000000000000000000000000000000000000000"===t.toString("hex")?new e(null):new e(o.Point.decodeFrom(a,t))}},{key:"fromPoint",value:function(t){return new e(t)}},{key:"fromString",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix");try{return e.fromStringOrThrow(t,r)}catch(e){return null}}},{key:"fromStringOrThrow",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix"),i=t.slice(0,n.length);u.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),t=t.slice(n.length);var o=(t=new r(s.decode(t),"binary")).slice(-4);t=t.slice(0,-4);var a=f.ripemd160(t);return a=a.slice(0,4),u.deepEqual(o,a,"Checksum did not match"),e.fromBuffer(t)}},{key:"fromHex",value:function(t){return e.fromBuffer(new r(t,"hex"))}},{key:"fromStringHex",value:function(t){return e.fromString(new r(t,"hex"))}}]),e}();t.exports=d}).call(this,e("buffer").Buffer)},{"../../../config":219,"./hash":198,assert:62,bigi:70,bs58:103,buffer:105,ecurve:165}],201:[function(e,t,r){(function(r){"use strict";var n=e("./key_private"),i=e("./hash"),o=e("secure-random"),a=0,s=0,f=o.randomBuffer(101);t.exports={addEntropy:function(){s++;for(var e=arguments.length,t=Array(e),r=0;r9007199254740991&&(f[h]=0)}}catch(e){i=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}},random32ByteBuffer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.browserEntropy();if("string"!=typeof e)throw new Error("string required for entropy");if(e.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var t=Date.now();Date.now()-t<250;)e=i.sha256(e);var n=[];return n.push(e),n.push(o.randomBuffer(32)),i.sha256(r.concat(n))},get_random_key:function(e){return n.fromBuffer(this.random32ByteBuffer(e))},browserEntropy:function(){var e=Array(f).join();try{e+=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var t,n=0;n2&&void 0!==arguments[2]?arguments[2]:["owner","active","posting","memo"]).forEach(function(n){r[n]=this.toWif(e,t,n),r[n+"Pubkey"]=this.wifToPublic(r[n])}.bind(this)),r},p.isWif=function(e){var t=!1;try{var n=new r(i.decode(e)),o=n.slice(0,-4),a=n.slice(-4),s=d.sha256(o);s=(s=d.sha256(s)).slice(0,4),a.toString()==s.toString()&&(t=!0)}catch(e){}return t},p.toWif=function(e,t,n){var o=(e+n+t).trim().split(/[\t\n\v\f\r ]+/).join(" "),a=d.sha256(o),s=r.concat([new r([128]),a]),f=d.sha256(s);f=(f=d.sha256(f)).slice(0,4);var c=r.concat([s,f]);return i.encode(c)},p.wifIsValid=function(e,t){return this.wifToPublic(e)==t},p.wifToPublic=function(e){var t=l.fromWif(e);return t=t.toPublic().toString()},p.isPubkey=function(e,t){return null!=h.fromString(e,t)},p.signTransaction=function(e,t){var n=[];e.signatures&&(n=[].concat(e.signatures));var i=new r(f.get("chain_id"),"hex"),o=b.toBuffer(e);for(var a in t){var s=u.signBuffer(r.concat([i,o]),t[a]);n.push(s.toBuffer())}return m.toObject(Object.assign(e,{signatures:n}))},t.exports=p}).call(this,e("buffer").Buffer)},{"../config":219,"./ecc/src/hash":198,"./ecc/src/key_private":199,"./ecc/src/key_public":200,"./ecc/src/signature":202,"./serializer/src/operations":211,bigi:70,bs58:103,buffer:105,ecurve:165}],204:[function(e,t,r){(function(t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});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};r.decode=u,r.encode=l;var i=f(e("bytebuffer")),o=f(e("assert")),a=f(e("bs58")),s=e("./ecc");function f(e){return e&&e.__esModule?e:{default:e}}var c=e("./serializer").ops.encrypted_memo;function u(e,r){if((0,o.default)(r,"memo is required"),o.default.equal(void 0===r?"undefined":n(r),"string","memo"),!/^#/.test(r))return r;r=r.substring(1),(0,o.default)(e,"private_key is required"),d(),e=p(e),r=a.default.decode(r);var f=r=c.fromBuffer(new t(r,"binary")),u=f.from,l=f.to,h=f.nonce,b=f.check,m=f.encrypted,y=e.toPublicKey().toString()===u.toString()?l.toString():u.toString();r=s.Aes.decrypt(e,y,h,m,b);var g=i.default.fromBinary(r.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);try{return g.mark(),"#"+g.readVString()}catch(e){return g.reset(),"#"+(r=new t(g.toString("binary"),"binary").toString("utf-8"))}}function l(e,r,f,u){if((0,o.default)(f,"memo is required"),o.default.equal(void 0===f?"undefined":n(f),"string","memo"),!/^#/.test(f))return f;f=f.substring(1),(0,o.default)(e,"private_key is required"),(0,o.default)(r,"public_key is required"),d(),e=p(e),r=b(r);var l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeVString(f),f=new t(l.copy(0,l.offset).toBinary(),"binary");var h=s.Aes.encrypt(e,r,f,u),m=h.nonce,y=h.message,g=h.checksum;return f=c.fromObject({from:e.toPublicKey(),to:r,nonce:m,check:g,encrypted:y}),f=c.toBuffer(f),"#"+a.default.encode(new t(f,"binary"))}var h=void 0;function d(){if(void 0===h){var e=void 0;h=!0;try{var t="5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw";e=u(t,l(t,"GLS8m5UgaFAAYQRuaNejYdS8FVLVp9Ss3K1qAVk5de6F8s3HnVbvA","#memo爱"))}catch(e){console.error(e)}finally{h="#memo爱"===e}}if(!1===h)throw new Error("This environment does not support encryption.")}var p=function(e){return e?e.d?e:s.PrivateKey.fromWif(e):e},b=function(e){return e?e.Q?e:s.PublicKey.fromString(e):e}}).call(this,e("buffer").Buffer)},{"./ecc":191,"./serializer":205,assert:62,bs58:103,buffer:105,bytebuffer:106}],205:[function(e,t,r){arguments[4][30][0].apply(r,arguments)},{"./src/fast_parser":208,"./src/number_utils":209,"./src/operations":211,"./src/serializer":212,"./src/template":213,"./src/types":214,dup:30}],206:[function(e,t,r){"use strict";var n;t.exports=n={},n.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},n.operations={vote:0,comment:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,limit_order_create:5,limit_order_cancel:6,feed_publish:7,convert:8,account_create:9,account_update:10,witness_update:11,account_witness_vote:12,account_witness_proxy:13,pow:14,custom:15,report_over_production:16,delete_comment:17,custom_json:18,comment_options:19,set_withdraw_vesting_route:20,limit_order_create2:21,challenge_authority:22,prove_authority:23,request_account_recovery:24,recover_account:25,change_recovery_account:26,escrow_transfer:27,escrow_dispute:28,escrow_release:29,pow2:30,escrow_approve:31,transfer_to_savings:32,transfer_from_savings:33,cancel_transfer_from_savings:34,custom_binary:35,decline_voting_rights:36,reset_account:37,set_reset_account:38,delegate_vesting_shares:39,account_create_with_delegation:40,account_metadata:41,proposal_create:42,proposal_update:43,proposal_delete:44,chain_properties_update:45,fill_convert_request:46,author_reward:47,curation_reward:48,comment_reward:49,liquidity_reward:50,interest:51,fill_vesting_withdraw:52,fill_order:53,shutdown_witness:54,fill_transfer_from_savings:55,hardfork:56,comment_payout_update:57,comment_benefactor_reward:58,return_vesting_delegation:59},n.object_type={null:0,base:1}},{}],207:[function(e,t,r){arguments[4][32][0].apply(r,arguments)},{dup:32}],208:[function(e,t,r){arguments[4][33][0].apply(r,arguments)},{"../../ecc":191,buffer:105,dup:33}],209:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});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"==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};r.toImpliedDecimal=function(e,t){"number"==typeof e?((0,s.default)(e<=9007199254740991,"overflow"),e=""+e):e.toString&&(e=e.toString());(0,s.default)("string"==typeof e,"number should be an actual number or string: "+(void 0===e?"undefined":i(e))),e=e.trim(),(0,s.default)(/^[0-9]*\.?[0-9]*$/.test(e),"Invalid decimal number "+e);var r=e.split("."),o=n(r,2),a=o[0],f=void 0===a?"":a,c=o[1],u=void 0===c?"":c,l=t-u.length;(0,s.default)(l>=0,"Too many decimal digits in "+e+" to create an implied decimal of "+t);for(var h=0;h0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{use_default:!1,annotate:!1},r={},n=null;try{if(!this.types)return r;for(var i=this.keys,f=0;fc?1:f6)throw new Error("Symbols are not longer than 6 characters "+a+"-"+a.length);e.writeInt64(f.to_long(i.replace(".","")));var s=i.indexOf("."),c=-1===s?0:i.length-s-1;e.writeUint8(c),e.append(a.toUpperCase(),"binary");for(var u=0;u<7-a.length;u++)e.writeUint8(0)},fromObject:function(e){return e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0.000 GOLOS":e}},h.uint8={fromByteBuffer:function(e){return e.readUint8()},appendByteBuffer:function(e,t){f.require_range(0,255,t,"uint8 "+t),e.writeUint8(t)},fromObject:function(e){return f.require_range(0,255,e,"uint8 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(0,255,e,"uint8 "+e),parseInt(e))}},h.uint16={fromByteBuffer:function(e){return e.readUint16()},appendByteBuffer:function(e,t){f.require_range(0,65535,t,"uint16 "+t),e.writeUint16(t)},fromObject:function(e){return f.require_range(0,65535,e,"uint16 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(0,65535,e,"uint16 "+e),parseInt(e))}},h.uint32={fromByteBuffer:function(e){return e.readUint32()},appendByteBuffer:function(e,t){f.require_range(0,4294967295,t,"uint32 "+t),e.writeUint32(t)},fromObject:function(e){return f.require_range(0,4294967295,e,"uint32 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(0,4294967295,e,"uint32 "+e),parseInt(e))}};var p=-1*Math.pow(2,31),b=Math.pow(2,31)-1;h.varint32={fromByteBuffer:function(e){return e.readVarint32()},appendByteBuffer:function(e,t){f.require_range(p,b,t,"uint32 "+t),e.writeVarint32(t)},fromObject:function(e){return f.require_range(p,b,e,"uint32 "+e),e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:(f.require_range(p,b,e,"uint32 "+e),parseInt(e))}},h.int16={fromByteBuffer:function(e){return e.readInt16()},appendByteBuffer:function(e,t){e.writeInt16(t)},fromObject:function(e){return e},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?0:parseInt(e)}},h.int64={fromByteBuffer:function(e){return e.readInt64()},appendByteBuffer:function(e,t){f.required(t),e.writeInt64(f.to_long(t))},fromObject:function(e){return f.required(e),f.to_long(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0":(f.required(e),f.to_long(e).toString())}},h.uint64={fromByteBuffer:function(e){return e.readUint64()},appendByteBuffer:function(e,t){e.writeUint64(f.to_long(f.unsigned(t)))},fromObject:function(e){return f.to_long(f.unsigned(e))},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0":f.to_long(e).toString()}},h.string={fromByteBuffer:function(e){return new n(e.readVString(),"utf8")},appendByteBuffer:function(e,t){f.required(t),e.writeVString(t.toString())},fromObject:function(e){return f.required(e),new n(e,"utf8")},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"":e.toString("utf8")}},h.string_binary={fromByteBuffer:function(e){var t,r=e.readVarint32();return t=e.copy(e.offset,e.offset+r),e.skip(r),new n(t.toBinary(),"binary")},appendByteBuffer:function(e,t){e.writeVarint32(t.length),e.append(t.toString("binary"),"binary")},fromObject:function(e){return f.required(e),new n(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"":e.toString()}},h.bytes=function(e){return{fromByteBuffer:function(t){if(void 0===e){var r,i=t.readVarint32();return r=t.copy(t.offset,t.offset+i),t.skip(i),new n(r.toBinary(),"binary")}return r=t.copy(t.offset,t.offset+e),t.skip(e),new n(r.toBinary(),"binary")},appendByteBuffer:function(t,r){f.required(r),"string"==typeof r&&(r=new n(r,"hex")),void 0===e&&t.writeVarint32(r.length),t.append(r.toString("binary"),"binary")},fromObject:function(e){return f.required(e),n.isBuffer(e)?e:new n(e,"hex")},toObject:function(t){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t){return new Array(e).join("00")}return f.required(t),t.toString("hex")}}},h.bool={fromByteBuffer:function(e){return 1===e.readUint8()},appendByteBuffer:function(e,t){e.writeUint8(JSON.parse(t)?1:0)},fromObject:function(e){return!!JSON.parse(e)},toObject:function(e){return(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==e)&&!!JSON.parse(e)}},h.void={fromByteBuffer:function(e){throw new Error("(void) undefined type")},appendByteBuffer:function(e,t){throw new Error("(void) undefined type")},fromObject:function(e){throw new Error("(void) undefined type")},toObject:function(e){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==e)throw new Error("(void) undefined type")}},h.array=function(e){return{fromByteBuffer:function(t){var r=t.readVarint32();d&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0r;i++)n.push(e.fromByteBuffer(t));return g(n,e)},appendByteBuffer:function(t,r){f.required(r),r=g(r,e),t.writeVarint32(r.length);for(var n,i=0;i1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===t)return[e.toObject(t,r)];f.required(t),t=g(t,e);for(var n,i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e)return new Date(0).toISOString().split(".")[0];if(f.required(e),"string"==typeof e)return e;if(e.getTime)return e.toISOString().split(".")[0];var t=parseInt(e);return f.require_range(0,4294967295,t,"uint32 "+e),new Date(1e3*t).toISOString().split(".")[0]}},h.set=function(e){return{validate:function(t){for(var r,n={},o=0;o=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return g(t,e)},fromByteBuffer:function(t){var r=t.readVarint32();return d&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0r;i++)n.push(e.fromByteBuffer(t));return n}())},appendByteBuffer:function(t,r){r||(r=[]),t.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return r.use_default&&void 0===t?[e.toObject(t,r)]:(t||(t=[]),this.validate(function(){for(var n,i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{},i=l.object_type[r];return n.use_default&&void 0===e?t+"."+i+".0":(f.required(e),void 0!==e.resolve&&(e=e.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(e)&&(e=f.get_instance(t,r,e)),t+"."+i+"."+e)}};var t,r},h.object_id_type={fromByteBuffer:function(e){return c.fromByteBuffer(e)},appendByteBuffer:function(e,t){f.required(t),void 0!==t.resolve&&(t=t.resolve),(t=c.fromString(t)).appendByteBuffer(e)},fromObject:function(e){return f.required(e),void 0!==e.resolve&&(e=e.resolve),c.fromString(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0.0.0":(f.required(e),void 0!==e.resolve&&(e=e.resolve),(e=c.fromString(e)).toString())}},h.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(e){var t=e.readUint32();return{type:t&this.TYPE,id:t&this.ID}},appendByteBuffer:function(e,t){f.required(t),"string"===t&&(t=h.vote_id.fromObject(t));var r=t.id<<8|t.type;e.writeUint32(r)},fromObject:function(e){if(f.required(e,"(type vote_id)"),"object"===(void 0===e?"undefined":i(e)))return f.required(e.type,"type"),f.required(e.id,"id"),e;f.require_test(/^[0-9]+:[0-9]+$/,e,"vote_id format "+e);var t=e.split(":"),r=o(t,2),n=r[0],a=r[1];return f.require_range(0,255,n,"vote type "+e),f.require_range(0,16777215,a,"vote id "+e),{type:n,id:a}},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?"0:0":(f.required(e),"string"==typeof e&&(e=h.vote_id.fromObject(e)),e.type+":"+e.id)},compare:function(e,t){return"object"!==(void 0===e?"undefined":i(e))&&(e=h.vote_id.fromObject(e)),"object"!==(void 0===t?"undefined":i(t))&&(t=h.vote_id.fromObject(t)),parseInt(e.id)-parseInt(t.id)}},h.optional=function(e){return f.required(e,"st_operation"),{fromByteBuffer:function(t){if(1===t.readUint8())return e.fromByteBuffer(t)},appendByteBuffer:function(t,r){null!==r&&void 0!==r?(t.writeUint8(1),e.appendByteBuffer(t,r)):t.writeUint8(0)},fromObject:function(t){if(void 0!==t)return e.fromObject(t)},toObject:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.use_default||void 0!==t?e.toObject(t,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.static_variant=function(e){return{nosort:!0,st_operations:e,opTypeId:function(e){var t=0,r=void 0;if("number"==typeof e)r=e;else{var n=!0,i=!1,o=void 0;try{for(var a,s=this.st_operations[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){if(a.value.operation_name===e){r=t;break}t++}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}}return r},fromByteBuffer:function(e){var t=e.readVarint32(),r=this.st_operations[t];return d&&console.error("static_variant id 0x"+t.toString(16)+" ("+t+")"),f.required(r,"operation "+t),[t,r.fromByteBuffer(e)]},appendByteBuffer:function(e,t){f.required(t);var r=this.opTypeId(t[0]),n=this.st_operations[r];f.required(n,"operation "+r),e.writeVarint32(r),n.appendByteBuffer(e,t[1])},fromObject:function(e){f.required(e);var t=this.opTypeId(e[0]),r=this.st_operations[t];return f.required(r,"operation "+t),[t,r.fromObject(e[1])]},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.use_default&&void 0===e)return[this.st_operations[0].operation_name,this.st_operations[0].toObject(void 0,t)];f.required(e);var r=this.opTypeId(e[0]),n=this.st_operations[r];return f.required(n,"operation "+r),[n.operation_name,n.toObject(e[1],t)]},compare:function(e,t){return m(this.opTypeId(e[0]),this.opTypeId(t[0]))}}},h.map=function(e,t){return{validate:function(t){if(!Array.isArray(t))throw new Error("expecting array");for(var r,n={},o=0;o=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return g(t,e)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0i;o++)n.push([e.fromByteBuffer(r),t.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if(n.use_default&&void 0===r)return[[e.toObject(void 0,n),t.toObject(void 0,n)]];f.required(r),r=this.validate(r);for(var i,o=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?a.ecc_config.get("address_prefix")+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(f.required(e),e.toString())},compare:function(e,t){return-1*m(e.toString(),t.toString())}},h.address={_to_address:function(e){return f.required(e),e.addy?e:a.Address.fromString(e)},fromByteBuffer:function(e){return new a.Address(u.ripemd160(e))},appendByteBuffer:function(e,t){u.ripemd160(e,h.address._to_address(t).toBuffer())},fromObject:function(e){return h.address._to_address(e)},toObject:function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e?a.ecc_config.get("address_prefix")+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":h.address._to_address(e).toString()},compare:function(e,t){return-1*m(e.toString(),t.toString())}};var m=function(e,t){return e>t?1:e1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))throw new Error("value required "+t+" "+e);return e},require_long:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!c.isLong(e))throw new Error("Long value required "+t+" "+e);return e},string:function(e){if(i(e))return e;if("string"!=typeof e)throw new Error("string required: "+e);return e},number:function(e){if(i(e))return e;if("number"!=typeof e)throw new Error("number required: "+e);return e},whole_number:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if(/\./.test(e))throw new Error("whole number required "+t+" "+e);return e},unsigned:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if(/-/.test(e))throw new Error("unsigned required "+t+" "+e);return e},is_digits:function(e){return"numeric"==typeof e||/^[0-9]+$/.test(e)},to_number:o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(e)?e:(n.no_overflow53(e,t),"number"==typeof e?e:parseInt(e))},to_long:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(e)?e:c.isLong(e)?e:(n.no_overflow64(e,t),"number"==typeof e&&(e=""+e),c.fromString(e))},to_string:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if("string"==typeof e)return e;if("number"==typeof e)return n.no_overflow53(e,t),""+e;if(c.isLong(e))return e.toString();throw"unsupported type "+t+": ("+(void 0===e?"undefined":f(e))+") "+e},require_test:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(t))return t;if(!e.test(t))throw new Error("unmatched "+e+" "+r+" "+t);return t},require_match:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(t))return t;var n=t.match(e);if(null===n)throw new Error("unmatched "+e+" "+r+" "+t);return n},require_range:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;o(r);if(rt)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;var o=u.object_type[t];if(!o)throw new Error("Unknown object type: "+t+", "+n+", "+r);if(!new RegExp(e+"."+o+".[0-9]+$").test(r))throw new Error("Expecting "+t+" in format "+e+"."+o+".[0-9]+ instead of "+r+" "+n+" "+r);return r},get_instance:function(e,t,r,n){return i(r)?r:(a(e,t,r,n),o(r.split(".")[2]))},require_relative_type:function(e,t,r){return a(0,e,t,r),t},get_relative_instance:function(e,t,r){return i(t)?t:(a(0,e,t,r),o(t.split(".")[2]))},require_protocol_type:function(e,t,r){return a(1,e,t,r),t},get_protocol_instance:function(e,t,r){return i(t)?t:(a(1,e,t,r),o(t.split(".")[2]))},get_protocol_type:s=function(e,t){if(i(e))return e;(void 0)(e,t);var r=e.split(".");return o(r[1])},get_protocol_type_name:function(e,t){if(i(e))return e;var r=s(e,t);return Object.keys(u.object_type)[r]},require_implementation_type:function(e,t,r){return a(2,e,t,r),t},get_implementation_instance:function(e,t,r){return i(t)?t:(a(2,e,t,r),o(t.split(".")[2]))},no_overflow53:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("number"!=typeof e)if("string"!=typeof e){if(!c.isLong(e))throw"unsupported type "+t+": ("+(void 0===e?"undefined":f(e))+") "+e;n.no_overflow53(e.toInt(),t)}else{parseInt(e);if(e>9007199254740991||e<-9007199254740991)throw new Error("overflow "+t+" "+e)}else if(e>9007199254740991||e<-9007199254740991)throw new Error("overflow "+t+" "+e)},no_overflow64:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!c.isLong(e))if(void 0===e.t||void 0===e.s)if("string"!=typeof e){if("number"!=typeof e)throw"unsupported type "+t+": ("+(void 0===e?"undefined":f(e))+") "+e;if(e>9007199254740991||e<-9007199254740991)throw new Error("overflow "+t+" "+e)}else{for(e=e.replace(/^0+/,"");/0$/.test(e);)e=e.substring(0,e.length-1);if(/\.$/.test(e)&&(e=e.substring(0,e.length-1)),""===e&&(e="0"),c.fromString(e).toString()!==e.trim())throw new Error("overflow "+t+" "+e)}else n.no_overflow64(e.toString(),t)}}},{"./ChainTypes":206,bytebuffer:106}],216:[function(e,t,r){"use strict";var n,i=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")}}(),o=e("../api"),a=(n=o)&&n.__esModule?n:{default:n};t.exports=function(e){e.addAccountAuth=function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"posting",s=arguments[4];a.default.getAccountsAsync([r]).then(function(r){var a=i(r,1)[0],f=a[o];if(-1!==f.account_auths.map(function(e){return e[0]}).indexOf(n))return s(null,null);f.account_auths.push([n,1]);var c="owner"===o?f:void 0,u="active"===o?f:void 0,l="posting"===o?f:void 0;e.accountUpdate(t,a.name,c,u,l,a.memo_key,a.json_metadata,s)})},e.removeAccountAuth=function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"posting",s=arguments[4];a.default.getAccountsAsync([r]).then(function(r){for(var a=i(r,1)[0],f=a[o],c=f.account_auths.length,u=0;u1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{},s=o.gprops,f=o.feed_price,c=o.open_orders,u=o.savings_withdraws,l=o.vesting_steem,h=[],d=i.name,p=void 0,b=void 0;return l&&f||(s&&f?l=t(i,s):h.push(e.getStateAsync("/@{username}").then(function(e){s=e.props,f=e.feed_price,l=t(i,s)}))),c?p=r(c,1e3):h.push(e.getOpenOrdersAsync(d).then(function(e){p=r(e,1e3)})),u?b=n(u):h.push(e.getSavingsWithdrawFromAsync(d).then(function(e){b=n(e)})),Promise.all(h).then(function(){var e=void 0,t=f,r=t.base,n=t.quote;/ GBG$/.test(r)&&/ GOLOS$/.test(n)&&(e=parseFloat(r.split(" ")[0]));var o=i.savings_balance,s=i.savings_sbd_balance,c=parseFloat(i.balance.split(" ")[0]),u=parseFloat(o.split(" ")[0]),h=parseFloat(i.sbd_balance),d=parseFloat(s.split(" ")[0]),m=0,y=(new Date).getTime();(i.other_history||[]).reduce(function(e,t){if("convert"!==(0,a.default)(t,[1,"op",0],""))return e;if(new Date((0,a.default)(t,[1,"timestamp"])).getTime()+3024e5=this._blockSize;){for(var o=this._blockOffset;o0;++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:238,"safe-buffer":428,stream:441}],224:[function(e,t,r){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":225,"./hash/hmac":226,"./hash/ripemd":227,"./hash/sha":228,"./hash/utils":235}],225:[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>>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;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":235}],235:[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>8,a=255&i;o?r.push(o,a):r.push(a)}else for(n=0;n>>0}return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>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<>>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>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0>>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 f=0,c=t;return f+=(c=c+n>>>0)>>0)>>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,f,c){var u=0,l=t;return u+=(l=l+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,f,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:238,"minimalistic-assert":389}],236:[function(e,t,r){"use strict";var n=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-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||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");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.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||"hex"),this._update(r));for(var o=[];o.length>1,u=-7,l=r?i-1:0,h=r?-1:1,d=e[t+l];for(l+=h,o=d&(1<<-u)-1,d>>=-u,u+=s;u>0;o=256*o+e[t+l],l+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=n;u>0;a=256*a+e[t+l],l+=h,u-=8);if(0===o)o=1-c;else{if(o===f)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,f,c=8*o-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,b=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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-a))<1&&(a--,f*=2),(t+=a+l>=1?h/f:h*Math.pow(2,1-l))*f>=2&&(a++,f/=2),a+l>=u?(s=0,a=u):a+l>=1?(s=(t*f-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*b}},{}],238:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{dup:63}],239:[function(e,t,r){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)}},{}],240:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],241:[function(e,t,r){!function(e,r){"use strict";"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?r(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return r(e)}:r(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,f=r.indexOf,c={},u=c.toString,l=c.hasOwnProperty,h=l.toString,d=h.call(Object),p={},b=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m=function(e){return null!=e&&e===e.window},y={type:!0,src:!0,noModule:!0};function g(e,t,r){var i,o=(t=t||n).createElement("script");if(o.text=e,r)for(i in y)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[u.call(e)]||"object":typeof e}var _=function(e,t){return new _.fn.init(e,t)},w=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function x(e){var t=!!e&&"length"in e&&e.length,r=v(e);return!b(e)&&!m(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+~]|"+L+")"+L+"*"),V=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),K=new RegExp(N),W=new RegExp("^"+D+"$"),G={ID:new RegExp("^#("+D+")"),CLASS:new RegExp("^\\.("+D+")"),TAG:new RegExp("^("+D+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,Y=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","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=ge(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{I.apply(j=O.call(w.childNodes),w.childNodes),j[w.childNodes.length].nodeType}catch(e){I={apply:j.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,u,l,p,y,g=t&&t.ownerDocument,x=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return n;if(!i&&((t?t.ownerDocument||t:w)!==d&&h(t),t=t||d,b)){if(11!==x&&(l=Q.exec(e)))if(o=l[1]){if(9===x){if(!(c=t.getElementById(o)))return n;if(c.id===o)return n.push(c),n}else if(g&&(c=g.getElementById(o))&&v(t,c)&&c.id===o)return n.push(c),n}else{if(l[2])return I.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&r.getElementsByClassName&&t.getElementsByClassName)return I.apply(n,t.getElementsByClassName(o)),n}if(r.qsa&&!B[e+" "]&&(!m||!m.test(e))){if(1!==x)g=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(te,re):t.setAttribute("id",u=_),s=(p=a(e)).length;s--;)p[s]="#"+u+" "+ye(p[s]);y=p.join(","),g=Z.test(e)&&be(t.parentNode)||t}if(y)try{return I.apply(n,g.querySelectorAll(y)),n}catch(e){}finally{u===_&&t.removeAttribute("id")}}}return f(e.replace(U,"$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 fe(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 ue(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 le(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 be(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,b=!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=fe(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=fe(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=$.test(d.getElementsByClassName),r.getById=fe(function(e){return p.appendChild(e).id=_,!d.getElementsByName||!d.getElementsByName(_).length}),r.getById?(n.filter.ID=function(e){var t=e.replace(Y,ee);return function(e){return e.getAttribute("id")===t}},n.find.ID=function(e,t){if(void 0!==t.getElementById&&b){var r=t.getElementById(e);return r?[r]:[]}}):(n.filter.ID=function(e){var t=e.replace(Y,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&&b){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&&b)return t.getElementsByClassName(e)},y=[],m=[],(r.qsa=$.test(d.querySelectorAll))&&(fe(function(e){p.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+L+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+L+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+_+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]")}),fe(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+L+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(r.matchesSelector=$.test(g=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&fe(function(e){r.disconnectedMatch=g.call(e,"*"),g.call(e,"[s!='']:x"),y.push("!=",N)}),m=m.length&&new RegExp(m.join("|")),y=y.length&&new RegExp(y.join("|")),t=$.test(p.compareDocumentPosition),v=t||$.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 l=!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:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!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:u?P(u,e)-P(u,t):0;if(i===o)return ue(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?ue(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(V,"='$1']"),r.matchesSelector&&b&&!B[t+" "]&&(!y||!y.test(t))&&(!m||!m.test(t)))try{var n=g.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,!b):void 0;return void 0!==o?o:r.attributes||!b?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(l=!r.detectDuplicates,u=!r.sortStable&&e.slice(0),e.sort(A),l){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return u=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(Y,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Y,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(Y,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+L+")"+e+"("+L+"|$)"))&&S(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,f){var c,u,l,h,d,p,b=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),g=!f&&!s,v=!1;if(m){if(o){for(;b;){for(h=t;h=h[b];)if(s?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;p=b="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?m.firstChild:m.lastChild],a&&g){for(v=(d=(c=(u=(l=(h=m)[_]||(h[_]={}))[h.uniqueID]||(l[h.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],h=d&&m.childNodes[d];h=++d&&h&&h[b]||(v=d=0)||p.pop();)if(1===h.nodeType&&++v&&h===t){u[e]=[x,d,v];break}}else if(g&&(v=d=(c=(u=(l=(h=t)[_]||(h[_]={}))[h.uniqueID]||(l[h.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===v)for(;(h=++d&&h&&h[b]||(v=d=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++v||(g&&((u=(l=h[_]||(h[_]={}))[h.uniqueID]||(l[h.uniqueID]={}))[e]=[x,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=P(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(U,"$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(Y,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(Y,ee).toLowerCase(),function(t){var r;do{if(r=b?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 J.test(e.nodeName)},input:function(e){return X.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=0;)e.push(n);return e}),gt:pe(function(e,t,r){for(var n=r<0?r+t:r;++n1?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,f=e.length,c=null!=t;s-1&&(o[c]=!(a[c]=l))}}else y=_e(y===a?y.splice(p,y.length):y),i?i(null,a,y,f):I.apply(a,y)})}function xe(e){for(var t,r,i,o=e.length,a=n.relative[e[0].type],s=a||n.relative[" "],f=a?1:0,u=ge(function(e){return e===t},s,!0),l=ge(function(e){return P(t,e)>-1},s,!0),h=[function(e,r,n){var i=!a&&(n||r!==c)||((t=r).nodeType?u(e,r,n):l(e,r,n));return t=null,i}];f1&&ve(h),f>1&&ye(e.slice(0,f-1).concat({value:" "===e[f-2].type?"*":""})).replace(U,"$1"),r,f0,i=e.length>0,o=function(o,a,s,f,u){var l,p,m,y=0,g="0",v=o&&[],_=[],w=c,k=o||i&&n.find.TAG("*",u),S=x+=null==w?1:Math.random()||.1,E=k.length;for(u&&(c=a===d||a||u);g!==E&&null!=(l=k[g]);g++){if(i&&l){for(p=0,a||l.ownerDocument===d||(h(l),s=!b);m=e[p++];)if(m(l,a||d,s)){f.push(l);break}u&&(x=S)}r&&((l=!m&&l)&&y--,o&&v.push(l))}if(y+=g,r&&g!==y){for(p=0;m=t[p++];)m(v,_,a,s);if(o){if(y>0)for(;g--;)v[g]||_[g]||(_[g]=C.call(f));_=_e(_)}I.apply(f,_),u&&!o&&_.length>0&&y+t.length>1&&oe.uniqueSort(f)}return u&&(x=S,c=w),v};return r?se(o):o}(o,i))).selector=e}return s},f=oe.select=function(e,t,r,i){var o,f,c,u,l,h="function"==typeof e&&e,d=!i&&a(e=h.selector||e);if(r=r||[],1===d.length){if((f=d[0]=d[0].slice(0)).length>2&&"ID"===(c=f[0]).type&&9===t.nodeType&&b&&n.relative[f[1].type]){if(!(t=(n.find.ID(c.matches[0].replace(Y,ee),t)||[])[0]))return r;h&&(t=t.parentNode),e=e.slice(f.shift().value.length)}for(o=G.needsContext.test(e)?0:f.length;o--&&(c=f[o],!n.relative[u=c.type]);)if((l=n.find[u])&&(i=l(c.matches[0].replace(Y,ee),Z.test(f[0].type)&&be(t.parentNode)||t))){if(f.splice(o,1),!(e=i.length&&ye(f)))return I.apply(r,i),r;break}}return(h||s(e,d))(i,t,!b,r,!t||Z.test(e)&&be(t.parentNode)||t),r},r.sortStable=_.split("").sort(A).join("")===_,r.detectDuplicates=!!l,h(),r.sortDetached=fe(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),fe(function(e){return e.innerHTML="","#"===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&&fe(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ce("value",function(e,t,r){if(!r&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),fe(function(e){return null==e.getAttribute("disabled")})||ce(R,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=k,_.expr=k.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=k.uniqueSort,_.text=k.getText,_.isXMLDoc=k.isXML,_.contains=k.contains,_.escapeSelector=k.escape;var S=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},E=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r},B=_.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 j(e,t,r){return b(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 f.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;t1?_.uniqueSort(r):r},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&B.test(e)?_(e):e||[],!1).length}});var C,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,r){var i,o;if(!e)return this;if(r=r||C,"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)b(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):b(e)?void 0!==r.ready?r.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,C=_(n);var I=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(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-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?f.call(_(e),this[0]):f.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 S(e,"parentNode")},parentsUntil:function(e,t,r){return S(e,"parentNode",r)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return S(e,"nextSibling")},prevAll:function(e){return S(e,"previousSibling")},nextUntil:function(e,t,r){return S(e,"nextSibling",r)},prevUntil:function(e,t,r){return S(e,"previousSibling",r)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(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),I.test(e)&&i.reverse()),this.pushStack(i)}});var R=/[^\x20\t\r\n\f]+/g;function L(e){return e}function D(e){throw e}function q(e,t,r,n){var i;try{e&&b(i=e.promise)?i.call(e).done(t).fail(r):e&&b(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(R)||[],function(e,r){t[r]=!0}),t}(e):_.extend({},e);var t,r,n,i,o=[],a=[],s=-1,f=function(){for(i=i||e.once,n=t=!0;a.length;s=-1)for(r=a.shift();++s-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||f()),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=b(e[n[4]])&&e[n[4]];o[n[1]](function(){var e=i&&i.apply(this,arguments);e&&b(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,f=arguments,c=function(){var e,c;if(!(t=o&&(n!==D&&(s=void 0,f=[e]),r.rejectWith(s,f))}};t?u():(_.Deferred.getStackHook&&(u.stackTrace=_.Deferred.getStackHook()),e.setTimeout(u))}}return _.Deferred(function(e){r[0][3].add(a(0,e,b(i)?i:L,e.notifyWith)),r[1][3].add(a(0,e,b(t)?t:L)),r[2][3].add(a(0,e,b(n)?n:D))}).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&&(q(e,a.done(s(r)).resolve,a.reject,!t),"pending"===a.state()||b(i[r]&&i[r].then)))return a.then();for(;r--;)q(i[r],s(r),a.reject);return a.promise()}});var N=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(t,r){e.console&&e.console.warn&&t&&N.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 U(){n.removeEventListener("DOMContentLoaded",U),e.removeEventListener("load",U),_.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",U),e.addEventListener("load",U));var z=function(e,t,r,n,i,o,a){var s=0,f=e.length,c=null==r;if("object"===v(r))for(s in i=!0,r)z(e,t,s,r[s],!0,o,a);else if(void 0!==n&&(i=!0,b(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(;s1,null,!0)},removeData:function(e){return this.each(function(){$.remove(this,e)})}}),_.extend({queue:function(e,t,r){var n;if(e)return t=(t||"fx")+"queue",n=J.get(e,t),r&&(!n||Array.isArray(r)?n=J.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 J.get(e,r)||J.access(e,r,{empty:_.Callbacks("once memory").add(function(){J.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\x20\t\r\n\f]+)/i,le=/^$|^module$|\/(?:java|ecma)script/i,he={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_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-1)i&&i.push(o);else if(c=_.contains(o.ownerDocument,o),a=de(l.appendChild(o),"script"),c&&pe(a),r)for(u=0;o=a[u++];)le.test(o.type||"")&&r.push(o);return l}be=n.createDocumentFragment().appendChild(n.createElement("div")),(me=n.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),be.appendChild(me),p.checkClone=be.cloneNode(!0).cloneNode(!0).lastChild.checked,be.innerHTML="",p.noCloneChecked=!!be.cloneNode(!0).lastChild.defaultValue;var ve=n.documentElement,_e=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ee(){try{return n.activeElement}catch(e){}}function Be(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)Be(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=Se;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,f,c,u,l,h,d,p,b,m=J.get(e);if(m)for(r.handler&&(r=(o=r).handler,i=o.selector),i&&_.find.matchesSelector(ve,i),r.guid||(r.guid=_.guid++),(f=m.events)||(f=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(R)||[""]).length;c--;)d=b=(s=xe.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),d&&(l=_.event.special[d]||{},d=(i?l.delegateType:l.bindType)||d,l=_.event.special[d]||{},u=_.extend({type:d,origType:b,data:n,handler:r,guid:r.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=f[d])||((h=f[d]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,n,p,a)||e.addEventListener&&e.addEventListener(d,a)),l.add&&(l.add.call(e,u),u.handler.guid||(u.handler.guid=r.guid)),i?h.splice(h.delegateCount++,0,u):h.push(u),_.event.global[d]=!0)},remove:function(e,t,r,n,i){var o,a,s,f,c,u,l,h,d,p,b,m=J.hasData(e)&&J.get(e);if(m&&(f=m.events)){for(c=(t=(t||"").match(R)||[""]).length;c--;)if(d=b=(s=xe.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),d){for(l=_.event.special[d]||{},h=f[d=(n?l.delegateType:l.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)u=h[o],!i&&b!==u.origType||r&&r.guid!==u.guid||s&&!s.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,l.remove&&l.remove.call(e,u));a&&!h.length&&(l.teardown&&!1!==l.teardown.call(e,p,m.handle)||_.removeEvent(e,d,m.handle),delete f[d])}else for(d in f)_.event.remove(e,d+t[c],r,n,!0);_.isEmptyObject(f)&&J.remove(e,"handle events")}},dispatch:function(e){var t,r,n,i,o,a,s=_.event.fix(e),f=new Array(arguments.length),c=(J.get(this,"events")||{})[s.type]||[],u=_.event.special[s.type]||{};for(f[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},r=0;r-1:_.find(i,this,null,[c]).length),a[i]&&o.push(n);o.length&&s.push({elem:c,handlers:o})}return c=this,f\x20\t\r\n\f]*)[^>]*)\/>/gi,Te=/\s*$/g;function Me(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Ie(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 Pe(e,t){var r,n,i,o,a,s,f,c;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),c=o.events))for(i in delete a.handle,a.events={},c)for(r=0,n=c[i].length;r1&&"string"==typeof m&&!p.checkClone&&je.test(m))return e.each(function(i){var o=e.eq(i);y&&(t[0]=m.call(this,i,o.html())),Re(o,t,r,n)});if(h&&(o=(i=ge(t,e[0].ownerDocument,!1,e,n)).firstChild,1===i.childNodes.length&&(i=o),o||n)){for(f=(s=_.map(de(i,"script"),Ie)).length;l")},clone:function(e,t,r){var n,i,o,a,s,f,c,u=e.cloneNode(!0),l=_.contains(e.ownerDocument,e);if(!(p.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||_.isXMLDoc(e)))for(a=de(u),n=0,i=(o=de(e)).length;n0&&pe(a,!l&&de(e,"script")),u},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[J.expando]){if(t.events)for(n in t.events)i[n]?_.event.remove(r,n):_.removeEvent(r,n,t.handle);r[J.expando]=void 0}r[$.expando]&&(r[$.expando]=void 0)}}}),_.fn.extend({detach:function(e){return Le(this,e,!0)},remove:function(e){return Le(this,e)},text:function(e){return z(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 Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)})},prepend:function(){return Re(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 Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(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 z(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[(ue.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;r=0&&(f+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-f-s-.5))),f}function Qe(e,t,r){var n=qe(e),i=Fe(e,t,n),o="border-box"===_.css(e,"boxSizing",!1,n),a=o;if(De.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)+$e(e,t,r||(o?"border":"content"),a,n,i)+"px"}function Ze(e,t,r,n,i){return new Ze.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),f=He.test(t),c=e.style;if(f||(t=Xe(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))||(f?c.setProperty(t,r):c[t]=r))}},css:function(e,t,r,n){var i,o,a,s=W(t);return He.test(t)||(t=Xe(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!ze.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Qe(e,t,n):ie(e,Ve,function(){return Qe(e,t,n)})},set:function(e,r,n){var i,o=qe(e),a="border-box"===_.css(e,"boxSizing",!1,o),s=n&&$e(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])-$e(e,t,"border",!1,o)-.5)),s&&(i=te.exec(r))&&"px"!==(i[3]||"px")&&(e.style[t]=r,r=_.css(e,t)),Je(0,r,s)}}}),_.cssHooks.marginLeft=Ue(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=Je)}),_.fn.extend({css:function(e,t){return z(this,function(e,t,r){var n,i,o={},a=0;if(Array.isArray(t)){for(n=qe(e),i=t.length;a1)}}),_.Tween=Ze,Ze.prototype={constructor:Ze,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=Ze.propHooks[this.prop];return e&&e.get?e.get(this):Ze.propHooks._default.get(this)},run:function(e){var t,r=Ze.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):Ze.propHooks._default.set(this),this}},Ze.prototype.init.prototype=Ze.prototype,Ze.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)}}},Ze.propHooks.scrollTop=Ze.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=Ze.prototype.init,_.fx.step={};var Ye,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(){Ye=void 0}),Ye=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;o1)},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)?ft: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(R);if(i&&1===e.nodeType)for(;r=i[n++];)e.removeAttribute(r)}}),ft={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 ut=/^(?:input|select|textarea|button)$/i,lt=/^(?:a|area)$/i;function ht(e){return(e.match(R)||[]).join(" ")}function dt(e){return e.getAttribute&&e.getAttribute("class")||""}function pt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}_.fn.extend({prop:function(e,t){return z(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):ut.test(e.nodeName)||lt.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,f=0;if(b(e))return this.each(function(t){_(this).addClass(e.call(this,t,dt(this)))});if((t=pt(e)).length)for(;r=this[f++];)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,f=0;if(b(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[f++];)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):b(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))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.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 bt=/\r/g;_.fn.extend({val:function(e){var t,r,n,i=this[0];return arguments.length?(n=b(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(bt,""):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:[],f=a?o+1:i.length;for(n=o<0?f:a?o:0;n-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 mt=/^(?:focusinfocus|focusoutblur)$/,yt=function(e){e.stopPropagation()};_.extend(_.event,{trigger:function(t,r,i,o){var a,s,f,c,u,h,d,p,y=[i||n],g=l.call(t,"type")?t.type:t,v=l.call(t,"namespace")?t.namespace.split("."):[];if(s=p=f=i=i||n,3!==i.nodeType&&8!==i.nodeType&&!mt.test(g+_.event.triggered)&&(g.indexOf(".")>-1&&(g=(v=g.split(".")).shift(),v.sort()),u=g.indexOf(":")<0&&"on"+g,(t=t[_.expando]?t:new _.Event(g,"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[g]||{},o||!d.trigger||!1!==d.trigger.apply(i,r))){if(!o&&!d.noBubble&&!m(i)){for(c=d.delegateType||g,mt.test(c+g)||(s=s.parentNode);s;s=s.parentNode)y.push(s),f=s;f===(i.ownerDocument||n)&&y.push(f.defaultView||f.parentWindow||e)}for(a=0;(s=y[a++])&&!t.isPropagationStopped();)p=s,t.type=a>1?c:d.bindType||g,(h=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&h.apply(s,r),(h=u&&s[u])&&h.apply&&G(s)&&(t.result=h.apply(s,r),!1===t.result&&t.preventDefault());return t.type=g,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(y.pop(),r)||!G(i)||u&&b(i[g])&&!m(i)&&((f=i[u])&&(i[u]=null),_.event.triggered=g,t.isPropagationStopped()&&p.addEventListener(g,yt),i[g](),t.isPropagationStopped()&&p.removeEventListener(g,yt),_.event.triggered=void 0,f&&(i[u]=f)),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=J.access(n,t);i||n.addEventListener(e,r,!0),J.access(n,t,(i||0)+1)},teardown:function(){var n=this.ownerDocument||this,i=J.access(n,t)-1;i?J.access(n,t,i):(n.removeEventListener(e,r,!0),J.remove(n,t))}}});var gt=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=/\[\]$/,xt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;function Et(e,t,r,n){var i;if(Array.isArray(t))_.each(t,function(t,i){r||wt.test(e)?n(e,i):Et(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,n)});else if(r||"object"!==v(t))n(e,t);else for(i in t)Et(e+"["+i+"]",t[i],r,n)}_.param=function(e,t){var r,n=[],i=function(e,t){var r=b(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)Et(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")&&St.test(this.nodeName)&&!kt.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(xt,"\r\n")}}):{name:t.name,value:r.replace(xt,"\r\n")}}).get()}});var Bt=/%20/g,At=/#.*$/,Tt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ct=/^(?:GET|HEAD)$/,Mt=/^\/\//,It={},Ot={},Pt="*/".concat("*"),Rt=n.createElement("a");function Lt(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var n,i=0,o=t.toLowerCase().match(R)||[];if(b(r))for(;n=o[i++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(r)):(e[n]=e[n]||[]).push(r)}}function Dt(e,t,r,n){var i={},o=e===Ot;function a(s){var f;return i[s]=!0,_.each(e[s]||[],function(e,s){var c=s(t,r,n);return"string"!=typeof c||o||i[c]?o?!(f=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),f}return a(t.dataTypes[0])||!i["*"]&&a("*")}function qt(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}Rt.href=gt.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:gt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(gt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Pt,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?qt(qt(e,_.ajaxSettings),t):qt(_.ajaxSettings,e)},ajaxPrefilter:Lt(It),ajaxTransport:Lt(Ot),ajax:function(t,r){"object"==typeof t&&(r=t,t=void 0),r=r||{};var i,o,a,s,f,c,u,l,h,d,p=_.ajaxSetup({},r),b=p.context||p,m=p.context&&(b.nodeType||b.jquery)?_(b):_.event,y=_.Deferred(),g=_.Callbacks("once memory"),v=p.statusCode||{},w={},x={},k="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=jt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(e,t){return null==u&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)S.always(e[S.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||k;return i&&i.abort(t),E(0,t),this}};if(y.promise(S),p.url=((t||p.url||gt.href)+"").replace(Mt,gt.protocol+"//"),p.type=r.method||r.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(R)||[""],null==p.crossDomain){c=n.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Rt.protocol+"//"+Rt.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)),Dt(It,p,r,S),u)return S;for(h in(l=_.event&&p.global)&&0==_.active++&&_.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ct.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(Bt,"+")):(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]&&S.setRequestHeader("If-Modified-Since",_.lastModified[o]),_.etag[o]&&S.setRequestHeader("If-None-Match",_.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||r.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Pt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(b,S,p)||u))return S.abort();if(k="abort",g.add(p.complete),S.done(p.success),S.fail(p.error),i=Dt(Ot,p,r,S)){if(S.readyState=1,l&&m.trigger("ajaxSend",[S,p]),u)return S;p.async&&p.timeout>0&&(f=e.setTimeout(function(){S.abort("timeout")},p.timeout));try{u=!1,i.send(w,E)}catch(e){if(u)throw e;E(-1,e)}}else E(-1,"No Transport");function E(t,r,n,s){var c,h,d,w,x,k=r;u||(u=!0,f&&e.clearTimeout(f),i=void 0,a=s||"",S.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,f=e.dataTypes;"*"===f[0];)f.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(i in s)if(s[i]&&s[i].test(n)){f.unshift(i);break}if(f[0]in r)o=f[0];else{for(i in r){if(!f[0]||e.converters[i+" "+f[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==f[0]&&f.unshift(o),r[o]}(p,S,n)),w=function(e,t,r,n){var i,o,a,s,f,c={},u=e.dataTypes.slice();if(u[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(r[e.responseFields[o]]=t),!f&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),f=o,o=u.shift())if("*"===o)o=f;else if("*"!==f&&f!==o){if(!(a=c[f+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[f+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],u.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 "+f+" to "+o}}}return{state:"success",data:t}}(p,w,S,c),c?(p.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(_.lastModified[o]=x),(x=S.getResponseHeader("etag"))&&(_.etag[o]=x)),204===t||"HEAD"===p.type?k="nocontent":304===t?k="notmodified":(k=w.state,h=w.data,c=!(d=w.error))):(d=k,!t&&k||(k="error",t<0&&(t=0))),S.status=t,S.statusText=(r||k)+"",c?y.resolveWith(b,[h,k,S]):y.rejectWith(b,[S,k,d]),S.statusCode(v),v=void 0,l&&m.trigger(c?"ajaxSuccess":"ajaxError",[S,p,c?h:d]),g.fireWith(b,[S,k]),l&&(m.trigger("ajaxComplete",[S,p]),--_.active||_.event.trigger("ajaxStop")))}return S},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 b(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]&&(b(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 b(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=b(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 Nt={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(Nt[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=_("