-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
274 lines (203 loc) · 178 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
91
92
93
94
95
96
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Hypervault</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="/favicon.png">
<style>
.jslghtbx-ie8.jslghtbx{background-image:url(img/trans-bck.png);display:none}.jslghtbx-ie8.jslghtbx.jslghtbx-active{display:block}.jslghtbx-ie8.jslghtbx .jslghtbx-contentwrapper>img{-ms-filter:"alpha(Opacity=0)";display:block}.jslghtbx-ie8.jslghtbx .jslghtbx-contentwrapper.jslghtbx-wrapper-active>img{-ms-filter:"alpha(Opacity=100)"}.jslghtbx{font-family:sans-serif;overflow:auto;visibility:hidden;position:fixed;z-index:2;left:0;top:0;width:100%;height:100%;background-color:transparent}.jslghtbx.jslghtbx-active{visibility:visible;background-color:rgba(0,0,0,.85)}.jslghtbx-loading-animation{margin-top:-60px;margin-left:-60px;width:120px;height:120px;top:50%;left:50%;display:none;position:absolute;z-index:-1}.jslghtbx-loading-animation>span{display:inline-block;width:20px;height:20px;border-radius:20px;margin:5px;background-color:#fff;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out}.jslghtbx-loading-animation>span.jslghtbx-active{margin-bottom:60px}.jslghtbx.jslghtbx-loading .jslghtbx-loading-animation{display:block}.jslghtbx-nooverflow{overflow:hidden!important}.jslghtbx-contentwrapper{margin:auto;visibility:hidden}.jslghtbx-contentwrapper>img{background:#fff;padding:.5em;display:none;height:auto;margin-left:auto;margin-right:auto;opacity:0}.jslghtbx-contentwrapper.jslghtbx-wrapper-active{visibility:visible}.jslghtbx-contentwrapper.jslghtbx-wrapper-active>img{display:block;opacity:1}.jslghtbx-caption{display:none;margin:5px auto;max-width:450px;color:#fff;text-align:center;font-size:.9em}.jslghtbx-active .jslghtbx-caption{display:block}.jslghtbx-contentwrapper.jslghtbx-animate>img{opacity:0}.jslghtbx-contentwrapper>img.jslghtbx-animate-transition{-webkit-transition:opacity .2s ease-in-out;-moz-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;-ms-transition:opacity .2s ease-in-out}.jslghtbx-contentwrapper>img.jslghtbx-animate-init,.jslghtbx-contentwrapper>img.jslghtbx-animating-next,.jslghtbx-contentwrapper>img.jslghtbx-animating-prev{opacity:1;-ms-filter:"alpha(Opacity=100)"}.jslghtbx-contentwrapper>img.jslghtbx-animate-transition{cursor:pointer}.jslghtbx-close{position:fixed;right:23px;top:23px;margin-top:-4px;font-size:2em;color:#FFF;cursor:pointer;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out}.jslghtbx-close:hover{text-shadow:0 0 10px #fff}@media screen and (max-width:1060px){.jslghtbx-close{font-size:1.5em}}.jslghtbx-next,.jslghtbx-prev{display:none;position:fixed;top:50%;max-width:6%;max-height:250px;cursor:pointer;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out}.jslghtbx-next.jslghtbx-active,.jslghtbx-prev.jslghtbx-active{display:block}.jslghtbx-next>img,.jslghtbx-prev>img{width:100%}.jslghtbx-next{right:.6em}.jslghtbx-next.jslghtbx-no-img:hover{border-left-color:#787878}@media screen and (min-width:451px){.jslghtbx-next{right:.6em}.jslghtbx-next.jslghtbx-no-img{border-top:110px solid transparent;border-bottom:110px solid transparent;border-left:40px solid #FFF}}@media screen and (max-width:600px){.jslghtbx-next.jslghtbx-no-img{right:5px;padding-left:0;border-top:60px solid transparent;border-bottom:60px solid transparent;border-left:15px solid #FFF}}@media screen and (max-width:450px){.jslghtbx-next{right:.2em;padding-left:20px}}.jslghtbx-prev{left:.6em}.jslghtbx-prev.jslghtbx-no-img:hover{border-right-color:#787878}@media screen and (min-width:451px){.jslghtbx-prev{left:.6em}.jslghtbx-prev.jslghtbx-no-img{border-top:110px solid transparent;border-bottom:110px solid transparent;border-right:40px solid #FFF}}@media screen and (max-width:600px){.jslghtbx-prev.jslghtbx-no-img{left:5px;padding-right:0;border-top:60px solid transparent;border-bottom:60px solid transparent;border-right:15px solid #FFF}}@media screen and (max-width:450px){.jslghtbx-prev{left:.2em;padding-right:20px}}.jslghtbx-thmb{padding:2px;max-width:100%;max-height:140px;cursor:pointer;box-shadow:0 0 3px 0 #000;-webkit-transition:all .3s ease-in-out;-moz-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;-ms-transition:all .3s ease-in-out}@media screen and (min-width:451px){.jslghtbx-thmb{margin:1em}}@media screen and (max-width:450px){.jslghtbx-thmb{margin:1em 0}}.jslghtbx-thmb:hover{box-shadow:0 0 14px 0 #000}
</style>
<style>
body,input,select,textarea{background:0;border-radius:0;font:16px sans-serif;margin:0}.addon,.btn-sm,.nav,input,select,textarea{outline:0;font-size:14px}.smooth{transition:all .2s}.btn,.nav a{text-decoration:none}.container{margin:0 20px;width:auto}@media(min-width:1310px){.container{margin:auto;width:1270px}}.btn,h2{font-size:2em}.row{margin:1% 0;overflow:auto}.col,.col-no-collapse{float:left}.c12,.table{width:100%}.c11{width:91.66%}.c10{width:83.33%}.c9{width:75%}.c8{width:66.66%}.c7{width:58.33%}.c6{width:50%}.c5{width:41.66%}.c4{width:33.33%}.c3{width:25%}.c2{width:16.66%}.c1{width:8.33%}@media(max-width:870px){.row .col{width:100%}}
</style>
<style>
body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;color:#333}.decryption-container,.encryption-container{display:none}.link-button{background:none!important;border:none;padding:0!important;cursor:pointer;text-decoration:none;color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.file-size{padding-top:10px}.delete-x{font-size:1em;margin-top:12px}.download-file{font-size:1em;margin-top:10px}A{text-decoration:none}.browsehappy{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.title{font-family:Raleway,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:300%;font-weight:lighter;letter-spacing:4px;color:#FF4136}.redText{color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.thinRed{color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100}.orangeText{color:#FF851B;font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.title a{color:#FF4136}.intro-text{color:#FF851B;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100;margin-top:40px}.choose-password-msg{color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100;font-size:1.3em}.select-files-msg{color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100;font-size:1.3em;text-align:center}.outer{padding:80px}.container{padding:0 30px 50px;margin-left:auto;margin-right:auto;max-width:750px;border:1px solid #FF851B;border-radius:12px}@media (max-width:870px){.outer{padding:25px}}.btn{border-radius:4px;color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100;background:#fff;font-size:1.8em;border:1px solid #FF4136;text-decoration:none}.floatLeft{float:left}.btn:hover{background:#fff;color:#FF851B;border:1px solid #FF851B;text-decoration:none}input[type=password],input[type=text]{border:1px solid #FF4136;border-radius:4px;padding:8px;font-size:20px;width:202px}#decrypt-button,#encrypt-button,.full-width{width:100%}#decrypt-password-input{width:220px}.control-container{text-align:center}.control-group{width:220px;margin:auto}@media (max-width:870px){.control-field,.control-group{width:100%}input[type=password]{width:99%;padding:8px 2px}}@media (max-width:650px){input[type=password]{width:98%;padding:8px 2px}}.control-field{margin-top:4px}.horizontal-space{margin-top:16px}input[type=file]{border-radius:4px;height:25px;padding:5px;font-size:14px;width:220px}#dropzone{min-height:130px;border:4px dashed #FF851B;border-radius:4px;padding:10px}#dropzone.hover{border:4px dashed #39CCCC}#selectFilesButton{vertical-align:middle;margin-top:5px}#dragAndDropHere{font-size:1.3em;text-align:center}#drag-msg-and-browse-button{margin-top:5px;text-align:center}#drag-files-here-msg{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100;font-size:1.7em;color:#FF4136}#or-browse-msg{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100;font-size:1.2em;color:#FF4136;margin:8px 0}.fileDisplay{border:1px solid #FF4136;border-radius:4px;padding:8px 5px}.fileDisplay span{color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:200}#decrypted-files{min-height:130px;border:1px solid #FF851B;border-radius:4px;padding:10px;display:none}#decrypt-helper-message{padding:4px;font-size:1.2em}#decrypt-progress-summary,#encrypt-progress-summary{text-align:left}#decrypt-progress-summary li,#encrypt-progress-summary li{color:#FF4136;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:100}.validation-error{display:none;color:#FF4136;font-size:.9em;text-align:left}.footer{margin-top:0;text-align:center;color:#AAA;font-size:.8em}.footer-container{width:155px;margin-left:auto;margin-right:auto;font-weight:200;margin-bottom:40px}.footer hr{border:0;border-bottom:1px dashed #ccc;background:#999;margin:2px}.footer a,.footer a:hover,.footer a:visited{color:#FF851B}.help-text{color:#888}.image-thumbnail{max-width:60px;height:46px;display:block;margin-left:auto;margin-right:auto}.modal-bg{display:none;position:fixed;z-index:1;padding-top:100px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4)}.modal-content{background-color:#fefefe;margin:auto;padding:20px;border:1px solid #FF851B;border-radius:12px;width:90%}.modal-close-button,.modal-viewer-close-button{color:#aaa;float:right;font-size:28px;font-weight:700;margin:0}.modal-button-panel{float:right}.modal-close-button:focus,.modal-close-button:hover,.modal-viewer-close-button:focus,.modal-viewer-close-button:hover{color:#000;text-decoration:none;cursor:pointer}#modal-editor-text,#modal-viewer-text{border:1px solid #FF4136;border-radius:4px;width:99%;min-height:100px;padding:8px;margin-right:20px;margin-top:5px;margin-bottom:5px}
</style>
</head>
<body>
<!--[if lt IE 10]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="outer">
<div class="container encryption-container">
<div class="row">
<div class="col c5">
<h1 class="title"><a href="https://hypervault.github.io/">Hypervault</a></h1>
</div>
<div class="col c7">
<p class="intro-text">Hypervault is a file encryption app. It outputs a password-locked vault with your encrypted files locked inside.</p>
</div>
</div>
<form name="uploadForm">
<div class="row">
<div class="col c7">
<div class="row">
<div class="col c12 select-files-msg">
Select files to lock in vault
</div>
</div>
<div class="row">
<div class="col c12">
<div id="dropzone">
<div id="dropAfterMe"></div>
<div id="drag-msg-and-browse-button">
<div id="drag-files-here-msg">Drag files here</div>
<div id="or-browse-msg">or</div>
<label for="uploadInput">
<button type="button" class="btn" id="selectFilesButton" onclick="document.getElementById('uploadInput').click();">Browse</button>
</label>
</div>
</div>
</div>
</div>
</div>
<div class="col c1"></div>
<div class="col c5">
<div class="row">
<div class="col c12 control-container">
<div class="control-group">
<div class="control-field choose-password-msg">
Add files to vault
</div>
<div class="control-field">
<button type="button" id="select-files-button" class="btn full-width" onclick="document.getElementById('uploadInput').click();">Select files</button>
</div>
<div class="control-field">
<button type="button" id="insert-text-button" class="btn full-width" onclick="showModalEditor();">Insert text</button>
</div>
</div>
</div>
<div class="col c12 control-container">
<div class="control-group horizontal-space">
<div class="control-field choose-password-msg">
Choose a vault password
</div>
<div class="control-field">
<input type="password" name="password_input" id="password_input" placeholder="Password"
onkeyup="validateEncryptionFields()" />
<div class="validation-error" id="pw-required-msg">Password required</div>
</div>
<div class="control-field">
<input type="password" name="password_input2" id="password_input2" placeholder="Retype Password"
onkeyup="validateEncryptionFields()" />
<div class="validation-error" id="pw-required-msg2">Password confirmation required</div>
<div class="validation-error" id="pw-mismatch-msg">Passwords don't match</div>
</div>
<div class="control-field">
<button type="button" id="encrypt-button" class="btn" onclick="validateEncryptionFields() && createVault();return false;">Lock vault</button>
</div>
<div class="control-field">
<div id="encrypt-progress-summary"></div>
</div>
</div>
</div> <!-- c12 -->
</div> <!-- row -->
</div> <!-- c5 -->
</div>
</form>
</div>
<input type="file" id="uploadInput" style="display: none; width:0px; height: 0px;" onchange="addSelectedFiles();" multiple accept>
</form>
<div class="container decryption-container">
<div class="row">
<div class="col c12">
<h1 class="title"><a href="https://hypervault.github.io">Hypervault</a></h1>
</div>
</div>
<div class="row">
<div class="col c4">
<div class="row">
<div class="col c12 control-container">
<div class="control-group">
<div class="control-field">
<input type="password" name="decrypt-password-input" id="decrypt-password-input" placeholder="Password">
<div class="validation-error" id="decrypt-pw-required-msg">Password required</div>
<div class="validation-error" id="wrong-pw-msg">Wrong password</div>
</div>
<div class="control-field">
<button id="decrypt-button" class="btn" onclick="decryptVault();return false;">Unlock vault</button>
</div>
<div class="control-field">
<div id="decrypt-progress-summary"></div>
</div>
</div>
</div>
</div>
<div class="row" style="display: none">
<div class="col c12">
<button class="btn floatLeft" onclick="decryptVault();return false;">Decrypt</button>
</div>
</div>
</div>
<div class="col c1"> </div>
<div class="col c7">
<div id="decrypt-helper-message">
<span class="thinRed">This is a locked hypervault.<br />Enter the password to access the files locked inside.</span>
</div>
<div id="decrypted-files">
<div id="add-after-me"></div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="footer-container">
<span>
<a href="https://hypervault.github.io/">Home</a> |
<a href="https://github.com/hypervault/hypervault.github.io">Github</a> |
<a href="https://hypervault.github.io/about.html">FAQ</a>
</span>
<hr />
<span>Project by <a href="http://calebmadrigal.com">Caleb Madrigal</a></span>
</div>
</div>
<!-- Modal text editor -->
<div id="modal-text-editor" class="modal-bg">
<!-- Modal content -->
<div class="modal-content">
<span class="modal-close-button">×</span>
<div class="control-field">
<input type="text" name="modal-editor-filename" id="modal-editor-filename" placeholder="Filename">
</div>
<div class="control-field">
<textarea id="modal-editor-text"></textarea>
</div>
<div class="modal-button-panel">
<button id="modal-editor-cancel" class="btn" onclick="hideModalEditor();return false;">Cancel</button>
<button id="modal-editor-save" class="btn" onclick="addInsertedText(); return false;">Insert text</button>
</div>
<div style="clear: both;"></div>
</div>
</div>
<!-- Modal text viewer -->
<div id="modal-text-viewer" class="modal-bg">
<!-- Modal content -->
<div class="modal-content">
<span class="modal-viewer-close-button">×</span>
<div class="control-field">
<input type="text" name="modal-viewer-filename" id="modal-viewer-filename" readonly>
</div>
<div class="control-field">
<textarea id="modal-viewer-text" readonly></textarea>
</div>
<div style="clear: both;"></div>
</div>
</div>
<script>
function Lightbox(){function a(){return window.innerHeight||document.documentElement.offsetHeight}function b(){return window.innerWidth||document.documentElement.offsetWidth}function c(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)}function d(a,b){return a&&b?new RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className):void 0}function e(a,b){return a&&b?(a.className=a.className.replace(new RegExp("(?:^|\\s)"+b+"(?!\\S)"),""),a):void 0}function f(a,b){return a&&b?(d(a,b)||(a.className+=" "+b),a):void 0}function g(a){return"undefined"!=typeof a}function h(a,b){if(!a||!g(a))return!1;var c;return a.getAttribute?c=a.getAttribute(b):a.getAttributeNode&&(c=a.getAttributeNode(b).value),g(c)&&""!==c?c:!1}function i(a,b){if(!a||!g(a))return!1;var c;return a.getAttribute?c=a.getAttribute(b):a.getAttributeNode&&(c=a.getAttributeNode(b).value),"string"==typeof c}function j(a){c(a,"click",function(b){H=h(a,"data-jslghtbx-group")||!1,I=a,t(a,!1,!1,!1)},!1)}function k(a){a.stopPropagation?a.stopPropagation():a.returnValue=!1}function l(a){for(var b=[],c=0;c<B.thumbnails.length;c++)h(B.thumbnails[c],"data-jslghtbx-group")===a&&b.push(B.thumbnails[c]);return b}function m(a,b){for(var c=l(b),d=0;d<c.length;d++)if(h(a,"src")===h(c[d],"src")&&h(a,"data-jslghtbx")===h(c[d],"data-jslghtbx"))return d}function n(){if(H){var a=new Image,b=new Image,c=m(I,H);c===K.length-1?(a.src=K[K.length-1].src,b.src=K[0].src):0===c?(a.src=K[K.length-1].src,b.src=K[1].src):(a.src=K[c-1].src,b.src=K[c+1].src)}}function o(){if(!C){p();var a=function(){if(f(B.box,"jslghtbx-loading"),!D&&"number"==typeof B.opt.loadingAnimation){var a=0;v=setInterval(function(){f(M[a],"jslghtbx-active"),setTimeout(function(){e(M[a],"jslghtbx-active")},B.opt.loadingAnimation),a=a>=M.length?0:a+=1},B.opt.loadingAnimation)}};w=setTimeout(a,500)}}function p(){if(!C&&(e(B.box,"jslghtbx-loading"),!D&&"string"!=typeof B.opt.loadingAnimation&&B.opt.loadingAnimation)){clearInterval(v);for(var a=0;a<M.length;a++)e(M[a],"jslghtbx-active")}}function q(){if(!N){if(N=document.createElement("span"),f(N,"jslghtbx-next"),B.opt.nextImg){var a=document.createElement("img");a.setAttribute("src",B.opt.nextImg),N.appendChild(a)}else f(N,"jslghtbx-no-img");c(N,"click",function(a){k(a),B.next()},!1),B.box.appendChild(N)}if(f(N,"jslghtbx-active"),!O){if(O=document.createElement("span"),f(O,"jslghtbx-prev"),B.opt.prevImg){var b=document.createElement("img");b.setAttribute("src",B.opt.prevImg),O.appendChild(b)}else f(O,"jslghtbx-no-img");c(O,"click",function(a){k(a),B.prev()},!1),B.box.appendChild(O)}f(O,"jslghtbx-active")}function r(){if(B.opt.responsive&&N&&O){var b=a()/2-N.offsetHeight/2;N.style.top=b+"px",O.style.top=b+"px"}}function s(a){function b(a){return"boolean"==typeof a?a:!0}if(a||(a={}),B.opt={boxId:a.boxId||!1,controls:b(a.controls),dimensions:b(a.dimensions),captions:b(a.captions),prevImg:"string"==typeof a.prevImg?a.prevImg:!1,nextImg:"string"==typeof a.nextImg?a.nextImg:!1,hideCloseBtn:a.hideCloseBtn||!1,closeOnClick:"boolean"==typeof a.closeOnClick?a.closeOnClick:!0,loadingAnimation:void 0===a.loadingAnimation?!0:a.loadingAnimation,animElCount:a.animElCount||4,preload:b(a.preload),carousel:b(a.carousel),animation:a.animation||400,nextOnClick:b(a.nextOnClick),responsive:b(a.responsive),maxImgSize:a.maxImgSize||.8,keyControls:b(a.keyControls),hideOverflow:a.hideOverflow||!0,onopen:a.onopen||!1,onclose:a.onclose||!1,onload:a.onload||!1,onresize:a.onresize||!1,onloaderror:a.onloaderror||!1},B.opt.boxId)B.box=document.getElementById(B.opt);else if(!B.box&&!document.getElementById("jslghtbx")){var d=document.createElement("div");d.setAttribute("id","jslghtbx"),d.setAttribute("class","jslghtbx"),B.box=d,E.appendChild(B.box)}if(B.box.innerHTML=F,C&&f(B.box,"jslghtbx-ie8"),B.wrapper=document.getElementById("jslghtbx-contentwrapper"),!B.opt.hideCloseBtn){var g=document.createElement("span");g.setAttribute("id","jslghtbx-close"),g.setAttribute("class","jslghtbx-close"),g.innerHTML="X",B.box.appendChild(g),c(g,"click",function(a){k(a),B.close()},!1)}if(!C&&B.opt.closeOnClick&&c(B.box,"click",function(a){B.close()},!1),"string"==typeof B.opt.loadingAnimation)u=document.createElement("img"),u.setAttribute("src",B.opt.loadingAnimation),f(u,"jslghtbx-loading-animation"),B.box.appendChild(u);else if(B.opt.loadingAnimation){B.opt.loadingAnimation="number"==typeof B.opt.loadingAnimation?B.opt.loadingAnimation:200,u=document.createElement("div"),f(u,"jslghtbx-loading-animation");for(var h=0;h<B.opt.animElCount;)M.push(u.appendChild(document.createElement("span"))),h++;B.box.appendChild(u)}B.opt.responsive?(c(window,"resize",function(a){B.resize()},!1),f(B.box,"jslghtbx-nooverflow")):e(B.box,"jslghtbx-nooverflow"),B.opt.keyControls&&c(document,"keydown",function(a){L&&(k(a),39===a.keyCode?B.next():37===a.keyCode?B.prev():27===a.keyCode&&B.close())},!1)}function t(a,b,e,i){if(!a&&!b)return!1;H=b||H||h(a,"data-jslghtbx-group"),H&&(K=l(H),"boolean"!=typeof a||a||(a=K[0])),J.img=new Image,I=a;var j;j="string"==typeof a?a:h(a,"data-jslghtbx")?h(a,"data-jslghtbx"):h(a,"src"),G=!1,L||("number"==typeof B.opt.animation&&f(J.img,"jslghtbx-animate-transition jslghtbx-animate-init"),L=!0,B.opt.onopen&&B.opt.onopen()),B.opt&&g(B.opt.hideOverflow)&&!B.opt.hideOverflow||E.setAttribute("style","overflow: hidden"),B.box.setAttribute("style","padding-top: 0"),B.wrapper.innerHTML="",B.wrapper.appendChild(J.img),B.opt.animation&&f(B.wrapper,"jslghtbx-animate");var m=h(a,"data-jslghtbx-caption");if(m&&B.opt.captions){var s=document.createElement("p");s.setAttribute("class","jslghtbx-caption"),s.innerHTML=m,B.wrapper.appendChild(s)}f(B.box,"jslghtbx-active"),C&&f(B.wrapper,"jslghtbx-active"),B.opt.controls&&K.length>1&&(q(),r()),J.img.onerror=function(){B.opt.onloaderror&&B.opt.onloaderror(i)},J.img.onload=function(){if(J.originalWidth=this.naturalWidth||this.width,J.originalHeight=this.naturalHeight||this.height,C||D){var a=new Image;a.setAttribute("src",j),J.originalWidth=a.width,J.originalHeight=a.height}var b=setInterval(function(){d(B.box,"jslghtbx-active")&&(f(B.wrapper,"jslghtbx-wrapper-active"),"number"==typeof B.opt.animation&&f(J.img,"jslghtbx-animate-transition"),e&&e(),p(),clearTimeout(w),B.opt.preload&&n(),B.opt.nextOnClick&&(f(J.img,"jslghtbx-next-on-click"),c(J.img,"click",function(a){k(a),B.next()},!1)),B.opt.onload&&B.opt.onload(i),clearInterval(b),B.resize())},10)},J.img.setAttribute("src",j),o()}var u,v,w,x,y,z,A,B=this,C=!1,D=!1,E=document.getElementsByTagName("body")[0],F='<div class="jslghtbx-contentwrapper" id="jslghtbx-contentwrapper" ></div>',G=!1,H=!1,I=!1,J={},K=[],L=!1,M=[],N=!1,O=!1;B.opt={},B.box=!1,B.wrapper=!1,B.thumbnails=[],B.load=function(a){navigator.appVersion.indexOf("MSIE 8")>0&&(C=!0),navigator.appVersion.indexOf("MSIE 9")>0&&(D=!0),s(a);for(var b=document.getElementsByTagName("img"),c=0;c<b.length;c++)i(b[c],"data-jslghtbx")&&(B.thumbnails.push(b[c]),j(b[c]))},B.open=function(a,b){a&&b&&(b=!1),t(a,b,!1,!1)},B.resize=function(){if(J.img){x=b(),y=a();var c=B.box.offsetWidth,d=B.box.offsetHeight;!G&&J.img&&J.img.offsetWidth&&J.img.offsetHeight&&(G=J.img.offsetWidth/J.img.offsetHeight),Math.floor(c/G)>d?(z=d*G,A=d):(z=c,A=c/G),z=Math.floor(z*B.opt.maxImgSize),A=Math.floor(A*B.opt.maxImgSize),(B.opt.dimensions&&A>J.originalHeight||B.opt.dimensions&&z>J.originalWidth)&&(A=J.originalHeight,z=J.originalWidth),J.img.setAttribute("width",z),J.img.setAttribute("height",A),J.img.setAttribute("style","margin-top:"+(a()-A)/2+"px"),setTimeout(r,200),B.opt.onresize&&B.opt.onresize()}},B.next=function(){if(H){var a=m(I,H)+1;if(K[a])I=K[a];else{if(!B.opt.carousel)return;I=K[0]}"number"==typeof B.opt.animation?(e(J.img,"jslghtbx-animating-next"),setTimeout(function(){var a=function(){setTimeout(function(){f(J.img,"jslghtbx-animating-next")},B.opt.animation/2)};t(I,!1,a,"next")},B.opt.animation/2)):t(I,!1,!1,"next")}},B.prev=function(){if(H){var a=m(I,H)-1;if(K[a])I=K[a];else{if(!B.opt.carousel)return;I=K[K.length-1]}"number"==typeof B.opt.animation?(e(J.img,"jslghtbx-animating-prev"),setTimeout(function(){var a=function(){setTimeout(function(){f(J.img,"jslghtbx-animating-next")},B.opt.animation/2)};t(I,!1,a,"prev")},B.opt.animation/2)):t(I,!1,!1,"prev")}},B.close=function(){H=!1,I=!1,J={},K=[],L=!1,e(B.box,"jslghtbx-active"),e(B.wrapper,"jslghtbx-wrapper-active"),e(N,"jslghtbx-active"),e(O,"jslghtbx-active"),B.box.setAttribute("style","padding-top: 0px"),p(),C&&B.box.setAttribute("style","display: none"),B.opt&&g(B.opt.hideOverflow)&&!B.opt.hideOverflow||E.setAttribute("style","overflow: auto"),B.opt.onclose&&B.opt.onclose()}}var saveAs=saveAs||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),h=a.webkitRequestFileSystem,i=a.requestFileSystem||h||a.mozRequestFileSystem,j=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},k="application/octet-stream",l=0,m=500,n=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,m)},o=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){j(f)}}},p=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},q=function(b,j,m){m||(b=p(b));var q,r,s,t=this,u=b.type,v=!1,w=function(){o(t,"writestart progress write writeend".split(" "))},x=function(){if(r&&g&&"undefined"!=typeof FileReader){var d=new FileReader;return d.onloadend=function(){var a=d.result;r.location.href="data:attachment/file"+a.slice(a.search(/[,;]/)),t.readyState=t.DONE,w()},d.readAsDataURL(b),void(t.readyState=t.INIT)}if((v||!q)&&(q=c().createObjectURL(b)),r)r.location.href=q;else{var e=a.open(q,"_blank");void 0==e&&g&&(a.location.href=q)}t.readyState=t.DONE,w(),n(q)},y=function(a){return function(){return t.readyState!==t.DONE?a.apply(this,arguments):void 0}},z={create:!0,exclusive:!1};return t.readyState=t.INIT,j||(j="download"),e?(q=c().createObjectURL(b),void setTimeout(function(){d.href=q,d.download=j,f(d),w(),n(q),t.readyState=t.DONE})):(a.chrome&&u&&u!==k&&(s=b.slice||b.webkitSlice,b=s.call(b,0,b.size,k),v=!0),h&&"download"!==j&&(j+=".download"),(u===k||h)&&(r=a),i?(l+=b.size,void i(a.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",z,y(function(a){var c=function(){a.getFile(j,z,y(function(a){a.createWriter(y(function(c){c.onwriteend=function(b){r.location.href=a.toURL(),t.readyState=t.DONE,o(t,"writeend",b),n(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=t["on"+a]}),c.write(b),t.abort=function(){c.abort(),t.readyState=t.DONE},t.readyState=t.WRITING}),x)}),x)};a.getFile(j,{create:!1},y(function(a){a.remove(),c()}),y(function(a){a.code===a.NOT_FOUND_ERR?c():x()}))}),x)}),x)):void x())},r=q.prototype,s=function(a,b,c){return new q(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=p(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(r.abort=function(){var a=this;a.readyState=a.DONE,o(a,"abort")},r.readyState=r.INIT=0,r.WRITING=1,r.DONE=2,r.error=r.onwritestart=r.onprogress=r.onwrite=r.onabort=r.onerror=r.onwriteend=null,s)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.triplesec=a():"undefined"!=typeof global?global.triplesec=a():"undefined"!=typeof self&&(self.triplesec=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=a("./algbase").BlockCipher,g=a("./util").scrub_vec,f=function(){function a(){var a;this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=function(){var b,c;for(c=[],a=b=0;4>b;a=++b)c.push([]);return c}(),this.INV_SUB_MIX=function(){var b,c;for(c=[],a=b=0;4>b;a=++b)c.push([]);return c}(),this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}return a.prototype.init=function(){var a,b,c,d,e,f,g,h,i,j;for(a=function(){var a,c;for(c=[],b=a=0;256>a;b=++a)128>b?c.push(b<<1):c.push(b<<1^283);return c}(),e=0,i=0,b=j=0;256>j;b=++j)c=i^i<<1^i<<2^i<<3^i<<4,c=c>>>8^255&c^99,this.SBOX[e]=c,this.INV_SBOX[c]=e,f=a[e],g=a[f],h=a[g],d=257*a[c]^16843008*c,this.SUB_MIX[0][e]=d<<24|d>>>8,this.SUB_MIX[1][e]=d<<16|d>>>16,this.SUB_MIX[2][e]=d<<8|d>>>24,this.SUB_MIX[3][e]=d,d=16843009*h^65537*g^257*f^16843008*e,this.INV_SUB_MIX[0][c]=d<<24|d>>>8,this.INV_SUB_MIX[1][c]=d<<16|d>>>16,this.INV_SUB_MIX[2][c]=d<<8|d>>>24,this.INV_SUB_MIX[3][c]=d,0===e?e=i=1:(e=f^a[a[a[h^f]]],i^=a[a[i]]);return!0},a}(),e=new f,b=function(a){function b(a){this._key=a.clone(),this._doReset()}return i(b,a),b.blockSize=16,b.prototype.blockSize=b.blockSize,b.keySize=32,b.prototype.keySize=b.keySize,b.ivSize=b.blockSize,b.prototype.ivSize=b.ivSize,b.prototype._doReset=function(){var a,b,c,d,f,g,h,i;for(c=this._key.words,b=this._key.sigBytes/4,this._nRounds=b+6,f=4*(this._nRounds+1),this._keySchedule=[],d=h=0;f>=0?f>h:h>f;d=f>=0?++h:--h)this._keySchedule[d]=b>d?c[d]:(g=this._keySchedule[d-1],d%b===0?(g=g<<8|g>>>24,g=e.SBOX[g>>>24]<<24|e.SBOX[g>>>16&255]<<16|e.SBOX[g>>>8&255]<<8|e.SBOX[255&g],g^=e.RCON[d/b|0]<<24):b>6&&d%b===4?g=e.SBOX[g>>>24]<<24|e.SBOX[g>>>16&255]<<16|e.SBOX[g>>>8&255]<<8|e.SBOX[255&g]:void 0,this._keySchedule[d-b]^g);for(this._invKeySchedule=[],a=i=0;f>=0?f>i:i>f;a=f>=0?++i:--i)d=f-a,g=this._keySchedule[d-(a%4?0:4)],this._invKeySchedule[a]=4>a||4>=d?g:e.INV_SUB_MIX[0][e.SBOX[g>>>24]]^e.INV_SUB_MIX[1][e.SBOX[g>>>16&255]]^e.INV_SUB_MIX[2][e.SBOX[g>>>8&255]]^e.INV_SUB_MIX[3][e.SBOX[255&g]];return!0},b.prototype.encryptBlock=function(a,b){return null==b&&(b=0),this._doCryptBlock(a,b,this._keySchedule,e.SUB_MIX,e.SBOX)},b.prototype.decryptBlock=function(a,b){var c,d;return null==b&&(b=0),c=[a[b+3],a[b+1]],a[b+1]=c[0],a[b+3]=c[1],this._doCryptBlock(a,b,this._invKeySchedule,e.INV_SUB_MIX,e.INV_SBOX),d=[a[b+3],a[b+1]],a[b+1]=d[0],a[b+3]=d[1],d},b.prototype.scrub=function(){return g(this._keySchedule),g(this._invKeySchedule),this._key.scrub()},b.prototype._doCryptBlock=function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;for(h=a[b]^c[0],i=a[b+1]^c[1],j=a[b+2]^c[2],k=a[b+3]^c[3],f=4,g=p=1,q=this._nRounds;q>=1?q>p:p>q;g=q>=1?++p:--p)l=d[0][h>>>24]^d[1][i>>>16&255]^d[2][j>>>8&255]^d[3][255&k]^c[f++],m=d[0][i>>>24]^d[1][j>>>16&255]^d[2][k>>>8&255]^d[3][255&h]^c[f++],n=d[0][j>>>24]^d[1][k>>>16&255]^d[2][h>>>8&255]^d[3][255&i]^c[f++],o=d[0][k>>>24]^d[1][h>>>16&255]^d[2][i>>>8&255]^d[3][255&j]^c[f++],h=l,i=m,j=n,k=o;return l=(e[h>>>24]<<24|e[i>>>16&255]<<16|e[j>>>8&255]<<8|e[255&k])^c[f++],m=(e[i>>>24]<<24|e[j>>>16&255]<<16|e[k>>>8&255]<<8|e[255&h])^c[f++],n=(e[j>>>24]<<24|e[k>>>16&255]<<16|e[h>>>8&255]<<8|e[255&i])^c[f++],o=(e[k>>>24]<<24|e[h>>>16&255]<<16|e[i>>>8&255]<<8|e[255&j])^c[f++],a[b]=l,a[b+1]=m,a[b+2]=n,a[b+3]=o},b}(d),c.AES=b}).call(this)},{"./algbase":2,"./util":23}],2:[function(a,b,c){(function(){var b,d,e,f,g,h,i={}.hasOwnProperty,j=function(a,b){function c(){this.constructor=a}for(var d in b)i.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=a("./wordarray").WordArray,h=a("./util"),d=function(){function a(){this.reset()}return a.prototype._minBufferSize=0,a.prototype.reset=function(){return this._data=new g,this._nDataBytes=0},a.prototype._append=function(a){return this._data.concat(a),this._nDataBytes+=a.sigBytes},a.prototype._process=function(a){var b,c,d,e,f,h,i,j,k,l,m;if(c=this._data,e=c.words,d=c.sigBytes,b=4*this.blockSize,f=d/b,f=a?Math.ceil(f):Math.max((0|f)-this._minBufferSize,0),i=f*this.blockSize,h=Math.min(4*i,d),i){for(j=l=0,m=this.blockSize;m>0?i>l:l>i;j=l+=m)this._doProcessBlock(e,j);k=e.splice(0,i),c.sigBytes-=h}return new g(k,h)},a.prototype.copy_to=function(a){return a._data=this._data.clone(),a._nDataBytes=this._nDataBytes},a.prototype.clone=function(){var b;return b=new a,this.copy_to(b),b},a}(),e=function(a){function b(){b.__super__.constructor.call(this)}return j(b,a),b.prototype.reset=function(){return b.__super__.reset.call(this),this._doReset(),this},b.prototype.update=function(a){return this._append(a),this._process(),this},b.prototype.finalize=function(a){return a&&this._append(a),this._doFinalize()},b.prototype.bufhash=function(a){var b,c,d;return c=g.from_buffer(a),d=this.finalize(c),b=d.to_buffer(),c.scrub(),d.scrub(),b},b}(d),c.BlockCipher=b=function(){function a(a){}return a.prototype.encryptBlock=function(a,b){},a}(),f=function(){function a(){}return a.prototype.encryptBlock=function(a,b){var c,d;return null==b&&(b=0),d=this.get_pad(),c=Math.min(a.words.length-b,this.bsiw),a.xor(d,{dst_offset:b,n_words:c}),d.scrub(),this.bsiw},a.prototype.encrypt=function(a){var b,c,d,e;for(b=c=0,d=a.words.length,e=this.bsiw;e>0?d>c:c>d;b=c+=e)this.encryptBlock(a,b);return a},a.prototype.bulk_encrypt=function(a,b){var c,d,e,f,g;return d=a.input,e=a.progress_hook,g=a.what,f={update:function(a){return function(b,c){var e,f,g,h;for(h=[],e=f=b,g=a.bsiw;g>0?c>f:f>c;e=f+=g)h.push(a.encryptBlock(d,e));return h}}(this),finalize:function(){return d},default_n:1024*this.bsiw},c={progress_hook:e,cb:b,what:g},h.bulk(d.sigBytes,f,c)},a}(),c.BlockCipher=b,c.Hasher=e,c.BufferedBlockAlgorithm=d,c.StreamCipher=f}).call(this)},{"./util":23,"./wordarray":24}],3:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};k=a("./hmac"),e=k.HMAC,j=k.bulk_sign,g=a("./sha512").SHA512,f=a("./sha3").SHA3,h=a("./wordarray").WordArray,b=function(){function a(){this.hasherBlockSize=this.hashers[0].hasherBlockSize,this.hasherBlockSizeBytes=4*this.hasherBlockSize,this.reset()}return a.prototype.reset=function(){var a,b,c,d;for(d=this.hashers,b=0,c=d.length;c>b;b++)a=d[b],a.reset();return this},a.prototype.update=function(a){var b,c,d,e;for(e=this.hashers,c=0,d=e.length;d>c;c++)b=e[c],b.update(a);return this},a.prototype.scrub=function(){var a,b,c,d;for(d=this.hashers,b=0,c=d.length;c>b;b++)a=d[b],a.scrub();return this},a.prototype.finalize=function(a){var b,c,d,e,f,g;for(c=function(){var c,d,e,f;for(e=this.hashers,f=[],c=0,d=e.length;d>c;c++)b=e[c],f.push(b.finalize(a));return f}.call(this),d=c[0],g=c.slice(1),e=0,f=g.length;f>e;e++)b=g[e],this._coalesce(d,b),b.scrub();return d},a}(),d=function(a){function b(a,c){var d,h,i,j,k;null==c&&(c=[g,f]),k=a.split(c.length),this.hashers=function(){var a,b,f;for(f=[],h=a=0,b=c.length;b>a;h=++a)i=c[h],j=k[h],d=new e(j,i),j.scrub(),f.push(d);return f}(),b.__super__.constructor.call(this)}return m(b,a),b.get_output_size=function(){return g.output_size+f.output_size},b.prototype._coalesce=function(a,b){return a.concat(b)},b.prototype.get_output_size=function(){var a,b,c,d,e;for(b=0,e=this.hashers,c=0,d=e.length;d>c;c++)a=e[c],b+=a.get_output_size();return b},b.sign=function(a){var c,d;return d=a.key,c=a.input,new b(d).finalize(c)},b.bulk_sign=function(a,c){return a.klass=b,a.what="HMAC-SHA512-SHA3",j(a,c)},b}(b),i=function(a){function b(a,c){var d;null==c&&(c=[g,f]),this.hashers=function(){var b,f,g;for(g=[],b=0,f=c.length;f>b;b++)d=c[b],g.push(new e(a,d));return g}(),b.__super__.constructor.call(this)}return m(b,a),b.prototype.reset=function(){var a,c,d,e,f;for(b.__super__.reset.call(this),f=this.hashers,c=d=0,e=f.length;e>d;c=++d)a=f[c],a.update(new h([c]));return this},b.get_output_size=function(){return Math.max(g.output_size,f.output_size)},b.prototype._coalesce=function(a,b){return a.xor(b,{})},b.prototype.get_output_size=function(){var a;return Math.max.apply(Math,function(){var b,c,d,e;for(d=this.hashers,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.get_output_size());return e}.call(this))},b.sign=function(a){var c,d;return d=a.key,c=a.input,new b(d).finalize(c)},b.bulk_sign=function(a,c){return a.klass=b,a.what="HMAC-SHA512-XOR-SHA3",j(a,c)},b}(b),c.Concat=d,c.XOR=i}).call(this)},{"./hmac":8,"./sha3":19,"./sha512":21,"./wordarray":24}],4:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=a("iced-runtime"),j=k=function(){},f=a("./wordarray").WordArray,e=a("./algbase").StreamCipher,d=function(){function a(a){var b,c,d;d=a.value,c=a.len,this._value=null!=d?d.clone():(null==c?c=2:void 0,new f(function(){var a,d;for(d=[],b=a=0;c>=0?c>a:a>c;b=c>=0?++a:--a)d.push(0);return d}()))}return a.prototype.WORD_MAX=4294967295,a.prototype.inc=function(){var b,c;for(b=!0,c=this._value.words.length-1;b&&c>=0;)++this._value.words[c]>a.WORD_MAX?this._value.words[c]=0:b=!1,c--;return this},a.prototype.inc_le=function(){var b,c;for(b=!0,c=0;b&&c<this._value.words.length;)++this._value.words[c]>a.WORD_MAX?this._value.words[c]=0:b=!1,c++;return this},a.prototype.get=function(){return this._value},a.prototype.copy=function(){return this._value.clone()},a}(),b=function(a){function b(a){if(this.block_cipher=a.block_cipher,this.iv=a.iv,b.__super__.constructor.call(this),this.bsiw=this.block_cipher.blockSize/4,this.iv.sigBytes!==this.block_cipher.blockSize)throw new Error("IV is wrong length ("+this.iv.sigBytes+")");this.ctr=new d({value:this.iv})}return m(b,a),b.prototype.scrub=function(){return this.block_cipher.scrub()},b.prototype.get_pad=function(){var a;return a=this.ctr.copy(),this.ctr.inc(),this.block_cipher.encryptBlock(a.words),a},b}(e),h=function(a){var c,d,e,f,g;return c=a.block_cipher,f=a.iv,e=a.input,d=new b({block_cipher:c,iv:f}),g=d.encrypt(e),d.scrub(),g},g=function(a,c){var d,e,f,g,h,j,l,m,n,o;o=k,m=i.findDeferral(arguments),d=a.block_cipher,g=a.iv,f=a.input,h=a.progress_hook,l=a.what,e=new b({block_cipher:d,iv:g}),function(a){return function(a){n=new i.Deferrals(a,{parent:m,filename:"/Users/max/src/keybase/triplesec/src/ctr.iced"}),e.bulk_encrypt({input:f,progress_hook:h,what:l},n.defer({assign_fn:function(){return function(){return j=arguments[0]}}(),lineno:121})),n._fulfill()}}(this)(function(a){return function(){return c(j)}}(this))},c.Counter=d,c.Cipher=b,c.encrypt=h,c.bulk_encrypt=g}).call(this)},{"./algbase":2,"./wordarray":24,"iced-runtime":34}],5:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t={}.hasOwnProperty,u=function(a,b){function c(){this.constructor=a}for(var d in b)t.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};n=a("iced-runtime"),q=r=function(){},k=a("./wordarray").WordArray,p=a("./salsa20"),b=a("./aes").AES,i=a("./twofish").TwoFish,l=a("./ctr"),e=a("./combine").Concat,g=a("./sha512").SHA512,h=a("./salsa20").Salsa20,s=a("./enc"),d=s.Base,j=s.V,o=a("iced-error").make_esc,f=function(a){function c(a){var b,d;d=a.key,b=a.enc,c.__super__.constructor.call(this,{key:d}),null!=b&&(this.key=b.key,this.derived_keys=b.derived_keys)}return u(c,a),c.prototype.read_header=function(a){var b,c;return b=null==(c=this.ct.unshift(2))?new Error("Ciphertext underrun in header"):null==(this.version=j[c.words[1]])?new Error("bad header; couldn't find a good version (got "+c.words[1]+")"):c.words[0]!==this.version.header[0]?new Error("Bad header: unrecognized magic value"):null,a(b)},c.prototype.verify_sig=function(a,b){var c,d,f,g,h,i;i=r,g=n.findDeferral(arguments),function(b){return function(i){return null==(f=b.ct.unshift(e.get_output_size()/4))?i(d=new Error("Ciphertext underrun in signature")):void!function(e){h=new n.Deferrals(e,{parent:g,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.verify_sig"}),b.sign({input:b.ct,key:a,salt:b.salt},h.defer({assign_fn:function(){return function(){return d=arguments[0],c=arguments[1]}}(),lineno:63})),h._fulfill()}(function(){return i(d=null!=d?d:f.equal(c)?null:new Error("Signature mismatch or bad decryption key"))})}}(this)(function(a){return function(){return b(d)}}(this))},c.prototype.unshift_iv=function(a,b,c){var d,e;return d=null!=(e=this.ct.unshift(a/4))?null:new Error("Ciphertext underrun in "+b),c(d,e)},c.prototype.read_salt=function(a){var b;return b=null==(this.salt=this.ct.unshift(this.version.salt_size/4))?new Error("Ciphertext underrrun in read_salt"):null,a(b)},c.prototype.generate_keys=function(a,b){var c,d,e,f,g,h;h=r,f=n.findDeferral(arguments),e=a.progress_hook,function(a){return function(b){g=new n.Deferrals(b,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.generate_keys"}),a.kdf({salt:a.salt,progress_hook:e},g.defer({assign_fn:function(){return function(){return c=arguments[0],d=arguments[1]}}(),lineno:114})),g._fulfill()}}(this)(function(a){return function(){return b(c,d)}}(this))},c.prototype.run=function(a,c){var d,e,f,g,j,l,m,p,q,s;s=r,p=n.findDeferral(arguments),f=a.data,l=a.progress_hook,g=o(c,"Decryptor::run"),this.ct=k.from_buffer(f),function(a){return function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.read_header(g(q.defer({lineno:141}))),q._fulfill()}}(this)(function(a){return function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.read_salt(g(q.defer({lineno:142}))),q._fulfill()}(function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.generate_keys({progress_hook:l},g(q.defer({assign_fn:function(a){return function(){return a.keys=arguments[0]}}(a),lineno:143}))),q._fulfill()}(function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.verify_sig(a.keys.hmac,g(q.defer({lineno:144}))),q._fulfill()}(function(){!function(c){q=new n.Deferrals(c,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.unshift_iv(b.ivSize,"AES",g(q.defer({assign_fn:function(){return function(){return j=arguments[0]}}(),lineno:145}))),q._fulfill()}(function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.run_aes({iv:j,input:a.ct,key:a.keys.aes,progress_hook:l},g(q.defer({assign_fn:function(){return function(){return e=arguments[0]}}(),lineno:146}))),q._fulfill()}(function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.unshift_iv(i.ivSize,"2fish",g(q.defer({assign_fn:function(){return function(){return j=arguments[0]}}(),lineno:147}))),q._fulfill()}(function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.run_twofish({iv:j,input:a.ct,key:a.keys.twofish,progress_hook:l},g(q.defer({assign_fn:function(){return function(){return d=arguments[0]}}(),lineno:148}))),q._fulfill()}(function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.unshift_iv(h.ivSize,"Salsa",g(q.defer({assign_fn:function(){return function(){return j=arguments[0]}}(),lineno:149}))),q._fulfill()}(function(){!function(b){q=new n.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/dec.iced",funcname:"Decryptor.run"}),a.run_salsa20({iv:j,input:a.ct,key:a.keys.salsa20,output_iv:!1,progress_hook:l},g(q.defer({assign_fn:function(){return function(){return m=arguments[0]}}(),lineno:150}))),q._fulfill()}(function(){return c(null,m.to_buffer())})})})})})})})})})}}(this))},c.prototype.clone=function(){var a,b;return a=new c({key:null!=(b=this.key)?b.to_buffer():void 0,rng:this.rng,version:this.version}),a.derived_keys=this.clone_derived_keys(),a},c}(d),m=function(a,b){var c,d,e,g,h,i,j,k,l;l=r,j=n.findDeferral(arguments),g=a.key,c=a.data,h=a.progress_hook,d=new f({key:g}),function(a){return function(a){k=new n.Deferrals(a,{parent:j,filename:"/Users/max/src/keybase/triplesec/src/dec.iced"}),d.run({data:c,progress_hook:h},k.defer({assign_fn:function(){return function(){return e=arguments[0],i=arguments[1]}}(),lineno:180})),k._fulfill()}}(this)(function(a){return function(){return d.scrub(),b(e,i)}}(this))},c.Decryptor=f,c.decrypt=m}).call(this)},{"./aes":1,"./combine":3,"./ctr":4,"./enc":7,"./salsa20":14,"./sha512":21,"./twofish":22,"./wordarray":24,"iced-error":30,"iced-runtime":34}],6:[function(a,b,c){var d=a("__browserify_Buffer");(function(){var b,e,f,g,h,i,j,k,l,m,n;j=a("iced-runtime"),m=n=function(){},i=a("./hmac"),h=a("./combine").XOR,l=a("./sha512"),k=a("./sha3"),g=a("./wordarray").WordArray,f=a("iced-lock").Lock,e=function(){function a(a,b,c){this.hmac=c||i.sign,this.security_strength=256,a=this.check_entropy(a),b||(b=new g([])),this._instantiate(a,b)}return a.prototype.check_entropy=function(a,b){if(null==b&&(b=!1),8*a.sigBytes*2<(b?2:3)*this.security_strength)throw new Error("entropy must be at least "+1.5*this.security_strength+" bits.");return a},a.prototype._hmac=function(a,b){return this.hmac({key:a,input:b})},a.prototype._update=function(a){var b,c;return b=new g([0],1),null!=a&&(b=b.concat(a)),c=this.V.clone().concat(b),this.K=this._hmac(this.K,c),c.scrub(),b.scrub(),this.V=this._hmac(this.K,this.V),null!=a&&(c=this.V.clone().concat(new g([1<<24],1)).concat(a),this.K=this._hmac(this.K,c),c.scrub(),this.V=this._hmac(this.K,this.V)),null!=a?a.scrub():void 0},a.prototype._instantiate=function(a,b){var c,e,f;return f=a.concat(b),e=64,this.K=g.from_buffer(new d(function(){var a,b;for(b=[],c=a=0;e>=0?e>a:a>e;c=e>=0?++a:--a)b.push(0);return b}())),this.V=g.from_buffer(new d(function(){var a,b;for(b=[],c=a=0;e>=0?e>a:a>e;c=e>=0?++a:--a)b.push(1);return b}())),this._update(f),a.scrub(),this.reseed_counter=1},a.prototype.reseed=function(a){return this._update(this.check_entropy(a,!0)),this.reseed_counter=1},a.prototype.generate=function(a){var b,c,d;if(8*a>7500)throw new Error("generate cannot generate > 7500 bits in 1 call.");if(this.reseed_counter>=1e4)throw new Error("Need a reseed!");for(c=[],b=0;0===c.length||c.length*c[0].length*4<a;)this.V=this._hmac(this.K,this.V),c.push(this.V.words);return this._update(),this.reseed_counter+=1,new g((d=[]).concat.apply(d,c)).truncate(a)},a}(),b=function(){function a(a,b){this.gen_seed=a,this.hmac=b,this.drbg=null,this.lock=new f}return a.prototype.generate=function(a,b){var c,d,f,g,h;h=n,f=j.findDeferral(arguments),function(a){return function(b){g=new j.Deferrals(b,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),a.lock.acquire(g.defer({lineno:148})),g._fulfill()}}(this)(function(h){return function(){!function(a){return null!=h.drbg?a():void!function(a){g=new j.Deferrals(a,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),h.gen_seed(256,g.defer({assign_fn:function(){
return function(){return d=arguments[0]}}(),lineno:150})),g._fulfill()}(function(){return a(h.drbg=new e(d,null,h.hmac))})}(function(){!function(a){return h.drbg.reseed_counter>100?void!function(a){g=new j.Deferrals(a,{parent:f,filename:"/Users/max/src/keybase/triplesec/src/drbg.iced",funcname:"ADRBG.generate"}),h.gen_seed(256,g.defer({assign_fn:function(){return function(){return d=arguments[0]}}(),lineno:153})),g._fulfill()}(function(){return a(h.drbg.reseed(d))}):a()}(function(){return c=h.drbg.generate(a),h.lock.release(),b(c)})})}}(this))},a}(),c.DRBG=e,c.ADRBG=b}).call(this)},{"./combine":3,"./hmac":8,"./sha3":19,"./sha512":21,"./wordarray":24,__browserify_Buffer:26,"iced-lock":31,"iced-runtime":34}],7:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z={}.hasOwnProperty,A=function(a,b){function c(){this.constructor=a}for(var d in b)z.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};r=a("iced-runtime"),w=x=function(){},n=a("./wordarray").WordArray,u=a("./salsa20"),b=a("./aes").AES,l=a("./twofish").TwoFish,p=a("./ctr"),y=a("./combine"),o=y.XOR,f=y.Concat,j=a("./sha512").SHA512,i=a("./pbkdf2").PBKDF2,k=a("./scrypt").Scrypt,v=a("./util"),t=a("./prng"),s=a("iced-error").make_esc,h=a("./hmac").HMAC_SHA256,m={1:{header:[479516638,1],salt_size:8,xsalsa20_rev:!0,kdf:{klass:i,opts:{c:1024,klass:o}},hmac_key_size:96,version:1},2:{header:[479516638,2],salt_size:16,xsalsa20_rev:!0,kdf:{klass:k,opts:{c:64,klass:o,N:12,r:8,p:1}},hmac_key_size:96,version:2},3:{header:[479516638,3],salt_size:16,xsalsa20_rev:!1,kdf:{klass:k,opts:{c:1,klass:h,N:15,r:8,p:1}},hmac_key_size:96,version:3}},c.CURRENT_VERSION=e=3,d=function(){function a(a){var b,c;if(b=a.key,c=a.version,this.version=m[null!=c?c:e],null==this.version)throw new Error("unknown version: "+c);this.set_key(b),this.derived_keys={}}return a.prototype.kdf=function(a,c){var d,e,f,g,h,i,j,k,m,o,p,q,s,t,v,w,y,z,A;A=x,y=r.findDeferral(arguments),t=a.salt,g=a.extra_keymaterial,q=a.progress_hook,function(a){return function(b){z=new r.Deferrals(b,{parent:y,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),a._check_scrubbed(a.key,"in KDF",c,z.defer({lineno:97})),z._fulfill()}}(this)(function(a){return function(){v=t.to_hex(),j=a.key.clone(),function(b){z=new r.Deferrals(b,{parent:y,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),a._check_scrubbed(j,"KDF",c,z.defer({lineno:105})),z._fulfill()}(function(){!function(c){if(null!=(k=a.derived_keys[v]))return c();a._kdf=new a.version.kdf.klass(a.version.kdf.opts),o={hmac:a.version.hmac_key_size,aes:b.keySize,twofish:l.keySize,salsa20:u.Salsa20.keySize},p=["hmac","aes","twofish","salsa20"],e=g||0;for(i in o)w=o[i],e+=w;d={dkLen:e,key:j,progress_hook:q,salt:t},function(b){z=new r.Deferrals(b,{parent:y,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.kdf"}),a._kdf.run(d,z.defer({assign_fn:function(){return function(){return s=arguments[0]}}(),lineno:124})),z._fulfill()}(function(){var b,d;for(k={},h=0,b=0,d=p.length;d>b;b++)i=p[b],w=o[i],m=w/4,f=h+m,k[i]=new n(s.words.slice(h,f)),h=f;return k.extra=new n(s.words.slice(f)).to_buffer(),c(a.derived_keys[v]=k)})}(function(){return c(null,k)})})}}(this))},a.prototype.set_key=function(a){var b;return null==a?this.scrub():(b=n.from_buffer(a),this.key&&this.key.equal(b)?void 0:(this.scrub(),this.key=b))},a.prototype._check_scrubbed=function(a,b,c,d){return null==a||a.is_scrubbed()?c(new Error(""+b+": Failed due to scrubbed key!"),null):d()},a.prototype.sign=function(a,b){var c,d,e,g,h,i,j,k;k=x,i=r.findDeferral(arguments),c=a.input,d=a.key,h=a.salt,g=a.progress_hook,function(a){return function(c){j=new r.Deferrals(c,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.sign"}),a._check_scrubbed(d,"HMAC",b,j.defer({lineno:182})),j._fulfill()}}(this)(function(a){return function(){c=new n(a.version.header).concat(h).concat(c),function(a){j=new r.Deferrals(a,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.sign"}),f.bulk_sign({key:d,input:c,progress_hook:g},j.defer({assign_fn:function(){return function(){return e=arguments[0]}}(),lineno:184})),j._fulfill()}(function(){return c.scrub(),b(null,e)})}}(this))},a.prototype.run_salsa20=function(a,b){var c,d,e,f,g,h,i,j,k,l;l=x,j=r.findDeferral(arguments),e=a.input,g=a.key,f=a.iv,h=a.output_iv,i=a.progress_hook,function(a){return function(c){k=new r.Deferrals(c,{parent:j,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_salsa20"}),a._check_scrubbed(g,"Salsa20",b,k.defer({lineno:200})),k._fulfill()}}(this)(function(a){return function(){c={input:e,progress_hook:i,key:g,iv:f},a.version.xsalsa20_rev&&(c.key=g.clone().endian_reverse(),c.iv=f.clone().endian_reverse()),function(a){k=new r.Deferrals(a,{parent:j,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_salsa20"}),u.bulk_encrypt(c,k.defer({assign_fn:function(){return function(){return d=arguments[0]}}(),lineno:212})),k._fulfill()}(function(){return h&&(d=f.clone().concat(d)),a.version.xsalsa20_rev&&(c.key.scrub(),c.iv.scrub()),b(null,d)})}}(this))},a.prototype.run_twofish=function(a,b){var c,d,e,f,g,h,i,j,k;k=x,i=r.findDeferral(arguments),e=a.input,g=a.key,f=a.iv,h=a.progress_hook,function(a){return function(c){j=new r.Deferrals(c,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_twofish"}),a._check_scrubbed(g,"TwoFish",b,j.defer({lineno:235})),j._fulfill()}}(this)(function(a){return function(){c=new l(g),function(a){j=new r.Deferrals(a,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_twofish"}),p.bulk_encrypt({block_cipher:c,iv:f,input:e,progress_hook:h,what:"twofish"},j.defer({assign_fn:function(){return function(){return d=arguments[0]}}(),lineno:237})),j._fulfill()}(function(){return c.scrub(),b(null,f.clone().concat(d))})}}(this))},a.prototype.run_aes=function(a,c){var d,e,f,g,h,i,j,k,l;l=x,j=r.findDeferral(arguments),f=a.input,h=a.key,g=a.iv,i=a.progress_hook,function(a){return function(b){k=new r.Deferrals(b,{parent:j,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_aes"}),a._check_scrubbed(h,"AES",c,k.defer({lineno:252})),k._fulfill()}}(this)(function(a){return function(){d=new b(h),function(a){k=new r.Deferrals(a,{parent:j,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Base.run_aes"}),p.bulk_encrypt({block_cipher:d,iv:g,input:f,progress_hook:i,what:"aes"},k.defer({assign_fn:function(){return function(){return e=arguments[0]}}(),lineno:254})),k._fulfill()}(function(){return d.scrub(),c(null,g.clone().concat(e))})}}(this))},a.prototype.scrub=function(){var a,b,c,d,e;if(null!=this.key&&this.key.scrub(),null!=this.derived_keys){e=this.derived_keys;for(d in e){c=e[d];for(a in c)b=c[a],"extra"!==a&&b.scrub()}}return this.derived_keys={},null!=this.salt&&this.salt.scrub(),this.salt=null,this.key=null},a.prototype.clone_derived_keys=function(){var a,b,c,d,e,f;if(d=null,null!=this.derived_keys){d={},f=this.derived_keys;for(e in f){c=f[e],d[e]={};for(a in c)b=c[a],d[e][a]="extra"===a?b:b.clone()}}return d},a}(),g=function(a){function c(a){var b,d,e;b=a.key,d=a.rng,e=a.version,c.__super__.constructor.call(this,{key:b,version:e}),this.rng=d||t.generate}return A(c,a),c.prototype.pick_random_ivs=function(a,c){var d,e,f,g,h,i,j,k;k=x,i=r.findDeferral(arguments),g=a.progress_hook,d={aes:b.ivSize,twofish:l.ivSize,salsa20:u.Salsa20.ivSize},e={},function(a){return function(b){var c,g,k,l,m;l=d,k=function(){var a;a=[];for(g in l)a.push(g);return a}(),c=0,(m=function(b){var d,g,n;return d=b,g=function(){return r.trampoline(function(){return++c,m(b)})},n=g,c<k.length?(f=k[c],h=l[f],function(b){j=new r.Deferrals(b,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.pick_random_ivs"}),a.rng(h,j.defer({assign_fn:function(a,b){return function(){return a[b]=arguments[0]}}(e,f),lineno:377})),j._fulfill()}(n),void 0):d()})(b)}}(this)(function(a){return function(){return c(e)}}(this))},c.prototype.resalt=function(a,b){var c,d,e,f,g,h,i;i=x,g=r.findDeferral(arguments),f=a.salt,d=a.extra_keymaterial,e=a.progress_hook,c=null,function(a){return function(b){return null!=f?b(f.length!==a.version.salt_size?c=new Error("Need a salt of exactly "+a.version.salt_size+" bytes (got "+f.length+")"):a.salt=n.alloc(f)):void!function(b){h=new r.Deferrals(b,{parent:g,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.resalt"}),a.rng(a.version.salt_size,h.defer({assign_fn:function(a){return function(){return a.salt=arguments[0]}}(a),lineno:393})),h._fulfill()}(b)}}(this)(function(a){return function(){!function(b){return null!=c?b():void!function(b){h=new r.Deferrals(b,{parent:g,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.resalt"}),a.kdf({extra_keymaterial:d,progress_hook:e,salt:a.salt},h.defer({assign_fn:function(a){return function(){return c=arguments[0],a.keys=arguments[1]}}(a),lineno:399})),h._fulfill()}(b)}(function(){return b(c,a.keys)})}}(this))},c.prototype.run=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,o,p,q,t;t=x,p=r.findDeferral(arguments),f=a.data,m=a.salt,h=a.extra_keymaterial,j=a.progress_hook,g=s(b,"Encryptor::run"),function(a){return function(b){return null==m&&null!=a.salt?b():void!function(b){q=new r.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),a.resalt({salt:m,extra_keymaterial:h,progress_hook:j},g(q.defer({lineno:430}))),q._fulfill()}(b)}}(this)(function(a){return function(){!function(b){q=new r.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),a.pick_random_ivs({progress_hook:j},q.defer({assign_fn:function(){return function(){return i=arguments[0]}}(),lineno:431})),q._fulfill()}(function(){k=n.from_buffer(f),function(b){q=new r.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),a.run_salsa20({input:k,key:a.keys.salsa20,progress_hook:j,iv:i.salsa20,output_iv:!0},g(q.defer({assign_fn:function(){return function(){return c=arguments[0]}}(),lineno:433}))),q._fulfill()}(function(){!function(b){q=new r.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),a.run_twofish({input:c,key:a.keys.twofish,progress_hook:j,iv:i.twofish},g(q.defer({assign_fn:function(){return function(){return d=arguments[0]}}(),lineno:434}))),q._fulfill()}(function(){!function(b){q=new r.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),a.run_aes({input:d,key:a.keys.aes,progress_hook:j,iv:i.aes},g(q.defer({assign_fn:function(){return function(){return e=arguments[0]}}(),lineno:435}))),q._fulfill()}(function(){!function(b){q=new r.Deferrals(b,{parent:p,filename:"/Users/max/src/keybase/triplesec/src/enc.iced",funcname:"Encryptor.run"}),a.sign({input:e,key:a.keys.hmac,progress_hook:j,salt:a.salt},g(q.defer({assign_fn:function(){return function(){return o=arguments[0]}}(),lineno:436}))),q._fulfill()}(function(){return l=new n(a.version.header).concat(a.salt).concat(o).concat(e).to_buffer(),v.scrub_buffer(f),b(null,l)})})})})})}}(this))},c.prototype.clone=function(){var a,b,d;return a=new c({key:null!=(b=this.key)?b.to_buffer():void 0,rng:this.rng,version:null!=(d=this.version)?d.version:void 0}),a.derived_keys=this.clone_derived_keys(),a},c}(d),q=function(a,b){var c,d,e,f,h,i,j,k,l,m,n;n=x,l=r.findDeferral(arguments),f=a.key,c=a.data,j=a.rng,h=a.progress_hook,k=a.version,d=new g({key:f,rng:j,version:k}),function(a){return function(a){m=new r.Deferrals(a,{parent:l,filename:"/Users/max/src/keybase/triplesec/src/enc.iced"}),d.run({data:c,progress_hook:h},m.defer({assign_fn:function(){return function(){return e=arguments[0],i=arguments[1]}}(),lineno:475})),m._fulfill()}}(this)(function(a){return function(){return d.scrub(),b(e,i)}}(this))},c.V=m,c.encrypt=q,c.Base=d,c.Encryptor=g}).call(this)},{"./aes":1,"./combine":3,"./ctr":4,"./hmac":8,"./pbkdf2":11,"./prng":12,"./salsa20":14,"./scrypt":15,"./sha512":21,"./twofish":22,"./util":23,"./wordarray":24,"iced-error":30,"iced-runtime":34}],8:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m={}.hasOwnProperty,n=function(a,b){function c(){this.constructor=a}for(var d in b)m.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};h=a("iced-runtime"),k=l=function(){},f=a("./sha512").SHA512,e=a("./sha256").SHA256,j=a("./util"),b=function(){function a(a,b){var c,d,e;for(null==b&&(b=f),this.key=a.clone(),this.hasher=new b,this.hasherBlockSize=this.hasher.blockSize,this.hasherBlockSizeBytes=4*this.hasherBlockSize,this.key.sigBytes>this.hasherBlockSizeBytes&&(this.key=this.hasher.finalize(this.key)),this.key.clamp(),this._oKey=this.key.clone(),this._iKey=this.key.clone(),c=d=0,e=this.hasherBlockSize;e>=0?e>d:d>e;c=e>=0?++d:--d)this._oKey.words[c]^=1549556828,this._iKey.words[c]^=909522486;this._oKey.sigBytes=this._iKey.sigBytes=this.hasherBlockSizeBytes,this.reset()}return a.outputSize=64,a.prototype.outputSize=a.outputSize,a.prototype.get_output_size=function(){return this.hasher.output_size},a.prototype.reset=function(){return this.hasher.reset().update(this._iKey)},a.prototype.update=function(a){return this.hasher.update(a),this},a.prototype.finalize=function(a){var b,c,d;return b=this.hasher.finalize(a),this.hasher.reset(),c=this._oKey.clone().concat(b),d=this.hasher.finalize(c),b.scrub(),c.scrub(),d},a.prototype.scrub=function(){return this.key.scrub(),this._iKey.scrub(),this._oKey.scrub()},a}(),i=function(a){var c,d,e,f,g;return f=a.key,e=a.input,d=a.hash_class,c=new b(f,d),g=c.finalize(e.clamp()),c.scrub(),g},g=function(a,c){var d,e,f,g,i,k,m,n,o,p,q;q=l,o=h.findDeferral(arguments),f=a.key,e=a.input,i=a.progress_hook,g=a.klass,n=a.what,g||(g=b),n||(n="hmac_sha512"),d=new g(f),e.clamp(),m={update:function(a,b){return d.update(e.slice(a,b))},finalize:function(){return d.finalize()},default_n:1e3*d.hasherBlockSize},function(a){return function(a){p=new h.Deferrals(a,{parent:o,filename:"/Users/max/src/keybase/triplesec/src/hmac.iced"}),j.bulk(e.sigBytes,m,{what:n,progress_hook:i,cb:p.defer({assign_fn:function(){return function(){return k=arguments[0]}}(),lineno:137})}),p._fulfill()}}(this)(function(a){return function(){return d.scrub(),c(k)}}(this))},c.HMAC_SHA256=d=function(a){function b(a){b.__super__.constructor.call(this,a,e)}return n(b,a),b}(b),c.HMAC=b,c.sign=i,c.bulk_sign=g}).call(this)},{"./sha256":18,"./sha512":21,"./util":23,"iced-runtime":34}],9:[function(a,b,c){var d=a("__browserify_Buffer");(function(){var b,e,f,g,h;g=a("./enc");for(e in g)f=g[e],c[e]=f;h=a("./dec");for(e in h)f=h[e],c[e]=f;c.prng=a("./prng"),c.Buffer=d,c.WordArray=a("./wordarray").WordArray,c.util=a("./util"),c.ciphers={AES:a("./aes").AES,TwoFish:a("./twofish").TwoFish,Salsa20:a("./salsa20").Salsa20},c.hash={SHA1:a("./sha1").SHA1,SHA224:a("./sha224").SHA224,SHA256:a("./sha256").SHA256,SHA384:a("./sha384").SHA384,SHA512:a("./sha512").SHA512,SHA3:a("./sha3").SHA3,MD5:a("./md5").MD5,RIPEMD160:a("./ripemd160").RIPEMD160},c.modes={CTR:a("./ctr")},c.scrypt=a("./scrypt").scrypt,c.pbkdf2=a("./pbkdf2").pbkdf2,c.hmac=b=a("./hmac"),c.HMAC_SHA256=b.HMAC_SHA256,c.HMAC=b.HMAC}).call(this)},{"./aes":1,"./ctr":4,"./dec":5,"./enc":7,"./hmac":8,"./md5":10,"./pbkdf2":11,"./prng":12,"./ripemd160":13,"./salsa20":14,"./scrypt":15,"./sha1":16,"./sha224":17,"./sha256":18,"./sha3":19,"./sha384":20,"./sha512":21,"./twofish":22,"./util":23,"./wordarray":24,__browserify_Buffer:26}],10:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l={}.hasOwnProperty,m=function(a,b){function c(){this.constructor=a}for(var d in b)l.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};j=a("./wordarray").WordArray,g=a("./algbase").Hasher,e=function(){function a(){var a;this.T=function(){var b,c;for(c=[],a=b=0;64>b;a=++b)c.push(4294967296*Math.abs(Math.sin(a+1))|0);return c}()}return a}(),k=new e,c.MD5=i=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return m(c,a),c.blockSize=16,c.prototype.blockSize=c.blockSize,c.output_size=16,c.prototype.output_size=c.output_size,c.prototype._doReset=function(){return this._hash=new j([1732584193,4023233417,2562383102,271733878])},c.prototype._doProcessBlock=function(a,c){var e,g,i,j,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;for(D=F=0;16>F;D=++F)E=c+D,y=a[E],a[E]=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8);return e=this._hash.words,g=a[c+0],i=a[c+1],q=a[c+2],r=a[c+3],s=a[c+4],t=a[c+5],u=a[c+6],v=a[c+7],w=a[c+8],x=a[c+9],j=a[c+10],l=a[c+11],m=a[c+12],n=a[c+13],o=a[c+14],p=a[c+15],z=e[0],A=e[1],B=e[2],C=e[3],z=b(z,A,B,C,g,7,k.T[0]),C=b(C,z,A,B,i,12,k.T[1]),B=b(B,C,z,A,q,17,k.T[2]),A=b(A,B,C,z,r,22,k.T[3]),z=b(z,A,B,C,s,7,k.T[4]),C=b(C,z,A,B,t,12,k.T[5]),B=b(B,C,z,A,u,17,k.T[6]),A=b(A,B,C,z,v,22,k.T[7]),z=b(z,A,B,C,w,7,k.T[8]),C=b(C,z,A,B,x,12,k.T[9]),B=b(B,C,z,A,j,17,k.T[10]),A=b(A,B,C,z,l,22,k.T[11]),z=b(z,A,B,C,m,7,k.T[12]),C=b(C,z,A,B,n,12,k.T[13]),B=b(B,C,z,A,o,17,k.T[14]),A=b(A,B,C,z,p,22,k.T[15]),z=d(z,A,B,C,i,5,k.T[16]),C=d(C,z,A,B,u,9,k.T[17]),B=d(B,C,z,A,l,14,k.T[18]),A=d(A,B,C,z,g,20,k.T[19]),z=d(z,A,B,C,t,5,k.T[20]),C=d(C,z,A,B,j,9,k.T[21]),B=d(B,C,z,A,p,14,k.T[22]),A=d(A,B,C,z,s,20,k.T[23]),z=d(z,A,B,C,x,5,k.T[24]),C=d(C,z,A,B,o,9,k.T[25]),B=d(B,C,z,A,r,14,k.T[26]),A=d(A,B,C,z,w,20,k.T[27]),z=d(z,A,B,C,n,5,k.T[28]),C=d(C,z,A,B,q,9,k.T[29]),B=d(B,C,z,A,v,14,k.T[30]),A=d(A,B,C,z,m,20,k.T[31]),z=f(z,A,B,C,t,4,k.T[32]),C=f(C,z,A,B,w,11,k.T[33]),B=f(B,C,z,A,l,16,k.T[34]),A=f(A,B,C,z,o,23,k.T[35]),z=f(z,A,B,C,i,4,k.T[36]),C=f(C,z,A,B,s,11,k.T[37]),B=f(B,C,z,A,v,16,k.T[38]),A=f(A,B,C,z,j,23,k.T[39]),z=f(z,A,B,C,n,4,k.T[40]),C=f(C,z,A,B,g,11,k.T[41]),B=f(B,C,z,A,r,16,k.T[42]),A=f(A,B,C,z,u,23,k.T[43]),z=f(z,A,B,C,x,4,k.T[44]),C=f(C,z,A,B,m,11,k.T[45]),B=f(B,C,z,A,p,16,k.T[46]),A=f(A,B,C,z,q,23,k.T[47]),z=h(z,A,B,C,g,6,k.T[48]),C=h(C,z,A,B,v,10,k.T[49]),B=h(B,C,z,A,o,15,k.T[50]),A=h(A,B,C,z,t,21,k.T[51]),z=h(z,A,B,C,m,6,k.T[52]),C=h(C,z,A,B,r,10,k.T[53]),B=h(B,C,z,A,j,15,k.T[54]),A=h(A,B,C,z,i,21,k.T[55]),z=h(z,A,B,C,w,6,k.T[56]),C=h(C,z,A,B,p,10,k.T[57]),B=h(B,C,z,A,u,15,k.T[58]),A=h(A,B,C,z,n,21,k.T[59]),z=h(z,A,B,C,s,6,k.T[60]),C=h(C,z,A,B,l,10,k.T[61]),B=h(B,C,z,A,q,15,k.T[62]),A=h(A,B,C,z,x,21,k.T[63]),e[0]=e[0]+z|0,e[1]=e[1]+A|0,e[2]=e[2]+B|0,e[3]=e[3]+C|0},c.prototype._doFinalize=function(){var a,b,c,d,e,f,g,h,i,j,k;for(c=this._data,d=c.words,h=8*this._nDataBytes,g=8*c.sigBytes,d[g>>>5]|=128<<24-g%32,i=Math.floor(h/4294967296),j=h,d[(g+64>>>9<<4)+15]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),d[(g+64>>>9<<4)+14]=16711935&(j<<8|j>>>24)|4278255360&(j<<24|j>>>8),c.sigBytes=4*(d.length+1),this._process(),e=this._hash,a=e.words,f=k=0;4>k;f=++k)b=a[f],a[f]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8);return e},c.prototype.copy_to=function(a){return c.__super__.copy_to.call(this,a),a._hash=this._hash.clone()},c.prototype.clone=function(){var a;return a=new c,this.copy_to(a),a},c}(g),b=function(a,b,c,d,e,f,g){var h;return h=a+(b&c|~b&d)+e+g,(h<<f|h>>>32-f)+b},d=function(a,b,c,d,e,f,g){var h;return h=a+(b&d|c&~d)+e+g,(h<<f|h>>>32-f)+b},f=function(a,b,c,d,e,f,g){var h;return h=a+(b^c^d)+e+g,(h<<f|h>>>32-f)+b},h=function(a,b,c,d,e,f,g){var h;return h=a+(c^(b|~d))+e+g,(h<<f|h>>>32-f)+b},c.transform=function(a){var b;return b=(new i).finalize(a),a.scrub(),b}}).call(this)},{"./algbase":2,"./wordarray":24}],11:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j;f=a("iced-runtime"),i=j=function(){},b=a("./hmac").HMAC,e=a("./wordarray").WordArray,h=a("./util"),d=function(){function a(a){this.klass=a.klass,this.c=a.c,this.c||(this.c=1024),this.klass||(this.klass=b)}return a.prototype._PRF=function(a){return this.prf.reset(),this.prf.finalize(a)},a.prototype._gen_T_i=function(a,b){var c,d,g,i,k,l,m,n,o,p;p=j,n=f.findDeferral(arguments),k=a.salt,d=a.i,g=a.progress_hook,g(0),l=k.clone().concat(new e([d])),c=this._PRF(l),i=c.clone(),d=1,function(a){return function(b){var e;(e=function(b){var j,k,l;if(j=b,k=function(){return f.trampoline(function(){return e(b)})},l=k,!(d<a.c))return j();for(m=Math.min(a.c,d+128);m>d;)c=a._PRF(c),i.xor(c,{}),d++;g(d),function(a){o=new f.Deferrals(a,{parent:n,filename:"/Users/max/src/keybase/triplesec/src/pbkdf2.iced",funcname:"PBKDF2._gen_T_i"}),h.default_delay(0,0,o.defer({lineno:57})),o._fulfill()}(function(){return l(null)})})(b)}}(this)(function(a){return function(){return g(d),b(i)}}(this))},a.prototype.run=function(a,b){var c,d,g,h,i,k,l,m,n,o,p,q,r,s,t,u,v,w;t=j,r=f.findDeferral(arguments),i=a.key,n=a.salt,d=a.dkLen,m=a.progress_hook,this.prf=new this.klass(i),c=this.prf.get_output_size(),k=Math.ceil(d/c),q=[],p=null,l=function(a){return function(b){return function(c){return"function"==typeof m?m({what:"pbkdf2",total:k*a.c,i:b*a.c+c}):void 0}}}(this),l(0)(0),function(a){return function(b){var c;h=1,u=1,v=k,w=v>u,(c=function(b){var d,e,g;return d=b,e=function(){return f.trampoline(function(){return w?h+=1:h-=1,c(b)})},g=e,w===!0&&h>k||w===!1&&k>h?d():void!function(b){s=new f.Deferrals(b,{parent:r,filename:"/Users/max/src/keybase/triplesec/src/pbkdf2.iced",funcname:"PBKDF2.run"}),a._gen_T_i({salt:n,i:h,progress_hook:l(h-1)},s.defer({assign_fn:function(){return function(){return o=arguments[0]}}(),lineno:80})),s._fulfill()}(function(){return g(q.push(o.words))})})(b)}}(this)(function(a){return function(){var c;return l(k)(0),g=(c=[]).concat.apply(c,q),i.scrub(),a.prf.scrub(),a.prf=null,b(new e(g,d))}}(this))},a}(),g=function(a,b){var c,e,g,h,i,k,l,m,n,o,p;p=j,n=f.findDeferral(arguments),h=a.key,m=a.salt,i=a.klass,c=a.c,e=a.dkLen,l=a.progress_hook,g=new d({klass:i,c:c}),function(a){return function(a){o=new f.Deferrals(a,{parent:n,filename:"/Users/max/src/keybase/triplesec/src/pbkdf2.iced"}),g.run({key:h,salt:m,dkLen:e,progress_hook:l},o.defer({assign_fn:function(){return function(){return k=arguments[0]}}(),lineno:106})),o._fulfill()}}(this)(function(a){return function(){return b(k)}}(this))},c.pbkdf2=g,c.PBKDF2=d}).call(this)},{"./hmac":8,"./util":23,"./wordarray":24,"iced-runtime":34}],12:[function(a,b,c){var d=a("__browserify_Buffer");(function(){var b,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(k=a("iced-runtime"),q=r=function(){},m=a("more-entropy"),b=a("./drbg").ADRBG,f=a("./wordarray").WordArray,g=a("./combine").XOR,p=a("./util"),s=null,h=function(a){var b;return b=new Uint8Array(a),s(b),new d(b)},s=null!=(l="undefined"!=typeof window&&null!==window&&null!=(v=window.crypto)?v.getRandomValues:void 0)?l.bind(window.crypto):null!=(l="undefined"!=typeof window&&null!==window&&null!=(w=window.msCrypto)?w.getRandomValues:void 0)?l.bind(window.msCrypto):null,null!=s)t=h;else try{o=a("crypto").rng,null!=o&&(t=o)}catch(x){i=x}n=function(a){if(null==t)throw new Error('No rng found; tried requiring "crypto" and window.crypto');return t(a)},e=function(){function a(){this.meg=new m.Generator,this.adrbg=new b(function(a){return function(b,c){return a.gen_seed(b,c)}}(this),g.sign)}return a.prototype.now_to_buffer=function(){var a,b,c,e;return b=Date.now(),c=b%1e3,e=Math.floor(b/1e3),a=new d(8),a.writeUInt32BE(e,0),a.writeUInt32BE(c,4),a},a.prototype.gen_seed=function(a,b){var c,e,g,h,i,j,l,m,o;o=r,l=k.findDeferral(arguments),h=a/8,e=[],e.push(this.now_to_buffer()),function(b){return function(c){m=new k.Deferrals(c,{parent:l,filename:"/Users/max/src/keybase/triplesec/src/prng.iced",funcname:"PRNG.gen_seed"}),b.meg.generate(a,m.defer({assign_fn:function(){return function(){return j=arguments[0]}}(),lineno:83})),m._fulfill()}}(this)(function(a){return function(){var k,l;for(e.push(a.now_to_buffer()),e.push(new d(j)),e.push(n(h)),e.push(a.now_to_buffer()),g=d.concat(e),i=f.from_buffer(g),p.scrub_buffer(g),k=0,l=e.length;l>k;k++)c=e[k],p.scrub_buffer(c);return b(i)}}(this))},a.prototype.generate=function(a,b){return this.adrbg.generate(a,b)},a}(),u=null,j=function(a,b){return null==u&&(u=new e),u.generate(a,b)},c.PRNG=e,c.generate=j,c.native_rng=n}).call(this)},{"./combine":3,"./drbg":6,"./util":23,"./wordarray":24,__browserify_Buffer:26,"iced-runtime":34,"more-entropy":37}],13:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r={}.hasOwnProperty,s=function(a,b){function c(){this.constructor=a}for(var d in b)r.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};q=a("./wordarray"),g=q.WordArray,h=q.X64Word,i=q.X64WordArray,e=a("./algbase").Hasher,d=function(){function a(){this._zl=new g([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]),this._zr=new g([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]),this._sl=new g([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]),this._sr=new g([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),this._hl=new g([0,1518500249,1859775393,2400959708,2840853838]),this._hr=new g([1352829926,1548603684,1836072691,2053994217,0])}return a}(),b=new d,f=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return s(c,a),c.blockSize=16,c.prototype.blockSize=c.blockSize,c.output_size=20,c.prototype.output_size=c.output_size,c.prototype._doReset=function(){return this._hash=new g([1732584193,4023233417,2562383102,271733878,3285377520])},c.prototype.get_output_size=function(){return this.output_size},c.prototype._doProcessBlock=function(a,c){var d,e,f,g,h,i,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;for(x=E=0;16>E;x=++E)y=c+x,e=a[y],a[y]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8);for(d=this._hash.words,v=b._hl.words,w=b._hr.words,C=b._zl.words,D=b._zr.words,z=b._sl.words,A=b._sr.words,g=f=d[0],i=h=d[1],q=p=d[2],s=r=d[3],u=t=d[4],x=F=0;80>F;x=++F)B=f+a[c+C[x]]|0,B+=16>x?j(h,p,r)+v[0]:32>x?k(h,p,r)+v[1]:48>x?l(h,p,r)+v[2]:64>x?m(h,p,r)+v[3]:n(h,p,r)+v[4],B=0|B,B=o(B,z[x]),B=B+t|0,f=t,t=r,r=o(p,10),p=h,h=B,B=g+a[c+D[x]]|0,B+=16>x?n(i,q,s)+w[0]:32>x?m(i,q,s)+w[1]:48>x?l(i,q,s)+w[2]:64>x?k(i,q,s)+w[3]:j(i,q,s)+w[4],B=0|B,B=o(B,A[x]),B=B+u|0,g=u,u=s,s=o(q,10),q=i,i=B;return B=d[1]+p+s|0,d[1]=d[2]+r+u|0,d[2]=d[3]+t+g|0,d[3]=d[4]+f+i|0,d[4]=d[0]+h+q|0,d[0]=B},c.prototype._doFinalize=function(){var a,b,c,d,e,f,g,h,i;for(c=this._data,d=c.words,h=8*this._nDataBytes,g=8*c.sigBytes,d[g>>>5]|=128<<24-g%32,d[(g+64>>>9<<4)+14]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),c.sigBytes=4*(d.length+1),this._process(),e=this._hash,a=e.words,f=i=0;5>i;f=++i)b=a[f],a[f]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8);return e},c.prototype.scrub=function(){return this._hash.scrub()},c.prototype.copy_to=function(a){return c.__super__.copy_to.call(this,a),a._hash=this._hash.clone()},c.prototype.clone=function(){var a;return a=new c,this.copy_to(a),a},c}(e),j=function(a,b,c){return a^b^c},k=function(a,b,c){return a&b|~a&c},l=function(a,b,c){return(a|~b)^c},m=function(a,b,c){return a&c|b&~c},n=function(a,b,c){return a^(b|~c)},o=function(a,b){return a<<b|a>>>32-b},p=function(a){var b;return b=(new f).finalize(a),a.scrub(),b},c.RIPEMD160=f,c.transform=p}).call(this)},{"./algbase":2,"./wordarray":24}],14:[function(a,b,c){var d=a("__browserify_Buffer");(function(){var b,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v={}.hasOwnProperty,w=function(a,b){function c(){this.constructor=a}for(var d in b)v.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};q=a("iced-runtime"),s=t=function(){},u=a("./wordarray"),o=u.endian_reverse,k=u.WordArray,e=a("./ctr").Counter,p=a("./util").fixup_uint32,j=a("./algbase").StreamCipher,r=a("./util"),l=function(a,b){var c,d,e,f;for(d=e=0,f=b.length;f>e;d=++e)c=b[d],a[d]+=c;return!1},h=function(){function a(a){this.rounds=a}return a.prototype._core=function(a){"use asm";var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;for(d=a[0],e=a[1],l=a[2],m=a[3],n=a[4],o=a[5],p=a[6],q=a[7],r=a[8],s=a[9],f=a[10],g=a[11],h=a[12],i=a[13],j=a[14],k=a[15],b=t=0,u=this.rounds;t<u;b=t+=2)c=d+h|0,n^=c<<7|c>>>25,c=n+d|0,r^=c<<9|c>>>23,c=r+n|0,h^=c<<13|c>>>19,c=h+r|0,d^=c<<18|c>>>14,c=o+e|0,s^=c<<7|c>>>25,c=s+o|0,i^=c<<9|c>>>23,c=i+s|0,e^=c<<13|c>>>19,c=e+i|0,o^=c<<18|c>>>14,c=f+p|0,j^=c<<7|c>>>25,c=j+f|0,l^=c<<9|c>>>23,c=l+j|0,p^=c<<13|c>>>19,c=p+l|0,f^=c<<18|c>>>14,c=k+g|0,m^=c<<7|c>>>25,c=m+k|0,q^=c<<9|c>>>23,c=q+m|0,g^=c<<13|c>>>19,c=g+q|0,k^=c<<18|c>>>14,c=d+m|0,e^=c<<7|c>>>25,c=e+d|0,l^=c<<9|c>>>23,c=l+e|0,m^=c<<13|c>>>19,c=m+l|0,d^=c<<18|c>>>14,c=o+n|0,p^=c<<7|c>>>25,c=p+o|0,q^=c<<9|c>>>23,c=q+p|0,n^=c<<13|c>>>19,c=n+q|0,o^=c<<18|c>>>14,c=f+s|0,g^=c<<7|c>>>25,c=g+f|0,r^=c<<9|c>>>23,c=r+g|0,s^=c<<13|c>>>19,c=s+r|0,f^=c<<18|c>>>14,c=k+j|0,h^=c<<7|c>>>25,c=h+k|0,i^=c<<9|c>>>23,c=i+h|0,j^=c<<13|c>>>19,c=j+i|0,k^=c<<18|c>>>14;return[d,e,l,m,n,o,p,q,r,s,f,g,h,i,j,k]},a}(),g=function(a){function b(a,c){var d;if(b.__super__.constructor.call(this,20),this.key=a.clone().endian_reverse(),this.nonce=c.clone().endian_reverse(),(16!==this.key.sigBytes||8!==this.nonce.sigBytes)&&(32!==this.key.sigBytes||8!==(d=this.nonce.sigBytes)&&24!==d))throw new Error("Bad key/nonce lengths");24===this.nonce.sigBytes&&this.xsalsa_setup(),this.input=this.key_iv_setup(this.nonce,this.key),this._reset()}return w(b,a),b.prototype.sigma=k.from_buffer_le(new d("expand 32-byte k")),b.prototype.tau=k.from_buffer_le(new d("expand 16-byte k")),b.blockSize=64,b.prototype.blockSize=b.blockSize,b.keySize=32,b.prototype.keySize=b.keySize,b.ivSize=24,b.prototype.ivSize=b.ivSize,b.prototype.scrub=function(){return this.key.scrub(),this.nonce.scrub(),r.scrub_vec(this.input)},b.prototype.xsalsa_setup=function(){var a,b;return a=new k(this.nonce.words.slice(0,4)),this.nonce=b=new k(this.nonce.words.slice(4)),this.key=this.hsalsa20(a,this.key)},b.prototype.hsalsa20=function(a,b){var c,d,e,f;return e=this.key_iv_setup(a,b),e[8]=a.words[2],e[9]=a.words[3],f=this._core(e),d=[0,5,10,15,6,7,8,9],f=function(){var a,b,e;for(e=[],a=0,b=d.length;b>a;a++)c=d[a],e.push(p(f[c]));return e}(),r.scrub_vec(e),new k(f)},b.prototype.key_iv_setup=function(a,b){var c,d,e,f,g,h,i,j;for(f=[],e=g=0;4>g;e=++g)f[e+1]=b.words[e];for(j=32===b.sigBytes?[this.sigma,b.words.slice(4)]:[this.tau,b.words],d=j[0],c=j[1],e=h=0;4>h;e=++h)f[e+11]=c[e];for(e=i=0;4>i;e=++i)f[5*e]=d.words[e];return f[6]=a.words[0],f[7]=a.words[1],f},b.prototype.counter_setup=function(){return this.input[8]=this.counter.get().words[0],this.input[9]=this.counter.get().words[1]},b.prototype._reset=function(){return this.counter=new e({len:2})},b.prototype._generateBlock=function(){var a;return this.counter_setup(),a=this._core(this.input),l(a,this.input),this.counter.inc_le(),a},b}(h),c.Salsa20WordStream=i=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return w(b,a),b.prototype._reset=function(){return b.__super__._reset.call(this)},b.prototype.getWordArray=function(a){var b,c,d,e,f,g,h,i;for(null==a||a===this.blockSize?f=this._generateBlock():(d=Math.ceil(a/this.blockSize),b=function(){var a,b;for(b=[],c=a=0;d>=0?d>a:a>d;c=d>=0?++a:--a)b.push(this._generateBlock());return b}.call(this),f=(i=[]).concat.apply(i,b)),c=g=0,h=f.length;h>g;c=++g)e=f[c],f[c]=o(e);return new k(f,a)},b}(g),c.Salsa20=f=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return w(b,a),b.prototype._reset=function(){return b.__super__._reset.call(this),this._i=this.blockSize},b.prototype.getBytes=function(a){var b,c,e;if(null==a&&(a=this.blockSize),
e=[],b=this.blockSize,this._i===b&&a===b)return this._generateBlockBuffer();for(;a>0;)this._i===b&&(this._generateBlockBuffer(),this._i=0),c=Math.min(a,b-this._i),e.push(c===b?this._buf:this._buf.slice(this._i,this._i+c)),this._i+=c,a-=c;return d.concat(e)},b.prototype._generateBlockBuffer=function(){var a,b,c,e,f;for(this._buf=new d(this.blockSize),c=this._generateBlock(),b=e=0,f=c.length;f>e;b=++e)a=c[b],this._buf.writeUInt32LE(p(a),4*b);return this._buf},b}(g),c.Cipher=b=function(a){function b(a){var c,d;d=a.key,c=a.iv,b.__super__.constructor.call(this),this.salsa=new i(d,c),this.bsiw=this.salsa.blockSize/4}return w(b,a),b.prototype.scrub=function(){return this.salsa.scrub()},b.prototype.get_pad=function(){var a;return a=this.salsa.getWordArray()},b}(j),c.encrypt=n=function(a){var c,d,e,f,g;return f=a.key,e=a.iv,d=a.input,c=new b({key:f,iv:e}),g=c.encrypt(d),c.scrub(),g},c.bulk_encrypt=m=function(a,c){var d,e,f,g,h,i,j,k,l;l=t,j=q.findDeferral(arguments),g=a.key,f=a.iv,e=a.input,h=a.progress_hook,d=new b({key:g,iv:f}),function(a){return function(a){k=new q.Deferrals(a,{parent:j,filename:"/Users/max/src/keybase/triplesec/src/salsa20.iced"}),d.bulk_encrypt({input:e,progress_hook:h,what:"salsa20"},k.defer({assign_fn:function(){return function(){return i=arguments[0]}}(),lineno:257})),k._fulfill()}}(this)(function(a){return function(){return d.scrub(),c(i)}}(this))},c.Salsa20InnerCore=h,c.endian_reverse=o,c.asum=l}).call(this)},{"./algbase":2,"./ctr":4,"./util":23,"./wordarray":24,__browserify_Buffer:26,"iced-runtime":34}],15:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;m=a("iced-runtime"),t=u=function(){},b=a("./hmac").HMAC_SHA256,n=a("./pbkdf2").pbkdf2,v=a("./salsa20"),k=v.endian_reverse,d=v.Salsa20InnerCore,w=a("./wordarray"),r=w.ui8a_to_buffer,g=w.WordArray,x=a("./util"),l=x.fixup_uint32,j=x.default_delay,o=x.scrub_vec,f=function(){function a(){this.tot=0}return a.prototype.start=function(){return this._t=Date.now()},a.prototype.stop=function(){return this.tot+=Date.now()-this._t},a}(),q=new f,h=function(a,b,c,d,e){"use asm";var f,g,h;for(h=c<<4|0,g=d<<4|0,f=g+(e<<4)|0;g<f;)a[h]=b[g],a[h+1]=b[g+1],a[h+2]=b[g+2],a[h+3]=b[g+3],a[h+4]=b[g+4],a[h+5]=b[g+5],a[h+6]=b[g+6],a[h+7]=b[g+7],a[h+8]=b[g+8],a[h+9]=b[g+9],a[h+10]=b[g+10],a[h+11]=b[g+11],a[h+12]=b[g+12],a[h+13]=b[g+13],a[h+14]=b[g+14],a[h+15]=b[g+15],g+=16,h+=16;return!0},i=function(a,b,c,d){"use asm";var e,f;for(d=d<<4|0,e=0,f=c<<4|0;e<d;)a[e]^=b[f],a[e+1]^=b[f+1],a[e+2]^=b[f+2],a[e+3]^=b[f+3],a[e+4]^=b[f+4],a[e+5]^=b[f+5],a[e+6]^=b[f+6],a[e+7]^=b[f+7],a[e+8]^=b[f+8],a[e+9]^=b[f+9],a[e+10]^=b[f+10],a[e+11]^=b[f+11],a[e+12]^=b[f+12],a[e+13]^=b[f+13],a[e+14]^=b[f+14],a[e+15]^=b[f+15],e+=16,f+=16;return!0},s=function(a){var b,c,d,e;for(c=d=0,e=a.length;e>d;c=++d)b=a[c],a[c]=k(b);return!0},e=function(){function a(a){var c,e,f,g;c=a.N,this.r=a.r,this.p=a.p,e=a.c,f=a.c0,g=a.c1,this.klass=a.klass,this.N||(this.N=1<<(c||15)),this.r||(this.r=8),this.p||(this.p=1),this.c0=f||e||1,this.c1=g||e||1,this.klass||(this.klass=b),this.X16_tmp=new Int32Array(16),this.s20ic=new d(8)}return a.prototype.salsa20_8=function(a){var b,c,d,e,f;for(b=this.s20ic._core(a),c=e=0,f=b.length;f>e;c=++e)d=b[c],a[c]+=d;return!0},a.prototype.pbkdf2=function(a,b){var c,d,e,f,g,h,i,j,k;k=u,i=m.findDeferral(arguments),e=a.key,g=a.salt,d=a.dkLen,f=a.progress_hook,c=a.c,function(a){return function(b){j=new m.Deferrals(b,{parent:i,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.pbkdf2"}),n({key:e,salt:g,c:c,dkLen:d,klass:a.klass,progress_hook:f},j.defer({assign_fn:function(){return function(){return h=arguments[0]}}(),lineno:113})),j._fulfill()}}(this)(function(a){return function(){return b(h)}}(this))},a.prototype.blockmix_salsa8=function(a,b){var c,d,e,f;for(c=this.X16_tmp,h(c,a,0,2*this.r-1,1),d=e=0,f=2*this.r;f>=0?f>e:e>f;d=f>=0?++e:--e)i(c,a,d,1),this.salsa20_8(c),h(b,c,d,0,1);for(d=0;d<this.r;)h(a,b,d,2*d,1),d++;for(d=0;d<this.r;)h(a,b,d+this.r,2*d+1,1),d++;return!0},a.prototype.smix=function(a,b){var c,d,e,f,g,k,n,o,p,q,r,s,t;t=u,r=m.findDeferral(arguments),c=a.B,d=a.V,f=a.XY,p=a.progress_hook,e=f,o=2*this.r,g=f.subarray(16*o),h(e,c,0,0,o),k=0,function(a){return function(b){var c;(c=function(b){var f,i,l;if(f=b,i=function(){return m.trampoline(function(){return c(b)})},l=i,!(k<a.N))return f();for(q=Math.min(a.N,k+2048);q>k;)h(d,e,o*k,0,o),a.blockmix_salsa8(e,g),k++;"function"==typeof p&&p(k),function(a){s=new m.Deferrals(a,{parent:r,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.smix"}),j(0,0,s.defer({lineno:170})),s._fulfill()}(l)})(b)}}(this)(function(a){return function(){k=0,function(b){var c;(c=function(b){var f,h,t;if(f=b,h=function(){return m.trampoline(function(){return c(b)})},t=h,!(k<a.N))return f();for(q=Math.min(a.N,k+256);q>k;)n=l(e[16*(o-1)])&a.N-1,i(e,d,n*o,o),a.blockmix_salsa8(e,g),k++;"function"==typeof p&&p(k+a.N),function(a){s=new m.Deferrals(a,{parent:r,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.smix"}),j(0,0,s.defer({lineno:187})),s._fulfill()}(t)})(b)}(function(){return h(c,e,0,0,o),b()})}}(this))},a.prototype.run=function(a,b){var c,d,e,f,h,i,j,k,l,n,p,q,r,t,v,w,x,y,z;w=u,t=m.findDeferral(arguments),k=a.key,r=a.salt,h=a.dkLen,p=a.progress_hook,d=4294967295,i=q=null,i=h>d?i=new Error("asked for too much data"):this.r*this.p>=1<<30?new Error("r & p are too big"):this.r>d/128/this.p||this.r>d/256||this.N>d/128/this.r?new Error("N is too big"):null,f=new Int32Array(64*this.r),e=new Int32Array(32*this.r*this.N),l=function(a){return a.what+=" (pass 1)","function"==typeof p?p(a):void 0},function(a){return function(b){v=new m.Deferrals(b,{parent:t,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),a.pbkdf2({key:k.clone(),salt:r,dkLen:128*a.r*a.p,c:a.c0,progress_hook:l},v.defer({assign_fn:function(){return function(){return c=arguments[0]}}(),lineno:218})),v._fulfill()}}(this)(function(a){return function(){c=new Int32Array(c.words),s(c),l=function(b){return function(c){return"function"==typeof p?p({i:c+b*a.N*2,what:"scrypt",total:a.p*a.N*2}):void 0}},function(b){var d;j=0,x=0,y=a.p,z=y>x,(d=function(b){var g,h,i;return g=b,h=function(){return m.trampoline(function(){return z?j+=1:j-=1,d(b)})},i=h,z===!0&&j>=a.p||z===!1&&j<=a.p?g():void!function(b){v=new m.Deferrals(b,{parent:t,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),a.smix({B:c.subarray(32*a.r*j),V:e,XY:f,progress_hook:l(j)},v.defer({lineno:225})),v._fulfill()}(i)})(b)}(function(){s(c),l=function(a){return a.what+=" (pass 2)","function"==typeof p?p(a):void 0},function(b){v=new m.Deferrals(b,{parent:t,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced",funcname:"Scrypt.run"}),a.pbkdf2({key:k,salt:g.from_i32a(c),dkLen:h,c:a.c1,progress_hook:l},v.defer({assign_fn:function(){return function(){return n=arguments[0]}}(),lineno:233})),v._fulfill()}(function(){return o(f),o(e),o(c),k.scrub(),b(n)})})}}(this))},a}(),p=function(a,b){var c,d,f,g,h,i,j,k,l,n,o,p,q,r,s,t;t=u,r=m.findDeferral(arguments),j=a.key,p=a.salt,o=a.r,c=a.N,l=a.p,f=a.c0,g=a.c1,d=a.c,k=a.klass,n=a.progress_hook,h=a.dkLen,i=new e({r:o,N:c,p:l,c:d,c0:f,c1:g,klass:k}),function(a){return function(a){s=new m.Deferrals(a,{parent:r,filename:"/Users/max/src/keybase/triplesec/src/scrypt.iced"}),i.run({key:j,salt:p,progress_hook:n,dkLen:h},s.defer({assign_fn:function(){return function(){return q=arguments[0]}}(),lineno:263})),s._fulfill()}}(this)(function(a){return function(){return b(q)}}(this))},c.Scrypt=e,c.scrypt=p,c.v_endian_reverse=s}).call(this)},{"./hmac":8,"./pbkdf2":11,"./salsa20":14,"./util":23,"./wordarray":24,"iced-runtime":34}],16:[function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=a("./wordarray").WordArray,b=a("./algbase").Hasher,e=[],d=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return i(b,a),b.blockSize=16,b.prototype.blockSize=b.blockSize,b.output_size=20,b.prototype.output_size=b.output_size,b.prototype._doReset=function(){return this._hash=new f([1732584193,4023233417,2562383102,271733878,3285377520])},b.prototype._doProcessBlock=function(a,b){var c,d,f,g,h,i,j,k,l,m;for(c=this._hash.words,d=c[0],f=c[1],g=c[2],h=c[3],i=c[4],j=m=0;80>m;j=++m)16>j?e[j]=0|a[b+j]:(k=e[j-3]^e[j-8]^e[j-14]^e[j-16],e[j]=k<<1|k>>>31),l=(d<<5|d>>>27)+i+e[j],l+=20>j?(f&g|~f&h)+1518500249:40>j?(f^g^h)+1859775393:60>j?(f&g|f&h|g&h)-1894007588:(f^g^h)-899497514,i=h,h=g,g=f<<30|f>>>2,f=d,d=l;return c[0]=c[0]+d|0,c[1]=c[1]+f|0,c[2]=c[2]+g|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},b.prototype._doFinalize=function(){var a,b,c,d;return a=this._data,b=a.words,d=8*this._nDataBytes,c=8*a.sigBytes,b[c>>>5]|=128<<24-c%32,b[(c+64>>>9<<4)+14]=Math.floor(d/4294967296),b[(c+64>>>9<<4)+15]=d,a.sigBytes=4*b.length,this._process(),this._hash},b.prototype.copy_to=function(a){return b.__super__.copy_to.call(this,a),a._hash=this._hash.clone()},b.prototype.clone=function(){var a;return a=new b,this.copy_to(a),a},b}(b),g=g=function(a){var b;return b=(new d).finalize(a),a.scrub(),b},c.SHA1=d,c.transform=g}).call(this)},{"./algbase":2,"./wordarray":24}],17:[function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=a("./wordarray").WordArray,d=a("./sha256").SHA256,b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return h(b,a),b.output_size=28,b.prototype.output_size=b.output_size,b.prototype._doReset=function(){return this._hash=new e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},b.prototype._doFinalize=function(){var a;return a=b.__super__._doFinalize.call(this),a.sigBytes-=4,a},b.prototype.clone=function(){var a;return a=new b,this.copy_to(a),a},b}(d),f=function(a){var c;return c=(new b).finalize(a),a.scrub(),c},c.SHA224=b,c.transform=f}).call(this)},{"./sha256":18,"./wordarray":24}],18:[function(a,b,c){(function(){var b,d,e,f,g,h,i={}.hasOwnProperty,j=function(a,b){function c(){this.constructor=a}for(var d in b)i.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=a("./wordarray").WordArray,d=a("./algbase").Hasher,b=function(){function a(){this.H=[],this.K=[],this.W=[],this.init()}return a.prototype.isPrime=function(a){var b,c,d;if(2===a||3===a||5===a||7===a)return!0;if(1===a||4===a||6===a||8===a||9===a)return!1;for(c=Math.ceil(Math.sqrt(a)),b=d=2;c>=2?c>=d:d>=c;b=c>=2?++d:--d)if(a%b===0)return!1;return!0},a.prototype.getFractionalBits=function(a){return 4294967296*(a-(0|a))|0},a.prototype.init=function(){var a,b,c;for(a=2,b=0,c=[];64>b;)this.isPrime(a)&&(8>b&&(this.H[b]=this.getFractionalBits(Math.pow(a,.5))),this.K[b]=this.getFractionalBits(Math.pow(a,1/3)),b++),c.push(a++);return c},a}(),g=new b,e=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return j(b,a),b.blockSize=16,b.prototype.blockSize=b.blockSize,b.output_size=32,b.prototype.output_size=b.output_size,b.prototype._doReset=function(){return this._hash=new f(g.H.slice(0))},b.prototype.get_output_size=function(){return this.output_size},b.prototype._doProcessBlock=function(a,b){var c,d,e,f,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;for(c=this._hash.words,e=g.W,d=g.K,f=c[0],h=c[1],i=c[2],k=c[3],l=c[4],m=c[5],n=c[6],s=c[7],t=z=0;64>z;t=++z)16>t?e[t]=0|a[b+t]:(p=e[t-15],o=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,r=e[t-2],q=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10,e[t]=o+e[t-7]+q+e[t-16]),j=l&m^~l&n,u=f&h^f&i^h&i,v=(f<<30|f>>>2)^(f<<19|f>>>13)^(f<<10|f>>>22),w=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),x=s+w+j+d[t]+e[t],y=v+u,s=n,n=m,m=l,l=k+x|0,k=i,i=h,h=f,f=x+y|0;return c[0]=c[0]+f|0,c[1]=c[1]+h|0,c[2]=c[2]+i|0,c[3]=c[3]+k|0,c[4]=c[4]+l|0,c[5]=c[5]+m|0,c[6]=c[6]+n|0,c[7]=c[7]+s|0},b.prototype._doFinalize=function(){var a,b,c,d;return a=this._data,b=a.words,d=8*this._nDataBytes,c=8*a.sigBytes,b[c>>>5]|=128<<24-c%32,b[(c+64>>>9<<4)+14]=Math.floor(d/4294967296),b[(c+64>>>9<<4)+15]=d,a.sigBytes=4*b.length,this._process(),this._hash},b.prototype.scrub=function(){return this._hash.scrub()},b.prototype.copy_to=function(a){return b.__super__.copy_to.call(this,a),a._hash=this._hash.clone()},b.prototype.clone=function(){var a;return a=new b,this.copy_to(a),a},b}(d),h=function(a){var b;return b=(new e).finalize(a),a.scrub(),b},c.SHA256=e,c.transform=h}).call(this)},{"./algbase":2,"./wordarray":24}],19:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k={}.hasOwnProperty,l=function(a,b){function c(){this.constructor=a}for(var d in b)k.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};j=a("./wordarray"),f=j.WordArray,g=j.X64Word,h=j.X64WordArray,d=a("./algbase").Hasher,b=function(){function a(){this.RHO_OFFSETS=[],this.PI_INDEXES=[],this.ROUND_CONSTANTS=[],this.T=[],this.compute_rho_offsets(),this.compute_pi_indexes(),this.compute_round_constants(),this.make_reusables()}return a.prototype.compute_rho_offsets=function(){var a,b,c,d,e,f,g;for(d=1,e=0,g=[],c=f=0;24>f;c=++f)this.RHO_OFFSETS[d+5*e]=(c+1)*(c+2)/2%64,a=e%5,b=(2*d+3*e)%5,d=a,g.push(e=b);return g},a.prototype.compute_pi_indexes=function(){var a,b,c,d;for(d=[],a=c=0;5>c;a=++c)d.push(function(){var c,d;for(d=[],b=c=0;5>c;b=++c)d.push(this.PI_INDEXES[a+5*b]=b+(2*a+3*b)%5*5);return d}.call(this));return d},a.prototype.compute_round_constants=function(){var a,b,c,d,e,f,h,i,j;for(a=1,j=[],c=h=0;24>h;c=++h){for(f=0,e=0,d=i=0;7>i;d=++i)1&a&&(b=(1<<d)-1,32>b?e^=1<<b:f^=1<<b-32),128&a?a=a<<1^113:a<<=1;j.push(this.ROUND_CONSTANTS[c]=new g(f,e))}return j},a.prototype.make_reusables=function(){var a;return this.T=function(){var b,c;for(c=[],a=b=0;25>b;a=++b)c.push(new g(0,0));return c}()},a}(),i=new b,c.SHA3=e=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return l(b,a),b.outputLength=512,b.prototype.outputLength=b.outputLength,b.blockSize=(1600-2*b.outputLength)/32,b.prototype.blockSize=b.blockSize,b.output_size=b.outputLength/8,b.prototype.output_size=b.output_size,b.prototype._doReset=function(){var a;return this._state=function(){var b,c;for(c=[],a=b=0;25>b;a=++b)c.push(new g(0,0));return c}()},b.prototype._doProcessBlock=function(a,b){var c,d,e,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O;for(c=i,z=this._state,v=this.blockSize/2,q=F=0;v>=0?v>F:F>v;q=v>=0?++F:--F)d=a[b+2*q],e=a[b+2*q+1],d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),e=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),r=z[q],r.high^=e,r.low^=d;for(O=[],x=G=0;24>G;x=++G){for(D=H=0;5>H;D=++H){for(C=B=0,E=I=0;5>I;E=++I)r=z[D+5*E],C^=r.high,B^=r.low;j=c.T[D],j.high=C,j.low=B}for(D=J=0;5>J;D=++J)for(p=c.T[(D+4)%5],k=c.T[(D+1)%5],n=k.high,m=k.low,C=p.high^(n<<1|m>>>31),B=p.low^(m<<1|n>>>31),E=K=0;5>K;E=++K)r=z[D+5*E],r.high^=C,r.low^=B;for(s=L=1;25>L;s=++L)r=z[s],u=r.high,t=r.low,w=c.RHO_OFFSETS[s],32>w?(C=u<<w|t>>>32-w,B=t<<w|u>>>32-w):(C=t<<w-32|u>>>64-w,B=u<<w-32|t>>>64-w),h=c.T[c.PI_INDEXES[s]],h.high=C,h.low=B;for(f=c.T[0],A=z[0],f.high=A.high,f.low=A.low,D=M=0;5>M;D=++M)for(E=N=0;5>N;E=++N)s=D+5*E,r=z[s],g=c.T[s],l=c.T[(D+1)%5+5*E],o=c.T[(D+2)%5+5*E],r.high=g.high^~l.high&o.high,r.low=g.low^~l.low&o.low;r=z[0],y=c.ROUND_CONSTANTS[x],r.high^=y.high,O.push(r.low^=y.low)}return O},b.prototype._doFinalize=function(){var a,b,c,d,e,g,h,i,j,k,l,m,n,o;for(b=this._data,c=b.words,k=8*this._nDataBytes,j=8*b.sigBytes,a=32*this.blockSize,c[j>>>5]|=1<<24-j%32,c[(Math.ceil((j+1)/a)*a>>>5)-1]|=128,b.sigBytes=4*c.length,this._process(),n=this._state,l=this.outputLength/8,m=l/8,d=[],e=o=0;m>=0?m>o:o>m;e=m>=0?++o:--o)g=n[e],i=g.high,h=g.low,i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),d.push(h),d.push(i);return new f(d,l)},b.prototype.copy_to=function(a){var c;return b.__super__.copy_to.call(this,a),a._state=function(){var a,b,d,e;for(d=this._state,e=[],a=0,b=d.length;b>a;a++)c=d[a],e.push(c.clone());return e}.call(this)},b.prototype.scrub=function(){},b.prototype.clone=function(){var a;return a=new b,this.copy_to(a),a},b}(d),c.transform=function(a){var b;return b=(new e).finalize(a),a.scrub(),b}}).call(this)},{"./algbase":2,"./wordarray":24}],20:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k={}.hasOwnProperty,l=function(a,b){function c(){this.constructor=a}for(var d in b)k.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=a("./wordarray"),g=i.X64WordArray,f=i.WordArray,j=a("./sha512"),e=j.SHA512,b=j.Global,d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return l(c,a),c.output_size=48,c.prototype.output_size=c.output_size,c.prototype._doReset=function(){return this._hash=new g(b.convert([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]))},c.prototype._doFinalize=function(){var a;return a=c.__super__._doFinalize.call(this),a.sigBytes-=16,a},c.prototype.clone=function(){var a;return a=new c,this.copy_to(a),a},c}(e),h=function(a){var b;return b=(new d).finalize(a),a.scrub(),b},c.SHA384=d,c.transform=h}).call(this)},{"./sha512":21,"./wordarray":24}],21:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=a("./wordarray"),f=i.X64Word,g=i.X64WordArray,d=a("./algbase").Hasher,b=function(){function a(){var a;this.K=this.convert([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]),this.I=new g(this.convert([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])),this.W=function(){var b,c;for(c=[],a=b=0;80>b;a=++b)c.push(new f(0,0));return c}()}return a.convert=function(a){var b,c,d,e;for(e=[],b=c=0,d=a.length;d>c;b=c+=2)e.push(new f(a[b],a[b+1]));return e},a.prototype.convert=function(b){return a.convert(b)},a}(),c.Global=b,h=new b,c.SHA512=e=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return k(b,a),b.blockSize=32,b.prototype.blockSize=b.blockSize,b.output_size=64,b.prototype.output_size=b.output_size,b.prototype._doReset=function(){return this._hash=h.I.clone()},b.prototype._doProcessBlock=function(a,b){var c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa;for(c=this._hash.words,F=h.W,d=c[0],g=c[1],k=c[2],n=c[3],q=c[4],t=c[5],w=c[6],z=c[7],e=d.high,f=d.low,i=g.high,j=g.low,l=k.high,m=k.low,o=n.high,p=n.low,r=q.high,s=q.low,u=t.high,v=t.low,x=w.high,y=w.low,A=z.high,B=z.low,P=e,Q=f,R=i,S=j,T=l,W=m,X=o,Y=p,Z=r,$=s,_=u,aa=v,la=x,ma=y,na=A,oa=B,pa=Aa=0;80>Aa;pa=++Aa)G=F[pa],16>pa?(N=G.high=0|a[b+2*pa],O=G.low=0|a[b+2*pa+1]):(da=F[pa-15],ea=da.high,fa=da.low,ba=(ea>>>1|fa<<31)^(ea>>>8|fa<<24)^ea>>>7,ca=(fa>>>1|ea<<31)^(fa>>>8|ea<<24)^(fa>>>7|ea<<25),ia=F[pa-2],ja=ia.high,ka=ia.low,ga=(ja>>>19|ka<<13)^(ja<<3|ka>>>29)^ja>>>6,ha=(ka>>>19|ja<<13)^(ka<<3|ja>>>29)^(ka>>>6|ja<<26),K=F[pa-7],L=K.high,M=K.low,H=F[pa-16],I=H.high,J=H.low,O=ca+M,N=ba+L+(ca>>>0>O>>>0?1:0),O+=ha,N=N+ga+(ha>>>0>O>>>0?1:0),O+=J,N=N+I+(J>>>0>O>>>0?1:0),G.high=N,G.low=O),U=Z&_^~Z&la,V=$&aa^~$&ma,qa=P&R^P&T^R&T,ra=Q&S^Q&W^S&W,sa=(P>>>28|Q<<4)^(P<<30|Q>>>2)^(P<<25|Q>>>7),ta=(Q>>>28|P<<4)^(Q<<30|P>>>2)^(Q<<25|P>>>7),ua=(Z>>>14|$<<18)^(Z>>>18|$<<14)^(Z<<23|$>>>9),va=($>>>14|Z<<18)^($>>>18|Z<<14)^($<<23|Z>>>9),C=h.K[pa],D=C.high,E=C.low,xa=oa+va,wa=na+ua+(oa>>>0>xa>>>0?1:0),xa+=V,wa=wa+U+(V>>>0>xa>>>0?1:0),xa+=E,wa=wa+D+(E>>>0>xa>>>0?1:0),xa+=O,wa=wa+N+(O>>>0>xa>>>0?1:0),za=ta+ra,ya=sa+qa+(ta>>>0>za>>>0?1:0),na=la,oa=ma,la=_,ma=aa,_=Z,aa=$,$=Y+xa|0,Z=X+wa+(Y>>>0>$>>>0?1:0)|0,X=T,Y=W,T=R,W=S,R=P,S=Q,Q=xa+za|0,P=wa+ya+(xa>>>0>Q>>>0?1:0)|0;return f=d.low=f+Q,d.high=e+P+(Q>>>0>f>>>0?1:0),j=g.low=j+S,g.high=i+R+(S>>>0>j>>>0?1:0),m=k.low=m+W,k.high=l+T+(W>>>0>m>>>0?1:0),p=n.low=p+Y,n.high=o+X+(Y>>>0>p>>>0?1:0),s=q.low=s+$,q.high=r+Z+($>>>0>s>>>0?1:0),v=t.low=v+aa,t.high=u+_+(aa>>>0>v>>>0?1:0),y=w.low=y+ma,w.high=x+la+(ma>>>0>y>>>0?1:0),B=z.low=B+oa,z.high=A+na+(oa>>>0>B>>>0?1:0)},b.prototype._doFinalize=function(){var a,b,c;return a=this._data.words,c=8*this._nDataBytes,b=8*this._data.sigBytes,a[b>>>5]|=128<<24-b%32,a[(b+128>>>10<<5)+30]=Math.floor(c/4294967296),a[(b+128>>>10<<5)+31]=c,this._data.sigBytes=4*a.length,this._process(),this._hash.toX32()},b.prototype.copy_to=function(a){return b.__super__.copy_to.call(this,a),a._hash=this._hash.clone()},b.prototype.clone=function(){var a;return a=new b,this.copy_to(a),a},b}(d),c.transform=function(a){var b;return b=(new e).finalize(a),a.scrub(),b}}).call(this)},{"./algbase":2,"./wordarray":24}],22:[function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=a("./algbase").BlockCipher,g=a("./util").scrub_vec,e=function(){function a(){this.P=[[169,103,179,232,4,253,163,118,154,146,128,120,228,221,209,56,13,198,53,152,24,247,236,108,67,117,55,38,250,19,148,72,242,208,139,48,132,84,223,35,25,91,61,89,243,174,162,130,99,1,131,46,217,81,155,124,166,235,165,190,22,12,227,97,192,140,58,245,115,44,37,11,187,78,137,107,83,106,180,241,225,230,189,69,226,244,182,102,204,149,3,86,212,28,30,215,251,195,142,181,233,207,191,186,234,119,57,175,51,201,98,113,129,121,9,173,36,205,249,216,229,197,185,77,68,8,134,231,161,29,170,237,6,112,178,210,65,123,160,17,49,194,39,144,32,246,96,255,150,92,177,171,158,156,82,27,95,147,10,239,145,133,73,238,45,79,143,59,71,135,109,70,214,62,105,100,42,206,203,47,252,151,5,122,172,127,213,26,75,14,167,90,40,20,63,41,136,60,76,2,184,218,176,23,85,31,138,125,87,199,141,116,183,196,159,114,126,21,34,18,88,7,153,52,110,80,222,104,101,188,219,248,200,168,43,64,220,254,50,164,202,16,33,240,211,93,15,0,111,157,54,66,74,94,193,224],[117,243,198,244,219,123,251,200,74,211,230,107,69,125,232,75,214,50,216,253,55,113,241,225,48,15,248,27,135,250,6,63,94,186,174,91,138,0,188,157,109,193,177,14,128,93,210,213,160,132,7,20,181,144,44,163,178,115,76,84,146,116,54,81,56,176,189,90,252,96,98,150,108,66,247,16,124,40,39,140,19,149,156,199,36,70,59,112,202,227,133,203,17,208,147,184,166,131,32,255,159,119,195,204,3,111,8,191,64,231,43,226,121,12,170,130,65,58,234,185,228,154,164,151,126,218,122,23,102,148,161,29,61,240,222,179,11,114,167,28,239,209,83,62,143,51,38,95,236,118,42,73,129,136,238,33,196,26,235,217,197,57,153,205,173,49,139,1,24,35,221,31,78,45,249,72,79,242,101,142,120,92,88,25,141,229,152,87,103,127,5,100,175,99,182,254,245,183,60,165,206,233,104,68,224,77,67,105,41,46,172,21,89,168,10,158,110,71,223,52,53,106,207,220,34,201,192,155,137,212,237,171,18,162,13,82,187,2,47,169,215,97,30,180,80,4,246,194,22,37,134,86,85,9,190,145]],this.P_00=1,this.P_01=0,this.P_02=0,this.P_03=1,this.P_04=1,this.P_10=0,this.P_11=0,this.P_12=1,this.P_13=1,this.P_14=0,this.P_20=1,this.P_21=1,this.P_22=0,this.P_23=0,this.P_24=0,this.P_30=0,this.P_31=1,this.P_32=1,this.P_33=0,this.P_34=1,this.GF256_FDBK=361,this.GF256_FDBK_2=this.GF256_FDBK/2,this.GF256_FDBK_4=this.GF256_FDBK/4,this.RS_GF_FDBK=333,this.SK_STEP=33686018,this.SK_BUMP=16843009,this.SK_ROTL=9}return a}(),d=new e,c.TwoFish=f=function(a){function b(a){this._key=a.clone(),this.gMDS0=[],this.gMDS1=[],this.gMDS2=[],this.gMDS3=[],this.gSubKeys=[],this.gSBox=[],this.k64Cnt=0,this._doReset()}return i(b,a),b.blockSize=16,b.prototype.blockSize=b.blockSize,b.keySize=32,b.prototype.keySize=b.keySize,b.ivSize=b.blockSize,b.prototype.ivSize=b.ivSize,b.prototype.getByte=function(a,b){return a>>>8*b&255},b.prototype.switchEndianness=function(a){return(255&a)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>24&255},b.prototype.LFSR1=function(a){return a>>1^(0!==(1&a)?d.GF256_FDBK_2:0)},b.prototype.LFSR2=function(a){return a>>2^(0!==(2&a)?d.GF256_FDBK_2:0)^(0!==(1&a)?d.GF256_FDBK_4:0)},b.prototype.Mx_X=function(a){return a^this.LFSR2(a)},b.prototype.Mx_Y=function(a){return a^this.LFSR1(a)^this.LFSR2(a)},b.prototype.RS_rem=function(a){var b,c,e;return b=a>>>24&255,c=255&(b<<1^(0!==(128&b)?d.RS_GF_FDBK:0)),e=b>>>1^(0!==(1&b)?d.RS_GF_FDBK>>>1:0)^c,a<<8^e<<24^c<<16^e<<8^b},b.prototype.RS_MDS_Encode=function(a,b){var c,d,e,f;for(d=b,c=e=0;4>e;c=++e)d=this.RS_rem(d);for(d^=a,c=f=0;4>f;c=++f)d=this.RS_rem(d);return d},b.prototype.F32=function(a,b){var c,e,f,g,h,i,j,k,l,m;return c=this.getByte(a,0),e=this.getByte(a,1),f=this.getByte(a,2),g=this.getByte(a,3),h=b[0],i=b[1],j=b[2],k=b[3],l=3&this.k64Cnt,m=1===l?this.gMDS0[255&d.P[d.P_01][c]^this.getByte(h,0)]^this.gMDS1[255&d.P[d.P_11][e]^this.getByte(h,1)]^this.gMDS2[255&d.P[d.P_21][f]^this.getByte(h,2)]^this.gMDS3[255&d.P[d.P_31][g]^this.getByte(h,3)]:(0===l?(c=255&d.P[d.P_04][c]^this.getByte(k,0),e=255&d.P[d.P_14][e]^this.getByte(k,1),f=255&d.P[d.P_24][f]^this.getByte(k,2),g=255&d.P[d.P_34][g]^this.getByte(k,3)):void 0,0===l||3===l?(c=255&d.P[d.P_03][c]^this.getByte(j,0),e=255&d.P[d.P_13][e]^this.getByte(j,1),f=255&d.P[d.P_23][f]^this.getByte(j,2),g=255&d.P[d.P_33][g]^this.getByte(j,3)):void 0,this.gMDS0[255&d.P[d.P_01][255&d.P[d.P_02][c]^this.getByte(i,0)]^this.getByte(h,0)]^this.gMDS1[255&d.P[d.P_11][255&d.P[d.P_12][e]^this.getByte(i,1)]^this.getByte(h,1)]^this.gMDS2[255&d.P[d.P_21][255&d.P[d.P_22][f]^this.getByte(i,2)]^this.getByte(h,2)]^this.gMDS3[255&d.P[d.P_31][255&d.P[d.P_32][g]^this.getByte(i,3)]^this.getByte(h,3)])},b.prototype.Fe32_0=function(a){return this.gSBox[0+2*(255&a)]^this.gSBox[1+2*(a>>>8&255)]^this.gSBox[512+2*(a>>>16&255)]^this.gSBox[513+2*(a>>>24&255)]},b.prototype.Fe32_3=function(a){return this.gSBox[0+2*(a>>>24&255)]^this.gSBox[1+2*(255&a)]^this.gSBox[512+2*(a>>>8&255)]^this.gSBox[513+2*(a>>>16&255)]},b.prototype._doReset=function(){var a,b,c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;if(n=[],o=[],v=[],q=[],r=[],s=[],this.k64Cnt=this._key.words.length/2,this.k64Cnt<1)throw"Key size less than 64 bits";if(this.k64Cnt>4)throw"Key size larger than 256 bits";for(h=w=0;256>w;h=++w)i=255&d.P[0][h],q[0]=i,r[0]=255&this.Mx_X(i),s[0]=255&this.Mx_Y(i),i=255&d.P[1][h],q[1]=i,r[1]=255&this.Mx_X(i),s[1]=255&this.Mx_Y(i),this.gMDS0[h]=q[d.P_00]|r[d.P_00]<<8|s[d.P_00]<<16|s[d.P_00]<<24,this.gMDS1[h]=s[d.P_10]|s[d.P_10]<<8|r[d.P_10]<<16|q[d.P_10]<<24,this.gMDS2[h]=r[d.P_20]|s[d.P_20]<<8|q[d.P_20]<<16|s[d.P_20]<<24,this.gMDS3[h]=r[d.P_30]|q[d.P_30]<<8|s[d.P_30]<<16|r[d.P_30]<<24;for(h=x=0,A=this.k64Cnt;A>=0?A>x:x>A;h=A>=0?++x:--x)t=2*h,n[h]=this.switchEndianness(this._key.words[t]),o[h]=this.switchEndianness(this._key.words[t+1]),v[this.k64Cnt-1-h]=this.RS_MDS_Encode(n[h],o[h]);for(h=y=0,B=20;B>=0?B>y:y>B;h=B>=0?++y:--y)u=h*d.SK_STEP,a=this.F32(u,n),b=this.F32(u+d.SK_BUMP,o),b=b<<8|b>>>24,a+=b,this.gSubKeys[2*h]=a,a+=b,this.gSubKeys[2*h+1]=a<<d.SK_ROTL|a>>>32-d.SK_ROTL;for(j=v[0],k=v[1],l=v[2],m=v[3],this.gSBox=[],C=[],h=z=0;256>z;h=++z)c=e=f=g=h,p=3&this.k64Cnt,1===p?(this.gSBox[2*h]=this.gMDS0[255&d.P[d.P_01][c]^this.getByte(j,0)],this.gSBox[2*h+1]=this.gMDS1[255&d.P[d.P_11][e]^this.getByte(j,1)],this.gSBox[2*h+512]=this.gMDS2[255&d.P[d.P_21][f]^this.getByte(j,2)],C.push(this.gSBox[2*h+513]=this.gMDS3[255&d.P[d.P_31][g]^this.getByte(j,3)])):(0===p&&(c=255&d.P[d.P_04][c]^this.getByte(m,0),e=255&d.P[d.P_14][e]^this.getByte(m,1),f=255&d.P[d.P_24][f]^this.getByte(m,2),g=255&d.P[d.P_34][g]^this.getByte(m,3)),(0===p||3===p)&&(c=255&d.P[d.P_03][c]^this.getByte(l,0),e=255&d.P[d.P_13][e]^this.getByte(l,1),f=255&d.P[d.P_23][f]^this.getByte(l,2),g=255&d.P[d.P_33][g]^this.getByte(l,3)),this.gSBox[2*h]=this.gMDS0[255&d.P[d.P_01][255&d.P[d.P_02][c]^this.getByte(k,0)]^this.getByte(j,0)],this.gSBox[2*h+1]=this.gMDS1[255&d.P[d.P_11][255&d.P[d.P_12][e]^this.getByte(k,1)]^this.getByte(j,1)],this.gSBox[2*h+512]=this.gMDS2[255&d.P[d.P_21][255&d.P[d.P_22][f]^this.getByte(k,2)]^this.getByte(j,2)],C.push(this.gSBox[2*h+513]=this.gMDS3[255&d.P[d.P_31][255&d.P[d.P_32][g]^this.getByte(k,3)]^this.getByte(j,3)]));return C},b.prototype.scrub=function(){return g(this.gSubKeys),g(this.gSBox),this._key.scrub()},b.prototype.decryptBlock=function(a,b){var c,d,e,f,g,h,i,j,k;for(null==b&&(b=0),i=this.switchEndianness(a[b])^this.gSubKeys[4],j=this.switchEndianness(a[b+1])^this.gSubKeys[5],g=this.switchEndianness(a[b+2])^this.gSubKeys[6],h=this.switchEndianness(a[b+3])^this.gSubKeys[7],c=39,d=k=0;16>k;d=k+=2)e=this.Fe32_0(i),f=this.Fe32_3(j),h^=e+2*f+this.gSubKeys[c--],g=(g<<1|g>>>31)^e+f+this.gSubKeys[c--],h=h>>>1|h<<31,e=this.Fe32_0(g),f=this.Fe32_3(h),j^=e+2*f+this.gSubKeys[c--],i=(i<<1|i>>>31)^e+f+this.gSubKeys[c--],j=j>>>1|j<<31;return a[b]=this.switchEndianness(g^this.gSubKeys[0]),a[b+1]=this.switchEndianness(h^this.gSubKeys[1]),a[b+2]=this.switchEndianness(i^this.gSubKeys[2]),a[b+3]=this.switchEndianness(j^this.gSubKeys[3])},b.prototype.encryptBlock=function(a,b){var c,d,e,f,g,h,i,j,k;for(null==b&&(b=0),g=this.switchEndianness(a[b])^this.gSubKeys[0],h=this.switchEndianness(a[b+1])^this.gSubKeys[1],i=this.switchEndianness(a[b+2])^this.gSubKeys[2],j=this.switchEndianness(a[b+3])^this.gSubKeys[3],c=8,d=k=0;16>k;d=k+=2)e=this.Fe32_0(g),f=this.Fe32_3(h),i^=e+f+this.gSubKeys[c++],i=i>>>1|i<<31,j=(j<<1|j>>>31)^e+2*f+this.gSubKeys[c++],e=this.Fe32_0(i),f=this.Fe32_3(j),g^=e+f+this.gSubKeys[c++],g=g>>>1|g<<31,h=(h<<1|h>>>31)^e+2*f+this.gSubKeys[c++];return a[b]=this.switchEndianness(i^this.gSubKeys[4]),a[b+1]=this.switchEndianness(j^this.gSubKeys[5]),a[b+2]=this.switchEndianness(g^this.gSubKeys[6]),a[b+3]=this.switchEndianness(h^this.gSubKeys[7])},b}(b)}).call(this)},{"./algbase":2,"./util":23}],23:[function(a,b,c){var d=a("__browserify_Buffer");(function(){var b,e,f,g,h;e=a("iced-runtime"),g=h=function(){},f=Math.pow(2,32),c.fixup_uint32=function(a){var b,c;return b=a>f||0>a?(c=Math.abs(a)%f,0>a?f-c:c):a},c.scrub_buffer=function(a){var b,c;for(c=a.length>>2,b=0;c>b;)a.writeUInt32LE(0,b),
b+=4;for(;b<a.length;)a.writeUInt8(0,b),b++;return!1},c.copy_buffer=function(a){var b,c,e,f;for(c=new d(a.length),b=e=0,f=a.length;f>=0?f>e:e>f;b=f>=0?++e:--e)c.writeUInt8(a.readUInt8(b),b);return c},c.scrub_vec=function(a){var b,c,d;for(b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)a[b]=0;return!1},c.default_delay=b=function(a,b,c){var d,f,g;g=h,d=e.findDeferral(arguments),function(a){return function(a){"undefined"!=typeof setImmediate&&null!==setImmediate?!function(a){f=new e.Deferrals(a,{parent:d,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),setImmediate(f.defer({lineno:45})),f._fulfill()}(a):!function(a){f=new e.Deferrals(a,{parent:d,filename:"/Users/max/src/keybase/triplesec/src/util.iced"}),setTimeout(f.defer({lineno:47}),1),f._fulfill()}(a)}}(this)(function(a){return function(){return c()}}(this))},c.buffer_cmp_ule=function(a,b){var c,d,e,f,g,h;for(e=f=0,c=a.length,d=b.length;c>e&&0===a.readUInt8(e);)e++;for(;d>f&&0===b.readUInt8(f);)f++;if(c-e>d-f)return 1;if(d-f>c-e)return-1;for(;c>e;){if((g=a.readUInt8(e))<(h=b.readUInt8(f)))return-1;if(g>h)return 1;e++,f++}return 0},c.bulk=function(a,c,d){var f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;w=h,u=e.findDeferral(arguments),s=c.update,k=c.finalize,i=c.default_n,j=d.delay,n=d.n,g=d.cb,t=d.what,p=d.progress_hook,l=0,m=0,r=Math.ceil(a/4),j||(j=b),n||(n=i),f=function(a){return"function"==typeof p?p({what:t,i:a,total:r}):void 0},f(0),function(a){return function(a){var b;(b=function(a){var c,d,g;return c=a,d=function(){return e.trampoline(function(){return b(a)})},g=d,(m=r-l)>0?(o=Math.min(n,m),s(l,l+o),f(l),function(a){v=new e.Deferrals(a,{parent:u,filename:"/Users/max/src/keybase/triplesec/src/util.iced",funcname:"bulk"}),j(l,r,v.defer({lineno:105})),v._fulfill()}(function(){return g(l+=o)}),void 0):c()})(a)}}(this)(function(a){return function(){return f(r),q=k(),g(q)}}(this))}}).call(this)},{__browserify_Buffer:26,"iced-runtime":34}],24:[function(a,b,c){var d=a("__browserify_Buffer");(function(){var b,e,f,g,h,i,j;j=a("./util"),g=function(a){var b,c,d,e;for(c=new Uint8Array(a.length),b=d=0,e=a.length;e>=0?e>d:d>e;b=e>=0?++d:--d)c[b]=a.readUInt8(b);return c},i=function(a){var b,c,e,f;for(c=new d(a.length),b=e=0,f=a.length;f>=0?f>e:e>f;b=f>=0?++e:--e)c.writeUInt8(a[b],b);return c},h=function(a){return a>>>24&255|(a>>>16&255)<<8|(a>>>8&255)<<16|(255&a)<<24},c.WordArray=b=function(){function a(a,b){this.words=a||[],this.sigBytes=null!=b?b:4*this.words.length}return a.prototype.concat=function(a){var b,c,d,e,f;if(e=a.words,d=a.sigBytes,this.clamp(),this.sigBytes%4)for(b=f=0;d>=0?d>f:f>d;b=d>=0?++f:--f)c=e[b>>>2]>>>24-b%4*8&255,this.words[this.sigBytes+b>>>2]|=c<<24-(this.sigBytes+b)%4*8;else this.words=this.words.concat(e);return this.sigBytes+=d,this},a.prototype.clamp=function(){return this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this},a.prototype.clone=function(){return new a(this.words.slice(0),this.sigBytes)},a.prototype.to_buffer=function(){var a,b,c,e,f,g,h;for(b=new d(this.sigBytes),c=0,h=this.words,f=0,g=h.length;g>f;f++)e=h[f],this.sigBytes-c>=4&&(e=j.fixup_uint32(e),b.writeUInt32BE(e,c),c+=4);for(;c<this.sigBytes;)a=this.words[c>>>2]>>>24-c%4*8&255,b.writeUInt8(a,c),c++;return b},a.prototype.endian_reverse=function(){var a,b,c,d,e;for(e=this.words,a=c=0,d=e.length;d>c;a=++c)b=e[a],this.words[a]=h(b);return this},a.prototype.split=function(b){var c,d,e;if(this.sigBytes%4!==0||this.words.length%b!==0)throw new Error("bad key alignment");return e=this.words.length/b,d=function(){var b,d,f;for(f=[],c=b=0,d=this.words.length;e>0?d>b:b>d;c=b+=e)f.push(new a(this.words.slice(c,c+e)));return f}.call(this)},a.prototype.to_utf8=function(){return this.to_buffer().toString("utf8")},a.prototype.to_hex=function(){return this.to_buffer().toString("hex")},a.prototype.to_ui8a=function(){return g(this.to_buffer())},a.alloc=function(b){return d.isBuffer(b)?a.from_buffer(b):"object"==typeof b&&b instanceof a?b:"string"==typeof b?a.from_hex(b):null},a.from_buffer=function(b){var c,d,e,f;for(f=[],e=0;b.length-e>=4;)f.push(b.readUInt32BE(e)),e+=4;if(e<b.length){for(d=0;e<b.length;)c=b.readUInt8(e),d|=c<<24-e%4*8,e++;d=j.fixup_uint32(d),f.push(d)}return new a(f,b.length)},a.from_buffer_le=function(b){var c,d,e,f;for(f=[],e=0;b.length-e>=4;)f.push(b.readUInt32LE(e)),e+=4;if(e<b.length){for(d=0;e<b.length;)c=b.readUInt8(e),d|=c<<e%4*8,e++;d=j.fixup_uint32(d),f.push(d)}return new a(f,b.length)},a.from_utf8=function(b){return a.from_buffer(new d(b,"utf8"))},a.from_utf8_le=function(b){return a.from_buffer_le(new d(b,"utf8"))},a.from_hex=function(b){return a.from_buffer(new d(b,"hex"))},a.from_hex_le=function(b){return a.from_buffer_le(new d(b,"hex"))},a.from_ui8a=function(b){return a.from_buffer(i(b))},a.from_i32a=function(b){return new a(Array.apply([],b))},a.prototype.equal=function(a){var b,c,d,e,f,g;if(c=!0,a.sigBytes!==this.sigBytes)c=!1;else for(g=this.words,b=e=0,f=g.length;f>e;b=++e)d=g[b],j.fixup_uint32(d)!==j.fixup_uint32(a.words[b])&&(c=!1);return c},a.prototype.xor=function(a,b){var c,d,e,f,g,h;if(c=b.dst_offset,f=b.src_offset,e=b.n_words,c||(c=0),f||(f=0),null==e&&(e=a.words.length-f),this.words.length<c+e)throw new Error("dest range exceeded ("+this.words.length+" < "+(c+e)+")");if(a.words.length<f+e)throw new Error("source range exceeded");for(d=h=0;e>=0?e>h:h>e;d=e>=0?++h:--h)g=this.words[c+d]^a.words[f+d],this.words[c+d]=j.fixup_uint32(g);return this},a.prototype.truncate=function(b){var c;if(!(b<=this.sigBytes))throw new Error("Cannot truncate: "+b+" > "+this.sigBytes);return c=Math.ceil(b/4),new a(this.words.slice(0,c),b)},a.prototype.unshift=function(b){var c;return this.words.length>=b?(c=this.words.splice(0,b),this.sigBytes-=4*b,new a(c)):null},a.prototype.is_scrubbed=function(){var a,b,c,d;for(d=this.words,b=0,c=d.length;c>b;b++)if(a=d[b],0!==a)return!1;return!0},a.prototype.scrub=function(){return j.scrub_vec(this.words)},a.prototype.cmp_ule=function(a){return j.buffer_cmp_ule(this.to_buffer(),a.to_buffer())},a.prototype.slice=function(b,c){var d,e;if(d=this.words.length,!(c>b&&d>=c))throw new Error("Bad WordArray slice ["+b+","+c+")] when only "+d+" avail");return e=4*(c-b),c===d&&(e-=4*d-this.sigBytes),new a(this.words.slice(b,c),e)},a}(),c.X64Word=e=function(){function a(a,b){this.high=a,this.low=b}return a.prototype.clone=function(){return new a(this.high,this.low)},a}(),c.X64WordArray=f=function(){function a(a,b){this.sigBytes=b,this.words=a||[],this.sigBytes||(this.sigBytes=8*this.words.length)}return a.prototype.toX32=function(){var a,c,d,e,f;for(a=[],f=this.words,d=0,e=f.length;e>d;d++)c=f[d],a.push(c.high),a.push(c.low);return new b(a,this.sigBytes)},a.prototype.clone=function(){var b;return new a(function(){var a,c,d,e;for(d=this.words,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b.clone());return e}.call(this),this.sigBytes)},a}(),c.buffer_to_ui8a=g,c.ui8a_to_buffer=i,c.endian_reverse=h}).call(this)},{"./util":23,__browserify_Buffer:26}],25:[function(a,b,c){"function"==typeof Object.create?b.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],26:[function(a,b,c){a=function d(b,c,e){function f(h,i){if(!c[h]){if(!b[h]){var j="function"==typeof a&&a;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=c[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,d,b,c,e)}return c[h].exports}for(var g="function"==typeof a&&a,h=0;h<e.length;h++)f(e[h]);return f}({PcZj9L:[function(a,b,c){function d(a,b){var c=typeof a;if("base64"===b&&"string"===c)for(a=ia(a);a.length%4!==0;)a+="=";var e;if("number"===c)e=na(a);else if("string"===c)e=d.byteLength(a,b);else{if("object"!==c)throw new Error("First argument needs to be a number, array or string.");e=na(a.length)}var f=la(new Ca(e));if(d.isBuffer(a))f.set(a);else if(oa(a))for(var g=0;e>g;g++)d.isBuffer(a)?f[g]=a.readUInt8(g):f[g]=a[g];else"string"===c&&f.write(a,0,b);return f}function e(a,b,c,e){c=Number(c)||0;var f=a.length-c;e?(e=Number(e),e>f&&(e=f)):e=f;var g=b.length;if(g%2!==0)throw new Error("Invalid hex string");e>g/2&&(e=g/2);for(var h=0;e>h;h++){var i=parseInt(b.substr(2*h,2),16);if(isNaN(i))throw new Error("Invalid hex string");a[c+h]=i}return d._charsWritten=2*h,h}function f(a,b,c,e){return d._charsWritten=ta(qa(b),a,c,e)}function g(a,b,c,e){return d._charsWritten=ta(ra(b),a,c,e)}function h(a,b,c,d){return g(a,b,c,d)}function i(a,b,c,e){return d._charsWritten=ta(sa(b),a,c,e)}function j(a,b,c,d){if(isFinite(b))isFinite(c)||(d=c,c=void 0);else{var j=d;d=b,b=c,c=j}b=Number(b)||0;var k=this.length-b;switch(c?(c=Number(c),c>k&&(c=k)):c=k,d=String(d||"utf8").toLowerCase()){case"hex":return e(this,a,b,c);case"utf8":case"utf-8":return f(this,a,b,c);case"ascii":return g(this,a,b,c);case"binary":return h(this,a,b,c);case"base64":return i(this,a,b,c);default:throw new Error("Unknown encoding")}}function k(a,b,c){var d=this instanceof ka?this._proxy:this;if(a=String(a||"utf8").toLowerCase(),b=Number(b)||0,c=void 0!==c?Number(c):c=d.length,c===b)return"";switch(a){case"hex":return r(d,b,c);case"utf8":case"utf-8":return o(d,b,c);case"ascii":return p(d,b,c);case"binary":return q(d,b,c);case"base64":return n(d,b,c);default:throw new Error("Unknown encoding")}}function l(){return{type:"Buffer",data:Array.prototype.slice.call(this,0)}}function m(a,b,c,d){var e=this;if(c||(c=0),d||0===d||(d=this.length),b||(b=0),d!==c&&0!==a.length&&0!==e.length){if(c>d)throw new Error("sourceEnd < sourceStart");if(0>b||b>=a.length)throw new Error("targetStart out of bounds");if(0>c||c>=e.length)throw new Error("sourceStart out of bounds");if(0>d||d>e.length)throw new Error("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-b<d-c&&(d=a.length-b+c);for(var f=0;d-c>f;f++)a[f+b]=this[f+c]}}function n(b,c,d){var e=b.slice(c,d);return a("base64-js").fromByteArray(e)}function o(a,b,c){for(var d=a.slice(b,c),e="",f="",g=0;g<d.length;)d[g]<=127?(e+=ua(f)+String.fromCharCode(d[g]),f=""):f+="%"+d[g].toString(16),g++;return e+ua(f)}function p(a,b,c){for(var d=a.slice(b,c),e="",f=0;f<d.length;f++)e+=String.fromCharCode(d[f]);return e}function q(a,b,c){return p(a,b,c)}function r(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=pa(a[f]);return e}function s(a,b){var c=this.length;return a=ma(a,c,0),b=ma(b,c,c),la(this.subarray(a,b))}function t(a,b){var c=this;return b||(ya(void 0!==a&&null!==a,"missing offset"),ya(a<c.length,"Trying to read beyond buffer length")),a>=c.length?void 0:c[a]}function u(a,b,c,d){d||(ya("boolean"==typeof c,"missing or invalid endian"),ya(void 0!==b&&null!==b,"missing offset"),ya(b+1<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){if(b+1===e){var f=new Aa(new Ba(2));return f.setUint8(0,a[e-1]),f.getUint16(0,c)}return a._dataview.getUint16(b,c)}}function v(a,b){return u(this,a,!0,b)}function w(a,b){return u(this,a,!1,b)}function x(a,b,c,d){d||(ya("boolean"==typeof c,"missing or invalid endian"),ya(void 0!==b&&null!==b,"missing offset"),ya(b+3<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){if(b+3>=e){for(var f=new Aa(new Ba(4)),g=0;e>g+b;g++)f.setUint8(g,a[g+b]);return f.getUint32(0,c)}return a._dataview.getUint32(b,c)}}function y(a,b){return x(this,a,!0,b)}function z(a,b){return x(this,a,!1,b)}function A(a,b){var c=this;return b||(ya(void 0!==a&&null!==a,"missing offset"),ya(a<c.length,"Trying to read beyond buffer length")),a>=c.length?void 0:c._dataview.getInt8(a)}function B(a,b,c,d){d||(ya("boolean"==typeof c,"missing or invalid endian"),ya(void 0!==b&&null!==b,"missing offset"),ya(b+1<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){if(b+1===e){var f=new Aa(new Ba(2));return f.setUint8(0,a[e-1]),f.getInt16(0,c)}return a._dataview.getInt16(b,c)}}function C(a,b){return B(this,a,!0,b)}function D(a,b){return B(this,a,!1,b)}function E(a,b,c,d){d||(ya("boolean"==typeof c,"missing or invalid endian"),ya(void 0!==b&&null!==b,"missing offset"),ya(b+3<a.length,"Trying to read beyond buffer length"));var e=a.length;if(!(b>=e)){if(b+3>=e){for(var f=new Aa(new Ba(4)),g=0;e>g+b;g++)f.setUint8(g,a[g+b]);return f.getInt32(0,c)}return a._dataview.getInt32(b,c)}}function F(a,b){return E(this,a,!0,b)}function G(a,b){return E(this,a,!1,b)}function H(a,b,c,d){return d||(ya("boolean"==typeof c,"missing or invalid endian"),ya(b+3<a.length,"Trying to read beyond buffer length")),a._dataview.getFloat32(b,c)}function I(a,b){return H(this,a,!0,b)}function J(a,b){return H(this,a,!1,b)}function K(a,b,c,d){return d||(ya("boolean"==typeof c,"missing or invalid endian"),ya(b+7<a.length,"Trying to read beyond buffer length")),a._dataview.getFloat64(b,c)}function L(a,b){return K(this,a,!0,b)}function M(a,b){return K(this,a,!1,b)}function N(a,b,c){var d=this;c||(ya(void 0!==a&&null!==a,"missing value"),ya(void 0!==b&&null!==b,"missing offset"),ya(b<d.length,"trying to write beyond buffer length"),va(a,255)),b>=d.length||(d[b]=a)}function O(a,b,c,d,e){e||(ya(void 0!==b&&null!==b,"missing value"),ya("boolean"==typeof d,"missing or invalid endian"),ya(void 0!==c&&null!==c,"missing offset"),ya(c+1<a.length,"trying to write beyond buffer length"),va(b,65535));var f=a.length;if(!(c>=f))if(c+1===f){var g=new Aa(new Ba(2));g.setUint16(0,b,d),a[c]=g.getUint8(0)}else a._dataview.setUint16(c,b,d)}function P(a,b,c){O(this,a,b,!0,c)}function Q(a,b,c){O(this,a,b,!1,c)}function R(a,b,c,d,e){e||(ya(void 0!==b&&null!==b,"missing value"),ya("boolean"==typeof d,"missing or invalid endian"),ya(void 0!==c&&null!==c,"missing offset"),ya(c+3<a.length,"trying to write beyond buffer length"),va(b,4294967295));var f=a.length;if(!(c>=f))if(c+3>=f){var g=new Aa(new Ba(4));g.setUint32(0,b,d);for(var h=0;f>h+c;h++)a[h+c]=g.getUint8(h)}else a._dataview.setUint32(c,b,d)}function S(a,b,c){R(this,a,b,!0,c)}function T(a,b,c){R(this,a,b,!1,c)}function U(a,b,c){var d=this;c||(ya(void 0!==a&&null!==a,"missing value"),ya(void 0!==b&&null!==b,"missing offset"),ya(b<d.length,"Trying to write beyond buffer length"),wa(a,127,-128)),b>=d.length||d._dataview.setInt8(b,a)}function V(a,b,c,d,e){e||(ya(void 0!==b&&null!==b,"missing value"),ya("boolean"==typeof d,"missing or invalid endian"),ya(void 0!==c&&null!==c,"missing offset"),ya(c+1<a.length,"Trying to write beyond buffer length"),wa(b,32767,-32768));var f=a.length;if(!(c>=f))if(c+1===f){var g=new Aa(new Ba(2));g.setInt16(0,b,d),a[c]=g.getUint8(0)}else a._dataview.setInt16(c,b,d)}function W(a,b,c){V(this,a,b,!0,c)}function X(a,b,c){V(this,a,b,!1,c)}function Y(a,b,c,d,e){e||(ya(void 0!==b&&null!==b,"missing value"),ya("boolean"==typeof d,"missing or invalid endian"),ya(void 0!==c&&null!==c,"missing offset"),ya(c+3<a.length,"Trying to write beyond buffer length"),wa(b,2147483647,-2147483648));var f=a.length;if(!(c>=f))if(c+3>=f){var g=new Aa(new Ba(4));g.setInt32(0,b,d);for(var h=0;f>h+c;h++)a[h+c]=g.getUint8(h)}else a._dataview.setInt32(c,b,d)}function Z(a,b,c){Y(this,a,b,!0,c)}function $(a,b,c){Y(this,a,b,!1,c)}function _(a,b,c,d,e){e||(ya(void 0!==b&&null!==b,"missing value"),ya("boolean"==typeof d,"missing or invalid endian"),ya(void 0!==c&&null!==c,"missing offset"),ya(c+3<a.length,"Trying to write beyond buffer length"),xa(b,3.4028234663852886e38,-3.4028234663852886e38));var f=a.length;if(!(c>=f))if(c+3>=f){var g=new Aa(new Ba(4));g.setFloat32(0,b,d);for(var h=0;f>h+c;h++)a[h+c]=g.getUint8(h)}else a._dataview.setFloat32(c,b,d)}function aa(a,b,c){_(this,a,b,!0,c)}function ba(a,b,c){_(this,a,b,!1,c)}function ca(a,b,c,d,e){e||(ya(void 0!==b&&null!==b,"missing value"),ya("boolean"==typeof d,"missing or invalid endian"),ya(void 0!==c&&null!==c,"missing offset"),ya(c+7<a.length,"Trying to write beyond buffer length"),xa(b,1.7976931348623157e308,-1.7976931348623157e308));var f=a.length;if(!(c>=f))if(c+7>=f){var g=new Aa(new Ba(8));g.setFloat64(0,b,d);for(var h=0;f>h+c;h++)a[h+c]=g.getUint8(h)}else a._dataview.setFloat64(c,b,d)}function da(a,b,c){ca(this,a,b,!0,c)}function ea(a,b,c){ca(this,a,b,!1,c)}function fa(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),"string"==typeof a&&(a=a.charCodeAt(0)),"number"!=typeof a||isNaN(a))throw new Error("value is not a number");if(b>c)throw new Error("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new Error("start out of bounds");if(0>c||c>this.length)throw new Error("end out of bounds");for(var d=b;c>d;d++)this[d]=a}}function ga(){for(var a=[],b=this.length,d=0;b>d;d++)if(a[d]=pa(this[d]),d===c.INSPECT_MAX_BYTES){a[d+1]="...";break}return"<Buffer "+a.join(" ")+">"}function ha(){return new d(this).buffer}function ia(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function ja(){var a=new Ca(0);a.foo=function(){return 42};try{return 42===a.foo()}catch(b){return!1}}function ka(a){this._arr=a,0!==a.byteLength&&(this._dataview=new Aa(a.buffer,a.byteOffset,a.byteLength))}function la(a){if(void 0===Da&&(Da=ja()),Da)return a.write=j,a.toString=k,a.toLocaleString=k,a.toJSON=l,a.copy=m,a.slice=s,a.readUInt8=t,a.readUInt16LE=v,a.readUInt16BE=w,a.readUInt32LE=y,a.readUInt32BE=z,a.readInt8=A,a.readInt16LE=C,a.readInt16BE=D,a.readInt32LE=F,a.readInt32BE=G,a.readFloatLE=I,a.readFloatBE=J,a.readDoubleLE=L,a.readDoubleBE=M,a.writeUInt8=N,a.writeUInt16LE=P,a.writeUInt16BE=Q,a.writeUInt32LE=S,a.writeUInt32BE=T,a.writeInt8=U,a.writeInt16LE=W,a.writeInt16BE=X,a.writeInt32LE=Z,a.writeInt32BE=$,a.writeFloatLE=aa,a.writeFloatBE=ba,a.writeDoubleLE=da,a.writeDoubleBE=ea,a.fill=fa,a.inspect=ga,a.toArrayBuffer=ha,a._isBuffer=!0,0!==a.byteLength&&(a._dataview=new Aa(a.buffer,a.byteOffset,a.byteLength)),a;var b=new ka(a),c=new Proxy(b,Ea);return b._proxy=c,c}function ma(a,b,c){return"number"!=typeof a?c:(a=~~a,a>=b?b:a>=0?a:(a+=b,a>=0?a:0))}function na(a){return a=~~Math.ceil(+a),0>a?0:a}function oa(a){return Array.isArray(a)||d.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function pa(a){return 16>a?"0"+a.toString(16):a.toString(16)}function qa(a){for(var b=[],c=0;c<a.length;c++)if(a.charCodeAt(c)<=127)b.push(a.charCodeAt(c));else for(var d=encodeURIComponent(a.charAt(c)).substr(1).split("%"),e=0;e<d.length;e++)b.push(parseInt(d[e],16));return b}function ra(a){for(var b=[],c=0;c<a.length;c++)b.push(255&a.charCodeAt(c));return b}function sa(b){return a("base64-js").toByteArray(b)}function ta(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);)b[e+c]=a[e],e++;return e}function ua(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function va(a,b){ya("number"==typeof a,"cannot write a non-number as a number"),ya(a>=0,"specified a negative value for writing an unsigned value"),ya(b>=a,"value is larger than maximum value for type"),ya(Math.floor(a)===a,"value has a fractional component")}function wa(a,b,c){ya("number"==typeof a,"cannot write a non-number as a number"),ya(b>=a,"value larger than maximum allowed value"),ya(a>=c,"value smaller than minimum allowed value"),ya(Math.floor(a)===a,"value has a fractional component")}function xa(a,b,c){ya("number"==typeof a,"cannot write a non-number as a number"),ya(b>=a,"value larger than maximum allowed value"),ya(a>=c,"value smaller than minimum allowed value")}function ya(a,b){if(!a)throw new Error(b||"Failed assertion")}var za=a("typedarray"),Aa="undefined"==typeof DataView?za.DataView:DataView,Ba="undefined"==typeof ArrayBuffer?za.ArrayBuffer:ArrayBuffer,Ca="undefined"==typeof Uint8Array?za.Uint8Array:Uint8Array;c.Buffer=d,c.SlowBuffer=d,c.INSPECT_MAX_BYTES=50,d.poolSize=8192;var Da;d.isEncoding=function(a){switch((a+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},d.isBuffer=function(a){return a&&a._isBuffer},d.byteLength=function(a,b){switch(b||"utf8"){case"hex":return a.length/2;case"utf8":case"utf-8":return qa(a).length;case"ascii":case"binary":return a.length;case"base64":return sa(a).length;default:throw new Error("Unknown encoding")}},d.concat=function(a,b){if(!Array.isArray(a))throw new Error("Usage: Buffer.concat(list, [totalLength])\nlist should be an Array.");var c,e;if(0===a.length)return new d(0);if(1===a.length)return a[0];if("number"!=typeof b)for(b=0,c=0;c<a.length;c++)e=a[c],b+=e.length;var f=new d(b),g=0;for(c=0;c<a.length;c++)e=a[c],e.copy(f,g),g+=e.length;return f},ka.prototype.write=j,ka.prototype.toString=k,ka.prototype.toLocaleString=k,ka.prototype.toJSON=l,ka.prototype.copy=m,ka.prototype.slice=s,ka.prototype.readUInt8=t,ka.prototype.readUInt16LE=v,ka.prototype.readUInt16BE=w,ka.prototype.readUInt32LE=y,ka.prototype.readUInt32BE=z,ka.prototype.readInt8=A,ka.prototype.readInt16LE=C,ka.prototype.readInt16BE=D,ka.prototype.readInt32LE=F,ka.prototype.readInt32BE=G,ka.prototype.readFloatLE=I,ka.prototype.readFloatBE=J,ka.prototype.readDoubleLE=L,ka.prototype.readDoubleBE=M,ka.prototype.writeUInt8=N,ka.prototype.writeUInt16LE=P,ka.prototype.writeUInt16BE=Q,ka.prototype.writeUInt32LE=S,ka.prototype.writeUInt32BE=T,ka.prototype.writeInt8=U,ka.prototype.writeInt16LE=W,ka.prototype.writeInt16BE=X,ka.prototype.writeInt32LE=Z,ka.prototype.writeInt32BE=$,ka.prototype.writeFloatLE=aa,ka.prototype.writeFloatBE=ba,ka.prototype.writeDoubleLE=da,ka.prototype.writeDoubleBE=ea,ka.prototype.fill=fa,ka.prototype.inspect=ga,ka.prototype.toArrayBuffer=ha,ka.prototype._isBuffer=!0,ka.prototype.subarray=function(){return this._arr.subarray.apply(this._arr,arguments)},ka.prototype.set=function(){return this._arr.set.apply(this._arr,arguments)};var Ea={get:function(a,b){return b in a?a[b]:a._arr[b]},set:function(a,b,c){a._arr[b]=c}}},{"base64-js":3,typedarray:4}],"native-buffer-browserify":[function(a,b,c){b.exports=a("PcZj9L")},{}],3:[function(a,b,c){!function(a){"use strict";function c(a){var b,c,d,f,g,h;if(a.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(g=a.indexOf("="),g=g>0?a.length-g:0,h=[],d=g>0?a.length-4:a.length,b=0,c=0;d>b;b+=4,c+=3)f=e.indexOf(a[b])<<18|e.indexOf(a[b+1])<<12|e.indexOf(a[b+2])<<6|e.indexOf(a[b+3]),h.push((16711680&f)>>16),h.push((65280&f)>>8),h.push(255&f);return 2===g?(f=e.indexOf(a[b])<<2|e.indexOf(a[b+1])>>4,h.push(255&f)):1===g&&(f=e.indexOf(a[b])<<10|e.indexOf(a[b+1])<<4|e.indexOf(a[b+2])>>2,h.push(f>>8&255),h.push(255&f)),h}function d(a){function b(a){return e[a>>18&63]+e[a>>12&63]+e[a>>6&63]+e[63&a]}var c,d,f,g=a.length%3,h="";for(c=0,f=a.length-g;f>c;c+=3)d=(a[c]<<16)+(a[c+1]<<8)+a[c+2],h+=b(d);switch(g){case 1:d=a[a.length-1],h+=e[d>>2],h+=e[d<<4&63],h+="==";break;case 2:d=(a[a.length-2]<<8)+a[a.length-1],h+=e[d>>10],h+=e[d>>4&63],h+=e[d<<2&63],h+="="}return h}var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.exports.toByteArray=c,b.exports.fromByteArray=d}()},{}],4:[function(a,b,c){function d(a){if(L&&K){var b,c=L(a);for(b=0;b<c.length;b+=1)K(a,c[b],{value:a[c[b]],writable:!1,enumerable:!1,configurable:!1})}}function e(a){function b(b){K(a,b,{get:function(){return a._getter(b)},set:function(c){a._setter(b,c)},enumerable:!0,configurable:!1})}if(K){if(a.length>B)throw new RangeError("Array too large for polyfill");var c;for(c=0;c<a.length;c+=1)b(c)}}function f(a,b){var c=32-b;return a<<c>>c}function g(a,b){var c=32-b;return a<<c>>>c}function h(a){return[255&a]}function i(a){return f(a[0],8)}function j(a){return[255&a]}function k(a){return g(a[0],8)}function l(a){return a=J(Number(a)),[0>a?0:a>255?255:255&a]}function m(a){return[a>>8&255,255&a]}function n(a){return f(a[0]<<8|a[1],16)}function o(a){return[a>>8&255,255&a]}function p(a){return g(a[0]<<8|a[1],16)}function q(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}function r(a){return f(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function s(a){return[a>>24&255,a>>16&255,a>>8&255,255&a]}function t(a){return g(a[0]<<24|a[1]<<16|a[2]<<8|a[3],32)}function u(a,b,c){function d(a){var b=F(a),c=a-b;return.5>c?b:c>.5?b+1:b%2?b+1:b}var e,f,g,h,i,j,k,l=(1<<b-1)-1;for(a!==a?(f=(1<<b)-1,g=I(2,c-1),e=0):a===1/0||a===-(1/0)?(f=(1<<b)-1,g=0,e=0>a?1:0):0===a?(f=0,g=0,e=1/a===-(1/0)?1:0):(e=0>a,a=E(a),a>=I(2,1-l)?(f=H(F(G(a)/D),1023),g=d(a/I(2,f)*I(2,c)),g/I(2,c)>=2&&(f+=1,g=1),f>l?(f=(1<<b)-1,g=0):(f+=l,g-=I(2,c))):(f=0,g=d(a/I(2,1-l-c)))),i=[],h=c;h;h-=1)i.push(g%2?1:0),g=F(g/2);for(h=b;h;h-=1)i.push(f%2?1:0),f=F(f/2);for(i.push(e?1:0),i.reverse(),j=i.join(""),k=[];j.length;)k.push(parseInt(j.substring(0,8),2)),j=j.substring(8);return k}function v(a,b,c){var d,e,f,g,h,i,j,k,l=[];for(d=a.length;d;d-=1)for(f=a[d-1],e=8;e;e-=1)l.push(f%2?1:0),f>>=1;return l.reverse(),g=l.join(""),h=(1<<b-1)-1,i=parseInt(g.substring(0,1),2)?-1:1,j=parseInt(g.substring(1,1+b),2),k=parseInt(g.substring(1+b),2),j===(1<<b)-1?0!==k?NaN:i*(1/0):j>0?i*I(2,j-h)*(1+k/I(2,c)):0!==k?i*I(2,-(h-1))*(k/I(2,c)):0>i?-0:0}function w(a){return v(a,11,52)}function x(a){return u(a,11,52)}function y(a){return v(a,8,23)}function z(a){return u(a,8,23)}var A=void 0,B=1e5,C=function(){var a=Object.prototype.toString,b=Object.prototype.hasOwnProperty;return{Class:function(b){return a.call(b).replace(/^\[object *|\]$/g,"")},HasProperty:function(a,b){return b in a},HasOwnProperty:function(a,c){return b.call(a,c)},IsCallable:function(a){return"function"==typeof a},ToInt32:function(a){return a>>0},ToUint32:function(a){return a>>>0}}}(),D=Math.LN2,E=Math.abs,F=Math.floor,G=Math.log,H=Math.min,I=Math.pow,J=Math.round,K=Object.defineProperty||function(a,b,c){if(!a===Object(a))throw new TypeError("Object.defineProperty called on non-object");return C.HasProperty(c,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(a,b,c.get),C.HasProperty(c,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(a,b,c.set),C.HasProperty(c,"value")&&(a[b]=c.value),a},L=Object.getOwnPropertyNames||function(a){if(a!==Object(a))throw new TypeError("Object.getOwnPropertyNames called on non-object");var b,c=[];for(b in a)C.HasOwnProperty(a,b)&&c.push(b);return c};!function(){function a(a,c,g){var h;return h=function(a,c,f){var g,i,j,k;if(arguments.length&&"number"!=typeof arguments[0])if("object"==typeof arguments[0]&&arguments[0].constructor===h)for(g=arguments[0],this.length=g.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new b(this.byteLength),this.byteOffset=0,j=0;j<this.length;j+=1)this._setter(j,g._getter(j));else if("object"!=typeof arguments[0]||(arguments[0]instanceof b||"ArrayBuffer"===C.Class(arguments[0]))){if("object"!=typeof arguments[0]||!(arguments[0]instanceof b||"ArrayBuffer"===C.Class(arguments[0])))throw new TypeError("Unexpected argument type(s)");if(this.buffer=a,this.byteOffset=C.ToUint32(c),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=C.ToUint32(f),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(i=arguments[0],this.length=C.ToUint32(i.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new b(this.byteLength),this.byteOffset=0,j=0;j<this.length;j+=1)k=i[j],this._setter(j,Number(k));else{if(this.length=C.ToInt32(arguments[0]),0>f)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new b(this.byteLength),this.byteOffset=0}this.constructor=h,d(this),e(this)},h.prototype=new f,h.prototype.BYTES_PER_ELEMENT=a,h.prototype._pack=c,h.prototype._unpack=g,h.BYTES_PER_ELEMENT=a,h.prototype._getter=function(a){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(a=C.ToUint32(a),a>=this.length)return A;var b,c,d=[];for(b=0,c=this.byteOffset+a*this.BYTES_PER_ELEMENT;b<this.BYTES_PER_ELEMENT;b+=1,c+=1)d.push(this.buffer._bytes[c]);return this._unpack(d)},h.prototype.get=h.prototype._getter,h.prototype._setter=function(a,b){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if(a=C.ToUint32(a),a>=this.length)return A;var c,d,e=this._pack(b);for(c=0,d=this.byteOffset+a*this.BYTES_PER_ELEMENT;c<this.BYTES_PER_ELEMENT;c+=1,d+=1)this.buffer._bytes[d]=e[c]},h.prototype.set=function(a,b){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var c,d,e,f,g,h,i,j,k,l;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(c=arguments[0],e=C.ToUint32(arguments[1]),e+c.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(j=this.byteOffset+e*this.BYTES_PER_ELEMENT,k=c.length*this.BYTES_PER_ELEMENT,c.buffer===this.buffer){for(l=[],g=0,h=c.byteOffset;k>g;g+=1,h+=1)l[g]=c.buffer._bytes[h];for(g=0,i=j;k>g;g+=1,i+=1)this.buffer._bytes[i]=l[g]}else for(g=0,h=c.byteOffset,i=j;k>g;g+=1,h+=1,i+=1)this.buffer._bytes[i]=c.buffer._bytes[h]}else{if("object"!=typeof arguments[0]||"undefined"==typeof arguments[0].length)throw new TypeError("Unexpected argument type(s)");if(d=arguments[0],f=C.ToUint32(d.length),e=C.ToUint32(arguments[1]),e+f>this.length)throw new RangeError("Offset plus length of array is out of range");for(g=0;f>g;g+=1)h=d[g],this._setter(e+g,Number(h))}},h.prototype.subarray=function(a,b){function c(a,b,c){return b>a?b:a>c?c:a}a=C.ToInt32(a),b=C.ToInt32(b),arguments.length<1&&(a=0),arguments.length<2&&(b=this.length),0>a&&(a=this.length+a),0>b&&(b=this.length+b),a=c(a,0,this.length),b=c(b,0,this.length);var d=b-a;return 0>d&&(d=0),new this.constructor(this.buffer,this.byteOffset+a*this.BYTES_PER_ELEMENT,d)},h}var b=function(a){if(a=C.ToInt32(a),0>a)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=a,this._bytes=[],this._bytes.length=a;var b;for(b=0;b<this.byteLength;b+=1)this._bytes[b]=0;d(this)};c.ArrayBuffer=c.ArrayBuffer||b;var f=function(){},g=a(1,h,i),u=a(1,j,k),v=a(1,l,k),B=a(2,m,n),D=a(2,o,p),E=a(4,q,r),F=a(4,s,t),G=a(4,z,y),H=a(8,x,w);c.Int8Array=c.Int8Array||g,c.Uint8Array=c.Uint8Array||u,c.Uint8ClampedArray=c.Uint8ClampedArray||v,c.Int16Array=c.Int16Array||B,c.Uint16Array=c.Uint16Array||D,c.Int32Array=c.Int32Array||E,c.Uint32Array=c.Uint32Array||F,c.Float32Array=c.Float32Array||G,c.Float64Array=c.Float64Array||H}(),function(){function a(a,b){return C.IsCallable(a.get)?a.get(b):a[b]}function b(b){return function(c,d){if(c=C.ToUint32(c),c+b.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");c+=this.byteOffset;var e,g=new Uint8Array(this.buffer,c,b.BYTES_PER_ELEMENT),h=[];for(e=0;e<b.BYTES_PER_ELEMENT;e+=1)h.push(a(g,e));return Boolean(d)===Boolean(f)&&h.reverse(),a(new b(new Uint8Array(h).buffer),0)}}function e(b){return function(c,d,e){if(c=C.ToUint32(c),c+b.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var g,h,i=new b([d]),j=new Uint8Array(i.buffer),k=[];for(g=0;g<b.BYTES_PER_ELEMENT;g+=1)k.push(a(j,g));Boolean(e)===Boolean(f)&&k.reverse(),h=new Uint8Array(this.buffer,c,b.BYTES_PER_ELEMENT),h.set(k)}}var f=function(){var b=new c.Uint16Array([4660]),d=new c.Uint8Array(b.buffer);return 18===a(d,0)}(),g=function(a,b,c){if(0===arguments.length)a=new ArrayBuffer(0);else if(!(a instanceof ArrayBuffer||"ArrayBuffer"===C.Class(a)))throw new TypeError("TypeError");if(this.buffer=a||new ArrayBuffer(0),this.byteOffset=C.ToUint32(b),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");
if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=C.ToUint32(c),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");d(this)};g.prototype.getUint8=b(c.Uint8Array),g.prototype.getInt8=b(c.Int8Array),g.prototype.getUint16=b(c.Uint16Array),g.prototype.getInt16=b(c.Int16Array),g.prototype.getUint32=b(c.Uint32Array),g.prototype.getInt32=b(c.Int32Array),g.prototype.getFloat32=b(c.Float32Array),g.prototype.getFloat64=b(c.Float64Array),g.prototype.setUint8=e(c.Uint8Array),g.prototype.setInt8=e(c.Int8Array),g.prototype.setUint16=e(c.Uint16Array),g.prototype.setInt16=e(c.Int16Array),g.prototype.setUint32=e(c.Uint32Array),g.prototype.setInt32=e(c.Int32Array),g.prototype.setFloat32=e(c.Float32Array),g.prototype.setFloat64=e(c.Float64Array),c.DataView=c.DataView||g}()},{}]},{},[]),b.exports=a("native-buffer-browserify").Buffer},{}],27:[function(a,b,c){var d=b.exports={};d.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],28:[function(a,b,c){b.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},{}],29:[function(a,b,c){function d(a,b){var d={seen:[],stylize:f};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),o(b)?d.showHidden=b:b&&c._extend(d,b),u(d.showHidden)&&(d.showHidden=!1),u(d.depth)&&(d.depth=2),u(d.colors)&&(d.colors=!1),u(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=e),h(d,a,d.depth)}function e(a,b){var c=d.styles[b];return c?"["+d.colors[c][0]+"m"+a+"["+d.colors[c][1]+"m":a}function f(a,b){return a}function g(a){var b={};return a.forEach(function(a,c){b[a]=!0}),b}function h(a,b,d){if(a.customInspect&&b&&z(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d,a);return s(e)||(e=h(a,e,d)),e}var f=i(a,b);if(f)return f;var o=Object.keys(b),p=g(o);if(a.showHidden&&(o=Object.getOwnPropertyNames(b)),y(b)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return j(b);if(0===o.length){if(z(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(v(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(x(b))return a.stylize(Date.prototype.toString.call(b),"date");if(y(b))return j(b)}var r="",t=!1,u=["{","}"];if(n(b)&&(t=!0,u=["[","]"]),z(b)){var w=b.name?": "+b.name:"";r=" [Function"+w+"]"}if(v(b)&&(r=" "+RegExp.prototype.toString.call(b)),x(b)&&(r=" "+Date.prototype.toUTCString.call(b)),y(b)&&(r=" "+j(b)),0===o.length&&(!t||0==b.length))return u[0]+r+u[1];if(0>d)return v(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var A;return A=t?k(a,b,d,p,o):o.map(function(c){return l(a,b,d,p,c,t)}),a.seen.pop(),m(A,r,u)}function i(a,b){if(u(b))return a.stylize("undefined","undefined");if(s(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return r(b)?a.stylize(""+b,"number"):o(b)?a.stylize(""+b,"boolean"):p(b)?a.stylize("null","null"):void 0}function j(a){return"["+Error.prototype.toString.call(a)+"]"}function k(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)E(b,String(g))?f.push(l(a,b,c,d,String(g),!0)):f.push("");return e.forEach(function(e){e.match(/^\d+$/)||f.push(l(a,b,c,d,e,!0))}),f}function l(a,b,c,d,e,f){var g,i,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?i=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(i=a.stylize("[Setter]","special")),E(d,e)||(g="["+e+"]"),i||(a.seen.indexOf(j.value)<0?(i=p(c)?h(a,j.value,null):h(a,j.value,c-1),i.indexOf("\n")>-1&&(i=f?i.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+i.split("\n").map(function(a){return" "+a}).join("\n"))):i=a.stylize("[Circular]","special")),u(g)){if(f&&e.match(/^\d+$/))return i;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+i}function m(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function n(a){return Array.isArray(a)}function o(a){return"boolean"==typeof a}function p(a){return null===a}function q(a){return null==a}function r(a){return"number"==typeof a}function s(a){return"string"==typeof a}function t(a){return"symbol"==typeof a}function u(a){return void 0===a}function v(a){return w(a)&&"[object RegExp]"===B(a)}function w(a){return"object"==typeof a&&null!==a}function x(a){return w(a)&&"[object Date]"===B(a)}function y(a){return w(a)&&("[object Error]"===B(a)||a instanceof Error)}function z(a){return"function"==typeof a}function A(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function B(a){return Object.prototype.toString.call(a)}function C(a){return 10>a?"0"+a.toString(10):a.toString(10)}function D(){var a=new Date,b=[C(a.getHours()),C(a.getMinutes()),C(a.getSeconds())].join(":");return[a.getDate(),K[a.getMonth()],b].join(" ")}function E(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var F=a("__browserify_process"),G="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},H=/%[sdj%]/g;c.format=function(a){if(!s(a)){for(var b=[],c=0;c<arguments.length;c++)b.push(d(arguments[c]));return b.join(" ")}for(var c=1,e=arguments,f=e.length,g=String(a).replace(H,function(a){if("%%"===a)return"%";if(c>=f)return a;switch(a){case"%s":return String(e[c++]);case"%d":return Number(e[c++]);case"%j":try{return JSON.stringify(e[c++])}catch(b){return"[Circular]"}default:return a}}),h=e[c];f>c;h=e[++c])g+=p(h)||!w(h)?" "+h:" "+d(h);return g},c.deprecate=function(a,b){function d(){if(!e){if(F.throwDeprecation)throw new Error(b);F.traceDeprecation?console.trace(b):console.error(b),e=!0}return a.apply(this,arguments)}if(u(G.process))return function(){return c.deprecate(a,b).apply(this,arguments)};if(F.noDeprecation===!0)return a;var e=!1;return d};var I,J={};c.debuglog=function(a){if(u(I)&&(I=F.env.NODE_DEBUG||""),a=a.toUpperCase(),!J[a])if(new RegExp("\\b"+a+"\\b","i").test(I)){var b=F.pid;J[a]=function(){var d=c.format.apply(c,arguments);console.error("%s %d: %s",a,b,d)}}else J[a]=function(){};return J[a]},c.inspect=d,d.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]},d.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=n,c.isBoolean=o,c.isNull=p,c.isNullOrUndefined=q,c.isNumber=r,c.isString=s,c.isSymbol=t,c.isUndefined=u,c.isRegExp=v,c.isObject=w,c.isDate=x,c.isError=y,c.isFunction=z,c.isPrimitive=A,c.isBuffer=a("./support/isBuffer");var K=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",D(),c.format.apply(c,arguments))},c.inherits=a("inherits"),c._extend=function(a,b){if(!b||!w(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}},{"./support/isBuffer":28,__browserify_process:27,inherits:25}],30:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n=[].slice;m=a("util"),c.BaseError=b=function(a,b){return Error.captureStackTrace(this,this.constructor),this.message=a||"Error"},m.inherits(b,Error),b.prototype.name="BaseError",l=function(a){return a[0].toUpperCase()+a.slice(1).toLowerCase()},g=function(a){var b;return function(){var c,d,e,f;for(e=a.split(/_/),f=[],c=0,d=e.length;d>c;c++)b=e[c],f.push(l(b));return f}().join("")},i=function(a,c,d){var e;return e=function(a){return b.call(this,a||d,this.constructor),this.istack=[],this.code=c,this},m.inherits(e,b),e.prototype.name=a,e.prototype.inspect=function(){return"["+a+": "+this.message+" (code "+this.code+")]"},e},c.make_errors=j=function(a){var b,c,d,e,f,h;f={msg:{},name:{},code:{}},a.OK="Success",c=100;for(d in a)e=a[d],"OK"!==d?(b=g(d)+"Error",h=c++,f[b]=i(b,h,e)):h=0,f[d]=h,f.msg[d]=f.msg[h]=e,f.name[d]=f.name[h]=d,f.code[d]=h;return f},h=function(a,b){return null!=b?(null==a.istack&&(a.istack=[]),a.istack.push(b)):void 0},c.make_esc=k=function(a,b){return function(c){return function(){var d,e;return e=arguments[0],d=2<=arguments.length?n.call(arguments,1):[],null==e?c.apply(null,d):a.__esc?void 0:(a.__esc=!0,h(e,b),a(e))}}},c.EscOk=f=function(){function a(a,b){this.gcb=a,this.where=b}return a.prototype.bailout=function(){var a;return this.gcb?(a=this.gcb,this.gcb=null,a(!1)):void 0},a.prototype.check_ok=function(a){return function(b){return function(){var c,d;return d=arguments[0],c=2<=arguments.length?n.call(arguments,1):[],d?a.apply(null,c):b.bailout()}}(this)},a.prototype.check_err=function(a){return function(b){return function(){var c,d;return d=arguments[0],c=2<=arguments.length?n.call(arguments,1):[],null!=d?(h(d,b.where),b.bailout()):a.apply(null,c)}}(this)},a.prototype.check_non_null=function(a){return function(b){return function(){var c;return c=1<=arguments.length?n.call(arguments,0):[],null==c[0]?b.bailout():a.apply(null,c)}}(this)},a}(),c.EscErr=e=function(){function a(a,b){this.gcb=a,this.where=b}return a.prototype.finish=function(a){var b;return this.gcb?(b=this.gcb,this.gcb=null,b(a)):void 0},a.prototype.check_ok=function(a,b,c){return null==b&&(b=Error),null==c&&(c=null),function(){var d,e,f;return f=arguments[0],d=2<=arguments.length?n.call(arguments,1):[],f?a.apply(null,d):(e=new b(c),h(e,this.where),this.finish(e))}},a.prototype.check_err=function(a){return function(){var b,c;return c=arguments[0],b=2<=arguments.length?n.call(arguments,1):[],null!=c?(h(c,this.where),this.finish(c)):a.apply(null,b)}},a}(),c.Canceler=d=function(){function a(a){this.klass=null!=a?a:Error,this._canceled=!1}return a.prototype.is_canceled=function(){return this._canceled},a.prototype.is_ok=function(){return!this._canceled},a.prototype.cancel=function(){return this._canceled=!0},a.prototype.err=function(){return this._canceled?new this.klass("Aborted"):null},a}(),c.chain=function(a,b){return function(){var c;return c=1<=arguments.length?n.call(arguments,0):[],b(function(){return a.apply(null,c)})}},c.chain_err=function(a,b){return function(){var c;return c=1<=arguments.length?n.call(arguments,0):[],b(function(){var b;return b=1<=arguments.length?n.call(arguments,0):[],a.apply(null,null!=b[0]&&null==c[0]?b:c)})}}}).call(this)},{util:29}],31:[function(a,b,c){(function(){var b,d,e,f,g,h,i={}.hasOwnProperty,j=function(a,b){function c(){this.constructor=a}for(var d in b)i.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=a("iced-runtime"),g=h=function(){},c.Lock=b=function(){function a(){this._open=!0,this._waiters=[]}return a.prototype.acquire=function(a){return this._open?(this._open=!1,a()):this._waiters.push(a)},a.prototype.release=function(){var a;return this._waiters.length?(a=this._waiters.shift())():this._open=!0},a.prototype.open=function(){return this._open},a}(),d=function(a){function b(a,c){this.tab=a,this.name=c,b.__super__.constructor.call(this),this.refs=0}return j(b,a),b.prototype.incref=function(){return++this.refs},b.prototype.decref=function(){return--this.refs},b.prototype.release=function(){return b.__super__.release.call(this),0===this.decref()?delete this.tab.locks[this.name]:void 0},b}(b),c.Table=e=function(){function a(){this.locks={}}return a.prototype.create=function(a){var b;return b=new d(this,a),this.locks[a]=b},a.prototype.acquire=function(a,b,c){var d,e,g,i,j;j=h,g=f.findDeferral(arguments),d=this.locks[a]||this.create(a),e=d._open,d.incref(),function(a){return function(a){return c||d._open?void!function(a){i=new f.Deferrals(a,{parent:g,filename:"/home/max/src/iced/iced-lock/index.iced",funcname:"Table.acquire"}),d.acquire(i.defer({lineno:47})),i._fulfill()}(a):a(d=null)}}(this)(function(a){return function(){return b(d,e)}}(this))},a.prototype.lookup=function(a){return this.locks[a]},a}()}).call(this)},{"iced-runtime":34}],32:[function(a,b,c){(function(){b.exports={k:"__iced_k",k_noop:"__iced_k_noop",param:"__iced_p_",ns:"iced",runtime:"runtime",Deferrals:"Deferrals",deferrals:"__iced_deferrals",fulfill:"_fulfill",b_while:"_break",t_while:"_while",c_while:"_continue",n_while:"_next",n_arg:"__iced_next_arg",defer_method:"defer",slot:"__slot",assign_fn:"assign_fn",autocb:"autocb",retslot:"ret",trace:"__iced_trace",passed_deferral:"__iced_passed_deferral",findDeferral:"findDeferral",lineno:"lineno",parent:"parent",filename:"filename",funcname:"funcname",catchExceptions:"catchExceptions",runtime_modes:["node","inline","window","none","browserify","interp"],trampoline:"trampoline",context:"context",defer_arg:"__iced_defer_"}}).call(this)},{}],33:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k=[].slice;f=g=function(){},b=a("./const"),c.iced=e=a("./runtime"),j=function(a,b,c,d){var f,h,i,j,l,m;m=g,j=e.findDeferral(arguments),h=new e.Rendezvous,d[0]=h.id(!0).defer({assign_fn:function(a){return function(){return function(){return f=k.call(arguments,0)}}}(this)(),lineno:20,context:l}),setTimeout(h.id(!1).defer({lineno:21,context:l}),b),function(a){return function(a){l=new e.Deferrals(a,{parent:j,filename:"/Users/max/src/iced/iced-runtime/src/library.iced"}),h.wait(l.defer({assign_fn:function(){return function(){return i=arguments[0]}}(),lineno:22})),l._fulfill()}}(this)(function(b){return function(){return c&&(c[0]=i),a.apply(null,f)}}(this))},c.timeout=function(a,b,c){var d;return d=[],j(a,b,c,d),d[0]},h=function(a,b,c){var d,f,h,i;i=g,f=e.findDeferral(arguments),function(a){return function(a){h=new e.Deferrals(a,{parent:f,filename:"/Users/max/src/iced/iced-runtime/src/library.iced"}),c[0]=h.defer({assign_fn:function(){return function(){return d=arguments[0]}}(),lineno:39}),h._fulfill()}}(this)(function(c){return function(){return d||(b[0]=!1),a()}}(this))},c.iand=function(a,b){var c;return c=[],h(a,b,c),c[0]},i=function(a,b,c){var d,f,h,i;i=g,f=e.findDeferral(arguments),function(a){return function(a){h=new e.Deferrals(a,{parent:f,filename:"/Users/max/src/iced/iced-runtime/src/library.iced"}),c[0]=h.defer({assign_fn:function(){return function(){return d=arguments[0]}}(),lineno:58}),h._fulfill()}}(this)(function(c){return function(){return d&&(b[0]=!0),a()}}(this))},c.ior=function(a,b){var c;return c=[],i(a,b,c),c[0]},c.Pipeliner=d=function(){function a(a,c){this.window=a||1,this.delay=c||0,this.queue=[],this.n_out=0,this.cb=null,this[b.deferrals]=this,this.defer=this._defer}return a.prototype.waitInQueue=function(a){var b,c,d;d=g,b=e.findDeferral(arguments),function(a){return function(d){var f,g;f=[],(g=function(d){var h,i,j;return h=function(){return d(f)},i=function(){return e.trampoline(function(){return g(d)})},j=function(a){return f.push(a),i()},a.n_out>=a.window?void!function(d){c=new e.Deferrals(d,{parent:b,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),a.cb=c.defer({lineno:100}),c._fulfill()}(j):h()})(d)}}(this)(function(d){return function(){d.n_out++,function(a){return d.delay?void!function(a){c=new e.Deferrals(a,{parent:b,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.waitInQueue"}),setTimeout(c.defer({lineno:108}),d.delay),c._fulfill()}(a):a()}(function(){return a()})}}(this))},a.prototype.__defer=function(a,b){var c,d,f,h,i;i=g,f=e.findDeferral(arguments),function(c){return function(c){h=new e.Deferrals(c,{parent:f,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.__defer"}),d=h.defer({lineno:122}),a[0]=function(){var a,c;return a=1<=arguments.length?k.call(arguments,0):[],null!=(c=b.assign_fn)&&c.apply(null,a),d()},h._fulfill()}}(this)(function(a){return function(){return a.n_out--,a.cb?(c=a.cb,a.cb=null,c()):void 0}}(this))},a.prototype._defer=function(a){var b;return b=[],this.__defer(b,a),b[0]},a.prototype.flush=function(a){var b,c,d,f;c=a,b=e.findDeferral(arguments),d=[],(f=function(a){var c;return function(g){var h,i,j;return h=function(){return g(d)},i=function(){return e.trampoline(function(){return f(g)})},j=function(a){return d.push(a),i()},a.n_out?void!function(d){c=new e.Deferrals(d,{parent:b,filename:"/Users/max/src/iced/iced-runtime/src/library.iced",funcname:"Pipeliner.flush"}),a.cb=c.defer({lineno:151}),c._fulfill()}(j):h()}}(this))(c)},a}()}).call(this)},{"./const":32,"./runtime":35}],34:[function(a,b,c){(function(){var b,d,e,f,g,h;for(c["const"]=a("./const"),e=[a("./runtime"),a("./library")],g=0,h=e.length;h>g;g++){d=e[g];for(b in d)f=d[b],c[b]=f}}).call(this)},{"./const":32,"./library":33,"./runtime":35}],35:[function(a,b,c){var d=a("__browserify_process");(function(){var b,e,f,g,h,i,j,k,l,m,n,o,p,q=[].slice;b=a("./const"),i=function(a,c,d,e,f){var g,h,i,j;i={};for(g in e)j=e[g],i[g]=j;return i[b.lineno]=null!=c?c[b.lineno]:void 0,h=function(){var b,e,g;return b=1<=arguments.length?q.call(arguments,0):[],null!=c&&null!=(g=c.assign_fn)&&g.apply(null,b),a?(e=a,f||(a=null),e._fulfill(d,i)):m("overused deferral at "+p(i))},h[b.trace]=i,h},o=0,k=function(a){return o++,o%a===0?(o=0,!0):!1},n=null,p=function(a){var c;return c=a[b.funcname]||"<anonymous>",""+c+" ("+a[b.filename]+":"+(a[b.lineno]+1)+")"},m=function(a){return"undefined"!=typeof console&&null!==console?console.error("ICED warning: "+a):void 0},c.trampoline=l=function(a){return k(500)?"undefined"!=typeof d&&null!==d?d.nextTick(a):setTimeout(a):a()},c.Deferrals=e=function(){function a(a,b){this.trace=b,this.continuation=a,this.count=1,this.ret=null}return a.prototype._call=function(a){var b;return this.continuation?(n=a,b=this.continuation,this.continuation=null,b(this.ret)):m("Entered dead await at "+p(a))},a.prototype._fulfill=function(a,b){return--this.count>0?void 0:l(function(a){return function(){return a._call(b)}}(this))},a.prototype.defer=function(a){var b;return this.count++,b=this,i(b,a,null,this.trace)},a}(),c.findDeferral=h=function(a){var c,d,e;for(d=0,e=a.length;e>d;d++)if(c=a[d],null!=c?c[b.trace]:void 0)return c;return null},c.Rendezvous=f=function(){function a(){this.completed=[],this.waiters=[],this.defer_id=0}var b;return b=function(){function a(a,b,c){this.rv=a,this.id=b,this.multi=c}return a.prototype.defer=function(a){return this.rv._defer_with_id(this.id,a,this.multi)},a}(),a.prototype.wait=function(a){var b;return this.completed.length?(b=this.completed.shift(),a(b)):this.waiters.push(a)},a.prototype.defer=function(a){var b;return b=this.defer_id++,this._defer_with_id(b,a)},a.prototype.id=function(a,c){return c=!!c,new b(this,a,c)},a.prototype._fulfill=function(a,b){var c;return this.waiters.length?(c=this.waiters.shift())(a):this.completed.push(a)},a.prototype._defer_with_id=function(a,b,c){return this.count++,i(this,b,a,{},c)},a}(),c.stackWalk=j=function(a){var c,d,e,f;for(d=[],e=a?a[b.trace]:n;e;)c=" at "+p(e),d.push(c),e=null!=e&&null!=(f=e[b.parent])?f[b.trace]:void 0;return d},c.exceptionHandler=g=function(a,b){var c;return b||(b=console.error),b(a.stack),c=j(),c.length?(b("Iced 'stack' trace (w/ real line numbers):"),b(c.join("\n"))):void 0},c.catchExceptions=function(a){return"undefined"!=typeof d&&null!==d?d.on("uncaughtException",function(b){return g(b,a),d.exit(1)}):void 0}}).call(this)},{"./const":32,__browserify_process:27}],36:[function(a,b,c){(function(){var b,d,e,f;d=a("iced-runtime"),e=f=function(){},b=b=function(){function a(a){a=a||{},this.lazy_loop_delay=a.lazy_loop_delay||30,this.loop_delay=a.loop_delay||5,this.work_min=a.work_min||1,this.auto_stop_bits=a.auto_stop_bits||4096,this.max_bits_per_delta=a.max_bits_per_delta||4,this.auto_stop=a.auto_stop?a.auto_stop:!0,this.entropies=[],this.running=!0,this.is_generating=!1,this.timer_race_loop()}return a.prototype.generate=function(a,b){var c,e,g,h,i,j;j=f,h=d.findDeferral(arguments),this.is_generating=!0,this.running||this.resume(),e=0,g=[],function(b){return function(f){var j,k;j=[],(k=function(f){var l,m,n;return l=function(){return f(j)},m=function(){return d.trampoline(function(){return k(f)})},n=function(a){return j.push(a),m()},a>e?void!function(a){return b.entropies.length?(c=b.entropies.splice(0,1)[0],e+=c[1],a(g.push(c[0]))):void!function(a){i=new d.Deferrals(a,{parent:h,filename:"/Users/chris/git/more-entropy/src/generator.iced",funcname:"Generator.generate"}),b.delay(i.defer({lineno:28})),i._fulfill()}(a)}(n):l()})(f)}}(this)(function(a){return function(){return a.auto_stop&&a.stop(),a.is_generating=!1,b(g)}}(this))},a.prototype.stop=function(){return this.running=!1},a.prototype.resume=function(){return this.running=!0,this.timer_race_loop()},a.prototype.reset=function(){return this.entropies=[],this.total_bits=0},a.prototype.count_unused_bits=function(){var a,b,c,d,e;for(a=0,e=this.entropies,c=0,d=e.length;d>c;c++)b=e[c],a+=b[1];return a},a.prototype.delay=function(a){var b,c,e,g;g=f,c=d.findDeferral(arguments),b=this.is_generating?this.loop_delay:this.lazy_loop_delay,function(a){return function(a){e=new d.Deferrals(a,{parent:c,filename:"/Users/chris/git/more-entropy/src/generator.iced",funcname:"Generator.delay"}),setTimeout(e.defer({lineno:50}),b),e._fulfill()}}(this)(function(b){return function(){return a()}}(this))},a.prototype.timer_race_loop=function(){var a,b,c,e;b=f,a=d.findDeferral(arguments),this._last_count=null,c=[],(e=function(b){var f,g,h,i,j;return function(k){var l,m,n;return l=function(){return k(c)},m=function(){return d.trampoline(function(){return e(k)})},n=function(a){return c.push(a),m()},b.running?(b.count_unused_bits()<b.auto_stop_bits&&(f=b.millisecond_count(),null!=b._last_count&&(g=f-b._last_count)&&(h=Math.floor(b.log_2(Math.abs(g))),h=Math.min(b.max_bits_per_delta,h),i=[g,h],b.entropies.push(i)),b._last_count=f),void function(c){j=new d.Deferrals(c,{parent:a,filename:"/Users/chris/git/more-entropy/src/generator.iced",funcname:"Generator.timer_race_loop"}),b.delay(j.defer({lineno:64})),j._fulfill()}(n)):l()}}(this))(b)},a.prototype.log_2=function(a){return Math.log(a)/Math.LN2},a.prototype.millisecond_count=function(){var a,b,c;for(a=Date.now(),b=c=0;Date.now()<a+this.work_min+1;)b++,c=Math.sin(Math.sqrt(Math.log(b+c)));return b},a}(),"undefined"!=typeof window&&null!==window&&(window.Generator=b),"undefined"!=typeof c&&null!==c&&(c.Generator=b)}).call(this)},{"iced-runtime":34}],37:[function(a,b,c){(function(){c.Generator=a("../lib/generator").Generator}).call(this)},{"../lib/generator":36}]},{},[9])(9)});
</script>
<script>
var Base64Binary={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",decodeArrayBuffer:function(a){var b=a.length/4*3,c=new ArrayBuffer(b);return this.decode(a,c),c},decode:function(a,b){var c=this._keyStr.indexOf(a.charAt(a.length-1)),d=this._keyStr.indexOf(a.charAt(a.length-2)),e=a.length/4*3;64==c&&e--,64==d&&e--;var f,g,h,i,j,k,l,m,n=0,o=0;for(f=b?new Uint8Array(b):new Uint8Array(e),a=a.replace(/[^A-Za-z0-9\+\/\=]/g,""),n=0;e>n;n+=3)j=this._keyStr.indexOf(a.charAt(o++)),k=this._keyStr.indexOf(a.charAt(o++)),l=this._keyStr.indexOf(a.charAt(o++)),m=this._keyStr.indexOf(a.charAt(o++)),g=j<<2|k>>4,h=(15&k)<<4|l>>2,i=(3&l)<<6|m,f[n]=g,64!=l&&(f[n+1]=h),64!=m&&(f[n+2]=i);return f}};
</script>
<script>
function readFileData(a,b){var c=new FileReader;c.onload=function(a){return function(c){b(a.name,a.type,a.size,c.target.result)}}(a),c.readAsDataURL(a)}function humanFileSize(a){var b=Math.floor(Math.log(a)/Math.log(1024));return 1*(a/Math.pow(1024,b)).toFixed(2)+" "+["B","KB","MB","GB","TB"][b]}function displayFile(a,b,c){var d=a.hashCode(),e='<div id="'+d+'" class="row fileDisplay"><div class="col-no-collapse c11"><div class="redText">'+a+'</div><div class="file-size orangeText">'+humanFileSize(c)+'</div></div><div class="col-no-collapse c1"><button class="link-button delete-x" onclick="removeFile(\''+a+"')\">X</button></div></div>";insertHtml(e,document.getElementById("dropAfterMe"))}function displayDecryptedFile(a,b,c,d){var e=a.hashCode();if("image/png"==b||"image/jpeg"==b||"image/gif"==b){var f='<div id="'+e+'" class="row fileDisplay"><div class="col-no-collapse c3"><img class="image-thumbnail" src="'+d+'" data-jslghtbx-group="decrypted-file-thumbnails" data-jslghtbx></div><div class="col-no-collapse c8"><div class="redText">'+a+'</div><div class="file-size orangeText">'+humanFileSize(c)+'</div></div><div class="col-no-collapse c1"><button class="link-button download-file" onclick="downloadFile(\''+a+"')\">"+downloadImage+"</button></div></div>";insertHtml(f,document.getElementById("add-after-me"))}else if("text/plain"==b){var f='<div id="'+e+'" class="row fileDisplay"><div class="col-no-collapse c3" onclick="showModalViewer(\''+a+"','"+d+"');\">"+genericFileIcon+'</div><div class="col-no-collapse c8"><div class="redText">'+a+'</div><div class="file-size orangeText">'+humanFileSize(c)+'</div></div><div class="col-no-collapse c1"><button class="link-button download-file" onclick="downloadFile(\''+a+"')\">"+downloadImage+"</button></div></div>";insertHtml(f,document.getElementById("add-after-me"))}else{var f='<div id="'+e+'" class="row fileDisplay"><div class="col-no-collapse c3"> '+genericFileIcon+'</div><div class="col-no-collapse c8"><div class="redText">'+a+'</div><div class="file-size orangeText">'+humanFileSize(c)+'</div></div><div class="col-no-collapse c1"><button class="link-button download-file" onclick="downloadFile(\''+a+"')\">"+downloadImage+"</button></div></div>";insertHtml(f,document.getElementById("add-after-me"))}}function removeFileDisplay(a){var b=a.hashCode();document.getElementById(b).remove()}function removeFile(a){console.log("Remove file: "+a);for(var b=-1,c=0;c<plainTextFileData.length;c++)if(plainTextFileData[c].fileName==a){b=c;break}b>=0&&(removeFileDisplay(a),plainTextFileData.splice(c,1),showOrHideDragDropMsgAndSelectFiles())}function downloadFile(a){console.log("Download file: "+a);for(var b=0;b<plainTextFileData.length;b++)if(plainTextFileData[b].fileName==a){var c=stripDataPrefix(plainTextFileData[b].fileData),d=new Blob([Base64Binary.decode(c)],{type:plainTextFileData[b].fileType});saveAs(d,a);break}}function stripDataPrefix(a){var b=a.indexOf(",");return a.slice(b+1)}function stageFileData(a,b,c,d){console.log("stageFileData: "+d),plainTextFileData.push({fileName:a,fileType:b,fileSize:c,fileData:d}),console.log("File data for "+a+": "+d),displayFile(a,b,c),showOrHideDragDropMsgAndSelectFiles()}function fileReadCallback(a,b,c,d){stageFileData(a,b,c,d)}function alreadyHaveFile(a){for(var b=0;b<plainTextFileData.length;b++)if(plainTextFileData[b].fileName==a.name)return!0;return!1}function insertHtml(a,b){var c=document.createDocumentFragment(),d=document.createElement("div");for(d.innerHTML=a;d.firstChild;)c.appendChild(d.firstChild);b.parentNode.insertBefore(c,b)}function addFile(a){alreadyHaveFile(a)?alert("That file is already in the vault"):readFileData(a,fileReadCallback)}function ensureGoodTextFilename(a){var b=a;return""==a?b="message_"+Math.floor(1e7*Math.random()).toString()+".txt":a.endsWith(".txt")||(b=a+".txt"),b}function addInsertedText(){var a=ensureGoodTextFilename(document.getElementById("modal-editor-filename").value),b=document.getElementById("modal-editor-text").value,c=b.length;if(0==b.length)return void alert("Body is empty");var d=window.btoa(b);stageFileData(a,"text/plain",c,d),hideModalEditor()}function addFiles(a){for(var b=0;b<a.length;b++){var c=a[b];addFile(c)}}function addSelectedFiles(){var a=document.getElementById("uploadInput").files;addFiles(a)}function renderVault(a,b){var c=vaultTemplate.replace("<script>","<script>var _decryptionMode = true;").replace("REPLACE_WITH_ENCRYPTED_DATA"+String.fromCharCode(95),a);b(c)}function saveVault(a,b){var c=new Blob([a],{type:"text/html;charset=utf-8"});saveAs(c,b)}function createVault(){var a=document.getElementById("password_input").value,b=JSON.stringify(plainTextFileData);encryptFileData(b,a,function(a,b){renderVault(b,function(a){saveVault(a,"locked_hypervault.html")})})}function encryptFileData(a,b,c){var d=new triplesec.Buffer(a),e=new triplesec.Buffer(b);reset_progress(),triplesec.encrypt({key:e,progress_hook:progress_hook_encrypt,data:d},function(a,b){a?console.log("Encryption error: "+a.toString()):c(a,b.toString("base64"))})}function decryptFileData(a,b,c){var d=new triplesec.Buffer(a,"base64"),e=new triplesec.Buffer(b);removeAllElementsByClass("fileDisplay"),reset_progress(),displayWrongPasswordMsg(!1),triplesec.decrypt({key:e,progress_hook:progress_hook_decrypt,data:d},function(a,b){if(a)reset_progress(),displayWrongPasswordMsg(!0),console.log("Decryption error: "+a.toString());else{var d=b.toString();c(a,d)}})}function decryptVault(){var a=document.getElementById("decrypt-password-input").value;decryptFileData(encryptedFileData,a,function(a,b){displayDecryptMessage(!1),plainTextFileData=JSON.parse(b),document.getElementById("decrypted-files").style.display="block";for(var c=0;c<plainTextFileData.length;c++){var d=plainTextFileData[c].fileName,e=plainTextFileData[c].fileType,f=plainTextFileData[c].fileSize,g=plainTextFileData[c].fileData;displayDecryptedFile(d,e,f,g)}var h=new Lightbox;h.load()})}function validateRequiredField(a,b){return""===a.value?(document.getElementById(b).style.display="block",!1):(document.getElementById(b).style.display="none",!0)}function validatePasswordsMatch(){return encryptPasswordInput1.value==encryptPasswordInput2.value?(document.getElementById("pw-mismatch-msg").style.display="none",!0):(document.getElementById("pw-mismatch-msg").style.display="block",!1)}function displayWrongPasswordMsg(a){a?document.getElementById("wrong-pw-msg").style.display="block":document.getElementById("wrong-pw-msg").style.display="none"}function validateEncryptionFields(){var a=!0;return a=validateRequiredField(encryptPasswordInput1,"pw-required-msg")&&a,a=validateRequiredField(encryptPasswordInput2,"pw-required-msg2")&&a,a=a&&validatePasswordsMatch()}function showOrHideDragDropMsgAndSelectFiles(){console.log(plainTextFileData.length),0==plainTextFileData.length?document.getElementById("drag-msg-and-browse-button").style.display="block":document.getElementById("drag-msg-and-browse-button").style.display="none"}function displayDecryptMessage(a){a?document.getElementById("decrypt-helper-message").style.display="block":document.getElementById("decrypt-helper-message").style.display="none"}function showModalEditor(){modal_editor.style.display="block"}function hideModalEditor(){document.getElementById("modal-editor-filename").value="",document.getElementById("modal-editor-text").value="",modal_editor.style.display="none"}function showModalViewer(a,b){var c=window.atob(b);document.getElementById("modal-viewer-filename").value=a,document.getElementById("modal-viewer-text").value=c,modal_viewer.style.display="block"}function hideModalViewer(){document.getElementById("modal-viewer-filename").value="",document.getElementById("modal-viewer-text").value="",modal_viewer.style.display="none"}function removeAllElementsByClass(a){[].forEach.call(document.querySelectorAll("."+a),function(a){a.parentNode.removeChild(a)})}function setClassDisplay(a,b){for(var c=document.getElementsByClassName(a),d=0;d<c.length;++d){var e=c[d];e.style.display=b}}function inputKeyUp(a){return a.which=a.which||a.keyCode,13==a.which?(decryptionMode?decryptVault():validateEncryptionFields()&&createVault(),event.preventDefault(),!1):void 0}var hypervaultFormatVersion=1,decryptionMode=!1;"undefined"!=typeof _decryptionMode&&(decryptionMode=!0);var downloadImage="<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0' y='0' width='28' height='28' viewBox='0, 0, 100, 100'><g id='Layer_1'><path d='M50.5,7.5 L50.5,82.5' fill-opacity='0' stroke='#FF4136' stroke-width='4'/><path d='M49.5,82.5 L80.5,45.5' fill-opacity='0' stroke='#FF4136' stroke-width='4'/><path d='M51.5,82.5 L20.5,45.5' fill-opacity='0' stroke='#FF4136' stroke-width='4'/><path d='M20.5,92.5 L80.5,92.5' fill-opacity='0' stroke='#FF4136' stroke-width='4'/></g></svg>",genericFileIcon='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" class="image-thumbnail" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="46" height="46" viewBox="0, 0, 100, 100"><g id="Layer_1"><g><path d="M19.666,3.921 L19.411,97.079 L82.534,97.079 L82.534,29.211 L57.591,3.921 L19.666,3.921 z" fill-opacity="0" stroke="#AAAAAA" stroke-width="7"/><path d="M57.591,3.921 L57.591,31.275 L82.534,31.275" fill-opacity="0" stroke="#AAAAAA" stroke-width="7"/></g></g></svg>',plainTextFileData=[],encryptedFileData="REPLACE_WITH_ENCRYPTED_DATA_",progress=[],reset_progress=function(){progress=[],decryptionMode?document.getElementById("decrypt-progress-summary").innerHTML="":document.getElementById("encrypt-progress-summary").innerHTML=""},progress_hook_encrypt=function(a){var b,c,d,e,f=0;for(progress.length&&progress[progress.length-1].what===a.what?progress[progress.length-1]=a:progress.push(a),b="",d=0,e=progress.length;e>d;d++)c=progress[d],b+="<li>"+c.what+" "+c.i+"/"+c.total+"</li>",f+=0==d?10*(c.i/c.total):15*(c.i/c.total);document.getElementById("encrypt-progress-summary").innerHTML=b},progress_hook_decrypt=function(a){var b,c,d,e,f=0;for(progress.length&&progress[progress.length-1].what===a.what?progress[progress.length-1]=a:progress.push(a),b="",d=0,e=progress.length;e>d;d++)c=progress[d],b+="<li>"+c.what+" "+c.i+"/"+c.total+"</li>",f+=0==d?10*(c.i/c.total):18*(c.i/c.total);document.getElementById("decrypt-progress-summary").innerHTML=b};window.onload=function(){var a=document.getElementsByTagName("body")[0],b=document.getElementById("dropzone");a.ondragover=function(){return b.className="hover",!1},a.ondragend=function(){return b.className="",!1},a.ondragleave=function(){return b.className="",!1},a.ondrop=function(a){a.preventDefault(),b.className="",addFiles(a.dataTransfer.files)}};var vaultTemplate=document.documentElement.outerHTML,encryptPasswordInput1=null,encryptPasswordInput2=null,decryptPasswordInput=null;decryptionMode?decryptPasswordInput=document.getElementById("decrypt-password-input"):(encryptPasswordInput1=document.getElementById("password_input"),encryptPasswordInput2=document.getElementById("password_input2"));var modal_editor=document.getElementById("modal-text-editor"),modal_close_button=document.getElementsByClassName("modal-close-button")[0];modal_close_button.onclick=function(){hideModalEditor()};var modal_viewer=document.getElementById("modal-text-viewer"),modal_viewer_close_button=document.getElementsByClassName("modal-viewer-close-button")[0];modal_viewer_close_button.onclick=function(){hideModalViewer()},String.prototype.hashCode=function(){var a,b,c,d=0;if(0==this.length)return d;for(a=0,c=this.length;c>a;a++)b=this.charCodeAt(a),d=(d<<5)-d+b,d|=0;return d},Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var a=0,b=this.length;b>a;a++)this[a]&&this[a].parentElement&&this[a].parentElement.removeChild(this[a])},decryptionMode?(setClassDisplay("decryption-container","block"),setClassDisplay("encryption-container","none")):(setClassDisplay("decryption-container","none"),setClassDisplay("encryption-container","block"));for(var allInputs=document.getElementsByTagName("input"),index=0;index<allInputs.length;++index)allInputs[index].addEventListener("keydown",inputKeyUp);
</script>
</body>
</html>