-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch-id.min.html
167 lines (158 loc) · 963 KB
/
search-id.min.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
<!DOCTYPE html>
<!--
// https://search-id.org
//
// This file is part of search-id.org project.
//
// search-id is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// search-id is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this file. If not, see <http://www.gnu.org/licenses/>.
-->
<html>
<head>
<title>search-id.org</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="red">
<meta name="description" content="p2p content system" />
<meta name="robots" content="index, nofollow">
<meta name="google" content="nositelinkssearchbox" />
<meta name="google" content="notranslate" />
<!--
<link rel="shortcut icon" href="embedded/favicon.ico" type="image/x-icon">
<link rel="icon" href="embedded/favicon.ico" type="image/x-icon">
-->
<style> body{padding:0;margin:0;font-family:Helvetica;background-color:none;transition:border-top 1s,border-size 1s}pre{display:block;word-wrap:normal;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;background-color:white;box-shadow:inset 0 0 .5em black;padding:.5em}table{border-collapse:collapse;background-color:white}table td,table th{border:1px solid rgba(0,0,0,0.3);padding:.4em}table th{background-color:rgba(0,0,0,0.2)}table tr:nth-child(even){background-color:rgba(0,0,0,0.05)}a{color:#0366d6;text-decoration:none}a:hover{text-decoration:underline}.fatal{background-color:red;color:white;margin:auto;text-align:center;padding:1em;margin:10%;font-size:2em;box-shadow:0 0 1em red}.subtitle{font-size:.5em;color:gray}.hover-effect{opacity:.7;transition:opacity .5s}.hover-effect:hover{opacity:1}.disabled,.disabled:hover{opacity:.2 !important}.current{background-color:white;box-shadow:0 0 20px black inset}.id2web_tooltip{background-color:red;color:white;padding:5px 10px;border-radius:4px;font-size:13px}.id2web_tooltip{background:#333;color:white;font-weight:bold;padding:.5em 1em;border-radius:.5em;display:none;z-index:9999999}.id2web_tooltip[data-show]{display:block}.id2web_tooltip_arrow,.id2web_tooltip_arrow::before{position:absolute;width:8px;height:8px;z-index:-1}.id2web_tooltip_arrow::before{content:'';transform:rotate(45deg);background:#333}.id2web_tooltip[data-popper-placement^='top']>.id2web_tooltip_arrow{bottom:-4px}.id2web_tooltip[data-popper-placement^='bottom']>.id2web_tooltip_arrow{top:-4px}.id2web_tooltip[data-popper-placement^='left']>.id2web_tooltip_arrow{right:-4px}.id2web_tooltip[data-popper-placement^='right']>.id2web_tooltip_arrow{left:-4px}#play{display:none;position:absolute;z-index:100;width:100vw;height:100vh;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJ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pointer;transition:opacity 1s;background-color:rgba(255,255,255,0.1)}#play:hover{opacity:1}.message{position:absolute;text-align:center;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;top:50%;width:100%;font-size:2em;z-index:1;height:2em;margin-top:-1em;color:gray;text-shadow:0 0 1em white}#menu{position:fixed;right:4vh;top:2vh;width:7vh;height:7vh;z-index:200;opacity:.5;cursor:pointer;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gCiA8Zz4KICA8ZyBpZD0ic3ZnXzEiPgogICA8cGF0aCBmaWxsPSIjQkJCQkJCIiBpZD0ic3ZnXzIiIGQ9Im0yNCwzYzAsLTAuNiAtMC40LC0xIC0xLC0xbC0yMiwwYy0wLjYsMCAtMSwwLjQgLTEsMWwwLDJjMCwwLjYgMC40LDEgMSwxbDIyLDBjMC42LDAgMSwtMC40IDEsLTFsMCwtMnoiLz4KICAgPHBhdGggZmlsbD0iI0JCQkJCQiIgaWQ9InN2Z18zIiBkPSJtMjQsMTFjMCwtMC42IC0wLjQsLTEgLTEsLTFsLTIyLDBjLTAuNiwwIC0xLDAuNCAtMSwxbDAsMmMwLDAuNiAwLjQsMSAxLDFsMjIsMGMwLjYsMCAxLC0wLjQgMSwtMWwwLC0yeiIvPgogICA8cGF0aCBmaWxsPSIjQkJCQkJCIiBpZD0ic3ZnXzQiIGQ9Im0yNCwxOWMwLC0wLjYgLTAuNCwtMSAtMSwtMWwtMjIsMGMtMC42LDAgLTEsMC40IC0xLDFsMCwyYzAsMC42IDAuNCwxIDEsMWwyMiwwYzAuNiwwIDEsLTAuNCAxLC0xbDAsLTJ6Ii8+CiAgPC9nPgogPC9nPgo8L3N2Zz4=);background-size:contain;background-repeat:no-repeat;mix-blend-mode:difference;transition:opacity .5s}#menu:hover{opacity:1}#main-area{position:fixed;right:2vh;top:10vh;max-width:90%;max-height:80vh;overflow:auto;font-size:1.0;background-color:rgba(230,230,230,0.9);box-shadow:0 0 3em gray;text-align:center;z-index:200;transition:border-left .5s,box-shadow .5s}#nav{display:flex;flex-direction:row;position:absolute;right:0;padding:.2em;height:2.6em}#nav input{flex-grow:2;margin:0;padding:0;width:30em;font-size:1em;line-height:2em}#nav .home,#nav .add,#nav .search{background-repeat:no-repeat;background-size:contain;background-position:center center;width:2.6em;height:2.6em;cursor:pointer;vertical-align:middle}#nav .home{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTEyIDUxMjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTUxMiwyOTZsLTk2LTk2VjU2aC02NHY4MGwtOTYtOTZMMCwyOT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1NGwyMi44MjgtMjIuMDg4QzM0MC44MjcsMzA3LjczNSwzNDAuOTksMjk4LjEyNSwzMzUuMTY1LDI5Mi4wNzF6IE0xODIuMzA2LDE4MS44MQ0KCQljLTMyLjg1MiwzMi44NTctODYuMzEyLDMyLjg1Ny0xMTkuMTU5LDAuMDExYy0zMi44NTItMzIuODUyLTMyLjg0Ny04Ni4zMTgsMC0xMTkuMTY0YzMyLjg0Ny0zMi44NTIsODYuMzA3LTMyLjg0NywxMTkuMTQ4LDAuMDA1DQoJCUMyMTUuMTUyLDk1LjUwOSwyMTUuMTUyLDE0OC45NjQsMTgyLjMwNiwxODEuODF6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==)}#status{padding:.5em;height:2em;line-height:2em;text-align:left;opacity:1;background-color:white;overflow:hidden;white-space:nowrap;transition:background-color 1s}#stats{display:flex;flex-direction:column;width:100%}#download{flex-grow:2;line-height:2em;margin:.3em;text-align:center;box-shadow:0 0 .2em black;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9Ijk0NC42OTlweCIgaGVpZ2h0PSI5NDQuNjk5cHgiIHZpZXdCb3g9IjAgMCA5NDQuNjk5IDk0NC42OTkiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDk0NC42OTkgOTQ0LjY5OTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTg5NC44MDEsNTc5LjA1aC0zMDkuNWwtNDEuNSw0Ny4xOTljLTE4LDIwLjUtNDQuMTAyLDMyLjMwMS03MS40MDEsMzIuMzAxYy0yNy4zLDAtNTMuNC0xMS44MDEtNzEuNC0zMi4zMDFsLTQxLjUtNDcuMTk5DQoJCUg1MGMtMjcuNiwwLTUwLDIyLjQtNTAsNTB2MTk4LjVjMCwyNy42LDIyLjQsNTAsNTAsNTBoODQ0LjY5OWMyNy42MDIsMCw1MC0yMi40LDUwLTUwdi0xOTguNQ0KCQlDOTQ0LjgwMSw2MDEuNDUsOTIyLjQsNTc5LjA1LDg5NC44MDEsNTc5LjA1eiBNMTM5LjIsNzcwLjk1Yy0yMy41LDAtNDIuNi0xOS4xMDItNDIuNi00Mi42MDJzMTkuMS00Mi42LDQyLjYtNDIuNg0KCQlzNDIuNiwxOS4xLDQyLjYsNDIuNlMxNjIuNyw3NzAuOTUsMTM5LjIsNzcwLjk1eiIvPg0KCTxwYXRoIGQ9Ik00MTkuNCw1NzkuMDVsMTUuNCwxNy42YzEwLDExLjMwMSwyMy44LDE3LDM3LjYsMTdjMTMuNzk5LDAsMjcuNi01LjY5OSwzNy42LTE3bDE1LjQtMTcuNkw3MzQuMSwzNDEuMjUNCgkJYzI4LjQtMzIuMyw1LjQtODMtMzcuNi04M2gtNjUuNnYtMTQxLjFjMC0yNy42LTIyLjQtNTAtNTAtNTBoLTIxN2MtMjcuNiwwLTUwLDIyLjQtNTAsNTB2MTQxLjJoLTY1LjZjLTQzLDAtNjUuOSw1MC43LTM3LjYsODMNCgkJTDQxOS40LDU3OS4wNXoiLz4NCjwvZz4NCjwvc3ZnPg0K),linear-gradient(-90deg,white,white);background-position:.2em center,0 0;background-size:1.6em 1.6em,100% 100%;background-repeat:no-repeat;transition:opacity .5s}#upload{flex-grow:2;line-height:2em;margin:.3em;text-align:center;box-shadow:0 0 .2em black;background-color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YzMiwxNzMuNTloNzMuMDg5djEyNy45MDljMCw0Ljk0OCwxLjgwOSw5LjIzMiw1LjQyNCwxMi44NDdjMy42MTcsMy42MTMsNy45LDUuNDI3LDEyLjg0Nyw1LjQyN2g3My4wOTYNCgkJCWM0Ljk0OCwwLDkuMjI3LTEuODEzLDEyLjg0Ny01LjQyN2MzLjYxNC0zLjYxNCw1LjQyMS03Ljg5OCw1LjQyMS0xMi44NDdWMTczLjU5aDczLjA5MWM3Ljk5NywwLDEzLjYxMy0zLjgwOSwxNi44NDQtMTEuNDINCgkJCWMzLjIzNy03LjQyMiwxLjkwMi0xMy45OS0zLjk5Ny0xOS43MDFMMjUwLjM4NSwxNC41NjJjLTMuNDI5LTMuNjE3LTcuNzA2LTUuNDI2LTEyLjg0Ny01LjQyNmMtNS4xMzYsMC05LjQxOSwxLjgwOS0xMi44NDcsNS40MjYNCgkJCUw5Ni43ODYsMTQyLjQ2OWMtNS45MDIsNS43MTEtNy4yMzMsMTIuMjc1LTMuOTk5LDE5LjcwMUM5Ni4wMjYsMTY5Ljc4NSwxMDEuNjQsMTczLjU5LDEwOS42MzIsMTczLjU5eiIvPg0KCTwvZz4NCjwvZz4NCjwvc3ZnPg0K);background-position:.2em center;background-size:1.6em 1.6em;background-repeat:no-repeat;transition:opacity .5s}#peers-button{flex-grow:1;line-height:2em;margin:.3em;text-align:center;box-shadow:0 0 .2em black;cursor:pointer;background-color:white;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIH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JIE0yNjYuOTExLDE3Mi43MDhjLTguNjYsMC0xNS42OTctNy4wMzctMTUuNjk3LTE1LjcwMWMwLTguNjc0LDcuMDM3LTE1LjcwMSwxNS42OTctMTUuNzAxYzguNjY0LDAsMTUuNzAxLDcuMDI3LDE1LjcwMSwxNS43MDENCgkJCQlDMjgyLjYxMiwxNjUuNjcxLDI3NS41NzUsMTcyLjcwOCwyNjYuOTExLDE3Mi43MDh6Ii8+DQoJCTwvZz4NCgk8L2c+DQo8L2c+DQo8L3N2Zz4NCg==);background-position:.2em center;background-size:1.6em 1.6em;background-repeat:no-repeat;transition:opacity .5s}#peers{height:400px}#peers-graph{position:absolute;padding:0;margin:0;z-index:3000;background-color:rgba(255,255,255,0.9);box-shadow:0 0 1em black}#library-button{flex-grow:1;line-height:2em;margin:.3em;text-align:center;box-shadow:0 0 .2em black;cursor:pointer;background-color:white;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjMxNC4wMTRweCIgaGVpZ2h0PSIzMTQuMDE1cHgiIHZpZXdCb3g9IjAgMCAzMTQuMDE0IDMxNC4wMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMxNC4wMTQgMzE0LjAxNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPGcgaW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em center;background-size:1.6em 1.6em;background-repeat:no-repeat;transition:opacity .5s}#library-items{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}#library-welcome{color:gray;padding:.3em;font-size:.9em}.library-item{box-shadow:0 0 2em rgba(0,0,0,0.3);margin:1em;padding:0}.library-remove{background-color:white;opacity:.5;cursor:pointer;transition:opacity .5s}.library-remove:hover{opacity:1.0}#tools{display:flex;flex-direction:row;align-items:center;justify-content:center}#layout,#share{flex-grow:0;line-height:2em;margin:.3em;text-align:center;vertical-align:center;white-space:nowrap}#layout-title,#share-title{color:gray}#layout-auto,#layout-list,#layout-binary,#layout-none,#share-www,#share-html,#share-magnet,#share-torrent{display:inline-block;width:2em;height:2em;vertical-align:middle;background-size:90% 90%;background-position:center center;background-repeat:no-repeat;cursor:pointer}#layout-auto{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjUzNS41cHgiIGhlaWdodD0iNTM1LjVweCIgdmlld0JveD0iMCAwIDUzNS41IDUzNS41IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MzUuNSA1MzUuNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQoJPg0KPGc+DQoJPGcgaWQ9ImF1dG8tZml4Ij4NCgkJPHBvbHlnb24gcG9pbnRzPSIxNjUuNzUsOTEuOC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 1em green;display:inline-block;vertical-align:middle;transition:opacity .5s}.link-copy{display:inline-block;vertical-align:middle;width:1.2em;height:1.2em;background-color:white;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgNDcwLjMzMyA0NzAuMzMzIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NzAuMzMzIDQ3MC4zMzM7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxnPg0KCQk8cGF0aCBkPSJNMzMzLjQ4MywwaC0xOTQuNjVjLTkuMzUsMC0xNyw3LjY1LTE3LDE3djczLjY2N0g0OC4xNjdjLTkuMzUsMC0xNyw3LjY1LTE3LDE3djM0NS42NjdjMCw5LjM1LDcuNjUsMTcsMTcsMTdoMjg2LjE2Nw0KCQkJYzkuMzUsMCwxNy03LjY1LDE3LTE3di03Ni41aDcwLjgzM2M5LjM1LDAsMTctNy42NSwxNy0xN1YxMDYuMjVjMC00LjUzMy0xLjctOC43ODMtNC44MTctMTEuOUwzNDUuNjY3LDUuMQ0KCQkJQzM0Mi41NSwxLjcsMzM4LjAxNywwLDMzMy40ODMsMHogTTMxNy4zMzMsNDM2LjMzM0g2NS4xNjdWMTI0LjY2N2g1Ni42Njd2MjM1LjE2N2MwLDkuMzUsNy42NSwxNywxNywxN2gxNzguNVY0MzYuMzMzeg0KCQkJIE0xNTUuODMzLDM0Mi44MzNWMzRoMTQ3LjMzM3Y5Ni4zMzNjMCw5LjM1LDcuNjUsMTcsMTcsMTdoODV2MTk1LjVIMTU1LjgzM3ogTTQwNS4xNjcsMTEzLjMzM2gtNjhWNDQuNzY3TDQwNS4xNjcsMTEzLjMzMw0KCQkJTDQwNS4xNjcsMTEzLjMzM3oiLz4NCgk8L2c+DQo8L2c+DQo8L3N2Zz4NCg==);background-size:contain;background-repeat:no-repeat;transition:opacity .5s}.link-copy:hover{opacity:1}.link-box{display:block;cursor:pointer;margin:.5em;padding:.5em;text-align:center;box-shadow:0 0 .2em black;opacity:.2;background-color:white;transition:opacity .5s}.link-box .label{display:inline-block;width:8em;text-align:right}.link-box input{width:50%}.link-box.link-active{opacity:.7}.link-box.link-active:hover{opacity:1}#credits{font-size:.8em;padding:1em;text-align:right;color:gray}#credits a{font-weight:bold;color:black;text-decoration:none}#credits a.social{display:inline-block;vertical-align:middle;width:1.2em;height:1.2em;padding-left:.5em;background-repeat:no-repeat;background-size:contain;background-position:center center}#credits a.github{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjQzOC41NDlweCIgaGVpZ2h0PSI0MzguNTQ5cHgiIHZpZXdCb3g9IjAgMCA0MzguNTQ5IDQzOC41NDkiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQzOC41NDkgNDM4LjU0OTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0i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zLDI5LjIyDQoJCWMxLjMxLTYuMzE2LTQuODk2LTExLjU4NS0xMC45MS05LjI1OUw1LjIxOCwxMjkuNDAyQy0xLjc4MywxMzIuMTAyLTEuNzIyLDE0Mi4wMTQsNS4yOTksMTQ0LjY0NXogTTk2Ljg2OSwxNTYuNzExbDEzNS4wOTgtODMuMjA3DQoJCWMyLjQyOC0xLjQ5MSw0LjkyNiwxLjc5MiwyLjg0MSwzLjcyNkwxMjMuMzEzLDE4MC44N2MtMy45MTksMy42NDgtNi40NDcsOC41My03LjE2MywxMy44MjlsLTMuNzk4LDI4LjE0Ng0KCQljLTAuNTAzLDMuNzU4LTUuNzgyLDQuMTMxLTYuODE5LDAuNDk0bC0xNC42MDctNTEuMzI1Qzg5LjI1MywxNjYuMTYsOTEuNjkxLDE1OS45MDcsOTYuODY5LDE1Ni43MTF6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==)}#webtorrent{display:inline-block;vertical-align:middle;width:10em;height:3em;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAD4CAYAAAAU9YK3AAAx50lEQVR4AezBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD27gFIzqyLw/gdrW3bRr/oGDWtwdq2bdu2bdu2bZuxs8Gc75+v1t6Z9zafVP2KKYX3qT7ndGI/hqzcWicLSbscID1kJnEAAABApeMXobzUy3livzNCekmdOAAAAIAAQVc0ym7ytdjfeEFCcZ0BAAAAECDIyzNi/9JYOV/mFgcAAAAQIPgndbKw3CTWSR2yncwgDgAAACBA8Gfq5BiZKJaAAdJTHAAAAECA4Cf1srV8Ipaw8fKULMWvMwAAAAgQ9JFHpEPMo7FyiswpDgAAAKitAME8cqlYkY2U9WRqcQAAAEB1BwjqZX8ZI1ZCX0skDgAAAKjOAMH68q5YmRgr98h84gAAAIDKDxDUSSj3SIdYGRonR8rs4gAAAID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g8YmOvNwAAAoQt8UXxsSgr7NZ4cTxzc605AAAChC3x/XHdCs15nBZT1h0AgM0dIDw2/ixKTW6PL44HWOshAAAECLviNRXPefxCPDo+AwAABAgn2hanxGlRluHVMWo9AQAQICzUL8RNi5zzuDCa1g4AAAHCUjw1/nEB1/beEl8fD7ZmywEAgABhSxyJt0c5wc3x2/Fk6wQAgAChStvi5Hh1vC/+9O6PWwEAgAABAAAQIAAAgAABAAAECAAAgAABAAAECAAAgAABAAAECAAAIEAAAAAECAAAIEAAAAAECAAAIEAAAAABAgAAIEAAAAABAgAAIEAAAAABAgAA8O8UlhupCZowPAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-size:contain;background-position:center center}#viewer{position:absolute;z-index:0;margin:0;padding:0;border:0;text-align:center;width:100%}#viewer>.itemrow{padding:.5em}#viewer>.itemrow:nth-child(odd){background-color:rgba(0,0,0,0.1)}#viewer>.itemrow>.title{font-size:1.2em}#viewer .item{display:inline-block;max-width:95%;margin:1em;line-height:0;box-shadow:0 0 1em black}#viewer>.itemrow>.wait{height:5em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB3aWR0aD0iMjAwcHgiICBoZWlnaHQ9IjIwMHB4IiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIGNsYXNzPSJsZHMtYmFycyIgc3R5bGU9ImJhY2tncm91bmQ6IG5vbmU7Ij48cmVjdCBuZy1hdHRyLXg9Int7Y29uZmlnLngxfX0iIHk9IjMwIiBuZy1hdHRyLXdpZHRoPSJ7e2NvbmZpZy53aWR0aH19IiBoZWlnaHQ9IjQwIiBmaWxsPSIjMzM3YWI3IiB4PSIxNSIgd2lkdGg9IjEwIj48YW5pbWF0ZSBhdHRyaWJ1d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y29uZmlnLng0fX0iIHk9IjMwIiBuZy1hdHRyLXdpZHRoPSJ7e2NvbmZpZy53aWR0aH19IiBoZWlnaHQ9IjQwIiBmaWxsPSIjZjBhZDRlIiB4PSI3NSIgd2lkdGg9IjEwIj48YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBjYWxjTW9kZT0ic3BsaW5lIiB2YWx1ZXM9IjE7MC4yOzEiIGtleVRpbWVzPSIwOzAuNTsxIiBkdXI9IjEiIGtleVNwbGluZXM9IjAuNSAwIDAuNSAxOzAuNSAwIDAuNSAxIiBiZWdpbj0iMHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj48L2FuaW1hdGU+PC9yZWN0Pjwvc3ZnPg==);background-repeat:no-repeat;background-size:contain;background-position:center center}#viewer .item>pre,#viewer .item>.markdown,#viewer .item>.bbcode{overflow:auto;max-width:100%;margin:0;padding:.5em;line-height:1em;box-shadow:none;text-align:left}#viewer .item>video,#viewer .item>audio,#viewer .item>object,#viewer .item>img{max-width:100%}#viewer .item>iframe{min-width:80vw;height:20em;resize:both}#viewer.viewer-primary{width:100%;height:95%}#viewer.viewer-primary>.item{width:100%;height:100%;max-width:100%;max-height:100%;margin:0;padding:0;border:0;box-shadow:none}#viewer.viewer-primary .item>iframe,#viewer.viewer-primary .item>video,#viewer.viewer-primary .item>audio,#viewer.viewer-primary .item>object,#viewer.viewer-primary .item>img{width:100%;height:100%;max-width:100%;max-height:100%;margin:0;padding:0;border:0}#viewer.viewer-primary .item>img{height:auto}.file{display:inline-block;margin:.2em;padding:.5em;box-shadow:inset 1px 1px 1px gray;text-align:center;font-size:.8em;transition:background-color 1s}.file-save,.file-open{display:inline-block;width:1em;height:1em;margin-left:1em;background-size:contain;background-repeat:no-repeat;transition:opacity 1s}.file-save{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSI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jwvc3ZnPg0K)}.file-open{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBzdHlsZT0iZmlsbDojMDEwMDAyOyIgZD0iTTI3LjUzNSw0SDE4LjVsLTIuNjI4LDMuNTA0TDEzLjUzNSw0aC05LjA3TDAsMTAuNjk3VjI4aDMyVjEwTDI3LjUzNSw0eiBNMzAsMjZIMlYxMS4zMDJMNS41MzUsNg0KCQloNi45M2w0LDZIMzBWMjZ6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==)}.file-pending{background-color:rgba(240,241,169,1)}.file-pending>.file-save{opacity:.1}.file-done{background-color:rgba(180,236,180,1)}.bbc_underline{text-decoration:underline}.bbc_code{display:block;word-wrap:normal;font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;background-color:white;box-shadow:inset 0 0 .5em black;padding:.5em}.bbc_highlight{background-color:yellow}.bbc_left{text-align:left}.bbc_right{text-align:right}.bbc_center{text-align:center}.bbc_justify{text-align:justify}.bbc_center>.bb_table{margin-left:auto;margin-right:auto}.bbc_table{width:100%}#nav{position:static;width:auto}#files{overflow-y:auto;padding:2em;max-height:30vh;background-color:rgba(0,0,0,0.1)}#download,#upload,#peers-button{display:block;width:auto}@media only screen and (max-width:640px){#main-area{font-size:.6em}}</style>
<script>(function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,g.WebTorrent=f()}})(function(){var _Mathabs=Math.abs,_Mathpow=Math.pow,_Mathfloor=Math.floor,_StringfromCharCode=String.fromCharCode,_Mathceil=Math.ceil,_Mathmax=Math.max,_Mathmin=Math.min,define;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module){const debug=require("debug")("webtorrent:file-stream"),stream=require("readable-stream");class FileStream extends stream.Readable{constructor(file,opts){super(opts),this.destroyed=!1,this._torrent=file._torrent;const start=opts&&opts.start||0,end=opts&&opts.end&&opts.end<file.length?opts.end:file.length-1,pieceLength=file._torrent.pieceLength;this._startPiece=0|(start+file.offset)/pieceLength,this._endPiece=0|(end+file.offset)/pieceLength,this._piece=this._startPiece,this._offset=start+file.offset-this._startPiece*pieceLength,this._missing=end-start+1,this._reading=!1,this._notifying=!1,this._criticalLength=_Mathmin(0|1048576/pieceLength,2)}_read(){this._reading||(this._reading=!0,this._notify())}_notify(){if(!this._reading||0===this._missing)return;if(!this._torrent.bitfield.get(this._piece))return this._torrent.critical(this._piece,this._piece+this._criticalLength);if(this._notifying)return;if(this._notifying=!0,this._torrent.destroyed)return this._destroy(new Error("Torrent removed"));const p=this._piece;this._torrent.store.get(p,(err,buffer)=>{if(this._notifying=!1,!this.destroyed)return debug("read %s (length %s) (err %s)",p,buffer.length,err&&err.message),err?this._destroy(err):void(this._offset&&(buffer=buffer.slice(this._offset),this._offset=0),this._missing<buffer.length&&(buffer=buffer.slice(0,this._missing)),this._missing-=buffer.length,debug("pushing buffer of length %s",buffer.length),this._reading=!1,this.push(buffer),0===this._missing&&this.push(null))}),this._piece+=1}destroy(onclose){this._destroy(null,onclose)}_destroy(err,onclose){this.destroyed||(this.destroyed=!0,!this._torrent.destroyed&&this._torrent.deselect(this._startPiece,this._endPiece,!0),err&&this.emit("error",err),this.emit("close"),onclose&&onclose())}}module.exports=FileStream},{debug:33,"readable-stream":86}],2:[function(require,module){(function(process){(function(){const{EventEmitter}=require("events"),{PassThrough}=require("readable-stream"),eos=require("end-of-stream"),path=require("path"),render=require("render-media"),streamToBlob=require("stream-to-blob"),streamToBlobURL=require("stream-to-blob-url"),streamToBuffer=require("stream-with-known-length-to-buffer"),FileStream=require("./file-stream");class File extends EventEmitter{constructor(torrent,file){super(),this._torrent=torrent,this._destroyed=!1,this.name=file.name,this.path=file.path,this.length=file.length,this.offset=file.offset,this.done=!1;const start=file.offset,end=start+file.length-1;this._startPiece=0|start/this._torrent.pieceLength,this._endPiece=0|end/this._torrent.pieceLength,0===this.length&&(this.done=!0,this.emit("done"))}get downloaded(){if(!this._torrent.bitfield)return 0;const{pieces,bitfield,pieceLength}=this._torrent,{_startPiece:start,_endPiece:end}=this,piece=pieces[start],irrelevantFirstPieceBytes=this.offset%pieceLength;let downloaded=bitfield.get(start)?pieceLength-irrelevantFirstPieceBytes:_Mathmax(pieceLength-irrelevantFirstPieceBytes-piece.missing,0);for(let index=start+1;index<=end;++index)if(bitfield.get(index))downloaded+=pieceLength;else{const piece=pieces[index];downloaded+=pieceLength-piece.missing}return _Mathmin(downloaded,this.length)}get progress(){return this.length?this.downloaded/this.length:0}select(priority){0===this.length||this._torrent.select(this._startPiece,this._endPiece,priority)}deselect(){0===this.length||this._torrent.deselect(this._startPiece,this._endPiece,!1)}createReadStream(opts){if(0===this.length){const empty=new PassThrough;return process.nextTick(()=>{empty.end()}),empty}const fileStream=new FileStream(this,opts);return this._torrent.select(fileStream._startPiece,fileStream._endPiece,!0,()=>{fileStream._notify()}),eos(fileStream,()=>{this._destroyed||!this._torrent.destroyed&&this._torrent.deselect(fileStream._startPiece,fileStream._endPiece,!0)}),fileStream}getBuffer(cb){streamToBuffer(this.createReadStream(),this.length,cb)}getBlob(cb){if("undefined"==typeof window)throw new Error("browser-only method");streamToBlob(this.createReadStream(),this._getMimeType()).then(blob=>cb(null,blob),err=>cb(err))}getBlobURL(cb){if("undefined"==typeof window)throw new Error("browser-only method");streamToBlobURL(this.createReadStream(),this._getMimeType()).then(blobUrl=>cb(null,blobUrl),err=>cb(err))}appendTo(elem,opts,cb){if("undefined"==typeof window)throw new Error("browser-only method");render.append(this,elem,opts,cb)}renderTo(elem,opts,cb){if("undefined"==typeof window)throw new Error("browser-only method");render.render(this,elem,opts,cb)}_getMimeType(){return render.mime[path.extname(this.name).toLowerCase()]}_destroy(){this._destroyed=!0,this._torrent=null}}module.exports=File}).call(this)}).call(this,require("_process"))},{"./file-stream":1,_process:62,"end-of-stream":35,events:25,path:26,"readable-stream":86,"render-media":87,"stream-to-blob":105,"stream-to-blob-url":104,"stream-with-known-length-to-buffer":106}],3:[function(require,module,exports){const arrayRemove=require("unordered-array-remove"),debug=require("debug")("webtorrent:peer"),Wire=require("bittorrent-protocol"),WebConn=require("./webconn");exports.createWebRTCPeer=(conn,swarm)=>{const peer=new Peer(conn.id,"webrtc");return peer.conn=conn,peer.swarm=swarm,peer.conn.connected?peer.onConnect():(peer.conn.once("connect",()=>{peer.onConnect()}),peer.conn.once("error",err=>{peer.destroy(err)}),peer.startConnectTimeout()),peer},exports.createTCPIncomingPeer=conn=>_createIncomingPeer(conn,"tcpIncoming"),exports.createUTPIncomingPeer=conn=>_createIncomingPeer(conn,"utpIncoming"),exports.createTCPOutgoingPeer=(addr,swarm)=>_createOutgoingPeer(addr,swarm,"tcpOutgoing"),exports.createUTPOutgoingPeer=(addr,swarm)=>_createOutgoingPeer(addr,swarm,"utpOutgoing");const _createIncomingPeer=(conn,type)=>{const addr=`${conn.remoteAddress}:${conn.remotePort}`,peer=new Peer(addr,type);return peer.conn=conn,peer.addr=addr,peer.onConnect(),peer},_createOutgoingPeer=(addr,swarm,type)=>{const peer=new Peer(addr,type);return peer.addr=addr,peer.swarm=swarm,peer};exports.createWebSeedPeer=(url,swarm)=>{const peer=new Peer(url,"webSeed");return peer.swarm=swarm,peer.conn=new WebConn(url,swarm),peer.onConnect(),peer};class Peer{constructor(id,type){this.id=id,this.type=type,debug("new %s Peer %s",type,id),this.addr=null,this.conn=null,this.swarm=null,this.wire=null,this.connected=!1,this.destroyed=!1,this.timeout=null,this.retries=0,this.sentHandshake=!1}onConnect(){if(!this.destroyed){this.connected=!0,debug("Peer %s connected",this.id),clearTimeout(this.connectTimeout);const conn=this.conn;conn.once("end",()=>{this.destroy()}),conn.once("close",()=>{this.destroy()}),conn.once("finish",()=>{this.destroy()}),conn.once("error",err=>{this.destroy(err)});const wire=this.wire=new Wire;wire.type=this.type,wire.once("end",()=>{this.destroy()}),wire.once("close",()=>{this.destroy()}),wire.once("finish",()=>{this.destroy()}),wire.once("error",err=>{this.destroy(err)}),wire.once("handshake",(infoHash,peerId)=>{this.onHandshake(infoHash,peerId)}),this.startHandshakeTimeout(),conn.pipe(wire).pipe(conn),this.swarm&&!this.sentHandshake&&this.handshake()}}onHandshake(infoHash,peerId){if(!this.swarm)return;if(this.destroyed)return;if(this.swarm.destroyed)return this.destroy(new Error("swarm already destroyed"));if(infoHash!==this.swarm.infoHash)return this.destroy(new Error("unexpected handshake info hash for this swarm"));if(peerId===this.swarm.peerId)return this.destroy(new Error("refusing to connect to ourselves"));debug("Peer %s got handshake %s",this.id,infoHash),clearTimeout(this.handshakeTimeout),this.retries=0;let addr=this.addr;!addr&&this.conn.remoteAddress&&this.conn.remotePort&&(addr=`${this.conn.remoteAddress}:${this.conn.remotePort}`),this.swarm._onWire(this.wire,addr);this.swarm&&!this.swarm.destroyed&&(this.sentHandshake||this.handshake())}handshake(){const opts={dht:!this.swarm.private&&!!this.swarm.client.dht};this.wire.handshake(this.swarm.infoHash,this.swarm.client.peerId,opts),this.sentHandshake=!0}startConnectTimeout(){clearTimeout(this.connectTimeout);this.connectTimeout=setTimeout(()=>{this.destroy(new Error("connect timeout"))},{webrtc:25e3,tcpOutgoing:5e3,utpOutgoing:5e3}[this.type]),this.connectTimeout.unref&&this.connectTimeout.unref()}startHandshakeTimeout(){clearTimeout(this.handshakeTimeout),this.handshakeTimeout=setTimeout(()=>{this.destroy(new Error("handshake timeout"))},25e3),this.handshakeTimeout.unref&&this.handshakeTimeout.unref()}destroy(err){if(this.destroyed)return;this.destroyed=!0,this.connected=!1,debug("destroy %s %s (error: %s)",this.type,this.id,err&&(err.message||err)),clearTimeout(this.connectTimeout),clearTimeout(this.handshakeTimeout);const swarm=this.swarm,conn=this.conn,wire=this.wire;this.swarm=null,this.conn=null,this.wire=null,swarm&&wire&&arrayRemove(swarm.wires,swarm.wires.indexOf(wire)),conn&&(conn.on("error",()=>{}),conn.destroy()),wire&&wire.destroy(),swarm&&swarm.removePeer(this.id)}}},{"./webconn":6,"bittorrent-protocol":15,debug:33,"unordered-array-remove":115}],4:[function(require,module){module.exports=class RarityMap{constructor(torrent){this._torrent=torrent,this._numPieces=torrent.pieces.length,this._pieces=Array(this._numPieces),this._onWire=wire=>{this.recalculate(),this._initWire(wire)},this._onWireHave=index=>{this._pieces[index]+=1},this._onWireBitfield=()=>{this.recalculate()},this._torrent.wires.forEach(wire=>{this._initWire(wire)}),this._torrent.on("wire",this._onWire),this.recalculate()}getRarestPiece(pieceFilterFunc){let candidates=[],min=1/0;for(let i=0;i<this._numPieces;++i){if(pieceFilterFunc&&!pieceFilterFunc(i))continue;const availability=this._pieces[i];availability===min?candidates.push(i):availability<min&&(candidates=[i],min=availability)}return candidates.length?candidates[0|Math.random()*candidates.length]:-1}destroy(){this._torrent.removeListener("wire",this._onWire),this._torrent.wires.forEach(wire=>{this._cleanupWireEvents(wire)}),this._torrent=null,this._pieces=null,this._onWire=null,this._onWireHave=null,this._onWireBitfield=null}_initWire(wire){wire._onClose=()=>{this._cleanupWireEvents(wire);for(let i=0;i<this._numPieces;++i)this._pieces[i]-=wire.peerPieces.get(i)},wire.on("have",this._onWireHave),wire.on("bitfield",this._onWireBitfield),wire.once("close",wire._onClose)}recalculate(){this._pieces.fill(0);for(const wire of this._torrent.wires)for(let i=0;i<this._numPieces;++i)this._pieces[i]+=wire.peerPieces.get(i)}_cleanupWireEvents(wire){wire.removeListener("have",this._onWireHave),wire.removeListener("bitfield",this._onWireBitfield),wire._onClose&&wire.removeListener("close",wire._onClose),wire._onClose=null}}},{}],5:[function(require,module){(function(process,global){(function(){function getBlockPipelineLength(wire,duration){return 2+_Mathceil(duration*wire.downloadSpeed()/Piece.BLOCK_LENGTH)}function getPiecePipelineLength(wire,duration,pieceLength){return 1+_Mathceil(duration*wire.downloadSpeed()/pieceLength)}function randomInt(high){return 0|Math.random()*high}function noop(){}const addrToIPPort=require("addr-to-ip-port"),BitField=require("bitfield").default,ChunkStoreWriteStream=require("chunk-store-stream/write"),debug=require("debug")("webtorrent:torrent"),Discovery=require("torrent-discovery"),EventEmitter=require("events").EventEmitter,fs=require("fs"),FSChunkStore=require("fs-chunk-store"),get=require("simple-get"),ImmediateChunkStore=require("immediate-chunk-store"),MultiStream=require("multistream"),net=require("net"),os=require("os"),parallel=require("run-parallel"),parallelLimit=require("run-parallel-limit"),parseTorrent=require("parse-torrent"),path=require("path"),Piece=require("torrent-piece"),pump=require("pump"),randomIterate=require("random-iterate"),sha1=require("simple-sha1"),speedometer=require("speedometer"),utMetadata=require("ut_metadata"),utPex=require("ut_pex"),utp=require("utp-native"),File=require("./file"),Peer=require("./peer"),RarityMap=require("./rarity-map"),Server=require("./server"),CHOKE_TIMEOUT=5e3,SPEED_THRESHOLD=3*Piece.BLOCK_LENGTH,PIPELINE_MAX_DURATION=1,FILESYSTEM_CONCURRENCY=process.browser?1/0:2,RECONNECT_WAIT=[1e3,5e3,15e3],VERSION=require("../package.json").version,USER_AGENT=`WebTorrent/${VERSION} (https://webtorrent.io)`;let TMP;try{TMP=path.join(fs.statSync("/tmp")&&"/tmp","webtorrent")}catch(err){TMP=path.join("function"==typeof os.tmpdir?os.tmpdir():"/","webtorrent")}class Torrent extends EventEmitter{constructor(torrentId,client,opts){super(),this._debugId="unknown infohash",this.client=client,this.announce=opts.announce,this.urlList=opts.urlList,this.path=opts.path,this.skipVerify=!!opts.skipVerify,this._store=opts.store||FSChunkStore,this._getAnnounceOpts=opts.getAnnounceOpts,"boolean"==typeof opts.private&&(this.private=opts.private),this.strategy=opts.strategy||"sequential",this.maxWebConns=opts.maxWebConns||4,this._rechokeNumSlots=!1===opts.uploads||0===opts.uploads?0:+opts.uploads||10,this._rechokeOptimisticWire=null,this._rechokeOptimisticTime=0,this._rechokeIntervalId=null,this.ready=!1,this.destroyed=!1,this.paused=!1,this.done=!1,this.metadata=null,this.store=null,this.files=[],this.pieces=[],this._amInterested=!1,this._selections=[],this._critical=[],this.wires=[],this._queue=[],this._peers={},this._peersLength=0,this.received=0,this.uploaded=0,this._downloadSpeed=speedometer(),this._uploadSpeed=speedometer(),this._servers=[],this._xsRequests=[],this._fileModtimes=opts.fileModtimes,null!==torrentId&&this._onTorrentId(torrentId),this._debug("new torrent")}get timeRemaining(){return this.done?0:0===this.downloadSpeed?1/0:1e3*((this.length-this.downloaded)/this.downloadSpeed)}get downloaded(){if(!this.bitfield)return 0;let downloaded=0;for(let index=0,len=this.pieces.length;index<len;++index)if(this.bitfield.get(index))downloaded+=index===len-1?this.lastPieceLength:this.pieceLength;else{const piece=this.pieces[index];downloaded+=piece.length-piece.missing}return downloaded}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){return this.length?this.downloaded/this.length:0}get ratio(){return this.uploaded/(this.received||this.length)}get numPeers(){return this.wires.length}get torrentFileBlobURL(){if("undefined"==typeof window)throw new Error("browser-only property");return this.torrentFile?URL.createObjectURL(new Blob([this.torrentFile],{type:"application/x-bittorrent"})):null}get _numQueued(){return this._queue.length+(this._peersLength-this._numConns)}get _numConns(){let numConns=0;for(const id in this._peers)this._peers[id].connected&&(numConns+=1);return numConns}get swarm(){return console.warn("WebTorrent: `torrent.swarm` is deprecated. Use `torrent` directly instead."),this}_onTorrentId(torrentId){if(this.destroyed)return;let parsedTorrent;try{parsedTorrent=parseTorrent(torrentId)}catch(err){}parsedTorrent?(this.infoHash=parsedTorrent.infoHash,this._debugId=parsedTorrent.infoHash.toString("hex").substring(0,7),process.nextTick(()=>{this.destroyed||this._onParsedTorrent(parsedTorrent)})):parseTorrent.remote(torrentId,(err,parsedTorrent)=>this.destroyed?void 0:err?this._destroy(err):void this._onParsedTorrent(parsedTorrent))}_onParsedTorrent(parsedTorrent){if(!this.destroyed){if(this._processParsedTorrent(parsedTorrent),!this.infoHash)return this._destroy(new Error("Malformed torrent data: No info hash"));(this.path||(this.path=path.join(TMP,this.infoHash)),this._rechokeIntervalId=setInterval(()=>{this._rechoke()},1e4),this._rechokeIntervalId.unref&&this._rechokeIntervalId.unref(),this.emit("_infoHash",this.infoHash),!this.destroyed)&&(this.emit("infoHash",this.infoHash),this.destroyed||(this.client.listening?this._onListening():this.client.once("listening",()=>{this._onListening()})))}}_processParsedTorrent(parsedTorrent){this._debugId=parsedTorrent.infoHash.toString("hex").substring(0,7),"undefined"!=typeof this.private&&(parsedTorrent.private=this.private),this.announce&&(parsedTorrent.announce=parsedTorrent.announce.concat(this.announce)),this.client.tracker&&global.WEBTORRENT_ANNOUNCE&&!parsedTorrent.private&&(parsedTorrent.announce=parsedTorrent.announce.concat(global.WEBTORRENT_ANNOUNCE)),this.urlList&&(parsedTorrent.urlList=parsedTorrent.urlList.concat(this.urlList)),parsedTorrent.announce=Array.from(new Set(parsedTorrent.announce)),parsedTorrent.urlList=Array.from(new Set(parsedTorrent.urlList)),Object.assign(this,parsedTorrent),this.magnetURI=parseTorrent.toMagnetURI(parsedTorrent),this.torrentFile=parseTorrent.toTorrentFile(parsedTorrent)}_onListening(){this.destroyed||(this.info?this._onMetadata(this):(this.xs&&this._getMetadataFromServer(),this._startDiscovery()))}_startDiscovery(){if(this.discovery||this.destroyed)return;let trackerOpts=this.client.tracker;trackerOpts&&(trackerOpts=Object.assign({},this.client.tracker,{getAnnounceOpts:()=>{const opts={uploaded:this.uploaded,downloaded:this.downloaded,left:_Mathmax(this.length-this.downloaded,0)};return this.client.tracker.getAnnounceOpts&&Object.assign(opts,this.client.tracker.getAnnounceOpts()),this._getAnnounceOpts&&Object.assign(opts,this._getAnnounceOpts()),opts}})),this.peerAddresses&&this.peerAddresses.forEach(peer=>this.addPeer(peer)),this.discovery=new Discovery({infoHash:this.infoHash,announce:this.announce,peerId:this.client.peerId,dht:!this.private&&this.client.dht,tracker:trackerOpts,port:this.client.torrentPort,userAgent:USER_AGENT,lsd:this.client.lsd}),this.discovery.on("error",err=>{this._destroy(err)}),this.discovery.on("peer",(peer,source)=>{this._debug("peer %s discovered via %s",peer,source);"string"==typeof peer&&this.done||this.addPeer(peer)}),this.discovery.on("trackerAnnounce",()=>{this.emit("trackerAnnounce"),0===this.numPeers&&this.emit("noPeers","tracker")}),this.discovery.on("dhtAnnounce",()=>{this.emit("dhtAnnounce"),0===this.numPeers&&this.emit("noPeers","dht")}),this.discovery.on("warning",err=>{this.emit("warning",err)})}_getMetadataFromServer(){function getMetadataFromURL(url,cb){function onResponse(err,res,torrent){if(self.destroyed)return cb(null);if(self.metadata)return cb(null);if(err)return self.emit("warning",new Error(`http error from xs param: ${url}`)),cb(null);if(200!==res.statusCode)return self.emit("warning",new Error(`non-200 status code ${res.statusCode} from xs param: ${url}`)),cb(null);let parsedTorrent;try{parsedTorrent=parseTorrent(torrent)}catch(err){}return parsedTorrent?parsedTorrent.infoHash===self.infoHash?void(self._onMetadata(parsedTorrent),cb(null)):(self.emit("warning",new Error(`got torrent file with incorrect info hash from xs param: ${url}`)),cb(null)):(self.emit("warning",new Error(`got invalid torrent file from xs param: ${url}`)),cb(null))}if(0!==url.indexOf("http://")&&0!==url.indexOf("https://"))return self.emit("warning",new Error(`skipping non-http xs param: ${url}`)),cb(null);let req;try{req=get.concat({url,method:"GET",headers:{"user-agent":USER_AGENT}},onResponse)}catch(err){return self.emit("warning",new Error(`skipping invalid url xs param: ${url}`)),cb(null)}self._xsRequests.push(req)}const self=this,urls=Array.isArray(this.xs)?this.xs:[this.xs],tasks=urls.map(url=>cb=>{getMetadataFromURL(url,cb)});parallel(tasks)}_onMetadata(metadata){if(this.metadata||this.destroyed)return;this._debug("got metadata"),this._xsRequests.forEach(req=>{req.abort()}),this._xsRequests=[];let parsedTorrent;if(metadata&&metadata.infoHash)parsedTorrent=metadata;else try{parsedTorrent=parseTorrent(metadata)}catch(err){return this._destroy(err)}if(this._processParsedTorrent(parsedTorrent),this.metadata=this.torrentFile,this.client.enableWebSeeds&&this.urlList.forEach(url=>{this.addWebSeed(url)}),this._rarityMap=new RarityMap(this),this.store=new ImmediateChunkStore(new this._store(this.pieceLength,{torrent:{infoHash:this.infoHash},files:this.files.map(file=>({path:path.join(this.path,file.path),length:file.length,offset:file.offset})),length:this.length,name:this.infoHash})),this.files=this.files.map(file=>new File(this,file)),this.so?this.files.forEach((v,i)=>{this.so.includes(i)?this.files[i].select():this.files[i].deselect()}):0!==this.pieces.length&&this.select(0,this.pieces.length-1,!1),this._hashes=this.pieces,this.pieces=this.pieces.map((hash,i)=>{const pieceLength=i===this.pieces.length-1?this.lastPieceLength:this.pieceLength;return new Piece(pieceLength)}),this._reservations=this.pieces.map(()=>[]),this.bitfield=new BitField(this.pieces.length),this.wires.forEach(wire=>{wire.ut_metadata&&wire.ut_metadata.setMetadata(this.metadata),this._onWireWithMetadata(wire)}),this.emit("metadata"),!this.destroyed)if(this.skipVerify)this._markAllVerified(),this._onStore();else{const onPiecesVerified=err=>err?this._destroy(err):void(this._debug("done verifying"),this._onStore());this._debug("verifying existing torrent data"),this._fileModtimes&&this._store===FSChunkStore?this.getFileModtimes((err,fileModtimes)=>{if(err)return this._destroy(err);const unchanged=this.files.map((_,index)=>fileModtimes[index]===this._fileModtimes[index]).every(x=>x);unchanged?(this._markAllVerified(),this._onStore()):this._verifyPieces(onPiecesVerified)}):this._verifyPieces(onPiecesVerified)}}getFileModtimes(cb){const ret=[];parallelLimit(this.files.map((file,index)=>cb=>{fs.stat(path.join(this.path,file.path),(err,stat)=>err&&"ENOENT"!==err.code?cb(err):void(ret[index]=stat&&stat.mtime.getTime(),cb(null)))}),FILESYSTEM_CONCURRENCY,err=>{this._debug("done getting file modtimes"),cb(err,ret)})}_verifyPieces(cb){parallelLimit(this.pieces.map((piece,index)=>cb=>this.destroyed?cb(new Error("torrent is destroyed")):void this.store.get(index,(err,buf)=>this.destroyed?cb(new Error("torrent is destroyed")):err?process.nextTick(cb,null):void sha1(buf,hash=>{if(this.destroyed)return cb(new Error("torrent is destroyed"));if(hash===this._hashes[index]){if(!this.pieces[index])return cb(null);this._debug("piece verified %s",index),this._markVerified(index)}else this._debug("piece invalid %s",index);cb(null)}))),FILESYSTEM_CONCURRENCY,cb)}rescanFiles(cb){if(this.destroyed)throw new Error("torrent is destroyed");cb||(cb=noop),this._verifyPieces(err=>err?(this._destroy(err),cb(err)):void(this._checkDone(),cb(null)))}_markAllVerified(){for(let index=0;index<this.pieces.length;index++)this._markVerified(index)}_markVerified(index){this.pieces[index]=null,this._reservations[index]=null,this.bitfield.set(index,!0)}_onStore(){this.destroyed||(this._debug("on store"),this._startDiscovery(),this.ready=!0,this.emit("ready"),this._checkDone(),this._updateSelections())}destroy(opts,cb){return"function"==typeof opts?this.destroy(null,opts):void this._destroy(null,opts,cb)}_destroy(err,opts,cb){if("function"==typeof opts)return this._destroy(err,null,opts);if(!this.destroyed){for(const id in this.destroyed=!0,this._debug("destroy"),this.client._remove(this),clearInterval(this._rechokeIntervalId),this._xsRequests.forEach(req=>{req.abort()}),this._rarityMap&&this._rarityMap.destroy(),this._peers)this.removePeer(id);this.files.forEach(file=>{file instanceof File&&file._destroy()});const tasks=this._servers.map(server=>cb=>{server.destroy(cb)});this.discovery&&tasks.push(cb=>{this.discovery.destroy(cb)}),this.store&&tasks.push(cb=>{opts&&opts.destroyStore?this.store.destroy(cb):this.store.close(cb)}),parallel(tasks,cb),err&&(0===this.listenerCount("error")?this.client.emit("error",err):this.emit("error",err)),this.emit("close"),this.client=null,this.files=[],this.discovery=null,this.store=null,this._rarityMap=null,this._peers=null,this._servers=null,this._xsRequests=null}}addPeer(peer){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.infoHash)throw new Error("addPeer() must not be called before the `infoHash` event");if(this.client.blocked){let host;if("string"==typeof peer){let parts;try{parts=addrToIPPort(peer)}catch(e){return this._debug("ignoring peer: invalid %s",peer),this.emit("invalidPeer",peer),!1}host=parts[0]}else"string"==typeof peer.remoteAddress&&(host=peer.remoteAddress);if(host&&this.client.blocked.contains(host))return this._debug("ignoring peer: blocked %s",peer),"string"!=typeof peer&&peer.destroy(),this.emit("blockedPeer",peer),!1}const wasAdded=!!this._addPeer(peer,this.client.utp?"utp":"tcp");return wasAdded?this.emit("peer",peer):this.emit("invalidPeer",peer),wasAdded}_addPeer(peer,type){if(this.destroyed)return"string"!=typeof peer&&peer.destroy(),null;if("string"==typeof peer&&!this._validAddr(peer))return this._debug("ignoring peer: invalid %s",peer),null;const id=peer&&peer.id||peer;if(this._peers[id])return this._debug("ignoring peer: duplicate (%s)",id),"string"!=typeof peer&&peer.destroy(),null;if(this.paused)return this._debug("ignoring peer: torrent is paused"),"string"!=typeof peer&&peer.destroy(),null;this._debug("add peer %s",id);let newPeer;return newPeer="string"==typeof peer?"utp"===type?Peer.createUTPOutgoingPeer(peer,this):Peer.createTCPOutgoingPeer(peer,this):Peer.createWebRTCPeer(peer,this),this._peers[newPeer.id]=newPeer,this._peersLength+=1,"string"==typeof peer&&(this._queue.push(newPeer),this._drain()),newPeer}addWebSeed(url){if(this.destroyed)throw new Error("torrent is destroyed");if(!/^https?:\/\/.+/.test(url))return this.emit("warning",new Error(`ignoring invalid web seed: ${url}`)),void this.emit("invalidPeer",url);if(this._peers[url])return this.emit("warning",new Error(`ignoring duplicate web seed: ${url}`)),void this.emit("invalidPeer",url);this._debug("add web seed %s",url);const newPeer=Peer.createWebSeedPeer(url,this);this._peers[newPeer.id]=newPeer,this._peersLength+=1,this.emit("peer",url)}_addIncomingPeer(peer){return this.destroyed?peer.destroy(new Error("torrent is destroyed")):this.paused?peer.destroy(new Error("torrent is paused")):void(this._debug("add incoming peer %s",peer.id),this._peers[peer.id]=peer,this._peersLength+=1)}removePeer(peer){const id=peer&&peer.id||peer;peer=this._peers[id];peer&&(this._debug("removePeer %s",id),delete this._peers[id],this._peersLength-=1,peer.destroy(),this._drain())}select(start,end,priority,notify){if(this.destroyed)throw new Error("torrent is destroyed");if(0>start||end<start||this.pieces.length<=end)throw new Error(`invalid selection ${start} : ${end}`);priority=+priority||0,this._debug("select %s-%s (priority %s)",start,end,priority),this._selections.push({from:start,to:end,offset:0,priority,notify:notify||noop}),this._selections.sort((a,b)=>b.priority-a.priority),this._updateSelections()}deselect(start,end,priority){if(this.destroyed)throw new Error("torrent is destroyed");priority=+priority||0,this._debug("deselect %s-%s (priority %s)",start,end,priority);for(let i=0;i<this._selections.length;++i){const s=this._selections[i];if(s.from===start&&s.to===end&&s.priority===priority){this._selections.splice(i,1);break}}this._updateSelections()}critical(start,end){if(this.destroyed)throw new Error("torrent is destroyed");this._debug("critical %s-%s",start,end);for(let i=start;i<=end;++i)this._critical[i]=!0;this._updateSelections()}_onWire(wire,addr){if(this._debug("got wire %s (%s)",wire._debugId,addr||"Unknown"),wire.on("download",downloaded=>{this.destroyed||(this.received+=downloaded,this._downloadSpeed(downloaded),this.client._downloadSpeed(downloaded),this.emit("download",downloaded),this.destroyed||this.client.emit("download",downloaded))}),wire.on("upload",uploaded=>{this.destroyed||(this.uploaded+=uploaded,this._uploadSpeed(uploaded),this.client._uploadSpeed(uploaded),this.emit("upload",uploaded),this.destroyed||this.client.emit("upload",uploaded))}),this.wires.push(wire),addr){const parts=addrToIPPort(addr);wire.remoteAddress=parts[0],wire.remotePort=parts[1]}this.client.dht&&this.client.dht.listening&&wire.on("port",port=>this.destroyed||this.client.dht.destroyed?void 0:wire.remoteAddress?0===port||65536<port?this._debug("ignoring invalid PORT from peer"):void(this._debug("port: %s (from %s)",port,addr),this.client.dht.addNode({host:wire.remoteAddress,port})):this._debug("ignoring PORT from peer with no address")),wire.on("timeout",()=>{this._debug("wire timeout (%s)",addr),wire.destroy()}),wire.setTimeout(3e4,!0),wire.setKeepAlive(!0),wire.use(utMetadata(this.metadata)),wire.ut_metadata.on("warning",err=>{this._debug("ut_metadata warning: %s",err.message)}),this.metadata||(wire.ut_metadata.on("metadata",metadata=>{this._debug("got metadata via ut_metadata"),this._onMetadata(metadata)}),wire.ut_metadata.fetch()),"function"!=typeof utPex||this.private||(wire.use(utPex()),wire.ut_pex.on("peer",peer=>{this.done||(this._debug("ut_pex: got peer: %s (from %s)",peer,addr),this.addPeer(peer))}),wire.ut_pex.on("dropped",peer=>{const peerObj=this._peers[peer];peerObj&&!peerObj.connected&&(this._debug("ut_pex: dropped peer: %s (from %s)",peer,addr),this.removePeer(peer))}),wire.once("close",()=>{wire.ut_pex.reset()})),this.emit("wire",wire,addr),this.metadata&&process.nextTick(()=>{this._onWireWithMetadata(wire)})}_onWireWithMetadata(wire){let timeoutId=null;const onChokeTimeout=()=>{this.destroyed||wire.destroyed||(this._numQueued>2*(this._numConns-this.numPeers)&&wire.amInterested?wire.destroy():(timeoutId=setTimeout(onChokeTimeout,CHOKE_TIMEOUT),timeoutId.unref&&timeoutId.unref()))};let i;const updateSeedStatus=()=>{if(wire.peerPieces.buffer.length===this.bitfield.buffer.length){for(i=0;i<this.pieces.length;++i)if(!wire.peerPieces.get(i))return;wire.isSeeder=!0,wire.choke()}};wire.on("bitfield",()=>{updateSeedStatus(),this._update(),this._updateWireInterest(wire)}),wire.on("have",()=>{updateSeedStatus(),this._update(),this._updateWireInterest(wire)}),wire.once("interested",()=>{wire.unchoke()}),wire.once("close",()=>{clearTimeout(timeoutId)}),wire.on("choke",()=>{clearTimeout(timeoutId),timeoutId=setTimeout(onChokeTimeout,CHOKE_TIMEOUT),timeoutId.unref&&timeoutId.unref()}),wire.on("unchoke",()=>{clearTimeout(timeoutId),this._update()}),wire.on("request",(index,offset,length,cb)=>length>131072?wire.destroy():void(this.pieces[index]||this.store.get(index,{offset,length},cb))),wire.bitfield(this.bitfield),this._updateWireInterest(wire),wire.peerExtensions.dht&&this.client.dht&&this.client.dht.listening&&wire.port(this.client.dht.address().port),"webSeed"!==wire.type&&(timeoutId=setTimeout(onChokeTimeout,CHOKE_TIMEOUT),timeoutId.unref&&timeoutId.unref()),wire.isSeeder=!1,updateSeedStatus()}_updateSelections(){!this.ready||this.destroyed||(process.nextTick(()=>{this._gcSelections()}),this._updateInterest(),this._update())}_gcSelections(){for(let i=0;i<this._selections.length;++i){const s=this._selections[i],oldOffset=s.offset;for(;this.bitfield.get(s.from+s.offset)&&s.from+s.offset<s.to;)s.offset+=1;oldOffset!==s.offset&&s.notify(),s.to===s.from+s.offset&&this.bitfield.get(s.from+s.offset)&&(this._selections.splice(i,1),i-=1,s.notify(),this._updateInterest())}this._selections.length||this.emit("idle")}_updateInterest(){const prev=this._amInterested;this._amInterested=!!this._selections.length,this.wires.forEach(wire=>this._updateWireInterest(wire));prev===this._amInterested||(this._amInterested?this.emit("interested"):this.emit("uninterested"))}_updateWireInterest(wire){let interested=!1;for(let index=0;index<this.pieces.length;++index)if(this.pieces[index]&&wire.peerPieces.get(index)){interested=!0;break}interested?wire.interested():wire.uninterested()}_update(){if(!this.destroyed){const ite=randomIterate(this.wires);for(let wire;wire=ite();)this._updateWireWrapper(wire)}}_updateWireWrapper(wire){const self=this;"undefined"!=typeof window&&"function"==typeof window.requestIdleCallback?window.requestIdleCallback(function(){self._updateWire(wire)},{timeout:250}):self._updateWire(wire)}_updateWire(wire){function genPieceFilterFunc(start,end,tried,rank){return i=>i>=start&&i<=end&&!(i in tried)&&wire.peerPieces.get(i)&&(!rank||rank(i))}function speedRanker(){const speed=wire.downloadSpeed()||1;if(speed>SPEED_THRESHOLD)return()=>!0;const secs=_Mathmax(1,wire.requests.length)*Piece.BLOCK_LENGTH/speed;let tries=10,ptr=0;return index=>{if(!tries||self.bitfield.get(index))return!0;for(let missing=self.pieces[index].missing;ptr<self.wires.length;ptr++){const otherWire=self.wires[ptr],otherSpeed=otherWire.downloadSpeed();if(!(otherSpeed<SPEED_THRESHOLD)&&!(otherSpeed<=speed)&&otherWire.peerPieces.get(index)&&!(0<(missing-=otherSpeed*secs)))return tries--,!1}return!0}}function shufflePriority(i){let last=i;for(let j=i;j<self._selections.length&&self._selections[j].priority;j++)last=j;const tmp=self._selections[i];self._selections[i]=self._selections[last],self._selections[last]=tmp}function trySelectWire(hotswap){if(wire.requests.length>=maxOutstandingRequests)return!0;const rank=speedRanker();for(let i=0;i<self._selections.length;i++){const next=self._selections[i];let piece;if("rarest"===self.strategy){const start=next.from+next.offset,end=next.to,tried={};let tries=0;for(const filter=genPieceFilterFunc(start,end,tried,rank);tries<end-start+1&&(piece=self._rarityMap.getRarestPiece(filter),!(0>piece));){for(;self._request(wire,piece,self._critical[piece]||hotswap););if(wire.requests.length<maxOutstandingRequests){tried[piece]=!0,tries++;continue}return next.priority&&shufflePriority(i),!0}}else for(piece=next.from+next.offset;piece<=next.to;piece++)if(wire.peerPieces.get(piece)&&rank(piece)){for(;self._request(wire,piece,self._critical[piece]||hotswap););if(!(wire.requests.length<maxOutstandingRequests))return next.priority&&shufflePriority(i),!0}}return!1}const self=this;if(wire.peerChoking)return;if(!wire.downloaded)return function(){if(!wire.requests.length)for(let i=self._selections.length;i--;){const next=self._selections[i];let piece;if("rarest"===self.strategy){const start=next.from+next.offset,end=next.to,tried={};let tries=0;for(const filter=genPieceFilterFunc(start,end,tried);tries<end-start+1&&(piece=self._rarityMap.getRarestPiece(filter),!(0>piece));){if(self._request(wire,piece,!1))return;tried[piece]=!0,tries+=1}}else for(piece=next.to;piece>=next.from+next.offset;--piece)if(wire.peerPieces.get(piece)&&self._request(wire,piece,!1))return}}();const minOutstandingRequests=getBlockPipelineLength(wire,.5);if(wire.requests.length>=minOutstandingRequests)return;const maxOutstandingRequests=getBlockPipelineLength(wire,PIPELINE_MAX_DURATION);trySelectWire(!1)||trySelectWire(!0)}_rechoke(){if(this.ready){const wireStack=this.wires.map(wire=>({wire,random:Math.random()})).sort((objA,objB)=>{const wireA=objA.wire,wireB=objB.wire;return wireA.downloadSpeed()===wireB.downloadSpeed()?wireA.uploadSpeed()===wireB.uploadSpeed()?wireA.amChoking===wireB.amChoking?objA.random-objB.random:wireA.amChoking?-1:1:wireA.uploadSpeed()-wireB.uploadSpeed():wireA.downloadSpeed()-wireB.downloadSpeed()}).map(obj=>obj.wire);0>=this._rechokeOptimisticTime?this._rechokeOptimisticWire=null:this._rechokeOptimisticTime-=1;for(let numInterestedUnchoked=0;0<wireStack.length&&numInterestedUnchoked<this._rechokeNumSlots-1;){const wire=wireStack.pop();wire.isSeeder||wire===this._rechokeOptimisticWire||(wire.unchoke(),wire.peerInterested&&numInterestedUnchoked++)}if(null===this._rechokeOptimisticWire&&0<this._rechokeNumSlots){const remaining=wireStack.filter(wire=>wire.peerInterested);if(0<remaining.length){const newOptimisticPeer=remaining[randomInt(remaining.length)];newOptimisticPeer.unchoke(),this._rechokeOptimisticWire=newOptimisticPeer,this._rechokeOptimisticTime=2}}wireStack.filter(wire=>wire!==this._rechokeOptimisticWire).forEach(wire=>wire.choke())}}_hotswap(wire,index){const speed=wire.downloadSpeed();if(speed<Piece.BLOCK_LENGTH)return!1;if(!this._reservations[index])return!1;const r=this._reservations[index];if(!r)return!1;let minSpeed=1/0,minWire,i;for(i=0;i<r.length;i++){const otherWire=r[i];if(!otherWire||otherWire===wire)continue;const otherSpeed=otherWire.downloadSpeed();otherSpeed>=SPEED_THRESHOLD||2*otherSpeed>speed||otherSpeed>minSpeed||(minWire=otherWire,minSpeed=otherSpeed)}if(!minWire)return!1;for(i=0;i<r.length;i++)r[i]===minWire&&(r[i]=null);for(i=0;i<minWire.requests.length;i++){const req=minWire.requests[i];req.piece===index&&this.pieces[index].cancel(0|req.offset/Piece.BLOCK_LENGTH)}return this.emit("hotswap",minWire,wire,index),!0}_request(wire,index,hotswap){function onUpdateTick(){process.nextTick(()=>{self._update()})}const self=this,numRequests=wire.requests.length,isWebSeed="webSeed"===wire.type;if(self.bitfield.get(index))return!1;const maxOutstandingRequests=isWebSeed?_Mathmin(getPiecePipelineLength(wire,PIPELINE_MAX_DURATION,self.pieceLength),self.maxWebConns):getBlockPipelineLength(wire,PIPELINE_MAX_DURATION);if(numRequests>=maxOutstandingRequests)return!1;const piece=self.pieces[index];let reservation=isWebSeed?piece.reserveRemaining():piece.reserve();if(-1===reservation&&hotswap&&self._hotswap(wire,index)&&(reservation=isWebSeed?piece.reserveRemaining():piece.reserve()),-1===reservation)return!1;let r=self._reservations[index];r||(r=self._reservations[index]=[]);let i=r.indexOf(null);-1===i&&(i=r.length),r[i]=wire;const chunkOffset=piece.chunkOffset(reservation),chunkLength=isWebSeed?piece.chunkLengthRemaining(reservation):piece.chunkLength(reservation);return wire.request(index,chunkOffset,chunkLength,function onChunk(err,chunk){if(self.destroyed)return;if(!self.ready)return self.once("ready",()=>{onChunk(err,chunk)});if(r[i]===wire&&(r[i]=null),piece!==self.pieces[index])return onUpdateTick();if(err)return self._debug("error getting piece %s (offset: %s length: %s) from %s: %s",index,chunkOffset,chunkLength,`${wire.remoteAddress}:${wire.remotePort}`,err.message),isWebSeed?piece.cancelRemaining(reservation):piece.cancel(reservation),void onUpdateTick();if(self._debug("got piece %s (offset: %s length: %s) from %s",index,chunkOffset,chunkLength,`${wire.remoteAddress}:${wire.remotePort}`),!piece.set(reservation,chunk,wire))return onUpdateTick();const buf=piece.flush();sha1(buf,hash=>{if(!self.destroyed){if(hash===self._hashes[index]){if(!self.pieces[index])return;self._debug("piece verified %s",index),self.pieces[index]=null,self._reservations[index]=null,self.bitfield.set(index,!0),self.store.put(index,buf),self.wires.forEach(wire=>{wire.have(index)}),self._checkDone()&&!self.destroyed&&self.discovery.complete()}else self.pieces[index]=new Piece(piece.length),self.emit("warning",new Error(`Piece ${index} failed verification`));onUpdateTick()}})}),!0}_checkDone(){if(this.destroyed)return;this.files.forEach(file=>{if(!file.done){for(let i=file._startPiece;i<=file._endPiece;++i)if(!this.bitfield.get(i))return;file.done=!0,file.emit("done"),this._debug(`file done: ${file.name}`)}});let done=!0;for(let i=0;i<this._selections.length;i++){const selection=this._selections[i];for(let piece=selection.from;piece<=selection.to;piece++)if(!this.bitfield.get(piece)){done=!1;break}if(!done)break}return!this.done&&done&&(this.done=!0,this._debug(`torrent done: ${this.infoHash}`),this.emit("done")),this._gcSelections(),done}load(streams,cb){if(this.destroyed)throw new Error("torrent is destroyed");if(!this.ready)return this.once("ready",()=>{this.load(streams,cb)});Array.isArray(streams)||(streams=[streams]),cb||(cb=noop);const readable=new MultiStream(streams),writable=new ChunkStoreWriteStream(this.store,this.pieceLength);pump(readable,writable,err=>err?cb(err):void(this._markAllVerified(),this._checkDone(),cb(null)))}createServer(requestListener){if("function"!=typeof Server)throw new Error("node.js-only method");if(this.destroyed)throw new Error("torrent is destroyed");const server=new Server(this,requestListener);return this._servers.push(server),server}pause(){this.destroyed||(this._debug("pause"),this.paused=!0)}resume(){this.destroyed||(this._debug("resume"),this.paused=!1,this._drain())}_debug(){const args=[].slice.call(arguments);args[0]=`[${this.client?this.client._debugId:"No Client"}] [${this._debugId}] ${args[0]}`,debug(...args)}_drain(){if(this._debug("_drain numConns %s maxConns %s",this._numConns,this.client.maxConns),"function"!=typeof net.connect||this.destroyed||this.paused||this._numConns>=this.client.maxConns)return;this._debug("drain (%s queued, %s/%s peers)",this._numQueued,this.numPeers,this.client.maxConns);const peer=this._queue.shift();if(!peer)return;this._debug("%s connect attempt to %s",peer.type,peer.addr);const parts=addrToIPPort(peer.addr),opts={host:parts[0],port:parts[1]};peer.conn="utpOutgoing"===peer.type?utp.connect(opts.port,opts.host):net.connect(opts);const conn=peer.conn;conn.once("connect",()=>{peer.onConnect()}),conn.once("error",err=>{peer.destroy(err)}),peer.startConnectTimeout(),conn.on("close",()=>{if(!this.destroyed){if(peer.retries>=RECONNECT_WAIT.length){if(this.client.utp){const newPeer=this._addPeer(peer.addr,"tcp");newPeer&&(newPeer.retries=0)}else this._debug("conn %s closed: will not re-add (max %s attempts)",peer.addr,RECONNECT_WAIT.length);return}const ms=RECONNECT_WAIT[peer.retries];this._debug("conn %s closed: will re-add to queue in %sms (attempt %s)",peer.addr,ms,peer.retries+1);const reconnectTimeout=setTimeout(()=>{if(!this.destroyed){const newPeer=this._addPeer(peer.addr,this.client.utp?"utp":"tcp");newPeer&&(newPeer.retries=peer.retries+1)}},ms);reconnectTimeout.unref&&reconnectTimeout.unref()}})}_validAddr(addr){let parts;try{parts=addrToIPPort(addr)}catch(e){return!1}const host=parts[0],port=parts[1];return 0<port&&65535>port&&("127.0.0.1"!==host||port!==this.client.torrentPort)}}module.exports=Torrent}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"../package.json":124,"./file":2,"./peer":3,"./rarity-map":4,"./server":22,_process:62,"addr-to-ip-port":7,bitfield:14,"chunk-store-stream/write":31,debug:33,events:25,fs:23,"fs-chunk-store":49,"immediate-chunk-store":41,multistream:57,net:22,os:22,"parse-torrent":60,path:26,pump:63,"random-iterate":69,"run-parallel":90,"run-parallel-limit":89,"simple-get":94,"simple-sha1":96,speedometer:99,"torrent-discovery":111,"torrent-piece":112,ut_metadata:118,ut_pex:22,"utp-native":22}],6:[function(require,module){(function(Buffer){(function(){const BitField=require("bitfield").default,debug=require("debug")("webtorrent:webconn"),get=require("simple-get"),sha1=require("simple-sha1"),Wire=require("bittorrent-protocol"),VERSION=require("../package.json").version;module.exports=class WebConn extends Wire{constructor(url,torrent){super(),this.url=url,this.webPeerId=sha1.sync(url),this._torrent=torrent,this._init()}_init(){this.setKeepAlive(!0),this.once("handshake",infoHash=>{if(this.destroyed)return;this.handshake(infoHash,this.webPeerId);const numPieces=this._torrent.pieces.length,bitfield=new BitField(numPieces);for(let i=0;i<=numPieces;i++)bitfield.set(i,!0);this.bitfield(bitfield)}),this.once("interested",()=>{debug("interested"),this.unchoke()}),this.on("uninterested",()=>{debug("uninterested")}),this.on("choke",()=>{debug("choke")}),this.on("unchoke",()=>{debug("unchoke")}),this.on("bitfield",()=>{debug("bitfield")}),this.on("request",(pieceIndex,offset,length,callback)=>{debug("request pieceIndex=%d offset=%d length=%d",pieceIndex,offset,length),this.httpRequest(pieceIndex,offset,length,callback)})}httpRequest(pieceIndex,offset,length,cb){const pieceOffset=pieceIndex*this._torrent.pieceLength,rangeStart=pieceOffset+offset,rangeEnd=rangeStart+length-1,files=this._torrent.files;let requests;if(1>=files.length)requests=[{url:this.url,start:rangeStart,end:rangeEnd}];else{const requestedFiles=files.filter(file=>file.offset<=rangeEnd&&file.offset+file.length>rangeStart);if(1>requestedFiles.length)return cb(new Error("Could not find file corresponnding to web seed range request"));requests=requestedFiles.map(requestedFile=>{const fileEnd=requestedFile.offset+requestedFile.length-1,url=this.url+("/"===this.url[this.url.length-1]?"":"/")+requestedFile.path;return{url,fileOffsetInRange:_Mathmax(requestedFile.offset-rangeStart,0),start:_Mathmax(rangeStart-requestedFile.offset,0),end:_Mathmin(fileEnd,rangeEnd-requestedFile.offset)}})}let numRequestsSucceeded=0,hasError=!1,ret;1<requests.length&&(ret=Buffer.alloc(length)),requests.forEach(request=>{function onResponse(res,data){return 200>res.statusCode||300<=res.statusCode?(hasError=!0,cb(new Error(`Unexpected HTTP status code ${res.statusCode}`))):void(debug("Got data of length %d",data.length),1===requests.length?cb(null,data):(data.copy(ret,request.fileOffsetInRange),++numRequestsSucceeded===requests.length&&cb(null,ret)))}const url=request.url,start=request.start,end=request.end;debug("Requesting url=%s pieceIndex=%d offset=%d length=%d start=%d end=%d",url,pieceIndex,offset,length,start,end);const opts={url,method:"GET",headers:{"user-agent":`WebTorrent/${VERSION} (https://webtorrent.io)`,range:`bytes=${start}-${end}`}};get.concat(opts,(err,res,data)=>hasError?void 0:err?"undefined"==typeof window||url.startsWith(`${window.location.origin}/`)?(hasError=!0,cb(err)):get.head(url,(errHead,res)=>hasError?void 0:errHead?(hasError=!0,cb(errHead)):200>res.statusCode||300<=res.statusCode?(hasError=!0,cb(new Error(`Unexpected HTTP status code ${res.statusCode}`))):res.url===url?(hasError=!0,cb(err)):void(opts.url=res.url,get.concat(opts,(err,res,data)=>hasError?void 0:err?(hasError=!0,cb(err)):void onResponse(res,data)))):void onResponse(res,data))})}destroy(){super.destroy(),this._torrent=null}}}).call(this)}).call(this,require("buffer").Buffer)},{"../package.json":124,bitfield:14,"bittorrent-protocol":15,buffer:24,debug:33,"simple-get":94,"simple-sha1":96}],7:[function(require,module){let cache={},size=0;module.exports=function(addr){if(1e5===size&&module.exports.reset(),!cache[addr]){const m=/^\[?([^\]]+)\]?:(\d+)$/.exec(addr);if(!m)throw new Error(`invalid addr: ${addr}`);cache[addr]=[m[1],+m[2]],size+=1}return cache[addr]},module.exports.reset=function(){cache={},size=0}},{}],8:[function(require,module,exports){'use strict';function getLens(b64){var len=b64.length;if(0<len%4)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");-1===validLen&&(validLen=len);var placeHoldersLen=validLen===len?0:4-validLen%4;return[validLen,placeHoldersLen]}function _byteLength(b64,validLen,placeHoldersLen){return 3*(validLen+placeHoldersLen)/4-placeHoldersLen}function toByteArray(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr(_byteLength(b64,validLen,placeHoldersLen)),curByte=0,len=0<placeHoldersLen?validLen-4:validLen,tmp,i;for(i=0;i<len;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[curByte++]=255&tmp>>16,arr[curByte++]=255&tmp>>8,arr[curByte++]=255&tmp;return 2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp),1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=255&tmp>>8,arr[curByte++]=255&tmp),arr}function tripletToBase64(num){return lookup[63&num>>18]+lookup[63&num>>12]+lookup[63&num>>6]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var output=[],i=start,tmp;i<end;i+=3)tmp=(16711680&uint8[i]<<16)+(65280&uint8[i+1]<<8)+(255&uint8[i+2]),output.push(tripletToBase64(tmp));return output.join("")}function fromByteArray(uint8){for(var len=uint8.length,extraBytes=len%3,parts=[],maxChunkLength=16383,i=0,len2=len-extraBytes,tmp;i<len2;i+=maxChunkLength)parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength));return 1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[63&tmp<<4]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[63&tmp>>4]+lookup[63&tmp<<2]+"=")),parts.join("")}exports.byteLength=function(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return 3*(validLen+placeHoldersLen)/4-placeHoldersLen},exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"==typeof Uint8Array?Array:Uint8Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup[45]=62,revLookup[95]=63},{}],9:[function(require,module){function getIntFromBuffer(buffer,start,end){for(var sum=0,sign=1,i=start,num;i<end;i++){if(num=buffer[i],58>num&&48<=num){sum=10*sum+(num-48);continue}if(i!==start||43!==num){if(i===start&&45===num){sign=-1;continue}if(46===num)break;throw new Error("not a number: buffer["+i+"] = "+num)}}return sum*sign}function decode(data,start,end,encoding){return null==data||0===data.length?null:("number"!=typeof start&&null==encoding&&(encoding=start,start=void 0),"number"!=typeof end&&null==encoding&&(encoding=end,end=void 0),decode.position=0,decode.encoding=encoding||null,decode.data=Buffer.isBuffer(data)?data.slice(start,end):Buffer.from(data),decode.bytes=decode.data.length,decode.next())}var Buffer=require("safe-buffer").Buffer;const END_OF_TYPE=101;decode.bytes=0,decode.position=0,decode.data=null,decode.encoding=null,decode.next=function(){switch(decode.data[decode.position]){case 100:return decode.dictionary();case 108:return decode.list();case 105:return decode.integer();default:return decode.buffer();}},decode.find=function(chr){for(var i=decode.position,c=decode.data.length,d=decode.data;i<c;){if(d[i]===chr)return i;i++}throw new Error("Invalid data: Missing delimiter \""+_StringfromCharCode(chr)+"\" [0x"+chr.toString(16)+"]")},decode.dictionary=function(){decode.position++;for(var dict={};decode.data[decode.position]!==END_OF_TYPE;)dict[decode.buffer()]=decode.next();return decode.position++,dict},decode.list=function(){decode.position++;for(var lst=[];decode.data[decode.position]!==END_OF_TYPE;)lst.push(decode.next());return decode.position++,lst},decode.integer=function(){var end=decode.find(END_OF_TYPE),number=getIntFromBuffer(decode.data,decode.position+1,end);return decode.position+=end+1-decode.position,number},decode.buffer=function(){var sep=decode.find(58),length=getIntFromBuffer(decode.data,decode.position,sep),end=++sep+length;return decode.position=end,decode.encoding?decode.data.toString(decode.encoding,sep,end):decode.data.slice(sep,end)},module.exports=decode},{"safe-buffer":92}],10:[function(require,module){function encode(data,buffer,offset){var buffers=[],result=null;return encode._encode(buffers,data),result=Buffer.concat(buffers),encode.bytes=result.length,Buffer.isBuffer(buffer)?(result.copy(buffer,offset),buffer):result}var Buffer=require("safe-buffer").Buffer;encode.bytes=-1,encode._floatConversionDetected=!1,encode.getType=function(value){return Buffer.isBuffer(value)?"buffer":Array.isArray(value)?"array":ArrayBuffer.isView(value)?"arraybufferview":value instanceof Number?"number":value instanceof Boolean?"boolean":value instanceof ArrayBuffer?"arraybuffer":typeof value},encode._encode=function(buffers,data){if(null!=data)switch(encode.getType(data)){case"buffer":encode.buffer(buffers,data);break;case"object":encode.dict(buffers,data);break;case"array":encode.list(buffers,data);break;case"string":encode.string(buffers,data);break;case"number":encode.number(buffers,data);break;case"boolean":encode.number(buffers,data);break;case"arraybufferview":encode.buffer(buffers,Buffer.from(data.buffer,data.byteOffset,data.byteLength));break;case"arraybuffer":encode.buffer(buffers,Buffer.from(data));}};var buffE=Buffer.from("e"),buffD=Buffer.from("d"),buffL=Buffer.from("l");encode.buffer=function(buffers,data){buffers.push(Buffer.from(data.length+":"),data)},encode.string=function(buffers,data){buffers.push(Buffer.from(Buffer.byteLength(data)+":"+data))},encode.number=function(buffers,data){var val=(data/2147483648<<0)*2147483648+(data%2147483648<<0);buffers.push(Buffer.from("i"+val+"e")),val===data||encode._floatConversionDetected||(encode._floatConversionDetected=!0,console.warn("WARNING: Possible data corruption detected with value \""+data+"\":","Bencoding only defines support for integers, value was converted to \""+val+"\""),console.trace())},encode.dict=function(buffers,data){buffers.push(buffD);for(var j=0,keys=Object.keys(data).sort(),kl=keys.length,k;j<kl;j++)k=keys[j],null!=data[k]&&(encode.string(buffers,k),encode._encode(buffers,data[k]));buffers.push(buffE)},encode.list=function(buffers,data){var i=0,c=data.length;for(buffers.push(buffL);i<c;i++)null!=data[i]&&encode._encode(buffers,data[i]);buffers.push(buffE)},module.exports=encode},{"safe-buffer":92}],11:[function(require,module){var bencode=module.exports;bencode.encode=require("./encode"),bencode.decode=require("./decode"),bencode.byteLength=bencode.encodingLength=function(value){return bencode.encode(value).length}},{"./decode":9,"./encode":10}],12:[function(require,module){function parseRange(range){const generateRange=(start,end=start)=>Array.from({length:end-start+1},(cur,idx)=>idx+start);return range.reduce((acc,cur)=>{const r=cur.split("-").map(cur=>parseInt(cur));return acc.concat(generateRange(...r))},[])}module.exports=parseRange,module.exports.parse=parseRange,module.exports.compose=function(range){return range.reduce((acc,cur,idx,arr)=>((0===idx||cur!==arr[idx-1]+1)&&acc.push([]),acc[acc.length-1].push(cur),acc),[]).map(cur=>1<cur.length?`${cur[0]}-${cur[cur.length-1]}`:`${cur[0]}`)}},{}],13:[function(require,module){module.exports=function(haystack,needle,comparator,low,high){var mid,cmp;if(void 0===low)low=0;else if(low|=0,0>low||low>=haystack.length)throw new RangeError("invalid lower bound");if(void 0===high)high=haystack.length-1;else if(high|=0,high<low||high>=haystack.length)throw new RangeError("invalid upper bound");for(;low<=high;)if(mid=low+(high-low>>>1),cmp=+comparator(haystack[mid],needle,mid,haystack),0>cmp)low=mid+1;else if(0<cmp)high=mid-1;else return mid;return~low}},{}],14:[function(require,module,exports){"use strict";function getByteSize(num){var out=num>>3;return 0!=num%8&&out++,out}Object.defineProperty(exports,"__esModule",{value:!0});var BitField=function(){function BitField(data,opts){void 0===data&&(data=0);var grow=null===opts||void 0===opts?void 0:opts.grow;this.grow=grow&&isFinite(grow)&&getByteSize(grow)||grow||0,this.buffer="number"==typeof data?new Uint8Array(getByteSize(data)):data}return BitField.prototype.get=function(i){var j=i>>3;return j<this.buffer.length&&!!(this.buffer[j]&128>>i%8)},BitField.prototype.set=function(i,value){void 0===value&&(value=!0);var j=i>>3;if(value){if(this.buffer.length<j+1){var length_1=_Mathmax(j+1,_Mathmin(2*this.buffer.length,this.grow));if(length_1<=this.grow){var newBuffer=new Uint8Array(length_1);newBuffer.set(this.buffer),this.buffer=newBuffer}}this.buffer[j]|=128>>i%8}else j<this.buffer.length&&(this.buffer[j]&=~(128>>i%8))},BitField.prototype.forEach=function(fn,start,end){void 0===start&&(start=0),void 0===end&&(end=8*this.buffer.length);for(var i=start,j=i>>3,y=128>>i%8,byte=this.buffer[j];i<end;i++)fn(!!(byte&y),i),y=1==y?(byte=this.buffer[++j],128):y>>1},BitField}();exports.default=BitField},{}],15:[function(require,module){(function(Buffer){(function(){/*! bittorrent-protocol. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */const arrayRemove=require("unordered-array-remove"),bencode=require("bencode"),BitField=require("bitfield").default,debug=require("debug")("bittorrent-protocol"),randombytes=require("randombytes"),speedometer=require("speedometer"),stream=require("readable-stream"),MESSAGE_PROTOCOL=Buffer.from("\x13BitTorrent protocol"),MESSAGE_KEEP_ALIVE=Buffer.from([0,0,0,0]),MESSAGE_CHOKE=Buffer.from([0,0,0,1,0]),MESSAGE_UNCHOKE=Buffer.from([0,0,0,1,1]),MESSAGE_INTERESTED=Buffer.from([0,0,0,1,2]),MESSAGE_UNINTERESTED=Buffer.from([0,0,0,1,3]),MESSAGE_RESERVED=[0,0,0,0,0,0,0,0],MESSAGE_PORT=[0,0,0,3,9,0,0];class Request{constructor(piece,offset,length,callback){this.piece=piece,this.offset=offset,this.length=length,this.callback=callback}}class Wire extends stream.Duplex{constructor(){super(),this._debugId=randombytes(4).toString("hex"),this._debug("new wire"),this.peerId=null,this.peerIdBuffer=null,this.type=null,this.amChoking=!0,this.amInterested=!1,this.peerChoking=!0,this.peerInterested=!1,this.peerPieces=new BitField(0,{grow:4e5}),this.peerExtensions={},this.requests=[],this.peerRequests=[],this.extendedMapping={},this.peerExtendedMapping={},this.extendedHandshake={},this.peerExtendedHandshake={},this._ext={},this._nextExt=1,this.uploaded=0,this.downloaded=0,this.uploadSpeed=speedometer(),this.downloadSpeed=speedometer(),this._keepAliveInterval=null,this._timeout=null,this._timeoutMs=0,this.destroyed=!1,this._finished=!1,this._parserSize=0,this._parser=null,this._buffer=[],this._bufferSize=0,this.once("finish",()=>this._onFinish()),this._parseHandshake()}setKeepAlive(enable){this._debug("setKeepAlive %s",enable),clearInterval(this._keepAliveInterval);!1===enable||(this._keepAliveInterval=setInterval(()=>{this.keepAlive()},55e3))}setTimeout(ms,unref){this._debug("setTimeout ms=%d unref=%s",ms,unref),this._clearTimeout(),this._timeoutMs=ms,this._timeoutUnref=!!unref,this._updateTimeout()}destroy(){this.destroyed||(this.destroyed=!0,this._debug("destroy"),this.emit("close"),this.end())}end(...args){this._debug("end"),this._onUninterested(),this._onChoke(),super.end(...args)}use(Extension){function noop(){}const name=Extension.prototype.name;if(!name)throw new Error("Extension class requires a \"name\" property on the prototype");this._debug("use extension.name=%s",name);const ext=this._nextExt,handler=new Extension(this);"function"!=typeof handler.onHandshake&&(handler.onHandshake=noop),"function"!=typeof handler.onExtendedHandshake&&(handler.onExtendedHandshake=noop),"function"!=typeof handler.onMessage&&(handler.onMessage=noop),this.extendedMapping[ext]=name,this._ext[name]=handler,this[name]=handler,this._nextExt+=1}keepAlive(){this._debug("keep-alive"),this._push(MESSAGE_KEEP_ALIVE)}handshake(infoHash,peerId,extensions){let infoHashBuffer,peerIdBuffer;if("string"==typeof infoHash?(infoHash=infoHash.toLowerCase(),infoHashBuffer=Buffer.from(infoHash,"hex")):(infoHashBuffer=infoHash,infoHash=infoHashBuffer.toString("hex")),"string"==typeof peerId?peerIdBuffer=Buffer.from(peerId,"hex"):(peerIdBuffer=peerId,peerId=peerIdBuffer.toString("hex")),20!==infoHashBuffer.length||20!==peerIdBuffer.length)throw new Error("infoHash and peerId MUST have length 20");this._debug("handshake i=%s p=%s exts=%o",infoHash,peerId,extensions);const reserved=Buffer.from(MESSAGE_RESERVED);reserved[5]|=16,extensions&&extensions.dht&&(reserved[7]|=1),this._push(Buffer.concat([MESSAGE_PROTOCOL,reserved,infoHashBuffer,peerIdBuffer])),this._handshakeSent=!0,this.peerExtensions.extended&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_sendExtendedHandshake(){const msg=Object.assign({},this.extendedHandshake);for(const ext in msg.m={},this.extendedMapping){const name=this.extendedMapping[ext];msg.m[name]=+ext}this.extended(0,bencode.encode(msg)),this._extendedHandshakeSent=!0}choke(){if(!this.amChoking){for(this.amChoking=!0,this._debug("choke");this.peerRequests.length;)this.peerRequests.pop();this._push(MESSAGE_CHOKE)}}unchoke(){this.amChoking&&(this.amChoking=!1,this._debug("unchoke"),this._push(MESSAGE_UNCHOKE))}interested(){this.amInterested||(this.amInterested=!0,this._debug("interested"),this._push(MESSAGE_INTERESTED))}uninterested(){this.amInterested&&(this.amInterested=!1,this._debug("uninterested"),this._push(MESSAGE_UNINTERESTED))}have(index){this._debug("have %d",index),this._message(4,[index],null)}bitfield(bitfield){this._debug("bitfield"),Buffer.isBuffer(bitfield)||(bitfield=bitfield.buffer),this._message(5,[],bitfield)}request(index,offset,length,cb){return cb||(cb=()=>{}),this._finished?cb(new Error("wire is closed")):this.peerChoking?cb(new Error("peer is choking")):void(this._debug("request index=%d offset=%d length=%d",index,offset,length),this.requests.push(new Request(index,offset,length,cb)),this._updateTimeout(),this._message(6,[index,offset,length],null))}piece(index,offset,buffer){this._debug("piece index=%d offset=%d",index,offset),this.uploaded+=buffer.length,this.uploadSpeed(buffer.length),this.emit("upload",buffer.length),this._message(7,[index,offset],buffer)}cancel(index,offset,length){this._debug("cancel index=%d offset=%d length=%d",index,offset,length),this._callback(this._pull(this.requests,index,offset,length),new Error("request was cancelled"),null),this._message(8,[index,offset,length],null)}port(port){this._debug("port %d",port);const message=Buffer.from(MESSAGE_PORT);message.writeUInt16BE(port,5),this._push(message)}extended(ext,obj){if(this._debug("extended ext=%s",ext),"string"==typeof ext&&this.peerExtendedMapping[ext]&&(ext=this.peerExtendedMapping[ext]),"number"==typeof ext){const extId=Buffer.from([ext]),buf=Buffer.isBuffer(obj)?obj:bencode.encode(obj);this._message(20,[],Buffer.concat([extId,buf]))}else throw new Error(`Unrecognized extension: ${ext}`)}_read(){}_message(id,numbers,data){const dataLength=data?data.length:0,buffer=Buffer.allocUnsafe(5+4*numbers.length);buffer.writeUInt32BE(buffer.length+dataLength-4,0),buffer[4]=id;for(let i=0;i<numbers.length;i++)buffer.writeUInt32BE(numbers[i],5+4*i);this._push(buffer),data&&this._push(data)}_push(data){return this._finished?void 0:this.push(data)}_onKeepAlive(){this._debug("got keep-alive"),this.emit("keep-alive")}_onHandshake(infoHashBuffer,peerIdBuffer,extensions){const infoHash=infoHashBuffer.toString("hex"),peerId=peerIdBuffer.toString("hex");this._debug("got handshake i=%s p=%s exts=%o",infoHash,peerId,extensions),this.peerId=peerId,this.peerIdBuffer=peerIdBuffer,this.peerExtensions=extensions,this.emit("handshake",infoHash,peerId,extensions);for(var name in this._ext)this._ext[name].onHandshake(infoHash,peerId,extensions);extensions.extended&&this._handshakeSent&&!this._extendedHandshakeSent&&this._sendExtendedHandshake()}_onChoke(){for(this.peerChoking=!0,this._debug("got choke"),this.emit("choke");this.requests.length;)this._callback(this.requests.pop(),new Error("peer is choking"),null)}_onUnchoke(){this.peerChoking=!1,this._debug("got unchoke"),this.emit("unchoke")}_onInterested(){this.peerInterested=!0,this._debug("got interested"),this.emit("interested")}_onUninterested(){this.peerInterested=!1,this._debug("got uninterested"),this.emit("uninterested")}_onHave(index){this.peerPieces.get(index)||(this._debug("got have %d",index),this.peerPieces.set(index,!0),this.emit("have",index))}_onBitField(buffer){this.peerPieces=new BitField(buffer),this._debug("got bitfield"),this.emit("bitfield",this.peerPieces)}_onRequest(index,offset,length){if(this.amChoking)return;this._debug("got request index=%d offset=%d length=%d",index,offset,length);const respond=(err,buffer)=>request===this._pull(this.peerRequests,index,offset,length)?err?this._debug("error satisfying request index=%d offset=%d length=%d (%s)",index,offset,length,err.message):void this.piece(index,offset,buffer):void 0,request=new Request(index,offset,length,respond);this.peerRequests.push(request),this.emit("request",index,offset,length,respond)}_onPiece(index,offset,buffer){this._debug("got piece index=%d offset=%d",index,offset),this._callback(this._pull(this.requests,index,offset,buffer.length),null,buffer),this.downloaded+=buffer.length,this.downloadSpeed(buffer.length),this.emit("download",buffer.length),this.emit("piece",index,offset,buffer)}_onCancel(index,offset,length){this._debug("got cancel index=%d offset=%d length=%d",index,offset,length),this._pull(this.peerRequests,index,offset,length),this.emit("cancel",index,offset,length)}_onPort(port){this._debug("got port %d",port),this.emit("port",port)}_onExtended(ext,buf){if(0===ext){let info;try{info=bencode.decode(buf)}catch(err){this._debug("ignoring invalid extended handshake: %s",err.message||err)}if(!info)return;this.peerExtendedHandshake=info;if("object"==typeof info.m)for(var name in info.m)this.peerExtendedMapping[name]=+info.m[name].toString();for(name in this._ext)this.peerExtendedMapping[name]&&this._ext[name].onExtendedHandshake(this.peerExtendedHandshake);this._debug("got extended handshake"),this.emit("extended","handshake",this.peerExtendedHandshake)}else this.extendedMapping[ext]&&(ext=this.extendedMapping[ext],this._ext[ext]&&this._ext[ext].onMessage(buf)),this._debug("got extended message ext=%s",ext),this.emit("extended",ext,buf)}_onTimeout(){this._debug("request timed out"),this._callback(this.requests.shift(),new Error("request has timed out"),null),this.emit("timeout")}_write(data,encoding,cb){for(this._bufferSize+=data.length,this._buffer.push(data);this._bufferSize>=this._parserSize;){const buffer=1===this._buffer.length?this._buffer[0]:Buffer.concat(this._buffer);this._bufferSize-=this._parserSize,this._buffer=this._bufferSize?[buffer.slice(this._parserSize)]:[],this._parser(buffer.slice(0,this._parserSize))}cb(null)}_callback(request,err,buffer){request&&(this._clearTimeout(),!this.peerChoking&&!this._finished&&this._updateTimeout(),request.callback(err,buffer))}_clearTimeout(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null)}_updateTimeout(){this._timeoutMs&&this.requests.length&&!this._timeout&&(this._timeout=setTimeout(()=>this._onTimeout(),this._timeoutMs),this._timeoutUnref&&this._timeout.unref&&this._timeout.unref())}_parse(size,parser){this._parserSize=size,this._parser=parser}_onMessageLength(buffer){const length=buffer.readUInt32BE(0);0<length?this._parse(length,this._onMessage):(this._onKeepAlive(),this._parse(4,this._onMessageLength))}_onMessage(buffer){switch(this._parse(4,this._onMessageLength),buffer[0]){case 0:return this._onChoke();case 1:return this._onUnchoke();case 2:return this._onInterested();case 3:return this._onUninterested();case 4:return this._onHave(buffer.readUInt32BE(1));case 5:return this._onBitField(buffer.slice(1));case 6:return this._onRequest(buffer.readUInt32BE(1),buffer.readUInt32BE(5),buffer.readUInt32BE(9));case 7:return this._onPiece(buffer.readUInt32BE(1),buffer.readUInt32BE(5),buffer.slice(9));case 8:return this._onCancel(buffer.readUInt32BE(1),buffer.readUInt32BE(5),buffer.readUInt32BE(9));case 9:return this._onPort(buffer.readUInt16BE(1));case 20:return this._onExtended(buffer.readUInt8(1),buffer.slice(2));default:return this._debug("got unknown message"),this.emit("unknownmessage",buffer);}}_parseHandshake(){this._parse(1,buffer=>{const pstrlen=buffer.readUInt8(0);this._parse(pstrlen+48,handshake=>{const protocol=handshake.slice(0,pstrlen);return"BitTorrent protocol"===protocol.toString()?void(handshake=handshake.slice(pstrlen),this._onHandshake(handshake.slice(8,28),handshake.slice(28,48),{dht:!!(1&handshake[7]),extended:!!(16&handshake[5])}),this._parse(4,this._onMessageLength)):(this._debug("Error: wire not speaking BitTorrent protocol (%s)",protocol.toString()),void this.end())})})}_onFinish(){for(this._finished=!0,this.push(null);this.read(););for(clearInterval(this._keepAliveInterval),this._parse(Number.MAX_VALUE,()=>{});this.peerRequests.length;)this.peerRequests.pop();for(;this.requests.length;)this._callback(this.requests.pop(),new Error("wire was closed"),null)}_debug(...args){args[0]=`[${this._debugId}] ${args[0]}`,debug(...args)}_pull(requests,piece,offset,length){for(let i=0;i<requests.length;i++){const req=requests[i];if(req.piece===piece&&req.offset===offset&&req.length===length)return arrayRemove(requests,i),req}return null}}module.exports=Wire}).call(this)}).call(this,require("buffer").Buffer)},{bencode:11,bitfield:14,buffer:24,debug:33,randombytes:70,"readable-stream":86,speedometer:99,"unordered-array-remove":115}],16:[function(require,module){(function(process,Buffer){(function(){const debug=require("debug")("bittorrent-tracker:client"),EventEmitter=require("events"),once=require("once"),parallel=require("run-parallel"),Peer=require("simple-peer"),common=require("./lib/common"),HTTPTracker=require("./lib/client/http-tracker"),UDPTracker=require("./lib/client/udp-tracker"),WebSocketTracker=require("./lib/client/websocket-tracker");class Client extends EventEmitter{constructor(opts={}){if(super(),!opts.peerId)throw new Error("Option `peerId` is required");if(!opts.infoHash)throw new Error("Option `infoHash` is required");if(!opts.announce)throw new Error("Option `announce` is required");if(!process.browser&&!opts.port)throw new Error("Option `port` is required");this.peerId="string"==typeof opts.peerId?opts.peerId:opts.peerId.toString("hex"),this._peerIdBuffer=Buffer.from(this.peerId,"hex"),this._peerIdBinary=this._peerIdBuffer.toString("binary"),this.infoHash="string"==typeof opts.infoHash?opts.infoHash.toLowerCase():opts.infoHash.toString("hex"),this._infoHashBuffer=Buffer.from(this.infoHash,"hex"),this._infoHashBinary=this._infoHashBuffer.toString("binary"),debug("new client %s",this.infoHash),this.destroyed=!1,this._port=opts.port,this._getAnnounceOpts=opts.getAnnounceOpts,this._rtcConfig=opts.rtcConfig,this._userAgent=opts.userAgent,this._wrtc="function"==typeof opts.wrtc?opts.wrtc():opts.wrtc;let announce="string"==typeof opts.announce?[opts.announce]:null==opts.announce?[]:opts.announce;announce=announce.map(announceUrl=>(announceUrl=announceUrl.toString(),"/"===announceUrl[announceUrl.length-1]&&(announceUrl=announceUrl.substring(0,announceUrl.length-1)),announceUrl)),announce=Array.from(new Set(announce));const webrtcSupport=!1!==this._wrtc&&(!!this._wrtc||Peer.WEBRTC_SUPPORT),nextTickWarn=err=>{process.nextTick(()=>{this.emit("warning",err)})};this._trackers=announce.map(announceUrl=>{let parsedUrl;try{parsedUrl=new URL(announceUrl)}catch(err){return nextTickWarn(new Error(`Invalid tracker URL: ${announceUrl}`)),null}const port=parsedUrl.port;if(0>port||65535<port)return nextTickWarn(new Error(`Invalid tracker port: ${announceUrl}`)),null;const protocol=parsedUrl.protocol;return("http:"===protocol||"https:"===protocol)&&"function"==typeof HTTPTracker?new HTTPTracker(this,announceUrl):"udp:"===protocol&&"function"==typeof UDPTracker?new UDPTracker(this,announceUrl):("ws:"===protocol||"wss:"===protocol)&&webrtcSupport?"ws:"===protocol&&"undefined"!=typeof window&&"https:"===window.location.protocol?(nextTickWarn(new Error(`Unsupported tracker protocol: ${announceUrl}`)),null):new WebSocketTracker(this,announceUrl):(nextTickWarn(new Error(`Unsupported tracker protocol: ${announceUrl}`)),null)}).filter(Boolean)}start(opts){opts=this._defaultAnnounceOpts(opts),opts.event="started",debug("send `start` %o",opts),this._announce(opts),this._trackers.forEach(tracker=>{tracker.setInterval()})}stop(opts){opts=this._defaultAnnounceOpts(opts),opts.event="stopped",debug("send `stop` %o",opts),this._announce(opts)}complete(opts){opts||(opts={}),opts=this._defaultAnnounceOpts(opts),opts.event="completed",debug("send `complete` %o",opts),this._announce(opts)}update(opts){opts=this._defaultAnnounceOpts(opts),opts.event&&delete opts.event,debug("send `update` %o",opts),this._announce(opts)}_announce(opts){this._trackers.forEach(tracker=>{tracker.announce(opts)})}scrape(opts){debug("send `scrape`"),opts||(opts={}),this._trackers.forEach(tracker=>{tracker.scrape(opts)})}setInterval(intervalMs){debug("setInterval %d",intervalMs),this._trackers.forEach(tracker=>{tracker.setInterval(intervalMs)})}destroy(cb){if(!this.destroyed){this.destroyed=!0,debug("destroy");const tasks=this._trackers.map(tracker=>cb=>{tracker.destroy(cb)});parallel(tasks,cb),this._trackers=[],this._getAnnounceOpts=null}}_defaultAnnounceOpts(opts={}){return null==opts.numwant&&(opts.numwant=common.DEFAULT_ANNOUNCE_PEERS),null==opts.uploaded&&(opts.uploaded=0),null==opts.downloaded&&(opts.downloaded=0),this._getAnnounceOpts&&(opts=Object.assign({},opts,this._getAnnounceOpts())),opts}}Client.scrape=(opts,cb)=>{if(cb=once(cb),!opts.infoHash)throw new Error("Option `infoHash` is required");if(!opts.announce)throw new Error("Option `announce` is required");const clientOpts=Object.assign({},opts,{infoHash:Array.isArray(opts.infoHash)?opts.infoHash[0]:opts.infoHash,peerId:Buffer.from("01234567890123456789"),port:6881}),client=new Client(clientOpts);client.once("error",cb),client.once("warning",cb);let len=Array.isArray(opts.infoHash)?opts.infoHash.length:1;const results={};return client.on("scrape",data=>{if(len-=1,results[data.infoHash]=data,0===len){client.destroy();const keys=Object.keys(results);1===keys.length?cb(null,results[keys[0]]):cb(null,results)}}),opts.infoHash=Array.isArray(opts.infoHash)?opts.infoHash.map(infoHash=>Buffer.from(infoHash,"hex")):Buffer.from(opts.infoHash,"hex"),client.scrape({infoHash:opts.infoHash}),client},module.exports=Client}).call(this)}).call(this,require("_process"),require("buffer").Buffer)},{"./lib/client/http-tracker":22,"./lib/client/udp-tracker":22,"./lib/client/websocket-tracker":18,"./lib/common":19,_process:62,buffer:24,debug:33,events:25,once:59,"run-parallel":90,"simple-peer":95}],17:[function(require,module){const EventEmitter=require("events");module.exports=class Tracker extends EventEmitter{constructor(client,announceUrl){super(),this.client=client,this.announceUrl=announceUrl,this.interval=null,this.destroyed=!1}setInterval(intervalMs){null==intervalMs&&(intervalMs=this.DEFAULT_ANNOUNCE_INTERVAL),clearInterval(this.interval),intervalMs&&(this.interval=setInterval(()=>{this.announce(this.client._defaultAnnounceOpts())},intervalMs),this.interval.unref&&this.interval.unref())}}},{events:25}],18:[function(require,module){function noop(){}const debug=require("debug")("bittorrent-tracker:websocket-tracker"),Peer=require("simple-peer"),randombytes=require("randombytes"),Socket=require("simple-websocket"),common=require("../common"),Tracker=require("./tracker"),socketPool={};class WebSocketTracker extends Tracker{constructor(client,announceUrl){super(client,announceUrl),debug("new websocket tracker %s",announceUrl),this.peers={},this.socket=null,this.reconnecting=!1,this.retries=0,this.reconnectTimer=null,this.expectingResponse=!1,this._openSocket()}announce(opts){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",()=>{this.announce(opts)});const params=Object.assign({},opts,{action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary});if(this._trackerId&&(params.trackerid=this._trackerId),"stopped"===opts.event||"completed"===opts.event)this._send(params);else{const numwant=_Mathmin(opts.numwant,10);this._generateOffers(numwant,offers=>{params.numwant=numwant,params.offers=offers,this._send(params)})}}scrape(opts){if(this.destroyed||this.reconnecting)return;if(!this.socket.connected)return void this.socket.once("connect",()=>{this.scrape(opts)});const infoHashes=Array.isArray(opts.infoHash)&&0<opts.infoHash.length?opts.infoHash.map(infoHash=>infoHash.toString("binary")):opts.infoHash&&opts.infoHash.toString("binary")||this.client._infoHashBinary;this._send({action:"scrape",info_hash:infoHashes})}destroy(cb=noop){function destroyCleanup(){timeout&&(clearTimeout(timeout),timeout=null),socket.removeListener("data",destroyCleanup),socket.destroy(),socket=null}if(this.destroyed)return cb(null);for(const peerId in this.destroyed=!0,clearInterval(this.interval),clearTimeout(this.reconnectTimer),this.peers){const peer=this.peers[peerId];clearTimeout(peer.trackerTimeout),peer.destroy()}if(this.peers=null,this.socket&&(this.socket.removeListener("connect",this._onSocketConnectBound),this.socket.removeListener("data",this._onSocketDataBound),this.socket.removeListener("close",this._onSocketCloseBound),this.socket.removeListener("error",this._onSocketErrorBound),this.socket=null),this._onSocketConnectBound=null,this._onSocketErrorBound=null,this._onSocketDataBound=null,this._onSocketCloseBound=null,socketPool[this.announceUrl]&&(socketPool[this.announceUrl].consumers-=1),0<socketPool[this.announceUrl].consumers)return cb();let socket=socketPool[this.announceUrl];if(delete socketPool[this.announceUrl],socket.on("error",noop),socket.once("close",cb),!this.expectingResponse)return destroyCleanup();var timeout=setTimeout(destroyCleanup,common.DESTROY_TIMEOUT);socket.once("data",destroyCleanup)}_openSocket(){this.destroyed=!1,this.peers||(this.peers={}),this._onSocketConnectBound=()=>{this._onSocketConnect()},this._onSocketErrorBound=err=>{this._onSocketError(err)},this._onSocketDataBound=data=>{this._onSocketData(data)},this._onSocketCloseBound=()=>{this._onSocketClose()},this.socket=socketPool[this.announceUrl],this.socket?(socketPool[this.announceUrl].consumers+=1,this.socket.connected&&this._onSocketConnectBound()):(this.socket=socketPool[this.announceUrl]=new Socket(this.announceUrl),this.socket.consumers=1,this.socket.once("connect",this._onSocketConnectBound)),this.socket.on("data",this._onSocketDataBound),this.socket.once("close",this._onSocketCloseBound),this.socket.once("error",this._onSocketErrorBound)}_onSocketConnect(){this.destroyed||this.reconnecting&&(this.reconnecting=!1,this.retries=0,this.announce(this.client._defaultAnnounceOpts()))}_onSocketData(data){if(!this.destroyed){this.expectingResponse=!1;try{data=JSON.parse(data)}catch(err){return void this.client.emit("warning",new Error("Invalid tracker response"))}"announce"===data.action?this._onAnnounceResponse(data):"scrape"===data.action?this._onScrapeResponse(data):this._onSocketError(new Error(`invalid action in WS response: ${data.action}`))}}_onAnnounceResponse(data){if(data.info_hash!==this.client._infoHashBinary)return void debug("ignoring websocket data from %s for %s (looking for %s: reused socket)",this.announceUrl,common.binaryToHex(data.info_hash),this.client.infoHash);if(data.peer_id&&data.peer_id===this.client._peerIdBinary)return;debug("received %s from %s for %s",JSON.stringify(data),this.announceUrl,this.client.infoHash);const failure=data["failure reason"];if(failure)return this.client.emit("warning",new Error(failure));const warning=data["warning message"];warning&&this.client.emit("warning",new Error(warning));const interval=data.interval||data["min interval"];interval&&this.setInterval(1e3*interval);const trackerId=data["tracker id"];if(trackerId&&(this._trackerId=trackerId),null!=data.complete){const response=Object.assign({},data,{announce:this.announceUrl,infoHash:common.binaryToHex(data.info_hash)});this.client.emit("update",response)}let peer;if(data.offer&&data.peer_id&&(debug("creating peer (from remote offer)"),peer=this._createPeer(),peer.id=common.binaryToHex(data.peer_id),peer.once("signal",answer=>{const params={action:"announce",info_hash:this.client._infoHashBinary,peer_id:this.client._peerIdBinary,to_peer_id:data.peer_id,answer,offer_id:data.offer_id};this._trackerId&&(params.trackerid=this._trackerId),this._send(params)}),peer.signal(data.offer),this.client.emit("peer",peer)),data.answer&&data.peer_id){const offerId=common.binaryToHex(data.offer_id);peer=this.peers[offerId],peer?(peer.id=common.binaryToHex(data.peer_id),peer.signal(data.answer),this.client.emit("peer",peer),clearTimeout(peer.trackerTimeout),peer.trackerTimeout=null,delete this.peers[offerId]):debug(`got unexpected answer: ${JSON.stringify(data.answer)}`)}}_onScrapeResponse(data){data=data.files||{};const keys=Object.keys(data);return 0===keys.length?void this.client.emit("warning",new Error("invalid scrape response")):void keys.forEach(infoHash=>{const response=Object.assign(data[infoHash],{announce:this.announceUrl,infoHash:common.binaryToHex(infoHash)});this.client.emit("scrape",response)})}_onSocketClose(){this.destroyed||(this.destroy(),this._startReconnectTimer())}_onSocketError(err){this.destroyed||(this.destroy(),this.client.emit("warning",err),this._startReconnectTimer())}_startReconnectTimer(){const ms=_Mathfloor(Math.random()*300000)+_Mathmin(_Mathpow(2,this.retries)*10000,3600000);this.reconnecting=!0,clearTimeout(this.reconnectTimer),this.reconnectTimer=setTimeout(()=>{this.retries++,this._openSocket()},ms),this.reconnectTimer.unref&&this.reconnectTimer.unref(),debug("reconnecting socket in %s ms",ms)}_send(params){if(!this.destroyed){this.expectingResponse=!0;const message=JSON.stringify(params);debug("send %s",message),this.socket.send(message)}}_generateOffers(numwant,cb){function generateOffer(){const offerId=randombytes(20).toString("hex");debug("creating peer (from _generateOffers)");const peer=self.peers[offerId]=self._createPeer({initiator:!0});peer.once("signal",offer=>{offers.push({offer,offer_id:common.hexToBinary(offerId)}),checkDone()}),peer.trackerTimeout=setTimeout(()=>{debug("tracker timeout: destroying peer"),peer.trackerTimeout=null,delete self.peers[offerId],peer.destroy()},50000),peer.trackerTimeout.unref&&peer.trackerTimeout.unref()}function checkDone(){offers.length===numwant&&(debug("generated %s offers",numwant),cb(offers))}const self=this,offers=[];debug("generating %s offers",numwant);for(let i=0;i<numwant;++i)generateOffer();checkDone()}_createPeer(opts){function onError(err){self.client.emit("warning",new Error(`Connection error: ${err.message}`)),peer.destroy()}function onConnect(){peer.removeListener("error",onError),peer.removeListener("connect",onConnect)}const self=this;opts=Object.assign({trickle:!1,config:self.client._rtcConfig,wrtc:self.client._wrtc},opts);const peer=new Peer(opts);return peer.once("error",onError),peer.once("connect",onConnect),peer}}WebSocketTracker.prototype.DEFAULT_ANNOUNCE_INTERVAL=30000,WebSocketTracker._socketPool=socketPool,module.exports=WebSocketTracker},{"../common":19,"./tracker":17,debug:33,randombytes:70,"simple-peer":95,"simple-websocket":98}],19:[function(require,module,exports){(function(Buffer){(function(){exports.DEFAULT_ANNOUNCE_PEERS=50,exports.MAX_ANNOUNCE_PEERS=82,exports.binaryToHex=function(str){return"string"!=typeof str&&(str+=""),Buffer.from(str,"binary").toString("hex")},exports.hexToBinary=function(str){return"string"!=typeof str&&(str+=""),Buffer.from(str,"hex").toString("binary")};var config=require("./common-node");Object.assign(exports,config)}).call(this)}).call(this,require("buffer").Buffer)},{"./common-node":22,buffer:24}],20:[function(require,module){(function(Buffer){(function(){/*! blob-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(blob,cb){function onLoadEnd(e){reader.removeEventListener("loadend",onLoadEnd,!1),e.error?cb(e.error):cb(null,Buffer.from(reader.result))}if("undefined"==typeof Blob||!(blob instanceof Blob))throw new Error("first argument must be a Blob");if("function"!=typeof cb)throw new Error("second argument must be a function");const reader=new FileReader;reader.addEventListener("loadend",onLoadEnd,!1),reader.readAsArrayBuffer(blob)}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24}],21:[function(require,module){(function(Buffer){(function(){const{Transform}=require("readable-stream");module.exports=class Block extends Transform{constructor(size,opts={}){super(opts),"object"==typeof size&&(opts=size,size=opts.size),this.size=size||512;const{nopad,zeroPadding=!0}=opts;this._zeroPadding=!nopad&&!!zeroPadding,this._buffered=[],this._bufferedBytes=0}_transform(buf,enc,next){for(this._bufferedBytes+=buf.length,this._buffered.push(buf);this._bufferedBytes>=this.size;){const b=Buffer.concat(this._buffered);this._bufferedBytes-=this.size,this.push(b.slice(0,this.size)),this._buffered=[b.slice(this.size,b.length)]}next()}_flush(){if(this._bufferedBytes&&this._zeroPadding){const zeroes=Buffer.alloc(this.size-this._bufferedBytes);this._buffered.push(zeroes),this.push(Buffer.concat(this._buffered)),this._buffered=null}else this._bufferedBytes&&(this.push(Buffer.concat(this._buffered)),this._buffered=null);this.push(null)}}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24,"readable-stream":86}],22:[function(){},{}],23:[function(require,module,exports){arguments[4][22][0].apply(exports,arguments)},{dup:22}],24:[function(require,module,exports){(function(){(function(){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/'use strict';function createBuffer(length){if(2147483647<length)throw new RangeError("The value \""+length+"\" is invalid for option \"size\"");var buf=new Uint8Array(length);return buf.__proto__=Buffer.prototype,buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new TypeError("The \"string\" argument must be of type string. Received type number");return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return fromString(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayLike(value);if(null==value)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer))return fromArrayBuffer(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError("The \"value\" argument must not be of type number. Received type number");var valueOf=value.valueOf&&value.valueOf();if(null!=valueOf&&valueOf!==value)return Buffer.from(valueOf,encodingOrOffset,length);var b=fromObject(value);if(b)return b;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof value[Symbol.toPrimitive])return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value)}function assertSize(size){if("number"!=typeof size)throw new TypeError("\"size\" argument must be of type number");else if(0>size)throw new RangeError("The value \""+size+"\" is invalid for option \"size\"")}function alloc(size,fill,encoding){return assertSize(size),0>=size?createBuffer(size):void 0===fill?createBuffer(size):"string"==typeof encoding?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill)}function allocUnsafe(size){return assertSize(size),createBuffer(0>size?0:0|checked(size))}function fromString(string,encoding){if(("string"!=typeof encoding||""===encoding)&&(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);return actual!==length&&(buf=buf.slice(0,actual)),buf}function fromArrayLike(array){for(var length=0>array.length?0:0|checked(array.length),buf=createBuffer(length),i=0;i<length;i+=1)buf[i]=255&array[i];return buf}function fromArrayBuffer(array,byteOffset,length){if(0>byteOffset||array.byteLength<byteOffset)throw new RangeError("\"offset\" is outside of buffer bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("\"length\" is outside of buffer bounds");var buf;return buf=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length),buf.__proto__=Buffer.prototype,buf}function fromObject(obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length),buf=createBuffer(len);return 0===buf.length?buf:(obj.copy(buf,0,0,len),buf)}return void 0===obj.length?"Buffer"===obj.type&&Array.isArray(obj.data)?fromArrayLike(obj.data):void 0:"number"!=typeof obj.length||numberIsNaN(obj.length)?createBuffer(0):fromArrayLike(obj)}function checked(length){if(length>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw new TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type "+typeof string);var len=string.length,mustMatch=2<arguments.length&&!0===arguments[2];if(!mustMatch&&0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0;}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||0>start)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),0>=end)return"";if(end>>>=0,start>>>=0,end<=start)return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0;}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):2147483647<byteOffset?byteOffset=2147483647:-2147483648>byteOffset&&(byteOffset=-2147483648),byteOffset=+byteOffset,numberIsNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),0>byteOffset&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(0>byteOffset)if(dir)byteOffset=0;else return-1;if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&(encoding=(encoding+"").toLowerCase(),"ucs2"===encoding||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(2>arr.length||2>val.length)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)!==read(val,-1===foundIndex?0:i-foundIndex))-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1;else if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;0<=i;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=+offset||0;var remaining=buf.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0,parsed;i<length;++i){if(parsed=parseInt(string.substr(2*i,2),16),numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=_Mathmin(buf.length,end);for(var res=[],i=start;i<end;){var firstByte=buf[i],codePoint=null,bytesPerSequence=239<firstByte?4:223<firstByte?3:191<firstByte?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;1===bytesPerSequence?128>firstByte&&(codePoint=firstByte):2===bytesPerSequence?(secondByte=buf[i+1],128==(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,127<tempCodePoint&&(codePoint=tempCodePoint))):3===bytesPerSequence?(secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte,2047<tempCodePoint&&(55296>tempCodePoint||57343<tempCodePoint)&&(codePoint=tempCodePoint))):4===bytesPerSequence?(secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte,65535<tempCodePoint&&1114112>tempCodePoint&&(codePoint=tempCodePoint))):void 0}null===codePoint?(codePoint=65533,bytesPerSequence=1):65535<codePoint&&(codePoint-=65536,res.push(55296|1023&codePoint>>>10),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=4096)return _StringfromCharCode.apply(String,codePoints);for(var res="",i=0;i<len;)res+=_StringfromCharCode.apply(String,codePoints.slice(i,i+=4096));return res}function asciiSlice(buf,start,end){var ret="";end=_Mathmin(buf.length,end);for(var i=start;i<end;++i)ret+=_StringfromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=_Mathmin(buf.length,end);for(var i=start;i<end;++i)ret+=_StringfromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=_StringfromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(0!=offset%1||0>offset)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("\"buffer\" argument must be a Buffer instance");if(value>max||value<min)throw new RangeError("\"value\" argument is out of bounds");if(offset+ext>buf.length)throw new RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(0>offset)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,value,offset,4,34028234663852886e22,-34028234663852886e22),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,value,offset,8,17976931348623157e292,-17976931348623157e292),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=str.split("=")[0],str=str.trim().replace(INVALID_BASE64_RE,""),2>str.length)return"";for(;0!=str.length%4;)str+="=";return str}function toHex(n){return 16>n?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var length=string.length,leadSurrogate=null,bytes=[],i=0,codePoint;i<length;++i){if(codePoint=string.charCodeAt(i),55295<codePoint&&57344>codePoint){if(!leadSurrogate){if(56319<codePoint){-1<(units-=3)&&bytes.push(239,191,189);continue}else if(i+1===length){-1<(units-=3)&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(56320>codePoint){-1<(units-=3)&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&-1<(units-=3)&&bytes.push(239,191,189);if(leadSurrogate=null,128>codePoint){if(0>(units-=1))break;bytes.push(codePoint)}else if(2048>codePoint){if(0>(units-=2))break;bytes.push(192|codePoint>>6,128|63&codePoint)}else if(65536>codePoint){if(0>(units-=3))break;bytes.push(224|codePoint>>12,128|63&codePoint>>6,128|63&codePoint)}else if(1114112>codePoint){if(0>(units-=4))break;bytes.push(240|codePoint>>18,128|63&codePoint>>12,128|63&codePoint>>6,128|63&codePoint)}else throw new Error("Invalid code point")}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}function utf16leToBytes(str,units){for(var byteArray=[],i=0,c,hi,lo;i<str.length&&!(0>(units-=2));++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!==obj}var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=function(length){return+length!=length&&(length=0),Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50;exports.kMaxLength=2147483647,Buffer.TYPED_ARRAY_SUPPORT=function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){return Buffer.isBuffer(this)?this.buffer:void 0}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){return Buffer.isBuffer(this)?this.byteOffset:void 0}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)},Buffer.isBuffer=function(b){return null!=b&&!0===b._isBuffer&&b!==Buffer.prototype},Buffer.compare=function(a,b){if(isInstance(a,Uint8Array)&&(a=Buffer.from(a,a.offset,a.byteLength)),isInstance(b,Uint8Array)&&(b=Buffer.from(b,b.offset,b.byteLength)),!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=_Mathmin(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch((encoding+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1;}},Buffer.concat=function(list,length){if(!Array.isArray(list))throw new TypeError("\"list\" argument must be an Array of Buffers");if(0===list.length)return Buffer.alloc(0);var i;if(length===void 0)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(isInstance(buf,Uint8Array)&&(buf=Buffer.from(buf)),!Buffer.isBuffer(buf))throw new TypeError("\"list\" argument must be an Array of Buffers");buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(0!=len%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(0!=len%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(0!=len%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return str=this.toString("hex",0,max).replace(/(.{2})/g,"$1 ").trim(),this.length>max&&(str+=" ... "),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw new TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type "+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),0>start||end>target.length||0>thisStart||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=_Mathmin(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else if(isFinite(offset))offset>>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),0<string.length&&(0>length||0>offset)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0;}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=end===void 0?len:~~end,0>start?(start+=len,0>start&&(start=0)):start>len&&(start=len),0>end?(end+=len,0>end&&(end=0)):end>len&&(end=len),end<start&&(end=start);var newBuf=this.subarray(start,end);return newBuf.__proto__=Buffer.prototype,newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;0<byteLength&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return mul*=128,val>=mul&&(val-=_Mathpow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];0<i&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=_Mathpow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,byteLength>>>=0,!noAssert){var maxBytes=_Mathpow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=255&value/mul;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,byteLength>>>=0,!noAssert){var maxBytes=_Mathpow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1,mul=1;for(this[offset+i]=255&value;0<=--i&&(mul*=256);)this[offset+i]=255&value/mul;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=_Mathpow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)0>value&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=255&(value/mul>>0)-sub;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=_Mathpow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;0<=--i&&(mul*=256);)0>value&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=255&(value/mul>>0)-sub;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),0>value&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),0>value&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),0<end&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(0>targetStart)throw new RangeError("targetStart out of bounds");if(0>start||start>=this.length)throw new RangeError("Index out of range");if(0>end)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var len=end-start;if(this===target&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(targetStart,start,end);else if(this===target&&start<targetStart&&targetStart<end)for(var i=len-1;0<=i;--i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(1===val.length){var code=val.charCodeAt(0);("utf8"===encoding&&128>code||"latin1"===encoding)&&(val=code)}}else"number"==typeof val&&(val&=255);if(0>start||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;start>>>=0,end=end===void 0?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:Buffer.from(val,encoding),len=bytes.length;if(0===len)throw new TypeError("The value \""+val+"\" is invalid for argument \"value\"");for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g}).call(this)}).call(this,require("buffer").Buffer)},{"base64-js":8,buffer:24,ieee754:40}],25:[function(require,module){'use strict';function ProcessEmitWarning(warning){console&&console.warn&&console.warn(warning)}function EventEmitter(){EventEmitter.init.call(this)}function checkListener(listener){if("function"!=typeof listener)throw new TypeError("The \"listener\" argument must be of type Function. Received type "+typeof listener)}function _getMaxListeners(that){return void 0===that._maxListeners?EventEmitter.defaultMaxListeners:that._maxListeners}function _addListener(target,type,listener,prepend){var m,events,existing;if(checkListener(listener),events=target._events,void 0===events?(events=target._events=Object.create(null),target._eventsCount=0):(void 0!==events.newListener&&(target.emit("newListener",type,listener.listener?listener.listener:listener),events=target._events),existing=events[type]),void 0===existing)existing=events[type]=listener,++target._eventsCount;else if("function"==typeof existing?existing=events[type]=prepend?[listener,existing]:[existing,listener]:prepend?existing.unshift(listener):existing.push(listener),m=_getMaxListeners(target),0<m&&existing.length>m&&!existing.warned){existing.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+existing.length+" "+(type+" listeners added. Use emitter.setMaxListeners() to increase limit"));w.name="MaxListenersExceededWarning",w.emitter=target,w.type=type,w.count=existing.length,ProcessEmitWarning(w)}return target}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(target,type,listener){var state={fired:!1,wrapFn:void 0,target:target,type:type,listener:listener},wrapped=onceWrapper.bind(state);return wrapped.listener=listener,state.wrapFn=wrapped,wrapped}function _listeners(target,type,unwrap){var events=target._events;if(events===void 0)return[];var evlistener=events[type];return void 0===evlistener?[]:"function"==typeof evlistener?unwrap?[evlistener.listener||evlistener]:[evlistener]:unwrap?unwrapListeners(evlistener):arrayClone(evlistener,evlistener.length)}function listenerCount(type){var events=this._events;if(events!==void 0){var evlistener=events[type];if("function"==typeof evlistener)return 1;if(void 0!==evlistener)return evlistener.length}return 0}function arrayClone(arr,n){for(var copy=Array(n),i=0;i<n;++i)copy[i]=arr[i];return copy}function spliceOne(list,index){for(;index+1<list.length;index++)list[index]=list[index+1];list.pop()}function unwrapListeners(arr){for(var ret=Array(arr.length),i=0;i<ret.length;++i)ret[i]=arr[i].listener||arr[i];return ret}var R="object"==typeof Reflect?Reflect:null,ReflectApply=R&&"function"==typeof R.apply?R.apply:function(target,receiver,args){return Function.prototype.apply.call(target,receiver,args)},ReflectOwnKeys;ReflectOwnKeys=R&&"function"==typeof R.ownKeys?R.ownKeys:Object.getOwnPropertySymbols?function(target){return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))}:function(target){return Object.getOwnPropertyNames(target)};var NumberIsNaN=Number.isNaN||function(value){return value!==value};module.exports=EventEmitter,module.exports.once=function(emitter,name){return new Promise(function(resolve,reject){function eventListener(){errorListener!==void 0&&emitter.removeListener("error",errorListener),resolve([].slice.call(arguments))}var errorListener;"error"!==name&&(errorListener=function(err){emitter.removeListener(name,eventListener),reject(err)},emitter.once("error",errorListener)),emitter.once(name,eventListener)})},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var defaultMaxListeners=10;Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(arg){if("number"!=typeof arg||0>arg||NumberIsNaN(arg))throw new RangeError("The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received "+arg+".");defaultMaxListeners=arg}}),EventEmitter.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function(n){if("number"!=typeof n||0>n||NumberIsNaN(n))throw new RangeError("The value of \"n\" is out of range. It must be a non-negative number. Received "+n+".");return this._maxListeners=n,this},EventEmitter.prototype.getMaxListeners=function(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function(type){for(var args=[],i=1;i<arguments.length;i++)args.push(arguments[i]);var doError="error"===type,events=this._events;if(events!==void 0)doError=doError&&events.error===void 0;else if(!doError)return!1;if(doError){var er;if(0<args.length&&(er=args[0]),er instanceof Error)throw er;var err=new Error("Unhandled error."+(er?" ("+er.message+")":""));throw err.context=er,err}var handler=events[type];if(handler===void 0)return!1;if("function"==typeof handler)ReflectApply(handler,this,args);else for(var len=handler.length,listeners=arrayClone(handler,len),i=0;i<len;++i)ReflectApply(listeners[i],this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){return _addListener(this,type,listener,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function(type,listener){return _addListener(this,type,listener,!0)},EventEmitter.prototype.once=function(type,listener){return checkListener(listener),this.on(type,_onceWrap(this,type,listener)),this},EventEmitter.prototype.prependOnceListener=function(type,listener){return checkListener(listener),this.prependListener(type,_onceWrap(this,type,listener)),this},EventEmitter.prototype.removeListener=function(type,listener){var list,events,position,i,originalListener;if(checkListener(listener),events=this._events,void 0===events)return this;if(list=events[type],void 0===list)return this;if(list===listener||list.listener===listener)0==--this._eventsCount?this._events=Object.create(null):(delete events[type],events.removeListener&&this.emit("removeListener",type,list.listener||listener));else if("function"!=typeof list){for(position=-1,i=list.length-1;0<=i;i--)if(list[i]===listener||list[i].listener===listener){originalListener=list[i].listener,position=i;break}if(0>position)return this;0===position?list.shift():spliceOne(list,position),1===list.length&&(events[type]=list[0]),void 0!==events.removeListener&&this.emit("removeListener",type,originalListener||listener)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function(type){var listeners,events,i;if(events=this._events,void 0===events)return this;if(void 0===events.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==events[type]&&(0==--this._eventsCount?this._events=Object.create(null):delete events[type]),this;if(0===arguments.length){var keys=Object.keys(events),key;for(i=0;i<keys.length;++i)key=keys[i],"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(listeners=events[type],"function"==typeof listeners)this.removeListener(type,listeners);else if(void 0!==listeners)for(i=listeners.length-1;0<=i;i--)this.removeListener(type,listeners[i]);return this},EventEmitter.prototype.listeners=function(type){return _listeners(this,type,!0)},EventEmitter.prototype.rawListeners=function(type){return _listeners(this,type,!1)},EventEmitter.listenerCount=function(emitter,type){return"function"==typeof emitter.listenerCount?emitter.listenerCount(type):listenerCount.call(emitter,type)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return 0<this._eventsCount?ReflectOwnKeys(this._events):[]}},{}],26:[function(require,module){(function(process){(function(){'use strict';function assertPath(path){if("string"!=typeof path)throw new TypeError("Path must be a string. Received "+JSON.stringify(path))}function normalizeStringPosix(path,allowAboveRoot){for(var res="",lastSegmentLength=0,lastSlash=-1,dots=0,i=0,code;i<=path.length;++i){if(i<path.length)code=path.charCodeAt(i);else if(47===code)break;else code=47;if(47===code){if(lastSlash===i-1||1===dots);else if(lastSlash!==i-1&&2===dots){if(2>res.length||2!==lastSegmentLength||46!==res.charCodeAt(res.length-1)||46!==res.charCodeAt(res.length-2))if(2<res.length){var lastSlashIndex=res.lastIndexOf("/");if(lastSlashIndex!==res.length-1){-1===lastSlashIndex?(res="",lastSegmentLength=0):(res=res.slice(0,lastSlashIndex),lastSegmentLength=res.length-1-res.lastIndexOf("/")),lastSlash=i,dots=0;continue}}else if(2===res.length||1===res.length){res="",lastSegmentLength=0,lastSlash=i,dots=0;continue}allowAboveRoot&&(0<res.length?res+="/..":res="..",lastSegmentLength=2)}else 0<res.length?res+="/"+path.slice(lastSlash+1,i):res=path.slice(lastSlash+1,i),lastSegmentLength=i-lastSlash-1;lastSlash=i,dots=0}else 46===code&&-1!==dots?++dots:dots=-1}return res}function _format(sep,pathObject){var dir=pathObject.dir||pathObject.root,base=pathObject.base||(pathObject.name||"")+(pathObject.ext||"");return dir?dir===pathObject.root?dir+base:dir+sep+base:base}var posix={resolve:function(){for(var resolvedPath="",resolvedAbsolute=!1,i=arguments.length-1,cwd;-1<=i&&!resolvedAbsolute;i--){var path;(0<=i?path=arguments[i]:(void 0===cwd&&(cwd=process.cwd()),path=cwd),assertPath(path),0!==path.length)&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute=47===path.charCodeAt(0))}return resolvedPath=normalizeStringPosix(resolvedPath,!resolvedAbsolute),resolvedAbsolute?0<resolvedPath.length?"/"+resolvedPath:"/":0<resolvedPath.length?resolvedPath:"."},normalize:function(path){if(assertPath(path),0===path.length)return".";var isAbsolute=47===path.charCodeAt(0),trailingSeparator=47===path.charCodeAt(path.length-1);return path=normalizeStringPosix(path,!isAbsolute),0!==path.length||isAbsolute||(path="."),0<path.length&&trailingSeparator&&(path+="/"),isAbsolute?"/"+path:path},isAbsolute:function(path){return assertPath(path),0<path.length&&47===path.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var i=0,joined,arg;i<arguments.length;++i)arg=arguments[i],assertPath(arg),0<arg.length&&(void 0===joined?joined=arg:joined+="/"+arg);return void 0===joined?".":posix.normalize(joined)},relative:function(from,to){if(assertPath(from),assertPath(to),from===to)return"";if(from=posix.resolve(from),to=posix.resolve(to),from===to)return"";for(var fromStart=1;fromStart<from.length&&47===from.charCodeAt(fromStart);++fromStart);for(var fromEnd=from.length,fromLen=fromEnd-fromStart,toStart=1;toStart<to.length&&47===to.charCodeAt(toStart);++toStart);for(var toEnd=to.length,toLen=toEnd-toStart,length=fromLen<toLen?fromLen:toLen,lastCommonSep=-1,i=0;i<=length;++i){if(i===length){if(toLen>length){if(47===to.charCodeAt(toStart+i))return to.slice(toStart+i+1);if(0===i)return to.slice(toStart+i)}else fromLen>length&&(47===from.charCodeAt(fromStart+i)?lastCommonSep=i:0===i&&(lastCommonSep=0));break}var fromCode=from.charCodeAt(fromStart+i),toCode=to.charCodeAt(toStart+i);if(fromCode!==toCode)break;else 47===fromCode&&(lastCommonSep=i)}var out="";for(i=fromStart+lastCommonSep+1;i<=fromEnd;++i)(i===fromEnd||47===from.charCodeAt(i))&&(out+=0===out.length?"..":"/..");return 0<out.length?out+to.slice(toStart+lastCommonSep):(toStart+=lastCommonSep,47===to.charCodeAt(toStart)&&++toStart,to.slice(toStart))},_makeLong:function(path){return path},dirname:function(path){if(assertPath(path),0===path.length)return".";for(var code=path.charCodeAt(0),hasRoot=47===code,end=-1,matchedSlash=!0,i=path.length-1;1<=i;--i)if(code=path.charCodeAt(i),47!==code)matchedSlash=!1;else if(!matchedSlash){end=i;break}return-1===end?hasRoot?"/":".":hasRoot&&1===end?"//":path.slice(0,end)},basename:function(path,ext){if(ext!==void 0&&"string"!=typeof ext)throw new TypeError("\"ext\" argument must be a string");assertPath(path);var start=0,end=-1,matchedSlash=!0,i;if(void 0!==ext&&0<ext.length&&ext.length<=path.length){if(ext.length===path.length&&ext===path)return"";var extIdx=ext.length-1,firstNonSlashEnd=-1;for(i=path.length-1;0<=i;--i){var code=path.charCodeAt(i);if(47!==code)-1===firstNonSlashEnd&&(matchedSlash=!1,firstNonSlashEnd=i+1),0<=extIdx&&(code===ext.charCodeAt(extIdx)?-1==--extIdx&&(end=i):(extIdx=-1,end=firstNonSlashEnd));else if(!matchedSlash){start=i+1;break}}return start===end?end=firstNonSlashEnd:-1===end&&(end=path.length),path.slice(start,end)}for(i=path.length-1;0<=i;--i)if(47!==path.charCodeAt(i))-1===end&&(matchedSlash=!1,end=i+1);else if(!matchedSlash){start=i+1;break}return-1===end?"":path.slice(start,end)},extname:function(path){assertPath(path);for(var startDot=-1,startPart=0,end=-1,matchedSlash=!0,preDotState=0,i=path.length-1,code;0<=i;--i){if(code=path.charCodeAt(i),47===code){if(!matchedSlash){startPart=i+1;break}continue}-1===end&&(matchedSlash=!1,end=i+1),46===code?-1===startDot?startDot=i:1!==preDotState&&(preDotState=1):-1!==startDot&&(preDotState=-1)}return-1===startDot||-1===end||0===preDotState||1===preDotState&&startDot===end-1&&startDot===startPart+1?"":path.slice(startDot,end)},format:function(pathObject){if(null===pathObject||"object"!=typeof pathObject)throw new TypeError("The \"pathObject\" argument must be of type Object. Received type "+typeof pathObject);return _format("/",pathObject)},parse:function(path){assertPath(path);var ret={root:"",dir:"",base:"",ext:"",name:""};if(0===path.length)return ret;var code=path.charCodeAt(0),isAbsolute=47===code,start;isAbsolute?(ret.root="/",start=1):start=0;for(var startDot=-1,startPart=0,end=-1,matchedSlash=!0,i=path.length-1,preDotState=0;i>=start;--i){if(code=path.charCodeAt(i),47===code){if(!matchedSlash){startPart=i+1;break}continue}-1===end&&(matchedSlash=!1,end=i+1),46===code?-1===startDot?startDot=i:1!==preDotState&&(preDotState=1):-1!==startDot&&(preDotState=-1)}return-1===startDot||-1===end||0===preDotState||1===preDotState&&startDot===end-1&&startDot===startPart+1?-1!==end&&(0===startPart&&isAbsolute?ret.base=ret.name=path.slice(1,end):ret.base=ret.name=path.slice(startPart,end)):(0===startPart&&isAbsolute?(ret.name=path.slice(1,startDot),ret.base=path.slice(1,end)):(ret.name=path.slice(startPart,startDot),ret.base=path.slice(startPart,end)),ret.ext=path.slice(startDot,end)),0<startPart?ret.dir=path.slice(0,startPart-1):isAbsolute&&(ret.dir="/"),ret},sep:"/",delimiter:":",win32:null,posix:null};posix.posix=posix,module.exports=posix}).call(this)}).call(this,require("_process"))},{_process:62}],27:[function(require,module){(function(Buffer){(function(){module.exports=function(size){if("number"!=typeof size)throw new TypeError("\"size\" argument must be a number");if(0>size)throw new RangeError("\"size\" argument must not be negative");return Buffer.allocUnsafe?Buffer.allocUnsafe(size):new Buffer(size)}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24}],28:[function(require,module){(function(Buffer){(function(){var bufferFill=require("buffer-fill"),allocUnsafe=require("buffer-alloc-unsafe");module.exports=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("\"size\" argument must be a number");if(0>size)throw new RangeError("\"size\" argument must not be negative");if(Buffer.alloc)return Buffer.alloc(size,fill,encoding);var buffer=allocUnsafe(size);return 0===size?buffer:void 0===fill?bufferFill(buffer,0):("string"!=typeof encoding&&(encoding=void 0),bufferFill(buffer,fill,encoding))}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24,"buffer-alloc-unsafe":27,"buffer-fill":29}],29:[function(require,module){(function(Buffer){(function(){function isSingleByte(val){return 1===val.length&&256>val.charCodeAt(0)}function fillWithNumber(buffer,val,start,end){if(0>start||end>buffer.length)throw new RangeError("Out of range index");return start>>>=0,end=void 0===end?buffer.length:end>>>0,end>start&&buffer.fill(val,start,end),buffer}function fillWithBuffer(buffer,val,start,end){if(0>start||end>buffer.length)throw new RangeError("Out of range index");if(end<=start)return buffer;start>>>=0,end=void 0===end?buffer.length:end>>>0;for(var pos=start,len=val.length;pos<=end-len;)val.copy(buffer,pos),pos+=len;return pos!==end&&val.copy(buffer,pos,0,end-pos),buffer}var hasFullSupport=function(){try{if(!Buffer.isEncoding("latin1"))return!1;var buf=Buffer.alloc?Buffer.alloc(4):new Buffer(4);return buf.fill("ab","ucs2"),"61006200"===buf.toString("hex")}catch(_){return!1}}();module.exports=function(buffer,val,start,end,encoding){if(hasFullSupport)return buffer.fill(val,start,end,encoding);if("number"==typeof val)return fillWithNumber(buffer,val,start,end);if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=buffer.length):"string"==typeof end&&(encoding=end,end=buffer.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("latin1"===encoding&&(encoding="binary"),"string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(""===val)return fillWithNumber(buffer,0,start,end);if(isSingleByte(val))return fillWithNumber(buffer,val.charCodeAt(0),start,end);val=new Buffer(val,encoding)}return Buffer.isBuffer(val)?fillWithBuffer(buffer,val,start,end):fillWithNumber(buffer,0,start,end)}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24}],30:[function(require,module){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],31:[function(require,module){const BlockStream=require("block-stream2"),stream=require("readable-stream");class ChunkStoreWriteStream extends stream.Writable{constructor(store,chunkLength,opts={}){if(super(opts),!store||!store.put||!store.get)throw new Error("First argument must be an abstract-chunk-store compliant store");if(chunkLength=+chunkLength,!chunkLength)throw new Error("Second argument must be a chunk length");this._blockstream=new BlockStream(chunkLength,{zeroPadding:!1}),this._outstandingPuts=0;let index=0;const onData=chunk=>{this.destroyed||(this._outstandingPuts+=1,store.put(index,chunk,()=>{this._outstandingPuts-=1,0===this._outstandingPuts&&"function"==typeof this._finalCb&&(this._finalCb(null),this._finalCb=null)}),index+=1)};this._blockstream.on("data",onData).on("error",err=>{this.destroy(err)})}_write(chunk,encoding,callback){this._blockstream.write(chunk,encoding,callback)}_final(cb){this._blockstream.end(),this._blockstream.once("end",()=>{0===this._outstandingPuts?cb(null):this._finalCb=cb})}destroy(err){this.destroyed||(this.destroyed=!0,err&&this.emit("error",err),this.emit("close"))}}module.exports=ChunkStoreWriteStream},{"block-stream2":21,"readable-stream":86}],32:[function(require,module){(function(process,global,Buffer){(function(){function flat(arr1){return arr1.reduce((acc,val)=>Array.isArray(val)?acc.concat(flat(val)):acc.concat(val),[])}function _parseInput(input,opts,cb){function processInput(){parallel(input.map(item=>cb=>{const file={};if(isBlob(item))file.getStream=getBlobStream(item),file.length=item.size;else if(Buffer.isBuffer(item))file.getStream=getBufferStream(item),file.length=item.length;else if(isReadable(item))file.getStream=getStreamStream(item,file),file.length=0;else{if("string"==typeof item){if("function"!=typeof getFiles)throw new Error("filesystem paths do not work in the browser");const keepRoot=1<numPaths||isSingleFileTorrent;return void getFiles(item,keepRoot,cb)}throw new Error("invalid input type")}file.path=item.path,cb(null,file)}),(err,files)=>err?cb(err):void(files=flat(files),cb(null,files,isSingleFileTorrent)))}if(isFileList(input)&&(input=Array.from(input)),Array.isArray(input)||(input=[input]),0===input.length)throw new Error("invalid input type");input.forEach(item=>{if(null==item)throw new Error(`invalid input type: ${item}`)}),input=input.map(item=>isBlob(item)&&"string"==typeof item.path&&"function"==typeof getFiles?item.path:item),1!==input.length||"string"==typeof input[0]||input[0].name||(input[0].name=opts.name);let commonPrefix=null;input.forEach((item,i)=>{if("string"==typeof item)return;let path=item.fullPath||item.name;path||(path=`Unknown File ${i+1}`,item.unknownName=!0),item.path=path.split("/"),item.path[0]||item.path.shift(),2>item.path.length?commonPrefix=null:0===i&&1<input.length?commonPrefix=item.path[0]:item.path[0]!==commonPrefix&&(commonPrefix=null)}),input=input.filter(item=>{if("string"==typeof item)return!0;const filename=item.path[item.path.length-1];return notHidden(filename)&&junk.not(filename)}),commonPrefix&&input.forEach(item=>{const pathless=(Buffer.isBuffer(item)||isReadable(item))&&!item.path;"string"==typeof item||pathless||item.path.shift()}),!opts.name&&commonPrefix&&(opts.name=commonPrefix),opts.name||input.some(item=>"string"==typeof item?(opts.name=corePath.basename(item),!0):item.unknownName?void 0:(opts.name=item.path[item.path.length-1],!0)),opts.name||(opts.name=`Unnamed Torrent ${Date.now()}`);const numPaths=input.reduce((sum,item)=>sum+ +("string"==typeof item),0);let isSingleFileTorrent=1===input.length;if(1===input.length&&"string"==typeof input[0]){if("function"!=typeof getFiles)throw new Error("filesystem paths do not work in the browser");isFile(input[0],(err,pathIsFile)=>err?cb(err):void(isSingleFileTorrent=pathIsFile,processInput()))}else process.nextTick(()=>{processInput()})}function notHidden(file){return"."!==file[0]}function getPieceList(files,pieceLength,cb){function onData(chunk){length+=chunk.length;const i=pieceNum;sha1(chunk,hash=>{pieces[i]=hash,remainingHashes-=1,maybeDone()}),remainingHashes+=1,pieceNum+=1}function onEnd(){ended=!0,maybeDone()}function onError(err){cleanup(),cb(err)}function cleanup(){multistream.removeListener("error",onError),blockstream.removeListener("data",onData),blockstream.removeListener("end",onEnd),blockstream.removeListener("error",onError)}function maybeDone(){ended&&0===remainingHashes&&(cleanup(),cb(null,Buffer.from(pieces.join(""),"hex"),length))}cb=once(cb);const pieces=[];let length=0;const streams=files.map(file=>file.getStream);let remainingHashes=0,pieceNum=0,ended=!1;const multistream=new MultiStream(streams),blockstream=new BlockStream(pieceLength,{zeroPadding:!1});multistream.on("error",onError),multistream.pipe(blockstream).on("data",onData).on("end",onEnd).on("error",onError)}function onFiles(files,opts,cb){let announceList=opts.announceList;announceList||("string"==typeof opts.announce?announceList=[[opts.announce]]:Array.isArray(opts.announce)&&(announceList=opts.announce.map(u=>[u]))),announceList||(announceList=[]),global.WEBTORRENT_ANNOUNCE&&("string"==typeof global.WEBTORRENT_ANNOUNCE?announceList.push([[global.WEBTORRENT_ANNOUNCE]]):Array.isArray(global.WEBTORRENT_ANNOUNCE)&&(announceList=announceList.concat(global.WEBTORRENT_ANNOUNCE.map(u=>[u])))),opts.announce===void 0&&opts.announceList===void 0&&(announceList=announceList.concat(module.exports.announceList)),"string"==typeof opts.urlList&&(opts.urlList=[opts.urlList]);const torrent={info:{name:opts.name},"creation date":_Mathceil((+opts.creationDate||Date.now())/1e3),encoding:"UTF-8"};0!==announceList.length&&(torrent.announce=announceList[0][0],torrent["announce-list"]=announceList),opts.comment!==void 0&&(torrent.comment=opts.comment),opts.createdBy!==void 0&&(torrent["created by"]=opts.createdBy),opts.private!==void 0&&(torrent.info.private=+opts.private),opts.info!==void 0&&Object.assign(torrent.info,opts.info),opts.sslCert!==void 0&&(torrent.info["ssl-cert"]=opts.sslCert),opts.urlList!==void 0&&(torrent["url-list"]=opts.urlList);const pieceLength=opts.pieceLength||calcPieceLength(files.reduce(sumLength,0));torrent.info["piece length"]=pieceLength,getPieceList(files,pieceLength,(err,pieces,torrentLength)=>err?cb(err):void(torrent.info.pieces=pieces,files.forEach(file=>{delete file.getStream}),opts.singleFileTorrent?torrent.info.length=torrentLength:torrent.info.files=files,cb(null,bencode.encode(torrent))))}function sumLength(sum,file){return sum+file.length}function isBlob(obj){return"undefined"!=typeof Blob&&obj instanceof Blob}function isFileList(obj){return"undefined"!=typeof FileList&&obj instanceof FileList}function isReadable(obj){return"object"==typeof obj&&null!=obj&&"function"==typeof obj.pipe}function getBlobStream(file){return()=>new FileReadStream(file)}function getBufferStream(buffer){return()=>{const s=new stream.PassThrough;return s.end(buffer),s}}function getStreamStream(readable,file){return()=>{const counter=new stream.Transform;return counter._transform=function(buf,enc,done){file.length+=buf.length,this.push(buf),done()},readable.pipe(counter),counter}}/*! create-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */const bencode=require("bencode"),BlockStream=require("block-stream2"),calcPieceLength=require("piece-length"),corePath=require("path"),FileReadStream=require("filestream/read"),isFile=require("is-file"),junk=require("junk"),MultiStream=require("multistream"),once=require("once"),parallel=require("run-parallel"),sha1=require("simple-sha1"),stream=require("readable-stream"),getFiles=require("./get-files");module.exports=function(input,opts,cb){"function"==typeof opts&&([opts,cb]=[cb,opts]),opts=opts?Object.assign({},opts):{},_parseInput(input,opts,(err,files,singleFileTorrent)=>err?cb(err):void(opts.singleFileTorrent=singleFileTorrent,onFiles(files,opts,cb)))},module.exports.parseInput=function(input,opts,cb){"function"==typeof opts&&([opts,cb]=[cb,opts]),opts=opts?Object.assign({},opts):{},_parseInput(input,opts,cb)},module.exports.announceList=[["udp://tracker.leechers-paradise.org:6969"],["udp://tracker.coppersurfer.tk:6969"],["udp://tracker.opentrackr.org:1337"],["udp://explodie.org:6969"],["udp://tracker.empire-js.us:1337"],["wss://tracker.btorrent.xyz"],["wss://tracker.openwebtorrent.com"]]}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,require("buffer").Buffer)},{"./get-files":22,_process:62,bencode:11,"block-stream2":21,buffer:24,"filestream/read":37,"is-file":44,junk:46,multistream:57,once:59,path:26,"piece-length":61,"readable-stream":86,"run-parallel":90,"simple-sha1":96}],33:[function(require,module,exports){(function(process){(function(){function load(){let r;try{r=exports.storage.getItem("debug")}catch(error){}return!r&&"undefined"!=typeof process&&"env"in process&&(r=process.env.DEBUG),r}exports.formatArgs=function(args){if(args[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+args[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;args.splice(1,0,c,"color: inherit");let index=0,lastC=0;args[0].replace(/%[a-zA-Z%]/g,match=>{"%%"===match||(index++,"%c"===match&&(lastC=index))}),args.splice(lastC,0,c)},exports.save=function(namespaces){try{namespaces?exports.storage.setItem("debug",namespaces):exports.storage.removeItem("debug")}catch(error){}},exports.load=load,exports.useColors=function(){return!!("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},exports.storage=function(){try{return localStorage}catch(error){}}(),exports.destroy=(()=>{let warned=!1;return()=>{warned||(warned=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],exports.log=console.debug||console.log||(()=>{}),module.exports=require("./common")(exports);const{formatters}=module.exports;formatters.j=function(v){try{return JSON.stringify(v)}catch(error){return"[UnexpectedJSONParseError]: "+error.message}}}).call(this)}).call(this,require("_process"))},{"./common":34,_process:62}],34:[function(require,module){module.exports=function(env){function createDebug(namespace){function debug(...args){if(!debug.enabled)return;const self=debug,curr=+new Date,ms=curr-(prevTime||curr);self.diff=ms,self.prev=prevTime,self.curr=curr,prevTime=curr,args[0]=createDebug.coerce(args[0]),"string"!=typeof args[0]&&args.unshift("%O");let index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,(match,format)=>{if("%%"===match)return"%";index++;const formatter=createDebug.formatters[format];if("function"==typeof formatter){const val=args[index];match=formatter.call(self,val),args.splice(index,1),index--}return match}),createDebug.formatArgs.call(self,args);const logFn=self.log||createDebug.log;logFn.apply(self,args)}let enableOverride=null,prevTime;return debug.namespace=namespace,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(namespace),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null===enableOverride?createDebug.enabled(namespace):enableOverride,set:v=>{enableOverride=v}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(namespace,delimiter){const newDebug=createDebug(this.namespace+("undefined"==typeof delimiter?":":delimiter)+namespace);return newDebug.log=this.log,newDebug}function toNamespace(regexp){return regexp.toString().substring(2,regexp.toString().length-2).replace(/\.\*\?$/,"*")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function(val){return val instanceof Error?val.stack||val.message:val},createDebug.disable=function(){const namespaces=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map(namespace=>"-"+namespace)].join(",");return createDebug.enable(""),namespaces},createDebug.enable=function(namespaces){createDebug.save(namespaces),createDebug.names=[],createDebug.skips=[];let i;const split=("string"==typeof namespaces?namespaces:"").split(/[\s,]+/),len=split.length;for(i=0;i<len;i++)split[i]&&(namespaces=split[i].replace(/\*/g,".*?"),"-"===namespaces[0]?createDebug.skips.push(new RegExp("^"+namespaces.substr(1)+"$")):createDebug.names.push(new RegExp("^"+namespaces+"$")))},createDebug.enabled=function(name){if("*"===name[name.length-1])return!0;let i,len;for(i=0,len=createDebug.skips.length;i<len;i++)if(createDebug.skips[i].test(name))return!1;for(i=0,len=createDebug.names.length;i<len;i++)if(createDebug.names[i].test(name))return!0;return!1},createDebug.humanize=require("ms"),createDebug.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(env).forEach(key=>{createDebug[key]=env[key]}),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function(namespace){let hash=0;for(let i=0;i<namespace.length;i++)hash=(hash<<5)-hash+namespace.charCodeAt(i),hash|=0;return createDebug.colors[_Mathabs(hash)%createDebug.colors.length]},createDebug.enable(createDebug.load()),createDebug}},{ms:56}],35:[function(require,module){var once=require("once"),noop=function(){},isRequest=function(stream){return stream.setHeader&&"function"==typeof stream.abort},isChildProcess=function(stream){return stream.stdio&&Array.isArray(stream.stdio)&&3===stream.stdio.length},eos=function(stream,opts,callback){if("function"==typeof opts)return eos(stream,null,opts);opts||(opts={}),callback=once(callback||noop);var ws=stream._writableState,rs=stream._readableState,readable=opts.readable||!1!==opts.readable&&stream.readable,writable=opts.writable||!1!==opts.writable&&stream.writable,onlegacyfinish=function(){stream.writable||onfinish()},onfinish=function(){writable=!1,readable||callback.call(stream)},onend=function(){readable=!1,writable||callback.call(stream)},onexit=function(exitCode){callback.call(stream,exitCode?new Error("exited with error code: "+exitCode):null)},onerror=function(err){callback.call(stream,err)},onclose=function(){return readable&&!(rs&&rs.ended)?callback.call(stream,new Error("premature close")):writable&&!(ws&&ws.ended)?callback.call(stream,new Error("premature close")):void 0},onrequest=function(){stream.req.on("finish",onfinish)};return isRequest(stream)?(stream.on("complete",onfinish),stream.on("abort",onclose),stream.req?onrequest():stream.on("request",onrequest)):writable&&!ws&&(stream.on("end",onlegacyfinish),stream.on("close",onlegacyfinish)),isChildProcess(stream)&&stream.on("exit",onexit),stream.on("end",onend),stream.on("finish",onfinish),!1!==opts.error&&stream.on("error",onerror),stream.on("close",onclose),function(){stream.removeListener("complete",onfinish),stream.removeListener("abort",onclose),stream.removeListener("request",onrequest),stream.req&&stream.req.removeListener("finish",onfinish),stream.removeListener("end",onlegacyfinish),stream.removeListener("close",onlegacyfinish),stream.removeListener("finish",onfinish),stream.removeListener("exit",onexit),stream.removeListener("end",onend),stream.removeListener("error",onerror),stream.removeListener("close",onclose)}};module.exports=eos},{once:59}],36:[function(require,module){'use strict';function assign(obj,props){for(const key in props)Object.defineProperty(obj,key,{value:props[key],enumerable:!0,configurable:!0});return obj}module.exports=function(err,code,props){if(!err||"string"==typeof err)throw new TypeError("Please pass an Error to err-code");props||(props={}),"object"==typeof code&&(props=code,code=void 0),null!=code&&(props.code=code);try{return assign(err,props)}catch(_){props.message=err.message,props.stack=err.stack;const ErrClass=function(){};return ErrClass.prototype=Object.create(Object.getPrototypeOf(err)),assign(new ErrClass,props)}}},{}],37:[function(require,module){const{Readable}=require("readable-stream"),toBuffer=require("typedarray-to-buffer");module.exports=class FileReadStream extends Readable{constructor(file,opts={}){super(opts),this._offset=0,this._ready=!1,this._file=file,this._size=file.size,this._chunkSize=opts.chunkSize||_Mathmax(this._size/1e3,204800);const reader=new FileReader;reader.onload=()=>{this.push(toBuffer(reader.result))},reader.onerror=()=>{this.emit("error",reader.error)},this.reader=reader,this._generateHeaderBlocks(file,opts,(err,blocks)=>err?this.emit("error",err):void(Array.isArray(blocks)&&blocks.forEach(block=>this.push(block)),this._ready=!0,this.emit("_ready")))}_generateHeaderBlocks(file,opts,callback){callback(null,[])}_read(){if(!this._ready)return void this.once("_ready",this._read.bind(this));const startOffset=this._offset;let endOffset=this._offset+this._chunkSize;return endOffset>this._size&&(endOffset=this._size),startOffset===this._size?(this.destroy(),void this.push(null)):void(this.reader.readAsArrayBuffer(this._file.slice(startOffset,endOffset)),this._offset=endOffset)}destroy(){if(this._file=null,this.reader){this.reader.onload=null,this.reader.onerror=null;try{this.reader.abort()}catch(e){}}this.reader=null}}},{"readable-stream":86,"typedarray-to-buffer":113}],38:[function(require,module){module.exports=function(){if("undefined"==typeof globalThis)return null;var wrtc={RTCPeerConnection:globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection,RTCSessionDescription:globalThis.RTCSessionDescription||globalThis.mozRTCSessionDescription||globalThis.webkitRTCSessionDescription,RTCIceCandidate:globalThis.RTCIceCandidate||globalThis.mozRTCIceCandidate||globalThis.webkitRTCIceCandidate};return wrtc.RTCPeerConnection?wrtc:null}},{}],39:[function(require,module){function validateParams(params){if("string"==typeof params&&(params=url.parse(params)),params.protocol||(params.protocol="https:"),"https:"!==params.protocol)throw new Error("Protocol \""+params.protocol+"\" not supported. Expected \"https:\"");return params}var http=require("http"),url=require("url"),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(params,cb){return params=validateParams(params),http.request.call(this,params,cb)},https.get=function(params,cb){return params=validateParams(params),http.get.call(this,params,cb)}},{http:100,url:116}],40:[function(require,module,exports){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */exports.read=function(buffer,offset,isLE,mLen,nBytes){var eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i],e,m;for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;0<nBits;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;0<nBits;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=_Mathpow(2,mLen),e-=eBias}return(s?-1:1)*m*_Mathpow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var _MathLN=Math.LN2,_Mathlog=Math.log,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?_Mathpow(2,-24)-_Mathpow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=0>value||0===value&&0>1/value?1:0,e,m,c;for(value=_Mathabs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=_Mathfloor(_Mathlog(value)/_MathLN),1>value*(c=_Mathpow(2,-e))&&(e--,c*=2),value+=1<=e+eBias?rt/c:rt*_Mathpow(2,1-eBias),2<=value*c&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):1<=e+eBias?(m=(value*c-1)*_Mathpow(2,mLen),e+=eBias):(m=value*_Mathpow(2,eBias-1)*_Mathpow(2,mLen),e=0));8<=mLen;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;0<eLen;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],41:[function(require,module){/*! immediate-chunk-store. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */const queueMicrotask=require("queue-microtask");module.exports=class ImmediateStore{constructor(store){if(this.store=store,this.chunkLength=store.chunkLength,!this.store||!this.store.get||!this.store.put)throw new Error("First argument must be abstract-chunk-store compliant");this.mem=[]}put(index,buf,cb){this.mem[index]=buf,this.store.put(index,buf,err=>{this.mem[index]=null,cb&&cb(err)})}get(index,opts,cb){if("function"==typeof opts)return this.get(index,null,opts);let memoryBuffer=this.mem[index];if(!memoryBuffer)return this.store.get(index,opts,cb);if(opts){const start=opts.offset||0,end=opts.length?start+opts.length:memoryBuffer.length;memoryBuffer=memoryBuffer.slice(start,end)}queueMicrotask(()=>{cb&&cb(null,memoryBuffer)})}close(cb){this.store.close(cb)}destroy(cb){this.store.destroy(cb)}}},{"queue-microtask":68}],42:[function(require,module){module.exports="function"==typeof Object.create?function(ctor,superCtor){superCtor&&(ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}}))}:function(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}},{}],43:[function(require,module){module.exports=function(str){for(var i=0,strLen=str.length;i<strLen;++i)if(str.charCodeAt(i)>127)return!1;return!0}},{}],44:[function(require,module){'use strict';function isFileSync(path){return fs.existsSync(path)&&fs.statSync(path).isFile()}var fs=require("fs");module.exports=function(path,cb){return cb?void fs.stat(path,function(err,stats){return err?cb(err):cb(null,stats.isFile())}):isFileSync(path)},module.exports.sync=isFileSync},{fs:23}],45:[function(require,module){function isTypedArray(arr){return isStrictTypedArray(arr)||isLooseTypedArray(arr)}function isStrictTypedArray(arr){return arr instanceof Int8Array||arr instanceof Int16Array||arr instanceof Int32Array||arr instanceof Uint8Array||arr instanceof Uint8ClampedArray||arr instanceof Uint16Array||arr instanceof Uint32Array||arr instanceof Float32Array||arr instanceof Float64Array}function isLooseTypedArray(arr){return names[toString.call(arr)]}module.exports=isTypedArray,isTypedArray.strict=isStrictTypedArray,isTypedArray.loose=isLooseTypedArray;var toString=Object.prototype.toString,names={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0}},{}],46:[function(require,module,exports){'use strict';exports.re=()=>{throw new Error("`junk.re` was renamed to `junk.regex`")},exports.regex=new RegExp(["^npm-debug\\.log$","^\\..*\\.swp$","^\\.DS_Store$","^\\.AppleDouble$","^\\.LSOverride$","^Icon\\r$","^\\._.*","^\\.Spotlight-V100(?:$|\\/)","\\.Trashes","^__MACOSX$","~$","^Thumbs\\.db$","^ehthumbs\\.db$","^Desktop\\.ini$","@eaDir$"].join("|")),exports.is=filename=>exports.regex.test(filename),exports.not=filename=>!exports.is(filename),exports.default=module.exports},{}],47:[function(require,module){(function(Buffer){(function(){function magnetURIDecode(uri){const result={},data=uri.split("magnet:?")[1],params=data&&0<=data.length?data.split("&"):[];params.forEach(param=>{const keyval=param.split("=");if(2!==keyval.length)return;const key=keyval[0];let val=keyval[1];"dn"===key&&(val=decodeURIComponent(val).replace(/\+/g," ")),("tr"===key||"xs"===key||"as"===key||"ws"===key)&&(val=decodeURIComponent(val)),"kt"===key&&(val=decodeURIComponent(val).split("+")),"ix"===key&&(val=+val),"so"===key&&(val=bep53Range.parse(decodeURIComponent(val).split(","))),result[key]?(!Array.isArray(result[key])&&(result[key]=[result[key]]),result[key].push(val)):result[key]=val});let m;if(result.xt){const xts=Array.isArray(result.xt)?result.xt:[result.xt];xts.forEach(xt=>{if(m=xt.match(/^urn:btih:(.{40})/))result.infoHash=m[1].toLowerCase();else if(m=xt.match(/^urn:btih:(.{32})/)){const decodedStr=base32.decode(m[1]);result.infoHash=Buffer.from(decodedStr,"binary").toString("hex")}})}if(result.xs){const xss=Array.isArray(result.xs)?result.xs:[result.xs];xss.forEach(xs=>{(m=xs.match(/^urn:btpk:(.{64})/))&&(result.publicKey=m[1].toLowerCase())})}return result.infoHash&&(result.infoHashBuffer=Buffer.from(result.infoHash,"hex")),result.publicKey&&(result.publicKeyBuffer=Buffer.from(result.publicKey,"hex")),result.dn&&(result.name=result.dn),result.kt&&(result.keywords=result.kt),result.announce=[],("string"==typeof result.tr||Array.isArray(result.tr))&&(result.announce=result.announce.concat(result.tr)),result.urlList=[],("string"==typeof result.as||Array.isArray(result.as))&&(result.urlList=result.urlList.concat(result.as)),("string"==typeof result.ws||Array.isArray(result.ws))&&(result.urlList=result.urlList.concat(result.ws)),result.peerAddresses=[],("string"==typeof result["x.pe"]||Array.isArray(result["x.pe"]))&&(result.peerAddresses=result.peerAddresses.concat(result["x.pe"])),result.announce=Array.from(new Set(result.announce)),result.urlList=Array.from(new Set(result.urlList)),result.peerAddresses=Array.from(new Set(result.peerAddresses)),result}module.exports=magnetURIDecode,module.exports.decode=magnetURIDecode,module.exports.encode=function(obj){obj=Object.assign({},obj),obj.infoHashBuffer&&(obj.xt=`urn:btih:${obj.infoHashBuffer.toString("hex")}`),obj.infoHash&&(obj.xt=`urn:btih:${obj.infoHash}`),obj.publicKeyBuffer&&(obj.xs=`urn:btpk:${obj.publicKeyBuffer.toString("hex")}`),obj.publicKey&&(obj.xs=`urn:btpk:${obj.publicKey}`),obj.name&&(obj.dn=obj.name),obj.keywords&&(obj.kt=obj.keywords),obj.announce&&(obj.tr=obj.announce),obj.urlList&&(obj.ws=obj.urlList,delete obj.as),obj.peerAddresses&&(obj["x.pe"]=obj.peerAddresses);let result="magnet:?";return Object.keys(obj).filter(key=>2===key.length||"x.pe"===key).forEach((key,i)=>{const values=Array.isArray(obj[key])?obj[key]:[obj[key]];values.forEach((val,j)=>{(0<i||0<j)&&("kt"!==key&&"so"!==key||0===j)&&(result+="&"),"dn"===key&&(val=encodeURIComponent(val).replace(/%20/g,"+")),("tr"===key||"as"===key||"ws"===key)&&(val=encodeURIComponent(val)),"xs"!==key||val.startsWith("urn:btpk:")||(val=encodeURIComponent(val)),"kt"===key&&(val=encodeURIComponent(val)),"so"===key||("kt"===key&&0<j?result+=`+${val}`:result+=`${key}=${val}`)}),"so"===key&&(result+=`${key}=${bep53Range.compose(values)}`)}),result};const base32=require("thirty-two"),bep53Range=require("bep53-range")}).call(this)}).call(this,require("buffer").Buffer)},{"bep53-range":12,buffer:24,"thirty-two":108}],48:[function(require,module){function MediaElementWrapper(elem,opts){var self=this;if(!(self instanceof MediaElementWrapper))return new MediaElementWrapper(elem,opts);if(!MediaSource)throw new Error("web browser lacks MediaSource support");opts||(opts={}),self._debug=opts.debug,self._bufferDuration=opts.bufferDuration||60,self._elem=elem,self._mediaSource=new MediaSource,self._streams=[],self.detailedError=null,self._errorHandler=function(){self._elem.removeEventListener("error",self._errorHandler);var streams=self._streams.slice();streams.forEach(function(stream){stream.destroy(self._elem.error)})},self._elem.addEventListener("error",self._errorHandler),self._elem.src=window.URL.createObjectURL(self._mediaSource)}function MediaSourceStream(wrapper,obj){var self=this;if(stream.Writable.call(self),self._wrapper=wrapper,self._elem=wrapper._elem,self._mediaSource=wrapper._mediaSource,self._allStreams=wrapper._streams,self._allStreams.push(self),self._bufferDuration=wrapper._bufferDuration,self._sourceBuffer=null,self._debugBuffers=[],self._openHandler=function(){self._onSourceOpen()},self._flowHandler=function(){self._flow()},self._errorHandler=function(err){self.destroyed||self.emit("error",err)},"string"==typeof obj)self._type=obj,"open"===self._mediaSource.readyState?self._createSourceBuffer():self._mediaSource.addEventListener("sourceopen",self._openHandler);else if(null===obj._sourceBuffer)obj.destroy(),self._type=obj._type,self._mediaSource.addEventListener("sourceopen",self._openHandler);else if(obj._sourceBuffer)obj.destroy(),self._type=obj._type,self._sourceBuffer=obj._sourceBuffer,self._debugBuffers=obj._debugBuffers,self._sourceBuffer.addEventListener("updateend",self._flowHandler),self._sourceBuffer.addEventListener("error",self._errorHandler);else throw new Error("The argument to MediaElementWrapper.createWriteStream must be a string or a previous stream returned from that function");self._elem.addEventListener("timeupdate",self._flowHandler),self.on("error",function(err){self._wrapper.error(err)}),self.on("finish",function(){if(!self.destroyed&&(self._finished=!0,self._allStreams.every(function(other){return other._finished}))){self._wrapper._dumpDebugData();try{self._mediaSource.endOfStream()}catch(err){}}})}function downloadBuffers(bufs,name){var a=document.createElement("a");a.href=window.URL.createObjectURL(new window.Blob(bufs)),a.download=name,a.click()}module.exports=MediaElementWrapper;var inherits=require("inherits"),stream=require("readable-stream"),toArrayBuffer=require("to-arraybuffer"),MediaSource="undefined"!=typeof window&&window.MediaSource;MediaElementWrapper.prototype.createWriteStream=function(obj){var self=this;return new MediaSourceStream(self,obj)},MediaElementWrapper.prototype.error=function(err){var self=this;self.detailedError||(self.detailedError=err),self._dumpDebugData();try{self._mediaSource.endOfStream("decode")}catch(err){}try{window.URL.revokeObjectURL(self._elem.src)}catch(err){}},MediaElementWrapper.prototype._dumpDebugData=function(){var self=this;self._debug&&(self._debug=!1,self._streams.forEach(function(stream,i){downloadBuffers(stream._debugBuffers,"mediasource-stream-"+i)}))},inherits(MediaSourceStream,stream.Writable),MediaSourceStream.prototype._onSourceOpen=function(){var self=this;self.destroyed||(self._mediaSource.removeEventListener("sourceopen",self._openHandler),self._createSourceBuffer())},MediaSourceStream.prototype.destroy=function(err){var self=this;self.destroyed||(self.destroyed=!0,self._allStreams.splice(self._allStreams.indexOf(self),1),self._mediaSource.removeEventListener("sourceopen",self._openHandler),self._elem.removeEventListener("timeupdate",self._flowHandler),self._sourceBuffer&&(self._sourceBuffer.removeEventListener("updateend",self._flowHandler),self._sourceBuffer.removeEventListener("error",self._errorHandler),"open"===self._mediaSource.readyState&&self._sourceBuffer.abort()),err&&self.emit("error",err),self.emit("close"))},MediaSourceStream.prototype._createSourceBuffer=function(){var self=this;if(!self.destroyed)if(!MediaSource.isTypeSupported(self._type))self.destroy(new Error("The provided type is not supported"));else if(self._sourceBuffer=self._mediaSource.addSourceBuffer(self._type),self._sourceBuffer.addEventListener("updateend",self._flowHandler),self._sourceBuffer.addEventListener("error",self._errorHandler),self._cb){var cb=self._cb;self._cb=null,cb()}},MediaSourceStream.prototype._write=function(chunk,encoding,cb){var self=this;if(!self.destroyed){if(!self._sourceBuffer)return void(self._cb=function(err){return err?cb(err):void self._write(chunk,encoding,cb)});if(self._sourceBuffer.updating)return cb(new Error("Cannot append buffer while source buffer updating"));var arr=toArrayBuffer(chunk);self._wrapper._debug&&self._debugBuffers.push(arr);try{self._sourceBuffer.appendBuffer(arr)}catch(err){return void self.destroy(err)}self._cb=cb}},MediaSourceStream.prototype._flow=function(){var self=this;if(!(self.destroyed||!self._sourceBuffer||self._sourceBuffer.updating)&&!("open"===self._mediaSource.readyState&&self._getBufferDuration()>self._bufferDuration)&&self._cb){var cb=self._cb;self._cb=null,cb()}};MediaSourceStream.prototype._getBufferDuration=function(){for(var self=this,buffered=self._sourceBuffer.buffered,currentTime=self._elem.currentTime,bufferEnd=-1,i=0;i<buffered.length;i++){var start=buffered.start(i),end=buffered.end(i)+0;if(start>currentTime)break;else(0<=bufferEnd||currentTime<=end)&&(bufferEnd=end)}var bufferedTime=bufferEnd-currentTime;return 0>bufferedTime&&(bufferedTime=0),bufferedTime}},{inherits:42,"readable-stream":86,"to-arraybuffer":110}],49:[function(require,module){(function(process){(function(){function Storage(chunkLength,opts){if(!(this instanceof Storage))return new Storage(chunkLength,opts);if(opts||(opts={}),this.chunkLength=+chunkLength,!this.chunkLength)throw new Error("First argument must be a chunk length");this.chunks=[],this.closed=!1,this.length=+opts.length||1/0,this.length!==1/0&&(this.lastChunkLength=this.length%this.chunkLength||this.chunkLength,this.lastChunkIndex=_Mathceil(this.length/this.chunkLength)-1)}function nextTick(cb,err,val){process.nextTick(function(){cb&&cb(err,val)})}module.exports=Storage,Storage.prototype.put=function(index,buf,cb){if(this.closed)return nextTick(cb,new Error("Storage is closed"));var isLastChunk=index===this.lastChunkIndex;return isLastChunk&&buf.length!==this.lastChunkLength?nextTick(cb,new Error("Last chunk length must be "+this.lastChunkLength)):isLastChunk||buf.length===this.chunkLength?void(this.chunks[index]=buf,nextTick(cb,null)):nextTick(cb,new Error("Chunk length must be "+this.chunkLength))},Storage.prototype.get=function(index,opts,cb){if("function"==typeof opts)return this.get(index,null,opts);if(this.closed)return nextTick(cb,new Error("Storage is closed"));var buf=this.chunks[index];if(!buf){var err=new Error("Chunk not found");return err.notFound=!0,nextTick(cb,err)}if(!opts)return nextTick(cb,null,buf);var offset=opts.offset||0,len=opts.length||buf.length-offset;nextTick(cb,null,buf.slice(offset,len+offset))},Storage.prototype.close=Storage.prototype.destroy=function(cb){return this.closed?nextTick(cb,new Error("Storage is closed")):void(this.closed=!0,this.chunks=null,nextTick(cb,null))}}).call(this)}).call(this,require("_process"))},{_process:62}],50:[function(require,module,exports){(function(Buffer){(function(){function writeReserved(buf,offset,end){for(var i=offset;i<end;i++)buf[i]=0}function writeDate(date,buf,offset){buf.writeUInt32BE(_Mathfloor((date.getTime()+2082844800000)/1e3),offset)}function writeDate64(date,buf,offset){buf.writeUIntBE(_Mathfloor((date.getTime()+2082844800000)/1e3),offset,6)}function writeFixed32(num,buf,offset){buf.writeUInt16BE(_Mathfloor(num)%65536,offset),buf.writeUInt16BE(_Mathfloor(256*(256*num))%65536,offset+2)}function writeFixed16(num,buf,offset){buf[offset]=_Mathfloor(num)%256,buf[offset+1]=_Mathfloor(256*num)%256}function writeMatrix(list,buf,offset){list||(list=[0,0,0,0,0,0,0,0,0]);for(var i=0;i<list.length;i++)writeFixed32(list[i],buf,offset+4*i)}function writeString(str,buf,offset){var strBuffer=Buffer.from(str,"utf8");strBuffer.copy(buf,offset),buf[offset+strBuffer.length]=0}function readMatrix(buf){for(var list=Array(buf.length/4),i=0;i<list.length;i++)list[i]=readFixed32(buf,4*i);return list}function readDate64(buf,offset){return new Date(1e3*buf.readUIntBE(offset,6)-2082844800000)}function readDate(buf,offset){return new Date(1e3*buf.readUInt32BE(offset)-2082844800000)}function readFixed32(buf,offset){return buf.readUInt16BE(offset)+buf.readUInt16BE(offset+2)/65536}function readFixed16(buf,offset){return buf[offset]+buf[offset+1]/256}function readString(buf,offset,length){var i;for(i=0;i<length&&!(0===buf[offset+i]);i++);return buf.toString("utf8",offset,offset+i)}var Box=require("./index"),Descriptor=require("./descriptor"),uint64be=require("uint64be");exports.fullBoxes={};["mvhd","tkhd","mdhd","vmhd","smhd","stsd","esds","stsz","stco","co64","stss","stts","ctts","stsc","dref","elst","hdlr","mehd","trex","mfhd","tfhd","tfdt","trun"].forEach(function(type){exports.fullBoxes[type]=!0}),exports.ftyp={},exports.ftyp.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(exports.ftyp.encodingLength(box));var brands=box.compatibleBrands||[];buf.write(box.brand,0,4,"ascii"),buf.writeUInt32BE(box.brandVersion,4);for(var i=0;i<brands.length;i++)buf.write(brands[i],8+4*i,4,"ascii");return exports.ftyp.encode.bytes=8+4*brands.length,buf},exports.ftyp.decode=function(buf,offset){buf=buf.slice(offset);for(var brand=buf.toString("ascii",0,4),version=buf.readUInt32BE(4),compatibleBrands=[],i=8;i<buf.length;i+=4)compatibleBrands.push(buf.toString("ascii",i,i+4));return{brand:brand,brandVersion:version,compatibleBrands:compatibleBrands}},exports.ftyp.encodingLength=function(box){return 8+4*(box.compatibleBrands||[]).length},exports.mvhd={},exports.mvhd.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(96),writeDate(box.ctime||new Date,buf,0),writeDate(box.mtime||new Date,buf,4),buf.writeUInt32BE(box.timeScale||0,8),buf.writeUInt32BE(box.duration||0,12),writeFixed32(box.preferredRate||0,buf,16),writeFixed16(box.preferredVolume||0,buf,20),writeReserved(buf,22,32),writeMatrix(box.matrix,buf,32),buf.writeUInt32BE(box.previewTime||0,68),buf.writeUInt32BE(box.previewDuration||0,72),buf.writeUInt32BE(box.posterTime||0,76),buf.writeUInt32BE(box.selectionTime||0,80),buf.writeUInt32BE(box.selectionDuration||0,84),buf.writeUInt32BE(box.currentTime||0,88),buf.writeUInt32BE(box.nextTrackId||0,92),exports.mvhd.encode.bytes=96,buf},exports.mvhd.decode=function(buf,offset){return buf=buf.slice(offset),{ctime:readDate(buf,0),mtime:readDate(buf,4),timeScale:buf.readUInt32BE(8),duration:buf.readUInt32BE(12),preferredRate:readFixed32(buf,16),preferredVolume:readFixed16(buf,20),matrix:readMatrix(buf.slice(32,68)),previewTime:buf.readUInt32BE(68),previewDuration:buf.readUInt32BE(72),posterTime:buf.readUInt32BE(76),selectionTime:buf.readUInt32BE(80),selectionDuration:buf.readUInt32BE(84),currentTime:buf.readUInt32BE(88),nextTrackId:buf.readUInt32BE(92)}},exports.mvhd.encodingLength=function(){return 96},exports.tkhd={},exports.tkhd.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(80),writeDate(box.ctime||new Date,buf,0),writeDate(box.mtime||new Date,buf,4),buf.writeUInt32BE(box.trackId||0,8),writeReserved(buf,12,16),buf.writeUInt32BE(box.duration||0,16),writeReserved(buf,20,28),buf.writeUInt16BE(box.layer||0,28),buf.writeUInt16BE(box.alternateGroup||0,30),buf.writeUInt16BE(box.volume||0,32),writeMatrix(box.matrix,buf,36),buf.writeUInt32BE(box.trackWidth||0,72),buf.writeUInt32BE(box.trackHeight||0,76),exports.tkhd.encode.bytes=80,buf},exports.tkhd.decode=function(buf,offset){return buf=buf.slice(offset),{ctime:readDate(buf,0),mtime:readDate(buf,4),trackId:buf.readUInt32BE(8),duration:buf.readUInt32BE(16),layer:buf.readUInt16BE(28),alternateGroup:buf.readUInt16BE(30),volume:buf.readUInt16BE(32),matrix:readMatrix(buf.slice(36,72)),trackWidth:buf.readUInt32BE(72),trackHeight:buf.readUInt32BE(76)}},exports.tkhd.encodingLength=function(){return 80},exports.mdhd={},exports.mdhd.encode=function(box,buf,offset){return 1===box.version?(buf=buf?buf.slice(offset):Buffer.alloc(32),writeDate64(box.ctime||new Date,buf,0),writeDate64(box.mtime||new Date,buf,8),buf.writeUInt32BE(box.timeScale||0,16),buf.writeUIntBE(box.duration||0,20,6),buf.writeUInt16BE(box.language||0,28),buf.writeUInt16BE(box.quality||0,30),exports.mdhd.encode.bytes=32,buf):(buf=buf?buf.slice(offset):Buffer.alloc(20),writeDate(box.ctime||new Date,buf,0),writeDate(box.mtime||new Date,buf,4),buf.writeUInt32BE(box.timeScale||0,8),buf.writeUInt32BE(box.duration||0,12),buf.writeUInt16BE(box.language||0,16),buf.writeUInt16BE(box.quality||0,18),exports.mdhd.encode.bytes=20,buf)},exports.mdhd.decode=function(buf,offset,end){buf=buf.slice(offset);return 20!=end-offset?{ctime:readDate64(buf,0),mtime:readDate64(buf,8),timeScale:buf.readUInt32BE(16),duration:buf.readUIntBE(20,6),language:buf.readUInt16BE(28),quality:buf.readUInt16BE(30)}:{ctime:readDate(buf,0),mtime:readDate(buf,4),timeScale:buf.readUInt32BE(8),duration:buf.readUInt32BE(12),language:buf.readUInt16BE(16),quality:buf.readUInt16BE(18)}},exports.mdhd.encodingLength=function(box){return 1===box.version?32:20},exports.vmhd={},exports.vmhd.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(8),buf.writeUInt16BE(box.graphicsMode||0,0);var opcolor=box.opcolor||[0,0,0];return buf.writeUInt16BE(opcolor[0],2),buf.writeUInt16BE(opcolor[1],4),buf.writeUInt16BE(opcolor[2],6),exports.vmhd.encode.bytes=8,buf},exports.vmhd.decode=function(buf,offset){return buf=buf.slice(offset),{graphicsMode:buf.readUInt16BE(0),opcolor:[buf.readUInt16BE(2),buf.readUInt16BE(4),buf.readUInt16BE(6)]}},exports.vmhd.encodingLength=function(){return 8},exports.smhd={},exports.smhd.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(4),buf.writeUInt16BE(box.balance||0,0),writeReserved(buf,2,4),exports.smhd.encode.bytes=4,buf},exports.smhd.decode=function(buf,offset){return buf=buf.slice(offset),{balance:buf.readUInt16BE(0)}},exports.smhd.encodingLength=function(){return 4},exports.stsd={},exports.stsd.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(exports.stsd.encodingLength(box));var entries=box.entries||[];buf.writeUInt32BE(entries.length,0);for(var ptr=4,i=0,entry;i<entries.length;i++)entry=entries[i],Box.encode(entry,buf,ptr),ptr+=Box.encode.bytes;return exports.stsd.encode.bytes=ptr,buf},exports.stsd.decode=function(buf,offset,end){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),ptr=4,i=0,entry;i<num;i++)entry=Box.decode(buf,ptr,end),entries[i]=entry,ptr+=entry.length;return{entries:entries}},exports.stsd.encodingLength=function(box){var totalSize=4;if(!box.entries)return totalSize;for(var i=0;i<box.entries.length;i++)totalSize+=Box.encodingLength(box.entries[i]);return totalSize},exports.avc1=exports.VisualSampleEntry={},exports.VisualSampleEntry.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(exports.VisualSampleEntry.encodingLength(box)),writeReserved(buf,0,6),buf.writeUInt16BE(box.dataReferenceIndex||0,6),writeReserved(buf,8,24),buf.writeUInt16BE(box.width||0,24),buf.writeUInt16BE(box.height||0,26),buf.writeUInt32BE(box.hResolution||4718592,28),buf.writeUInt32BE(box.vResolution||4718592,32),writeReserved(buf,36,40),buf.writeUInt16BE(box.frameCount||1,40);var compressorName=box.compressorName||"",nameLen=_Mathmin(compressorName.length,31);buf.writeUInt8(nameLen,42),buf.write(compressorName,43,nameLen,"utf8"),buf.writeUInt16BE(box.depth||24,74),buf.writeInt16BE(-1,76);var ptr=78,children=box.children||[];children.forEach(function(child){Box.encode(child,buf,ptr),ptr+=Box.encode.bytes}),exports.VisualSampleEntry.encode.bytes=ptr},exports.VisualSampleEntry.decode=function(buf,offset,end){buf=buf.slice(offset);for(var length=end-offset,nameLen=_Mathmin(buf.readUInt8(42),31),box={dataReferenceIndex:buf.readUInt16BE(6),width:buf.readUInt16BE(24),height:buf.readUInt16BE(26),hResolution:buf.readUInt32BE(28),vResolution:buf.readUInt32BE(32),frameCount:buf.readUInt16BE(40),compressorName:buf.toString("utf8",43,43+nameLen),depth:buf.readUInt16BE(74),children:[]},ptr=78;8<=length-ptr;){var child=Box.decode(buf,ptr,length);box.children.push(child),box[child.type]=child,ptr+=child.length}return box},exports.VisualSampleEntry.encodingLength=function(box){var len=78,children=box.children||[];return children.forEach(function(child){len+=Box.encodingLength(child)}),len},exports.avcC={},exports.avcC.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(box.buffer.length),box.buffer.copy(buf),exports.avcC.encode.bytes=box.buffer.length},exports.avcC.decode=function(buf,offset,end){return buf=buf.slice(offset,end),{mimeCodec:buf.toString("hex",1,4),buffer:Buffer.from(buf)}},exports.avcC.encodingLength=function(box){return box.buffer.length},exports.mp4a=exports.AudioSampleEntry={},exports.AudioSampleEntry.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(exports.AudioSampleEntry.encodingLength(box)),writeReserved(buf,0,6),buf.writeUInt16BE(box.dataReferenceIndex||0,6),writeReserved(buf,8,16),buf.writeUInt16BE(box.channelCount||2,16),buf.writeUInt16BE(box.sampleSize||16,18),writeReserved(buf,20,24),buf.writeUInt32BE(box.sampleRate||0,24);var ptr=28,children=box.children||[];children.forEach(function(child){Box.encode(child,buf,ptr),ptr+=Box.encode.bytes}),exports.AudioSampleEntry.encode.bytes=ptr},exports.AudioSampleEntry.decode=function(buf,offset,end){buf=buf.slice(offset,end);for(var length=end-offset,box={dataReferenceIndex:buf.readUInt16BE(6),channelCount:buf.readUInt16BE(16),sampleSize:buf.readUInt16BE(18),sampleRate:buf.readUInt32BE(24),children:[]},ptr=28;8<=length-ptr;){var child=Box.decode(buf,ptr,length);box.children.push(child),box[child.type]=child,ptr+=child.length}return box},exports.AudioSampleEntry.encodingLength=function(box){var len=28,children=box.children||[];return children.forEach(function(child){len+=Box.encodingLength(child)}),len},exports.esds={},exports.esds.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(box.buffer.length),box.buffer.copy(buf,0),exports.esds.encode.bytes=box.buffer.length},exports.esds.decode=function(buf,offset,end){buf=buf.slice(offset,end);var desc=Descriptor.Descriptor.decode(buf,0,buf.length),esd="ESDescriptor"===desc.tagName?desc:{},dcd=esd.DecoderConfigDescriptor||{},oti=dcd.oti||0,dsi=dcd.DecoderSpecificInfo,audioConfig=dsi?(248&dsi.buffer.readUInt8(0))>>3:0,mimeCodec=null;return oti&&(mimeCodec=oti.toString(16),audioConfig&&(mimeCodec+="."+audioConfig)),{mimeCodec:mimeCodec,buffer:Buffer.from(buf.slice(0))}},exports.esds.encodingLength=function(box){return box.buffer.length},exports.stsz={},exports.stsz.encode=function(box,buf,offset){var entries=box.entries||[];buf=buf?buf.slice(offset):Buffer.alloc(exports.stsz.encodingLength(box)),buf.writeUInt32BE(0,0),buf.writeUInt32BE(entries.length,4);for(var i=0;i<entries.length;i++)buf.writeUInt32BE(entries[i],4*i+8);return exports.stsz.encode.bytes=8+4*entries.length,buf},exports.stsz.decode=function(buf,offset){buf=buf.slice(offset);for(var size=buf.readUInt32BE(0),num=buf.readUInt32BE(4),entries=Array(num),i=0;i<num;i++)entries[i]=0===size?buf.readUInt32BE(4*i+8):size;return{entries:entries}},exports.stsz.encodingLength=function(box){return 8+4*box.entries.length},exports.stss=exports.stco={},exports.stco.encode=function(box,buf,offset){var entries=box.entries||[];buf=buf?buf.slice(offset):Buffer.alloc(exports.stco.encodingLength(box)),buf.writeUInt32BE(entries.length,0);for(var i=0;i<entries.length;i++)buf.writeUInt32BE(entries[i],4*i+4);return exports.stco.encode.bytes=4+4*entries.length,buf},exports.stco.decode=function(buf,offset){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),i=0;i<num;i++)entries[i]=buf.readUInt32BE(4*i+4);return{entries:entries}},exports.stco.encodingLength=function(box){return 4+4*box.entries.length},exports.co64={},exports.co64.encode=function(box,buf,offset){var entries=box.entries||[];buf=buf?buf.slice(offset):Buffer.alloc(exports.co64.encodingLength(box)),buf.writeUInt32BE(entries.length,0);for(var i=0;i<entries.length;i++)uint64be.encode(entries[i],buf,8*i+4);return exports.co64.encode.bytes=4+8*entries.length,buf},exports.co64.decode=function(buf,offset){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),i=0;i<num;i++)entries[i]=uint64be.decode(buf,8*i+4);return{entries:entries}},exports.co64.encodingLength=function(box){return 4+8*box.entries.length},exports.stts={},exports.stts.encode=function(box,buf,offset){var entries=box.entries||[];buf=buf?buf.slice(offset):Buffer.alloc(exports.stts.encodingLength(box)),buf.writeUInt32BE(entries.length,0);for(var i=0,ptr;i<entries.length;i++)ptr=8*i+4,buf.writeUInt32BE(entries[i].count||0,ptr),buf.writeUInt32BE(entries[i].duration||0,ptr+4);return exports.stts.encode.bytes=4+8*box.entries.length,buf},exports.stts.decode=function(buf,offset){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),i=0,ptr;i<num;i++)ptr=8*i+4,entries[i]={count:buf.readUInt32BE(ptr),duration:buf.readUInt32BE(ptr+4)};return{entries:entries}},exports.stts.encodingLength=function(box){return 4+8*box.entries.length},exports.ctts={},exports.ctts.encode=function(box,buf,offset){var entries=box.entries||[];buf=buf?buf.slice(offset):Buffer.alloc(exports.ctts.encodingLength(box)),buf.writeUInt32BE(entries.length,0);for(var i=0,ptr;i<entries.length;i++)ptr=8*i+4,buf.writeUInt32BE(entries[i].count||0,ptr),buf.writeUInt32BE(entries[i].compositionOffset||0,ptr+4);return exports.ctts.encode.bytes=4+8*entries.length,buf},exports.ctts.decode=function(buf,offset){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),i=0,ptr;i<num;i++)ptr=8*i+4,entries[i]={count:buf.readUInt32BE(ptr),compositionOffset:buf.readInt32BE(ptr+4)};return{entries:entries}},exports.ctts.encodingLength=function(box){return 4+8*box.entries.length},exports.stsc={},exports.stsc.encode=function(box,buf,offset){var entries=box.entries||[];buf=buf?buf.slice(offset):Buffer.alloc(exports.stsc.encodingLength(box)),buf.writeUInt32BE(entries.length,0);for(var i=0,ptr;i<entries.length;i++)ptr=12*i+4,buf.writeUInt32BE(entries[i].firstChunk||0,ptr),buf.writeUInt32BE(entries[i].samplesPerChunk||0,ptr+4),buf.writeUInt32BE(entries[i].sampleDescriptionId||0,ptr+8);return exports.stsc.encode.bytes=4+12*entries.length,buf},exports.stsc.decode=function(buf,offset){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),i=0,ptr;i<num;i++)ptr=12*i+4,entries[i]={firstChunk:buf.readUInt32BE(ptr),samplesPerChunk:buf.readUInt32BE(ptr+4),sampleDescriptionId:buf.readUInt32BE(ptr+8)};return{entries:entries}},exports.stsc.encodingLength=function(box){return 4+12*box.entries.length},exports.dref={},exports.dref.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(exports.dref.encodingLength(box));var entries=box.entries||[];buf.writeUInt32BE(entries.length,0);for(var ptr=4,i=0;i<entries.length;i++){var entry=entries[i],size=(entry.buf?entry.buf.length:0)+4+4;buf.writeUInt32BE(size,ptr),ptr+=4,buf.write(entry.type,ptr,4,"ascii"),ptr+=4,entry.buf&&(entry.buf.copy(buf,ptr),ptr+=entry.buf.length)}return exports.dref.encode.bytes=ptr,buf},exports.dref.decode=function(buf,offset){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),ptr=4,i=0;i<num;i++){var size=buf.readUInt32BE(ptr),type=buf.toString("ascii",ptr+4,ptr+8),tmp=buf.slice(ptr+8,ptr+size);ptr+=size,entries[i]={type:type,buf:tmp}}return{entries:entries}},exports.dref.encodingLength=function(box){var totalSize=4;if(!box.entries)return totalSize;for(var i=0,buf;i<box.entries.length;i++)buf=box.entries[i].buf,totalSize+=(buf?buf.length:0)+4+4;return totalSize},exports.elst={},exports.elst.encode=function(box,buf,offset){var entries=box.entries||[];buf=buf?buf.slice(offset):Buffer.alloc(exports.elst.encodingLength(box)),buf.writeUInt32BE(entries.length,0);for(var i=0,ptr;i<entries.length;i++)ptr=12*i+4,buf.writeUInt32BE(entries[i].trackDuration||0,ptr),buf.writeUInt32BE(entries[i].mediaTime||0,ptr+4),writeFixed32(entries[i].mediaRate||0,buf,ptr+8);return exports.elst.encode.bytes=4+12*entries.length,buf},exports.elst.decode=function(buf,offset){buf=buf.slice(offset);for(var num=buf.readUInt32BE(0),entries=Array(num),i=0,ptr;i<num;i++)ptr=12*i+4,entries[i]={trackDuration:buf.readUInt32BE(ptr),mediaTime:buf.readInt32BE(ptr+4),mediaRate:readFixed32(buf,ptr+8)};return{entries:entries}},exports.elst.encodingLength=function(box){return 4+12*box.entries.length},exports.hdlr={},exports.hdlr.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(exports.hdlr.encodingLength(box));var len=21+(box.name||"").length;return buf.fill(0,0,len),buf.write(box.handlerType||"",4,4,"ascii"),writeString(box.name||"",buf,20),exports.hdlr.encode.bytes=len,buf},exports.hdlr.decode=function(buf,offset,end){return buf=buf.slice(offset),{handlerType:buf.toString("ascii",4,8),name:readString(buf,20,end)}},exports.hdlr.encodingLength=function(box){return 21+(box.name||"").length},exports.mehd={},exports.mehd.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(4),buf.writeUInt32BE(box.fragmentDuration||0,0),exports.mehd.encode.bytes=4,buf},exports.mehd.decode=function(buf,offset){return buf=buf.slice(offset),{fragmentDuration:buf.readUInt32BE(0)}},exports.mehd.encodingLength=function(){return 4},exports.trex={},exports.trex.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(20),buf.writeUInt32BE(box.trackId||0,0),buf.writeUInt32BE(box.defaultSampleDescriptionIndex||0,4),buf.writeUInt32BE(box.defaultSampleDuration||0,8),buf.writeUInt32BE(box.defaultSampleSize||0,12),buf.writeUInt32BE(box.defaultSampleFlags||0,16),exports.trex.encode.bytes=20,buf},exports.trex.decode=function(buf,offset){return buf=buf.slice(offset),{trackId:buf.readUInt32BE(0),defaultSampleDescriptionIndex:buf.readUInt32BE(4),defaultSampleDuration:buf.readUInt32BE(8),defaultSampleSize:buf.readUInt32BE(12),defaultSampleFlags:buf.readUInt32BE(16)}},exports.trex.encodingLength=function(){return 20},exports.mfhd={},exports.mfhd.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(4),buf.writeUInt32BE(box.sequenceNumber||0,0),exports.mfhd.encode.bytes=4,buf},exports.mfhd.decode=function(buf){return{sequenceNumber:buf.readUInt32BE(0)}},exports.mfhd.encodingLength=function(){return 4},exports.tfhd={},exports.tfhd.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(4),buf.writeUInt32BE(box.trackId,0),exports.tfhd.encode.bytes=4,buf},exports.tfhd.decode=function(){},exports.tfhd.encodingLength=function(){return 4},exports.tfdt={},exports.tfdt.encode=function(box,buf,offset){return buf=buf?buf.slice(offset):Buffer.alloc(4),buf.writeUInt32BE(box.baseMediaDecodeTime||0,0),exports.tfdt.encode.bytes=4,buf},exports.tfdt.decode=function(){},exports.tfdt.encodingLength=function(){return 4},exports.trun={},exports.trun.encode=function(box,buf,offset){buf=buf?buf.slice(offset):Buffer.alloc(8+16*box.entries.length),buf.writeUInt32BE(box.entries.length,0),buf.writeInt32BE(box.dataOffset,4);for(var ptr=8,i=0,entry;i<box.entries.length;i++)entry=box.entries[i],buf.writeUInt32BE(entry.sampleDuration,ptr),ptr+=4,buf.writeUInt32BE(entry.sampleSize,ptr),ptr+=4,buf.writeUInt32BE(entry.sampleFlags,ptr),ptr+=4,0===(box.version||0)?buf.writeUInt32BE(entry.sampleCompositionTimeOffset,ptr):buf.writeInt32BE(entry.sampleCompositionTimeOffset,ptr),ptr+=4;exports.trun.encode.bytes=ptr},exports.trun.decode=function(){},exports.trun.encodingLength=function(box){return 8+16*box.entries.length},exports.mdat={},exports.mdat.encode=function(box,buf,offset){box.buffer?(box.buffer.copy(buf,offset),exports.mdat.encode.bytes=box.buffer.length):exports.mdat.encode.bytes=exports.mdat.encodingLength(box)},exports.mdat.decode=function(buf,start,end){return{buffer:Buffer.from(buf.slice(start,end))}},exports.mdat.encodingLength=function(box){return box.buffer?box.buffer.length:box.contentLength}}).call(this)}).call(this,require("buffer").Buffer)},{"./descriptor":51,"./index":52,buffer:24,uint64be:114}],51:[function(require,module,exports){(function(Buffer){(function(){var tagToName={3:"ESDescriptor",4:"DecoderConfigDescriptor",5:"DecoderSpecificInfo",6:"SLConfigDescriptor"};exports.Descriptor={},exports.Descriptor.decode=function(buf,start,end){var tag=buf.readUInt8(start),ptr=start+1,len=0,lenByte;do lenByte=buf.readUInt8(ptr++),len=len<<7|127&lenByte;while(128&lenByte);var tagName=tagToName[tag],obj;return obj=exports[tagName]?exports[tagName].decode(buf,ptr,end):{buffer:Buffer.from(buf.slice(ptr,ptr+len))},obj.tag=tag,obj.tagName=tagName,obj.length=ptr-start+len,obj.contentsLen=len,obj},exports.DescriptorArray={},exports.DescriptorArray.decode=function(buf,start,end){for(var ptr=start,obj={};ptr+2<=end;){var descriptor=exports.Descriptor.decode(buf,ptr,end);ptr+=descriptor.length;var tagName=tagToName[descriptor.tag]||"Descriptor"+descriptor.tag;obj[tagName]=descriptor}return obj},exports.ESDescriptor={},exports.ESDescriptor.decode=function(buf,start,end){var flags=buf.readUInt8(start+2),ptr=start+3;if(128&flags&&(ptr+=2),64&flags){var len=buf.readUInt8(ptr);ptr+=len+1}return 32&flags&&(ptr+=2),exports.DescriptorArray.decode(buf,ptr,end)},exports.DecoderConfigDescriptor={},exports.DecoderConfigDescriptor.decode=function(buf,start,end){var oti=buf.readUInt8(start),obj=exports.DescriptorArray.decode(buf,start+13,end);return obj.oti=oti,obj}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24}],52:[function(require,module,exports){(function(Buffer){(function(){var uint64be=require("uint64be"),boxes=require("./boxes"),UINT32_MAX=4294967295,Box=exports,containers=exports.containers={moov:["mvhd","meta","traks","mvex"],trak:["tkhd","tref","trgr","edts","meta","mdia","udta"],edts:["elst"],mdia:["mdhd","hdlr","elng","minf"],minf:["vmhd","smhd","hmhd","sthd","nmhd","dinf","stbl"],dinf:["dref"],stbl:["stsd","stts","ctts","cslg","stsc","stsz","stz2","stco","co64","stss","stsh","padb","stdp","sdtp","sbgps","sgpds","subss","saizs","saios"],mvex:["mehd","trexs","leva"],moof:["mfhd","meta","trafs"],traf:["tfhd","tfdt","trun","sbgps","sgpds","subss","saizs","saios","meta"]};Box.encode=function(obj,buffer,offset){return Box.encodingLength(obj),offset=offset||0,buffer=buffer||Buffer.alloc(obj.length),Box._encode(obj,buffer,offset)},Box._encode=function(obj,buffer,offset){var type=obj.type,len=obj.length;len>UINT32_MAX&&(len=1),buffer.writeUInt32BE(len,offset),buffer.write(obj.type,offset+4,4,"ascii");var ptr=offset+8;if(1===len&&(uint64be.encode(obj.length,buffer,ptr),ptr+=8),boxes.fullBoxes[type]&&(buffer.writeUInt32BE(obj.flags||0,ptr),buffer.writeUInt8(obj.version||0,ptr),ptr+=4),containers[type]){var contents=containers[type];contents.forEach(function(childType){if(5===childType.length){var entry=obj[childType]||[];childType=childType.substr(0,4),entry.forEach(function(child){Box._encode(child,buffer,ptr),ptr+=Box.encode.bytes})}else obj[childType]&&(Box._encode(obj[childType],buffer,ptr),ptr+=Box.encode.bytes)}),obj.otherBoxes&&obj.otherBoxes.forEach(function(child){Box._encode(child,buffer,ptr),ptr+=Box.encode.bytes})}else if(boxes[type]){var encode=boxes[type].encode;encode(obj,buffer,ptr),ptr+=encode.bytes}else if(obj.buffer){var buf=obj.buffer;buf.copy(buffer,ptr),ptr+=obj.buffer.length}else throw new Error("Either `type` must be set to a known type (not'"+type+"') or `buffer` must be set");return Box.encode.bytes=ptr-offset,buffer},Box.readHeaders=function(buffer,start,end){if(start=start||0,end=end||buffer.length,8>end-start)return 8;var len=buffer.readUInt32BE(start),type=buffer.toString("ascii",start+4,start+8),ptr=start+8;if(1===len){if(16>end-start)return 16;len=uint64be.decode(buffer,ptr),ptr+=8}var version,flags;return boxes.fullBoxes[type]&&(version=buffer.readUInt8(ptr),flags=16777215&buffer.readUInt32BE(ptr),ptr+=4),{length:len,headersLen:ptr-start,contentLen:len-(ptr-start),type:type,version:version,flags:flags}},Box.decode=function(buffer,start,end){start=start||0,end=end||buffer.length;var headers=Box.readHeaders(buffer,start,end);if(!headers||headers.length>end-start)throw new Error("Data too short");return Box.decodeWithoutHeaders(headers,buffer,start+headers.headersLen,start+headers.length)},Box.decodeWithoutHeaders=function(headers,buffer,start,end){start=start||0,end=end||buffer.length;var type=headers.type,obj={};if(containers[type]){obj.otherBoxes=[];for(var contents=containers[type],ptr=start,child;8<=end-ptr;)if(child=Box.decode(buffer,ptr,end),ptr+=child.length,0<=contents.indexOf(child.type))obj[child.type]=child;else if(0<=contents.indexOf(child.type+"s")){var childType=child.type+"s",entry=obj[childType]=obj[childType]||[];entry.push(child)}else obj.otherBoxes.push(child)}else if(boxes[type]){var decode=boxes[type].decode;obj=decode(buffer,start,end)}else obj.buffer=Buffer.from(buffer.slice(start,end));return obj.length=headers.length,obj.contentLen=headers.contentLen,obj.type=headers.type,obj.version=headers.version,obj.flags=headers.flags,obj},Box.encodingLength=function(obj){var type=obj.type,len=8;if(boxes.fullBoxes[type]&&(len+=4),containers[type]){var contents=containers[type];contents.forEach(function(childType){if(5===childType.length){var entry=obj[childType]||[];childType=childType.substr(0,4),entry.forEach(function(child){child.type=childType,len+=Box.encodingLength(child)})}else if(obj[childType]){var child=obj[childType];child.type=childType,len+=Box.encodingLength(child)}}),obj.otherBoxes&&obj.otherBoxes.forEach(function(child){len+=Box.encodingLength(child)})}else if(boxes[type])len+=boxes[type].encodingLength(obj);else if(obj.buffer)len+=obj.buffer.length;else throw new Error("Either `type` must be set to a known type (not'"+type+"') or `buffer` must be set");return len>UINT32_MAX&&(len+=8),obj.length=len,len}}).call(this)}).call(this,require("buffer").Buffer)},{"./boxes":50,buffer:24,uint64be:114}],53:[function(require,module){(function(Buffer){(function(){var stream=require("readable-stream"),nextEvent=require("next-event"),Box=require("mp4-box-encoding"),EMPTY=Buffer.alloc(0);class Decoder extends stream.Writable{constructor(opts){super(opts),this.destroyed=!1,this._pending=0,this._missing=0,this._ignoreEmpty=!1,this._buf=null,this._str=null,this._cb=null,this._ondrain=null,this._writeBuffer=null,this._writeCb=null,this._ondrain=null,this._kick()}destroy(err){this.destroyed||(this.destroyed=!0,err&&this.emit("error",err),this.emit("close"))}_write(data,enc,next){if(!this.destroyed){for(var drained=!this._str||!this._str._writableState.needDrain;data.length&&!this.destroyed;){if(!this._missing&&!this._ignoreEmpty)return this._writeBuffer=data,void(this._writeCb=next);var consumed=data.length<this._missing?data.length:this._missing;if(this._buf?data.copy(this._buf,this._buf.length-this._missing):this._str&&(drained=this._str.write(consumed===data.length?data:data.slice(0,consumed))),this._missing-=consumed,!this._missing){var buf=this._buf,cb=this._cb,stream=this._str;this._buf=this._cb=this._str=this._ondrain=null,drained=!0,this._ignoreEmpty=!1,stream&&stream.end(),cb&&cb(buf)}data=consumed===data.length?EMPTY:data.slice(consumed)}return this._pending&&!this._missing?(this._writeBuffer=data,void(this._writeCb=next)):void(drained?next():this._ondrain(next))}}_buffer(size,cb){this._missing=size,this._buf=Buffer.alloc(size),this._cb=cb}_stream(size,cb){return this._missing=size,this._str=new MediaData(this),this._ondrain=nextEvent(this._str,"drain"),this._pending++,this._str.on("end",()=>{this._pending--,this._kick()}),this._cb=cb,this._str}_readBox(){const bufferHeaders=(len,buf)=>{this._buffer(len,additionalBuf=>{buf=buf?Buffer.concat([buf,additionalBuf]):additionalBuf;var headers=Box.readHeaders(buf);"number"==typeof headers?bufferHeaders(headers-buf.length,buf):(this._pending++,this._headers=headers,this.emit("box",headers))})};bufferHeaders(8)}stream(){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var headers=this._headers;return this._headers=null,this._stream(headers.contentLen,null)}decode(cb){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var headers=this._headers;this._headers=null,this._buffer(headers.contentLen,buf=>{var box=Box.decodeWithoutHeaders(headers,buf);cb(box),this._pending--,this._kick()})}ignore(){if(!this._headers)throw new Error("this function can only be called once after 'box' is emitted");var headers=this._headers;this._headers=null,this._missing=headers.contentLen,0===this._missing&&(this._ignoreEmpty=!0),this._cb=()=>{this._pending--,this._kick()}}_kick(){if(!this._pending&&(this._buf||this._str||this._readBox(),this._writeBuffer)){var next=this._writeCb,buffer=this._writeBuffer;this._writeBuffer=null,this._writeCb=null,this._write(buffer,null,next)}}}class MediaData extends stream.PassThrough{constructor(parent){super(),this._parent=parent,this.destroyed=!1}destroy(err){this.destroyed||(this.destroyed=!0,this._parent.destroy(err),err&&this.emit("error",err),this.emit("close"))}}module.exports=Decoder}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24,"mp4-box-encoding":52,"next-event":58,"readable-stream":86}],54:[function(require,module){(function(process,Buffer){(function(){function noop(){}var stream=require("readable-stream"),Box=require("mp4-box-encoding");class Encoder extends stream.Readable{constructor(opts){super(opts),this.destroyed=!1,this._finalized=!1,this._reading=!1,this._stream=null,this._drain=null,this._want=!1,this._onreadable=()=>{this._want&&(this._want=!1,this._read())},this._onend=()=>{this._stream=null}}mdat(size,cb){this.mediaData(size,cb)}mediaData(size,cb){var stream=new MediaData(this);return this.box({type:"mdat",contentLength:size,encodeBufferLen:8,stream:stream},cb),stream}box(box,cb){if(cb||(cb=noop),this.destroyed)return cb(new Error("Encoder is destroyed"));var buf;if(box.encodeBufferLen&&(buf=Buffer.alloc(box.encodeBufferLen)),box.stream)box.buffer=null,buf=Box.encode(box,buf),this.push(buf),this._stream=box.stream,this._stream.on("readable",this._onreadable),this._stream.on("end",this._onend),this._stream.on("end",cb),this._forward();else{buf=Box.encode(box,buf);var drained=this.push(buf);if(drained)return process.nextTick(cb);this._drain=cb}}destroy(err){if(!this.destroyed){if(this.destroyed=!0,this._stream&&this._stream.destroy&&this._stream.destroy(),this._stream=null,this._drain){var cb=this._drain;this._drain=null,cb(err)}err&&this.emit("error",err),this.emit("close")}}finalize(){this._finalized=!0,this._stream||this._drain||this.push(null)}_forward(){if(this._stream)for(;!this.destroyed;){var buf=this._stream.read();if(!buf)return void(this._want=!!this._stream);if(!this.push(buf))return}}_read(){if(!(this._reading||this.destroyed)){if(this._reading=!0,this._stream&&this._forward(),this._drain){var drain=this._drain;this._drain=null,drain()}this._reading=!1,this._finalized&&this.push(null)}}}class MediaData extends stream.PassThrough{constructor(parent){super(),this._parent=parent,this.destroyed=!1}destroy(err){this.destroyed||(this.destroyed=!0,this._parent.destroy(err),err&&this.emit("error",err),this.emit("close"))}}module.exports=Encoder}).call(this)}).call(this,require("_process"),require("buffer").Buffer)},{_process:62,buffer:24,"mp4-box-encoding":52,"readable-stream":86}],55:[function(require,module,exports){const Decoder=require("./decode"),Encoder=require("./encode");exports.decode=opts=>new Decoder(opts),exports.encode=opts=>new Encoder(opts)},{"./decode":53,"./encode":54}],56:[function(require,module){var _Mathround=Math.round;function parse(str){if(str+="",!(100<str.length)){var match=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);if(match){var n=parseFloat(match[1]),type=(match[2]||"ms").toLowerCase();return"years"===type||"year"===type||"yrs"===type||"yr"===type||"y"===type?31557600000*n:"weeks"===type||"week"===type||"w"===type?604800000*n:"days"===type||"day"===type||"d"===type?86400000*n:"hours"===type||"hour"===type||"hrs"===type||"hr"===type||"h"===type?3600000*n:"minutes"===type||"minute"===type||"mins"===type||"min"===type||"m"===type?60000*n:"seconds"===type||"second"===type||"secs"===type||"sec"===type||"s"===type?1000*n:"milliseconds"===type||"millisecond"===type||"msecs"===type||"msec"===type||"ms"===type?n:void 0}}}function fmtShort(ms){var msAbs=_Mathabs(ms);return 86400000<=msAbs?_Mathround(ms/86400000)+"d":3600000<=msAbs?_Mathround(ms/3600000)+"h":60000<=msAbs?_Mathround(ms/60000)+"m":1000<=msAbs?_Mathround(ms/1000)+"s":ms+"ms"}function fmtLong(ms){var msAbs=_Mathabs(ms);return 86400000<=msAbs?plural(ms,msAbs,86400000,"day"):3600000<=msAbs?plural(ms,msAbs,3600000,"hour"):60000<=msAbs?plural(ms,msAbs,60000,"minute"):1000<=msAbs?plural(ms,msAbs,1000,"second"):ms+" ms"}function plural(ms,msAbs,n,name){return _Mathround(ms/n)+" "+name+(msAbs>=1.5*n?"s":"")}var d=24*(60*60000);module.exports=function(val,options){options=options||{};var type=typeof val;if("string"==type&&0<val.length)return parse(val);if("number"===type&&isFinite(val))return options.long?fmtLong(val):fmtShort(val);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(val))}},{}],57:[function(require,module){function toStreams2Obj(s){return toStreams2(s,{objectMode:!0,highWaterMark:16})}function toStreams2Buf(s){return toStreams2(s)}function toStreams2(s,opts){if(!s||"function"==typeof s||s._readableState)return s;var wrap=new stream.Readable(opts).wrap(s);return s.destroy&&(wrap.destroy=s.destroy.bind(s)),wrap}/*! multistream. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var stream=require("readable-stream");class MultiStream extends stream.Readable{constructor(streams,opts){super(opts),this.destroyed=!1,this._drained=!1,this._forwarding=!1,this._current=null,this._toStreams2=opts&&opts.objectMode?toStreams2Obj:toStreams2Buf,"function"==typeof streams?this._queue=streams:(this._queue=streams.map(this._toStreams2),this._queue.forEach(stream=>{"function"!=typeof stream&&this._attachErrorListener(stream)})),this._next()}_read(){this._drained=!0,this._forward()}_forward(){if(!this._forwarding&&this._drained&&this._current){this._forwarding=!0;for(var chunk;this._drained&&null!==(chunk=this._current.read());)this._drained=this.push(chunk);this._forwarding=!1}}destroy(err){this.destroyed||(this.destroyed=!0,this._current&&this._current.destroy&&this._current.destroy(),"function"!=typeof this._queue&&this._queue.forEach(stream=>{stream.destroy&&stream.destroy()}),err&&this.emit("error",err),this.emit("close"))}_next(){if(this._current=null,"function"==typeof this._queue)this._queue((err,stream)=>err?this.destroy(err):void(stream=this._toStreams2(stream),this._attachErrorListener(stream),this._gotNextStream(stream)));else{var stream=this._queue.shift();"function"==typeof stream&&(stream=this._toStreams2(stream()),this._attachErrorListener(stream)),this._gotNextStream(stream)}}_gotNextStream(stream){if(!stream)return this.push(null),void this.destroy();this._current=stream,this._forward();const onReadable=()=>{this._forward()},onClose=()=>{stream._readableState.ended||this.destroy()},onEnd=()=>{this._current=null,stream.removeListener("readable",onReadable),stream.removeListener("end",onEnd),stream.removeListener("close",onClose),this._next()};stream.on("readable",onReadable),stream.once("end",onEnd),stream.once("close",onClose)}_attachErrorListener(stream){if(!stream)return;const onError=err=>{stream.removeListener("error",onError),this.destroy(err)};stream.once("error",onError)}}MultiStream.obj=streams=>new MultiStream(streams,{objectMode:!0,highWaterMark:16}),module.exports=MultiStream},{"readable-stream":86}],58:[function(require,module){module.exports=function(emitter,name){var next=null;return emitter.on(name,function(data){if(next){var fn=next;next=null,fn(data)}}),function(once){next=once}}},{}],59:[function(require,module){function once(fn){var f=function(){return f.called?f.value:(f.called=!0,f.value=fn.apply(this,arguments))};return f.called=!1,f}function onceStrict(fn){var f=function(){if(f.called)throw new Error(f.onceError);return f.called=!0,f.value=fn.apply(this,arguments)},name=fn.name||"Function wrapped with `once`";return f.onceError=name+" shouldn't be called more than once",f.called=!1,f}var wrappy=require("wrappy");module.exports=wrappy(once),module.exports.strict=wrappy(onceStrict),once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:!0})})},{wrappy:122}],60:[function(require,module){(function(process,Buffer){(function(){function parseTorrent(torrentId){if("string"==typeof torrentId&&/^(stream-)?magnet:/.test(torrentId)){const torrentObj=magnet(torrentId);if(!torrentObj.infoHash)throw new Error("Invalid torrent identifier");return torrentObj}if("string"==typeof torrentId&&(/^[a-f0-9]{40}$/i.test(torrentId)||/^[a-z2-7]{32}$/i.test(torrentId)))return magnet(`magnet:?xt=urn:btih:${torrentId}`);if(Buffer.isBuffer(torrentId)&&20===torrentId.length)return magnet(`magnet:?xt=urn:btih:${torrentId.toString("hex")}`);if(Buffer.isBuffer(torrentId))return decodeTorrentFile(torrentId);if(torrentId&&torrentId.infoHash)return torrentId.infoHash=torrentId.infoHash.toLowerCase(),torrentId.announce||(torrentId.announce=[]),"string"==typeof torrentId.announce&&(torrentId.announce=[torrentId.announce]),torrentId.urlList||(torrentId.urlList=[]),torrentId;throw new Error("Invalid torrent identifier")}function parseTorrentRemote(torrentId,opts,cb){function parseOrThrow(torrentBuf){try{parsedTorrent=parseTorrent(torrentBuf)}catch(err){return cb(err)}parsedTorrent&&parsedTorrent.infoHash?cb(null,parsedTorrent):cb(new Error("Invalid torrent identifier"))}if("function"==typeof opts)return parseTorrentRemote(torrentId,{},opts);if("function"!=typeof cb)throw new Error("second argument must be a Function");let parsedTorrent;try{parsedTorrent=parseTorrent(torrentId)}catch(err){}parsedTorrent&&parsedTorrent.infoHash?process.nextTick(()=>{cb(null,parsedTorrent)}):isBlob(torrentId)?blobToBuffer(torrentId,(err,torrentBuf)=>err?cb(new Error(`Error converting Blob: ${err.message}`)):void parseOrThrow(torrentBuf)):"function"==typeof get&&/^https?:/.test(torrentId)?(opts=Object.assign({url:torrentId,timeout:30000,headers:{"user-agent":"WebTorrent (https://webtorrent.io)"}},opts),get.concat(opts,(err,res,torrentBuf)=>err?cb(new Error(`Error downloading torrent: ${err.message}`)):void parseOrThrow(torrentBuf))):"function"==typeof fs.readFile&&"string"==typeof torrentId?fs.readFile(torrentId,(err,torrentBuf)=>err?cb(new Error("Invalid torrent identifier")):void parseOrThrow(torrentBuf)):process.nextTick(()=>{cb(new Error("Invalid torrent identifier"))})}function decodeTorrentFile(torrent){Buffer.isBuffer(torrent)&&(torrent=bencode.decode(torrent)),ensure(torrent.info,"info"),ensure(torrent.info["name.utf-8"]||torrent.info.name,"info.name"),ensure(torrent.info["piece length"],"info['piece length']"),ensure(torrent.info.pieces,"info.pieces"),torrent.info.files?torrent.info.files.forEach(file=>{ensure("number"==typeof file.length,"info.files[0].length"),ensure(file["path.utf-8"]||file.path,"info.files[0].path")}):ensure("number"==typeof torrent.info.length,"info.length");const result={info:torrent.info,infoBuffer:bencode.encode(torrent.info),name:(torrent.info["name.utf-8"]||torrent.info.name).toString(),announce:[]};result.infoHash=sha1.sync(result.infoBuffer),result.infoHashBuffer=Buffer.from(result.infoHash,"hex"),void 0!==torrent.info.private&&(result.private=!!torrent.info.private),torrent["creation date"]&&(result.created=new Date(1e3*torrent["creation date"])),torrent["created by"]&&(result.createdBy=torrent["created by"].toString()),Buffer.isBuffer(torrent.comment)&&(result.comment=torrent.comment.toString()),Array.isArray(torrent["announce-list"])&&0<torrent["announce-list"].length?torrent["announce-list"].forEach(urls=>{urls.forEach(url=>{result.announce.push(url.toString())})}):torrent.announce&&result.announce.push(torrent.announce.toString()),Buffer.isBuffer(torrent["url-list"])&&(torrent["url-list"]=0<torrent["url-list"].length?[torrent["url-list"]]:[]),result.urlList=(torrent["url-list"]||[]).map(url=>url.toString()),result.announce=Array.from(new Set(result.announce)),result.urlList=Array.from(new Set(result.urlList));const files=torrent.info.files||[torrent.info];result.files=files.map((file,i)=>{const parts=[].concat(result.name,file["path.utf-8"]||file.path||[]).map(p=>p.toString());return{path:path.join.apply(null,[path.sep].concat(parts)).slice(1),name:parts[parts.length-1],length:file.length,offset:files.slice(0,i).reduce(sumLength,0)}}),result.length=files.reduce(sumLength,0);const lastFile=result.files[result.files.length-1];return result.pieceLength=torrent.info["piece length"],result.lastPieceLength=(lastFile.offset+lastFile.length)%result.pieceLength||result.pieceLength,result.pieces=splitPieces(torrent.info.pieces),result}function isBlob(obj){return"undefined"!=typeof Blob&&obj instanceof Blob}function sumLength(sum,file){return sum+file.length}function splitPieces(buf){const pieces=[];for(let i=0;i<buf.length;i+=20)pieces.push(buf.slice(i,i+20).toString("hex"));return pieces}function ensure(bool,fieldName){if(!bool)throw new Error(`Torrent is missing required field: ${fieldName}`)}/*! parse-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */const bencode=require("bencode"),blobToBuffer=require("blob-to-buffer"),fs=require("fs"),get=require("simple-get"),magnet=require("magnet-uri"),path=require("path"),sha1=require("simple-sha1");module.exports=parseTorrent,module.exports.remote=parseTorrentRemote,module.exports.toMagnetURI=magnet.encode,module.exports.toTorrentFile=function(parsed){const torrent={info:parsed.info};return torrent["announce-list"]=(parsed.announce||[]).map(url=>(torrent.announce||(torrent.announce=url),url=Buffer.from(url,"utf8"),[url])),torrent["url-list"]=parsed.urlList||[],void 0!==parsed.private&&(torrent.private=+parsed.private),parsed.created&&(torrent["creation date"]=0|parsed.created.getTime()/1e3),parsed.createdBy&&(torrent["created by"]=parsed.createdBy),parsed.comment&&(torrent.comment=parsed.comment),bencode.encode(torrent)};(()=>{Buffer.alloc(0)})()}).call(this)}).call(this,require("_process"),require("buffer").Buffer)},{_process:62,bencode:11,"blob-to-buffer":20,buffer:24,fs:23,"magnet-uri":47,path:26,"simple-get":94,"simple-sha1":96}],61:[function(require,module){module.exports=function(bytes){return _Mathmax(16384,0|1<<Math.log2(1024>bytes?1:bytes/1024)+.5)}},{}],62:[function(require,module){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var process=module.exports={},cachedSetTimeout,cachedClearTimeout;(function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}})();var queue=[],draining=!1,queueIndex=-1,currentQueue;process.nextTick=function(fun){var args=Array(arguments.length-1);if(1<arguments.length)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(){return[]},process.binding=function(){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],63:[function(require,module){(function(process){(function(){var once=require("once"),eos=require("end-of-stream"),fs=require("fs"),noop=function(){},ancient=/^v?\.0/.test(process.version),isFn=function(fn){return"function"==typeof fn},isFS=function(stream){return!!ancient&&!!fs&&(stream instanceof(fs.ReadStream||noop)||stream instanceof(fs.WriteStream||noop))&&isFn(stream.close)},isRequest=function(stream){return stream.setHeader&&isFn(stream.abort)},destroyer=function(stream,reading,writing,callback){callback=once(callback);var closed=!1;stream.on("close",function(){closed=!0}),eos(stream,{readable:reading,writable:writing},function(err){return err?callback(err):void(closed=!0,callback())});var destroyed=!1;return function(err){if(!closed)return destroyed?void 0:(destroyed=!0,isFS(stream)?stream.close(noop):isRequest(stream)?stream.abort():isFn(stream.destroy)?stream.destroy():void callback(err||new Error("stream was destroyed")))}},call=function(fn){fn()},pipe=function(from,to){return from.pipe(to)};module.exports=function(){var streams=Array.prototype.slice.call(arguments),callback=isFn(streams[streams.length-1]||noop)&&streams.pop()||noop;if(Array.isArray(streams[0])&&(streams=streams[0]),2>streams.length)throw new Error("pump requires two streams per minimum");var destroys=streams.map(function(stream,i){var reading=i<streams.length-1;return destroyer(stream,reading,0<i,function(err){error||(error=err),err&&destroys.forEach(call),reading||(destroys.forEach(call),callback(error))})}),error;return streams.reduce(pipe)}}).call(this)}).call(this,require("_process"))},{_process:62,"end-of-stream":35,fs:22,once:59}],64:[function(require,module,exports){(function(global){(function(){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(root){function error(type){throw new RangeError(errors[type])}function map(array,fn){for(var length=array.length,result=[];length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";1<parts.length&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var output=[],counter=0,length=string.length,value,extra;counter<length;)value=string.charCodeAt(counter++),55296<=value&&56319>=value&&counter<length?(extra=string.charCodeAt(counter++),56320==(64512&extra)?output.push(((1023&value)<<10)+(1023&extra)+65536):(output.push(value),counter--)):output.push(value);return output}function ucs2encode(array){return map(array,function(value){var output="";return 65535<value&&(value-=65536,output+=stringFromCharCode(55296|1023&value>>>10),value=56320|1023&value),output+=stringFromCharCode(value),output}).join("")}function basicToDigit(codePoint){return 10>codePoint-48?codePoint-22:26>codePoint-65?codePoint-65:26>codePoint-97?codePoint-97:36}function digitToBasic(digit,flag){return digit+22+75*(26>digit)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/700):delta>>1,delta+=floor(delta/numPoints);455<delta;k+=36)delta=floor(delta/35);return floor(k+36*delta/(delta+38))}function decode(input){var output=[],inputLength=input.length,i=0,n=128,bias=72,out,basic,j,index,oldi,w,k,digit,t,baseMinusT;for(basic=input.lastIndexOf("-"),0>basic&&(basic=0),j=0;j<basic;++j)128<=input.charCodeAt(j)&&error("not-basic"),output.push(input.charCodeAt(j));for(index=0<basic?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=36;;k+=36){if(index>=inputLength&&error("invalid-input"),digit=basicToDigit(input.charCodeAt(index++)),(36<=digit||digit>floor((2147483647-i)/w))&&error("overflow"),i+=digit*w,t=k<=bias?1:k>=bias+26?26:k-bias,digit<t)break;baseMinusT=36-t,w>floor(2147483647/baseMinusT)&&error("overflow"),w*=baseMinusT}out=output.length+1,bias=adapt(i-oldi,out,0==oldi),floor(i/out)>2147483647-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var output=[],n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT;for(input=ucs2decode(input),inputLength=input.length,n=128,delta=0,bias=72,j=0;j<inputLength;++j)currentValue=input[j],128>currentValue&&output.push(stringFromCharCode(currentValue));for(handledCPCount=basicLength=output.length,basicLength&&output.push("-");handledCPCount<inputLength;){for(m=2147483647,j=0;j<inputLength;++j)currentValue=input[j],currentValue>=n&¤tValue<m&&(m=currentValue);for(handledCPCountPlusOne=handledCPCount+1,m-n>floor((2147483647-delta)/handledCPCountPlusOne)&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;j<inputLength;++j)if(currentValue=input[j],currentValue<n&&2147483647<++delta&&error("overflow"),currentValue==n){for(q=delta,k=36;;k+=36){if(t=k<=bias?1:k>=bias+26?26:k-bias,q<t)break;qMinusT=q-t,baseMinusT=36-t,output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0))),q=floor(qMinusT/baseMinusT)}output.push(stringFromCharCode(digitToBasic(q,0))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength),delta=0,++handledCPCount}++delta,++n}return output.join("")}var freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule="object"==typeof module&&module&&!module.nodeType&&module,freeGlobal="object"==typeof global&&global;(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)&&(root=freeGlobal);var regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},floor=_Mathfloor,stringFromCharCode=_StringfromCharCode,punycode,key;if(punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:function(input){return mapDomain(input,function(string){return /[^\x20-\x7E]/.test(string)?"xn--"+encode(string):string})},toUnicode:function(input){return mapDomain(input,function(string){return /^xn--/.test(string)?decode(string.slice(4).toLowerCase()):string})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return punycode});else if(!(freeExports&&freeModule))root.punycode=punycode;else if(module.exports==freeExports)freeModule.exports=punycode;else for(key in punycode)punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key])})(this)}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],65:[function(require,module){'use strict';function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&",eq=eq||"=";var obj={};if("string"!=typeof qs||0===qs.length)return obj;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;0<maxKeys&&len>maxKeys&&(len=maxKeys);for(var i=0;i<len;++i){var x=qs[i].replace(/\+/g,"%20"),idx=x.indexOf(eq),kstr,vstr,k,v;0<=idx?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},{}],66:[function(require,module){'use strict';function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;i<xs.length;i++)res.push(f(xs[i],i));return res}var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return"";}};module.exports=function(obj,sep,eq,name){return sep=sep||"&",eq=eq||"=",null===obj&&(obj=void 0),"object"==typeof obj?map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;return isArray(obj[k])?map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj)):""};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)},objectKeys=Object.keys||function(obj){var res=[];for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&res.push(key);return res}},{}],67:[function(require,module,exports){'use strict';exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode")},{"./decode":65,"./encode":66}],68:[function(require,module){/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let promise;module.exports="function"==typeof queueMicrotask?queueMicrotask.bind(globalThis):cb=>(promise||(promise=Promise.resolve())).then(cb).catch(err=>setTimeout(()=>{throw err},0))},{}],69:[function(require,module){module.exports=function(list){var offset=0;return function(){if(offset===list.length)return null;var len=list.length-offset,i=0|Math.random()*len,el=list[offset+i],tmp=list[offset];return list[offset]=el,list[offset+i]=tmp,offset++,el}}},{}],70:[function(require,module){(function(process,global){(function(){'use strict';var Buffer=require("safe-buffer").Buffer,crypto=global.crypto||global.msCrypto;module.exports=crypto&&crypto.getRandomValues?function(size,cb){if(size>4294967295)throw new RangeError("requested too many random bytes");var bytes=Buffer.allocUnsafe(size);if(0<size)if(65536<size)for(var generated=0;generated<size;generated+=65536)crypto.getRandomValues(bytes.slice(generated,generated+65536));else crypto.getRandomValues(bytes);return"function"==typeof cb?process.nextTick(function(){cb(null,bytes)}):bytes}:function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{_process:62,"safe-buffer":92}],71:[function(require,module){const{Writable,PassThrough}=require("readable-stream");module.exports=class RangeSliceStream extends Writable{constructor(offset,opts={}){super(opts),this.destroyed=!1,this._queue=[],this._position=offset||0,this._cb=null,this._buffer=null,this._out=null}_write(chunk,encoding,cb){let drained=!0;for(;;){if(this.destroyed)return;if(0===this._queue.length)return this._buffer=chunk,void(this._cb=cb);this._buffer=null;var currRange=this._queue[0];const writeStart=_Mathmax(currRange.start-this._position,0),writeEnd=currRange.end-this._position;if(writeStart>=chunk.length)return this._position+=chunk.length,cb(null);let toWrite;if(writeEnd>chunk.length){this._position+=chunk.length,toWrite=0===writeStart?chunk:chunk.slice(writeStart),drained=currRange.stream.write(toWrite)&&drained;break}this._position+=writeEnd,toWrite=0===writeStart&&writeEnd===chunk.length?chunk:chunk.slice(writeStart,writeEnd),drained=currRange.stream.write(toWrite)&&drained,currRange.last&&currRange.stream.end(),chunk=chunk.slice(writeEnd),this._queue.shift()}drained?cb(null):currRange.stream.once("drain",cb.bind(null,null))}slice(ranges){if(this.destroyed)return null;Array.isArray(ranges)||(ranges=[ranges]);const str=new PassThrough;return ranges.forEach((range,i)=>{this._queue.push({start:range.start,end:range.end,stream:str,last:i===ranges.length-1})}),this._buffer&&this._write(this._buffer,null,this._cb),str}destroy(err){this.destroyed||(this.destroyed=!0,err&&this.emit("error",err))}}},{"readable-stream":86}],72:[function(require,module){'use strict';function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype),subClass.prototype.constructor=subClass,subClass.__proto__=superClass}function createErrorType(code,message,Base){function getMessage(arg1,arg2,arg3){return"string"==typeof message?message:message(arg1,arg2,arg3)}Base||(Base=Error);var NodeError=function(_Base){function NodeError(arg1,arg2,arg3){return _Base.call(this,getMessage(arg1,arg2,arg3))||this}return _inheritsLoose(NodeError,_Base),NodeError}(Base);NodeError.prototype.name=Base.name,NodeError.prototype.code=code,codes[code]=NodeError}function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;return expected=expected.map(function(i){return i+""}),2<len?"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(", "),", or ")+expected[len-1]:2===len?"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1]):"of ".concat(thing," ").concat(expected[0])}return"of ".concat(thing," ").concat(expected+"")}function startsWith(str,search,pos){return str.substr(!pos||0>pos?0:+pos,search.length)===search}function endsWith(str,search,this_len){return(void 0===this_len||this_len>str.length)&&(this_len=str.length),str.substring(this_len-search.length,this_len)===search}function includes(str,search,start){return"number"!=typeof start&&(start=0),!(start+search.length>str.length)&&-1!==str.indexOf(search,start)}var codes={};createErrorType("ERR_INVALID_OPT_VALUE",function(name,value){return"The value \""+value+"\" is invalid for option \""+name+"\""},TypeError),createErrorType("ERR_INVALID_ARG_TYPE",function(name,expected,actual){var determiner;"string"==typeof expected&&startsWith(expected,"not ")?(determiner="must not be",expected=expected.replace(/^not /,"")):determiner="must be";var msg;if(endsWith(name," argument"))msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,"type"));else{var type=includes(name,".")?"property":"argument";msg="The \"".concat(name,"\" ").concat(type," ").concat(determiner," ").concat(oneOf(expected,"type"))}return msg+=". Received type ".concat(typeof actual),msg},TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(name){return"The "+name+" method is not implemented"}),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",function(name){return"Cannot call "+name+" after a stream was destroyed"}),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",function(arg){return"Unknown encoding: "+arg},TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),module.exports.codes=codes},{}],73:[function(require,module){(function(process){(function(){'use strict';function Duplex(options){return this instanceof Duplex?void(Readable.call(this,options),Writable.call(this,options),this.allowHalfOpen=!0,options&&(!1===options.readable&&(this.readable=!1),!1===options.writable&&(this.writable=!1),!1===options.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",onend)))):new Duplex(options)}function onend(){this._writableState.ended||process.nextTick(onEndNT,this)}function onEndNT(self){self.end()}var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");require("inherits")(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0,method;v<keys.length;v++)method=keys[v],Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method]);Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(value){void 0===this._readableState||void 0===this._writableState||(this._readableState.destroyed=value,this._writableState.destroyed=value)}})}).call(this)}).call(this,require("_process"))},{"./_stream_readable":75,"./_stream_writable":77,_process:62,inherits:42}],74:[function(require,module){'use strict';function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=require("./_stream_transform");require("inherits")(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":76,inherits:42}],75:[function(require,module){(function(process,global){(function(){'use strict';function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}function prependListener(emitter,event,fn){return"function"==typeof emitter.prependListener?emitter.prependListener(event,fn):void(emitter._events&&emitter._events[event]?Array.isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn))}function ReadableState(options,stream,isDuplex){Duplex=Duplex||require("./_stream_duplex"),options=options||{},"boolean"!=typeof isDuplex&&(isDuplex=stream instanceof Duplex),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"readableHighWaterMark",isDuplex),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==options.emitClose,this.autoDestroy=!!options.autoDestroy,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(!StringDecoder&&(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){if(Duplex=Duplex||require("./_stream_duplex"),!(this instanceof Readable))return new Readable(options);var isDuplex=this instanceof Duplex;this._readableState=new ReadableState(options,this,isDuplex),this.readable=!0,options&&("function"==typeof options.read&&(this._read=options.read),"function"==typeof options.destroy&&(this._destroy=options.destroy)),Stream.call(this)}function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){debug("readableAddChunk",chunk);var state=stream._readableState;if(null===chunk)state.reading=!1,onEofChunk(stream,state);else{var er;if(skipChunkCheck||(er=chunkInvalid(state,chunk)),er)errorOrDestroy(stream,er);else if(!(state.objectMode||chunk&&0<chunk.length))addToFront||(state.reading=!1,maybeReadMore(stream,state));else if("string"==typeof chunk||state.objectMode||Object.getPrototypeOf(chunk)===Buffer.prototype||(chunk=_uint8ArrayToBuffer(chunk)),addToFront)state.endEmitted?errorOrDestroy(stream,new ERR_STREAM_UNSHIFT_AFTER_END_EVENT):addChunk(stream,state,chunk,!0);else if(state.ended)errorOrDestroy(stream,new ERR_STREAM_PUSH_AFTER_EOF);else{if(state.destroyed)return!1;state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||0!==chunk.length?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1)}}return!state.ended&&(state.length<state.highWaterMark||0===state.length)}function addChunk(stream,state,chunk,addToFront){state.flowing&&0===state.length&&!state.sync?(state.awaitDrain=0,stream.emit("data",chunk)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state)}function chunkInvalid(state,chunk){var er;return _isUint8Array(chunk)||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer","Uint8Array"],chunk)),er}function computeNewHighWaterMark(n){return 1073741824<=n?n=1073741824:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return 0>=n||0===state.length&&state.ended?0:state.objectMode?1:n===n?(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0)):state.flowing&&state.length?state.buffer.head.data.length:state.length}function onEofChunk(stream,state){if(debug("onEofChunk"),!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,state.sync?emitReadable(stream):(state.needReadable=!1,!state.emittedReadable&&(state.emittedReadable=!0,emitReadable_(stream)))}}function emitReadable(stream){var state=stream._readableState;debug("emitReadable",state.needReadable,state.emittedReadable),state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,process.nextTick(emitReadable_,stream))}function emitReadable_(stream){var state=stream._readableState;debug("emitReadable_",state.destroyed,state.length,state.ended),!state.destroyed&&(state.length||state.ended)&&(stream.emit("readable"),state.emittedReadable=!1),state.needReadable=!state.flowing&&!state.ended&&state.length<=state.highWaterMark,flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(;!state.reading&&!state.ended&&(state.length<state.highWaterMark||state.flowing&&0===state.length);){var len=state.length;if(debug("maybeReadMore read 0"),stream.read(0),len===state.length)break}state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function updateReadableListening(self){var state=self._readableState;state.readableListening=0<self.listenerCount("readable"),state.resumeScheduled&&!state.paused?state.flowing=!0:0<self.listenerCount("data")&&self.resume()}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(resume_,stream,state))}function resume_(stream,state){debug("resume",state.reading),state.reading||stream.read(0),state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){if(0===state.length)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.first():state.buffer.concat(state.length),state.buffer.clear()):ret=state.buffer.consume(n,state.decoder),ret}function endReadable(stream){var state=stream._readableState;debug("endReadable",state.endEmitted),state.endEmitted||(state.ended=!0,process.nextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){if(debug("endReadableNT",state.endEmitted,state.length),!state.endEmitted&&0===state.length&&(state.endEmitted=!0,stream.readable=!1,stream.emit("end"),state.autoDestroy)){var wState=stream._writableState;(!wState||wState.autoDestroy&&wState.finished)&&stream.destroy()}}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var Duplex;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter,EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream=require("./internal/streams/stream"),Buffer=require("buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},debugUtil=require("util"),debug;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var BufferList=require("./internal/streams/buffer_list"),destroyImpl=require("./internal/streams/destroy"),_require=require("./internal/streams/state"),getHighWaterMark=_require.getHighWaterMark,_require$codes=require("../errors").codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_STREAM_PUSH_AFTER_EOF=_require$codes.ERR_STREAM_PUSH_AFTER_EOF,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_STREAM_UNSHIFT_AFTER_END_EVENT=_require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,StringDecoder,createReadableStreamAsyncIterator,from;require("inherits")(Readable,Stream);var errorOrDestroy=destroyImpl.errorOrDestroy,kProxyEvents=["error","close","destroy","pause","resume"];Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(err,cb){cb(err)},Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;return state.objectMode?skipChunkCheck=!0:"string"==typeof chunk&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=Buffer.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)},Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(enc){StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder);var decoder=new StringDecoder(enc);this._readableState.decoder=decoder,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,content="";null!==p;)content+=decoder.write(p.data),p=p.next;return this._readableState.buffer.clear(),""!==content&&this._readableState.buffer.push(content),this._readableState.length=content.length,this};Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&((0===state.highWaterMark?0<state.length:state.length>=state.highWaterMark)||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,!state.reading&&(n=howMuchToRead(nOrig,state)));var ret;return ret=0<n?fromList(n,state):null,null===ret?(state.needReadable=state.length<=state.highWaterMark,n=0):(state.length-=n,state.awaitDrain=0),0===state.length&&(!state.ended&&(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(){errorOrDestroy(this,new ERR_METHOD_NOT_IMPLEMENTED("_read()"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&!1===unpipeInfo.hasUnpiped&&(unpipeInfo.hasUnpiped=!0,cleanup())}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain)&&ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);debug("dest.write",ret),!1===ret&&((1===state.pipesCount&&state.pipes===dest||1<state.pipesCount&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",state.awaitDrain),state.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&errorOrDestroy(dest,er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||!1!==pipeOpts.end)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);return-1===index?this:(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn),state=this._readableState;return"data"===ev?(state.readableListening=0<this.listenerCount("readable"),!1!==state.flowing&&this.resume()):"readable"==ev&&!state.endEmitted&&!state.readableListening&&(state.readableListening=state.needReadable=!0,state.flowing=!1,state.emittedReadable=!1,debug("on readable",state.length,state.reading),state.length?emitReadable(this):!state.reading&&process.nextTick(nReadingNextTick,this)),res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(ev,fn){var res=Stream.prototype.removeListener.call(this,ev,fn);return"readable"===ev&&process.nextTick(updateReadableListening,this),res},Readable.prototype.removeAllListeners=function(ev){var res=Stream.prototype.removeAllListeners.apply(this,arguments);return("readable"===ev||void 0===ev)&&process.nextTick(updateReadableListening,this),res},Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!state.readableListening,resume(this,state)),state.paused=!1,this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(stream){var _this=this,state=this._readableState,paused=!1;for(var i in stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&_this.push(chunk)}_this.push(null)}),stream.on("data",function(chunk){if((debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!(state.objectMode&&(null===chunk||void 0===chunk)))&&(state.objectMode||chunk&&chunk.length)){var ret=_this.push(chunk);ret||(paused=!0,stream.pause())}}),stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},this},"function"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===createReadableStreamAsyncIterator&&(createReadableStreamAsyncIterator=require("./internal/streams/async_iterator")),createReadableStreamAsyncIterator(this)}),Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(state){this._readableState&&(this._readableState.flowing=state)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(Readable.from=function(iterable,opts){return void 0===from&&(from=require("./internal/streams/from")),from(Readable,iterable,opts)})}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"../errors":72,"./_stream_duplex":73,"./internal/streams/async_iterator":78,"./internal/streams/buffer_list":79,"./internal/streams/destroy":80,"./internal/streams/from":82,"./internal/streams/state":84,"./internal/streams/stream":85,_process:62,buffer:24,events:25,inherits:42,"string_decoder/":107,util:22}],76:[function(require,module){'use strict';function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(null===cb)return this.emit("error",new ERR_MULTIPLE_CALLBACK);ts.writechunk=null,ts.writecb=null,null!=data&&this.push(data),cb(er);var rs=this._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}function Transform(options){return this instanceof Transform?void(Duplex.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.on("prefinish",prefinish)):new Transform(options)}function prefinish(){var _this=this;"function"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush(function(er,data){done(_this,er,data)})}function done(stream,er,data){if(er)return stream.emit("error",er);if(null!=data&&stream.push(data),stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0;if(stream._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING;return stream.push(null)}module.exports=Transform;var _require$codes=require("../errors").codes,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_TRANSFORM_ALREADY_TRANSFORMING=_require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,ERR_TRANSFORM_WITH_LENGTH_0=_require$codes.ERR_TRANSFORM_WITH_LENGTH_0,Duplex=require("./_stream_duplex");require("inherits")(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"))},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(){var ts=this._transformState;null===ts.writechunk||ts.transforming?ts.needTransform=!0:(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform))},Transform.prototype._destroy=function(err,cb){Duplex.prototype._destroy.call(this,err,function(err2){cb(err2)})}},{"../errors":72,"./_stream_duplex":73,inherits:42}],77:[function(require,module){(function(process,global){(function(){'use strict';function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state)}}function _uint8ArrayToBuffer(chunk){return Buffer.from(chunk)}function _isUint8Array(obj){return Buffer.isBuffer(obj)||obj instanceof OurUint8Array}function nop(){}function WritableState(options,stream,isDuplex){Duplex=Duplex||require("./_stream_duplex"),options=options||{},"boolean"!=typeof isDuplex&&(isDuplex=stream instanceof Duplex),this.objectMode=!!options.objectMode,isDuplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode),this.highWaterMark=getHighWaterMark(this,options,"writableHighWaterMark",isDuplex),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=!1===options.decodeStrings;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==options.emitClose,this.autoDestroy=!!options.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(options){Duplex=Duplex||require("./_stream_duplex");var isDuplex=this instanceof Duplex;return isDuplex||realHasInstance.call(Writable,this)?void(this._writableState=new WritableState(options,this,isDuplex),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev),"function"==typeof options.destroy&&(this._destroy=options.destroy),"function"==typeof options.final&&(this._final=options.final)),Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,cb){var er=new ERR_STREAM_WRITE_AFTER_END;errorOrDestroy(stream,er),process.nextTick(cb,er)}function validChunk(stream,state,chunk,cb){var er;return null===chunk?er=new ERR_STREAM_NULL_VALUES:"string"!=typeof chunk&&!state.objectMode&&(er=new ERR_INVALID_ARG_TYPE("chunk",["string","Buffer"],chunk)),!er||(errorOrDestroy(stream,er),process.nextTick(cb,er),!1)}function decodeChunk(state,chunk,encoding){return state.objectMode||!1===state.decodeStrings||"string"!=typeof chunk||(chunk=Buffer.from(chunk,encoding)),chunk}function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk)}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk:chunk,encoding:encoding,isBuf:isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,state.destroyed?state.onwrite(new ERR_STREAM_DESTROYED("write")):writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?(process.nextTick(cb,er),process.nextTick(finishMaybe,stream,state),stream._writableState.errorEmitted=!0,errorOrDestroy(stream,er)):(cb(er),stream._writableState.errorEmitted=!0,errorOrDestroy(stream,er),finishMaybe(stream,state))}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if("function"!=typeof cb)throw new ERR_MULTIPLE_CALLBACK;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state)||stream.destroyed;finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?process.nextTick(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state),state.bufferedRequestCount=0}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final(function(err){state.pendingcb--,err&&errorOrDestroy(stream,err),state.prefinished=!0,stream.emit("prefinish"),finishMaybe(stream,state)})}function prefinish(stream,state){state.prefinished||state.finalCalled||("function"!=typeof stream._final||state.destroyed?(state.prefinished=!0,stream.emit("prefinish")):(state.pendingcb++,state.finalCalled=!0,process.nextTick(callFinal,stream,state)))}function finishMaybe(stream,state){var need=needFinish(state);if(need&&(prefinish(stream,state),0===state.pendingcb&&(state.finished=!0,stream.emit("finish"),state.autoDestroy))){var rState=stream._readableState;(!rState||rState.autoDestroy&&rState.endEmitted)&&stream.destroy()}return need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;for(corkReq.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree.next=corkReq}module.exports=Writable;var Duplex;Writable.WritableState=WritableState;var internalUtil={deprecate:require("util-deprecate")},Stream=require("./internal/streams/stream"),Buffer=require("buffer").Buffer,OurUint8Array=global.Uint8Array||function(){},destroyImpl=require("./internal/streams/destroy"),_require=require("./internal/streams/state"),getHighWaterMark=_require.getHighWaterMark,_require$codes=require("../errors").codes,ERR_INVALID_ARG_TYPE=_require$codes.ERR_INVALID_ARG_TYPE,ERR_METHOD_NOT_IMPLEMENTED=_require$codes.ERR_METHOD_NOT_IMPLEMENTED,ERR_MULTIPLE_CALLBACK=_require$codes.ERR_MULTIPLE_CALLBACK,ERR_STREAM_CANNOT_PIPE=_require$codes.ERR_STREAM_CANNOT_PIPE,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED,ERR_STREAM_NULL_VALUES=_require$codes.ERR_STREAM_NULL_VALUES,ERR_STREAM_WRITE_AFTER_END=_require$codes.ERR_STREAM_WRITE_AFTER_END,ERR_UNKNOWN_ENCODING=_require$codes.ERR_UNKNOWN_ENCODING,errorOrDestroy=destroyImpl.errorOrDestroy;require("inherits")(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(_){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return!!realHasInstance.call(this,object)||!(this!==Writable)&&object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this},Writable.prototype.pipe=function(){errorOrDestroy(this,new ERR_STREAM_CANNOT_PIPE)},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);return isBuf&&!Buffer.isBuffer(chunk)&&(chunk=_uint8ArrayToBuffer(chunk)),"function"==typeof encoding&&(cb=encoding,encoding=null),isBuf?encoding="buffer":!encoding&&(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ending?writeAfterEnd(this,cb):(isBuf||validChunk(this,state,chunk,cb))&&(state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest&&clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())))throw new ERR_UNKNOWN_ENCODING(encoding);return this._writableState.defaultEncoding=encoding,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(chunk,encoding,cb){cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;return"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||endWritable(this,state,cb),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){cb(err)}}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"../errors":72,"./_stream_duplex":73,"./internal/streams/destroy":80,"./internal/streams/state":84,"./internal/streams/stream":85,_process:62,buffer:24,inherits:42,"util-deprecate":119}],78:[function(require,module){(function(process){(function(){'use strict';function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function createIterResult(value,done){return{value:value,done:done}}function readAndResolve(iter){var resolve=iter[kLastResolve];if(null!==resolve){var data=iter[kStream].read();null!==data&&(iter[kLastPromise]=null,iter[kLastResolve]=null,iter[kLastReject]=null,resolve(createIterResult(data,!1)))}}function onReadable(iter){process.nextTick(readAndResolve,iter)}function wrapForNext(lastPromise,iter){return function(resolve,reject){lastPromise.then(function(){return iter[kEnded]?void resolve(createIterResult(void 0,!0)):void iter[kHandlePromise](resolve,reject)},reject)}}var finished=require("./end-of-stream"),kLastResolve=Symbol("lastResolve"),kLastReject=Symbol("lastReject"),kError=Symbol("error"),kEnded=Symbol("ended"),kLastPromise=Symbol("lastPromise"),kHandlePromise=Symbol("handlePromise"),kStream=Symbol("stream"),AsyncIteratorPrototype=Object.getPrototypeOf(function(){}),ReadableStreamAsyncIteratorPrototype=Object.setPrototypeOf((_Object$setPrototypeO={get stream(){return this[kStream]},next:function(){var _this=this,error=this[kError];if(null!==error)return Promise.reject(error);if(this[kEnded])return Promise.resolve(createIterResult(void 0,!0));if(this[kStream].destroyed)return new Promise(function(resolve,reject){process.nextTick(function(){_this[kError]?reject(_this[kError]):resolve(createIterResult(void 0,!0))})});var lastPromise=this[kLastPromise],promise;if(lastPromise)promise=new Promise(wrapForNext(lastPromise,this));else{var data=this[kStream].read();if(null!==data)return Promise.resolve(createIterResult(data,!1));promise=new Promise(this[kHandlePromise])}return this[kLastPromise]=promise,promise}},_defineProperty(_Object$setPrototypeO,Symbol.asyncIterator,function(){return this}),_defineProperty(_Object$setPrototypeO,"return",function(){var _this2=this;return new Promise(function(resolve,reject){_this2[kStream].destroy(null,function(err){return err?void reject(err):void resolve(createIterResult(void 0,!0))})})}),_Object$setPrototypeO),AsyncIteratorPrototype),_Object$setPrototypeO;module.exports=function(stream){var iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_Object$create={},_defineProperty(_Object$create,kStream,{value:stream,writable:!0}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:!0}),_defineProperty(_Object$create,kLastReject,{value:null,writable:!0}),_defineProperty(_Object$create,kError,{value:null,writable:!0}),_defineProperty(_Object$create,kEnded,{value:stream._readableState.endEmitted,writable:!0}),_defineProperty(_Object$create,kHandlePromise,{value:function(resolve,reject){var data=iterator[kStream].read();data?(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(data,!1))):(iterator[kLastResolve]=resolve,iterator[kLastReject]=reject)},writable:!0}),_Object$create)),_Object$create;return iterator[kLastPromise]=null,finished(stream,function(err){if(err&&"ERR_STREAM_PREMATURE_CLOSE"!==err.code){var reject=iterator[kLastReject];return null!==reject&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,reject(err)),void(iterator[kError]=err)}var resolve=iterator[kLastResolve];null!==resolve&&(iterator[kLastPromise]=null,iterator[kLastResolve]=null,iterator[kLastReject]=null,resolve(createIterResult(void 0,!0))),iterator[kEnded]=!0}),stream.on("readable",onReadable.bind(null,iterator)),iterator}}).call(this)}).call(this,require("_process"))},{"./end-of-stream":81,_process:62}],79:[function(require,module){'use strict';function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var i=1,source;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0,descriptor;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}function copyBuffer(src,target,offset){Buffer.prototype.copy.call(src,target,offset)}var _require=require("buffer"),Buffer=_require.Buffer,_require2=require("util"),inspect=_require2.inspect,custom=inspect&&inspect.custom||"inspect";module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return _createClass(BufferList,[{key:"push",value:function(v){var entry={data:v,next:null};0<this.length?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length}},{key:"unshift",value:function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length}},{key:"shift",value:function(){if(0!==this.length){var ret=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,ret}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret}},{key:"concat",value:function(n){if(0===this.length)return Buffer.alloc(0);for(var ret=Buffer.allocUnsafe(n>>>0),p=this.head,i=0;p;)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret}},{key:"consume",value:function(n,hasStrings){var ret;return n<this.head.data.length?(ret=this.head.data.slice(0,n),this.head.data=this.head.data.slice(n)):n===this.head.data.length?ret=this.shift():ret=hasStrings?this._getString(n):this._getBuffer(n),ret}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(n){var p=this.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(ret+=nb===str.length?str:str.slice(0,n),n-=nb,0===n){nb===str.length?(++c,this.head=p.next?p.next:this.tail=null):(this.head=p,p.data=str.slice(nb));break}++c}return this.length-=c,ret}},{key:"_getBuffer",value:function(n){var ret=Buffer.allocUnsafe(n),p=this.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,0===n){nb===buf.length?(++c,this.head=p.next?p.next:this.tail=null):(this.head=p,p.data=buf.slice(nb));break}++c}return this.length-=c,ret}},{key:custom,value:function(_,options){return inspect(this,_objectSpread({},options,{depth:0,customInspect:!1}))}}]),BufferList}()},{buffer:24,util:22}],80:[function(require,module){(function(process){(function(){'use strict';function emitErrorAndCloseNT(self,err){emitErrorNT(self,err),emitCloseNT(self)}function emitCloseNT(self){self._writableState&&!self._writableState.emitClose||self._readableState&&!self._readableState.emitClose||self.emit("close")}function emitErrorNT(self,err){self.emit("error",err)}module.exports={destroy:function(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;return readableDestroyed||writableDestroyed?(cb?cb(err):err&&(this._writableState?!this._writableState.errorEmitted&&(this._writableState.errorEmitted=!0,process.nextTick(emitErrorNT,this,err)):process.nextTick(emitErrorNT,this,err)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err){!cb&&err?_this._writableState?_this._writableState.errorEmitted?process.nextTick(emitCloseNT,_this):(_this._writableState.errorEmitted=!0,process.nextTick(emitErrorAndCloseNT,_this,err)):process.nextTick(emitErrorAndCloseNT,_this,err):cb?(process.nextTick(emitCloseNT,_this),cb(err)):process.nextTick(emitCloseNT,_this)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(stream,err){var rState=stream._readableState,wState=stream._writableState;rState&&rState.autoDestroy||wState&&wState.autoDestroy?stream.destroy(err):stream.emit("error",err)}}}).call(this)}).call(this,require("_process"))},{_process:62}],81:[function(require,module){'use strict';function once(callback){var called=!1;return function(){if(!called){called=!0;for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];callback.apply(this,args)}}}function noop(){}function isRequest(stream){return stream.setHeader&&"function"==typeof stream.abort}function eos(stream,opts,callback){if("function"==typeof opts)return eos(stream,null,opts);opts||(opts={}),callback=once(callback||noop);var readable=opts.readable||!1!==opts.readable&&stream.readable,writable=opts.writable||!1!==opts.writable&&stream.writable,onlegacyfinish=function(){stream.writable||onfinish()},writableEnded=stream._writableState&&stream._writableState.finished,onfinish=function(){writable=!1,writableEnded=!0,readable||callback.call(stream)},readableEnded=stream._readableState&&stream._readableState.endEmitted,onend=function(){readable=!1,readableEnded=!0,writable||callback.call(stream)},onerror=function(err){callback.call(stream,err)},onclose=function(){var err;return readable&&!readableEnded?(stream._readableState&&stream._readableState.ended||(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream,err)):writable&&!writableEnded?(stream._writableState&&stream._writableState.ended||(err=new ERR_STREAM_PREMATURE_CLOSE),callback.call(stream,err)):void 0},onrequest=function(){stream.req.on("finish",onfinish)};return isRequest(stream)?(stream.on("complete",onfinish),stream.on("abort",onclose),stream.req?onrequest():stream.on("request",onrequest)):writable&&!stream._writableState&&(stream.on("end",onlegacyfinish),stream.on("close",onlegacyfinish)),stream.on("end",onend),stream.on("finish",onfinish),!1!==opts.error&&stream.on("error",onerror),stream.on("close",onclose),function(){stream.removeListener("complete",onfinish),stream.removeListener("abort",onclose),stream.removeListener("request",onrequest),stream.req&&stream.req.removeListener("finish",onfinish),stream.removeListener("end",onlegacyfinish),stream.removeListener("close",onlegacyfinish),stream.removeListener("finish",onfinish),stream.removeListener("end",onend),stream.removeListener("error",onerror),stream.removeListener("close",onclose)}}var ERR_STREAM_PREMATURE_CLOSE=require("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;module.exports=eos},{"../../../errors":72}],82:[function(require,module){module.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],83:[function(require,module){'use strict';function once(callback){var called=!1;return function(){called||(called=!0,callback.apply(void 0,arguments))}}function noop(err){if(err)throw err}function isRequest(stream){return stream.setHeader&&"function"==typeof stream.abort}function destroyer(stream,reading,writing,callback){callback=once(callback);var closed=!1;stream.on("close",function(){closed=!0}),eos===void 0&&(eos=require("./end-of-stream")),eos(stream,{readable:reading,writable:writing},function(err){return err?callback(err):void(closed=!0,callback())});var destroyed=!1;return function(err){if(!closed)return destroyed?void 0:(destroyed=!0,isRequest(stream)?stream.abort():"function"==typeof stream.destroy?stream.destroy():void callback(err||new ERR_STREAM_DESTROYED("pipe")))}}function call(fn){fn()}function pipe(from,to){return from.pipe(to)}function popCallback(streams){return streams.length?"function"==typeof streams[streams.length-1]?streams.pop():noop:noop}var _require$codes=require("../../../errors").codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED,eos;module.exports=function(){for(var _len=arguments.length,streams=Array(_len),_key=0;_key<_len;_key++)streams[_key]=arguments[_key];var callback=popCallback(streams);if(Array.isArray(streams[0])&&(streams=streams[0]),2>streams.length)throw new ERR_MISSING_ARGS("streams");var destroys=streams.map(function(stream,i){var reading=i<streams.length-1;return destroyer(stream,reading,0<i,function(err){error||(error=err),err&&destroys.forEach(call),reading||(destroys.forEach(call),callback(error))})}),error;return streams.reduce(pipe)}},{"../../../errors":72,"./end-of-stream":81}],84:[function(require,module){'use strict';function highWaterMarkFrom(options,isDuplex,duplexKey){return null==options.highWaterMark?isDuplex?options[duplexKey]:null:options.highWaterMark}var ERR_INVALID_OPT_VALUE=require("../../../errors").codes.ERR_INVALID_OPT_VALUE;module.exports={getHighWaterMark:function(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(null!=hwm){if(!(isFinite(hwm)&&_Mathfloor(hwm)===hwm)||0>hwm){var name=isDuplex?duplexKey:"highWaterMark";throw new ERR_INVALID_OPT_VALUE(name,hwm)}return _Mathfloor(hwm)}return state.objectMode?16:16384}}},{"../../../errors":72}],85:[function(require,module){module.exports=require("events").EventEmitter},{events:25}],86:[function(require,module,exports){exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js"),exports.finished=require("./lib/internal/streams/end-of-stream.js"),exports.pipeline=require("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":73,"./lib/_stream_passthrough.js":74,"./lib/_stream_readable.js":75,"./lib/_stream_transform.js":76,"./lib/_stream_writable.js":77,"./lib/internal/streams/end-of-stream.js":81,"./lib/internal/streams/pipeline.js":83}],87:[function(require,module,exports){function renderMedia(file,getElem,opts,cb){function checkBlobLength(){return!("number"==typeof file.length&&file.length>opts.maxBlobLength)||(debug("File length too large for Blob URL approach: %d (max: %d)",file.length,opts.maxBlobLength),fatalError(new Error(`File length too large for Blob URL approach: ${file.length} (max: ${opts.maxBlobLength})`)),!1)}function renderMediaElement(type){checkBlobLength()&&(elem=getElem(type),getBlobURL(file,(err,url)=>err?fatalError(err):void(elem.addEventListener("error",fatalError),elem.addEventListener("loadstart",onLoadStart),elem.addEventListener("loadedmetadata",onLoadedMetadata),elem.src=url)))}function onLoadStart(){if(elem.removeEventListener("loadstart",onLoadStart),opts.autoplay){const playPromise=elem.play();"undefined"!=typeof playPromise&&playPromise.catch(fatalError)}}function onLoadedMetadata(){elem.removeEventListener("loadedmetadata",onLoadedMetadata),cb(null,elem)}function renderIframe(){getBlobURL(file,(err,url)=>err?fatalError(err):void(".pdf"===extname?(elem=getElem("object"),elem.setAttribute("typemustmatch",!0),elem.setAttribute("type","application/pdf"),elem.setAttribute("data",url)):(elem=getElem("iframe"),elem.sandbox="allow-forms allow-scripts",elem.src=url),cb(null,elem)))}function fatalError(err){err.message=`Error rendering file "${file.name}": ${err.message}`,debug(err.message),cb(err)}const extname=path.extname(file.name).toLowerCase();let currentTime=0,elem;MEDIASOURCE_EXTS.includes(extname)?function(){function useVideostream(){debug(`Use \`videostream\` package for ${file.name}`),prepareElem(),elem.addEventListener("error",fallbackToMediaSource),elem.addEventListener("loadstart",onLoadStart),elem.addEventListener("loadedmetadata",onLoadedMetadata),new VideoStream(file,elem)}function useMediaSource(){debug(`Use MediaSource API for ${file.name}`),prepareElem(),elem.addEventListener("error",fallbackToBlobURL),elem.addEventListener("loadstart",onLoadStart),elem.addEventListener("loadedmetadata",onLoadedMetadata);const wrapper=new MediaElementWrapper(elem),writable=wrapper.createWriteStream(getCodec(file.name));file.createReadStream().pipe(writable),currentTime&&(elem.currentTime=currentTime)}function useBlobURL(){debug(`Use Blob URL for ${file.name}`),prepareElem(),elem.addEventListener("error",fatalError),elem.addEventListener("loadstart",onLoadStart),elem.addEventListener("loadedmetadata",onLoadedMetadata),getBlobURL(file,(err,url)=>err?fatalError(err):void(elem.src=url,currentTime&&(elem.currentTime=currentTime)))}function fallbackToMediaSource(err){debug("videostream error: fallback to MediaSource API: %o",err.message||err),elem.removeEventListener("error",fallbackToMediaSource),elem.removeEventListener("loadedmetadata",onLoadedMetadata),useMediaSource()}function fallbackToBlobURL(err){debug("MediaSource API error: fallback to Blob URL: %o",err.message||err);checkBlobLength()&&(elem.removeEventListener("error",fallbackToBlobURL),elem.removeEventListener("loadedmetadata",onLoadedMetadata),useBlobURL())}function prepareElem(){elem||(elem=getElem(tagName),elem.addEventListener("progress",()=>{currentTime=elem.currentTime}))}const tagName=MEDIASOURCE_VIDEO_EXTS.includes(extname)?"video":"audio";MediaSource?VIDEOSTREAM_EXTS.includes(extname)?useVideostream():useMediaSource():useBlobURL()}():VIDEO_EXTS.includes(extname)?renderMediaElement("video"):AUDIO_EXTS.includes(extname)?renderMediaElement("audio"):IMAGE_EXTS.includes(extname)?function(){elem=getElem("img"),getBlobURL(file,(err,url)=>err?fatalError(err):void(elem.src=url,elem.alt=file.name,cb(null,elem)))}():IFRAME_EXTS.includes(extname)?renderIframe():function(){function done(){isAscii(str)?(debug("File extension \"%s\" appears ascii, so will render.",extname),renderIframe()):(debug("File extension \"%s\" appears non-ascii, will not render.",extname),cb(new Error(`Unsupported file type "${extname}": Cannot append to DOM`)))}debug("Unknown file extension \"%s\" - will attempt to render into iframe",extname);let str="";file.createReadStream({start:0,end:1e3}).setEncoding("utf8").on("data",chunk=>{str+=chunk}).on("end",done).on("error",cb)}()}function getBlobURL(file,cb){const extname=path.extname(file.name).toLowerCase();streamToBlobURL(file.createReadStream(),exports.mime[extname]).then(blobUrl=>cb(null,blobUrl),err=>cb(err))}function validateFile(file){if(null==file)throw new Error("file cannot be null or undefined");if("string"!=typeof file.name)throw new Error("missing or invalid file.name property");if("function"!=typeof file.createReadStream)throw new Error("missing or invalid file.createReadStream property")}function getCodec(name){const extname=path.extname(name).toLowerCase();return{".m4a":"audio/mp4; codecs=\"mp4a.40.5\"",".m4b":"audio/mp4; codecs=\"mp4a.40.5\"",".m4p":"audio/mp4; codecs=\"mp4a.40.5\"",".m4v":"video/mp4; codecs=\"avc1.640029, mp4a.40.5\"",".mkv":"video/webm; codecs=\"avc1.640029, mp4a.40.5\"",".mp3":"audio/mpeg",".mp4":"video/mp4; codecs=\"avc1.640029, mp4a.40.5\"",".webm":"video/webm; codecs=\"vorbis, vp8\""}[extname]}function parseOpts(opts){null==opts.autoplay&&(opts.autoplay=!1),null==opts.muted&&(opts.muted=!1),null==opts.controls&&(opts.controls=!0),null==opts.maxBlobLength&&(opts.maxBlobLength=MAX_BLOB_LENGTH)}function setMediaOpts(elem,opts){elem.autoplay=!!opts.autoplay,elem.muted=!!opts.muted,elem.controls=!!opts.controls}exports.render=function(file,elem,opts,cb){"function"==typeof opts&&(cb=opts,opts={}),opts||(opts={}),cb||(cb=()=>{}),validateFile(file),parseOpts(opts),"string"==typeof elem&&(elem=document.querySelector(elem)),renderMedia(file,tagName=>{if(elem.nodeName!==tagName.toUpperCase()){const extname=path.extname(file.name).toLowerCase();throw new Error(`Cannot render "${extname}" inside a "${elem.nodeName.toLowerCase()}" element, expected "${tagName}"`)}return("video"===tagName||"audio"===tagName)&&setMediaOpts(elem,opts),elem},opts,cb)},exports.append=function(file,rootElem,opts,cb){function createMedia(tagName){const elem=createElem(tagName);return setMediaOpts(elem,opts),rootElem.appendChild(elem),elem}function createElem(tagName){const elem=document.createElement(tagName);return rootElem.appendChild(elem),elem}function done(err,elem){err&&elem&&elem.remove(),cb(err,elem)}if("function"==typeof opts&&(cb=opts,opts={}),opts||(opts={}),cb||(cb=()=>{}),validateFile(file),parseOpts(opts),"string"==typeof rootElem&&(rootElem=document.querySelector(rootElem)),rootElem&&("VIDEO"===rootElem.nodeName||"AUDIO"===rootElem.nodeName))throw new Error("Invalid video/audio node argument. Argument must be root element that video/audio tag will be appended to.");renderMedia(file,function(tagName){return"video"===tagName||"audio"===tagName?createMedia(tagName):createElem(tagName)},opts,done)},exports.mime=require("./lib/mime.json");const debug=require("debug")("render-media"),isAscii=require("is-ascii"),MediaElementWrapper=require("mediasource"),path=require("path"),streamToBlobURL=require("stream-to-blob-url"),VideoStream=require("videostream"),VIDEOSTREAM_EXTS=[".m4a",".m4b",".m4p",".m4v",".mp4"],MEDIASOURCE_VIDEO_EXTS=[".m4v",".mkv",".mp4",".webm"],MEDIASOURCE_EXTS=[].concat(MEDIASOURCE_VIDEO_EXTS,[".m4a",".m4b",".m4p",".mp3"]),VIDEO_EXTS=[".mov",".ogv"],AUDIO_EXTS=[".aac",".oga",".ogg",".wav",".flac"],IMAGE_EXTS=[".bmp",".gif",".jpeg",".jpg",".png",".svg"],IFRAME_EXTS=[".css",".html",".js",".md",".pdf",".srt",".txt"],MAX_BLOB_LENGTH=200000000,MediaSource="undefined"!=typeof window&&window.MediaSource},{"./lib/mime.json":88,debug:33,"is-ascii":43,mediasource:48,path:26,"stream-to-blob-url":104,videostream:121}],88:[function(require,module){module.exports={".3gp":"video/3gpp",".aac":"audio/aac",".aif":"audio/x-aiff",".aiff":"audio/x-aiff",".atom":"application/atom+xml",".avi":"video/x-msvideo",".bmp":"image/bmp",".bz2":"application/x-bzip2",".conf":"text/plain",".css":"text/css",".csv":"text/plain",".diff":"text/x-diff",".doc":"application/msword",".flv":"video/x-flv",".gif":"image/gif",".gz":"application/x-gzip",".htm":"text/html",".html":"text/html",".ico":"image/vnd.microsoft.icon",".ics":"text/calendar",".iso":"application/octet-stream",".jar":"application/java-archive",".jpeg":"image/jpeg",".jpg":"image/jpeg",".js":"application/javascript",".json":"application/json",".less":"text/css",".log":"text/plain",".m3u":"audio/x-mpegurl",".m4a":"audio/x-m4a",".m4b":"audio/mp4",".m4p":"audio/mp4",".m4v":"video/x-m4v",".manifest":"text/cache-manifest",".markdown":"text/x-markdown",".mathml":"application/mathml+xml",".md":"text/x-markdown",".mid":"audio/midi",".midi":"audio/midi",".mov":"video/quicktime",".mp3":"audio/mpeg",".mp4":"video/mp4",".mp4v":"video/mp4",".mpeg":"video/mpeg",".mpg":"video/mpeg",".odp":"application/vnd.oasis.opendocument.presentation",".ods":"application/vnd.oasis.opendocument.spreadsheet",".odt":"application/vnd.oasis.opendocument.text",".oga":"audio/ogg",".ogg":"application/ogg",".pdf":"application/pdf",".png":"image/png",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".ps":"application/postscript",".psd":"image/vnd.adobe.photoshop",".qt":"video/quicktime",".rar":"application/x-rar-compressed",".rdf":"application/rdf+xml",".rss":"application/rss+xml",".rtf":"application/rtf",".svg":"image/svg+xml",".svgz":"image/svg+xml",".swf":"application/x-shockwave-flash",".tar":"application/x-tar",".tbz":"application/x-bzip-compressed-tar",".text":"text/plain",".tif":"image/tiff",".tiff":"image/tiff",".torrent":"application/x-bittorrent",".ttf":"application/x-font-ttf",".txt":"text/plain",".wav":"audio/wav",".webm":"video/webm",".wma":"audio/x-ms-wma",".wmv":"video/x-ms-wmv",".xls":"application/vnd.ms-excel",".xml":"application/xml",".yaml":"text/yaml",".yml":"text/yaml",".zip":"application/zip"}},{}],89:[function(require,module){(function(process){(function(){/*! run-parallel-limit. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(tasks,limit,cb){function done(err){function end(){cb&&cb(err,results),cb=null}isSync?process.nextTick(end):end()}function each(i,err,result){if(results[i]=result,err&&(isErrored=!0),0==--pending||err)done(err);else if(!isErrored&&next<len){var key;keys?(key=keys[next],next+=1,tasks[key](function(err,result){each(key,err,result)})):(key=next,next+=1,tasks[key](function(err,result){each(key,err,result)}))}}if("number"!=typeof limit)throw new Error("second argument must be a Number");var isSync=!0,results,len,pending,keys,isErrored;Array.isArray(tasks)?(results=[],pending=len=tasks.length):(keys=Object.keys(tasks),results={},pending=len=keys.length);var next=limit;pending?keys?keys.some(function(key,i){if(tasks[key](function(err,result){each(key,err,result)}),i===limit-1)return!0}):tasks.some(function(task,i){if(task(function(err,result){each(i,err,result)}),i===limit-1)return!0}):done(null),isSync=!1}}).call(this)}).call(this,require("_process"))},{_process:62}],90:[function(require,module){(function(process){(function(){/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(tasks,cb){function done(err){function end(){cb&&cb(err,results),cb=null}isSync?process.nextTick(end):end()}function each(i,err,result){results[i]=result,(0==--pending||err)&&done(err)}var isSync=!0,results,pending,keys;Array.isArray(tasks)?(results=[],pending=tasks.length):(keys=Object.keys(tasks),results={},pending=keys.length),pending?keys?keys.forEach(function(key){tasks[key](function(err,result){each(key,err,result)})}):tasks.forEach(function(task,i){task(function(err,result){each(i,err,result)})}):done(null),isSync=!1}}).call(this)}).call(this,require("_process"))},{_process:62}],91:[function(require,module,exports){(function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory():"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?exports.Rusha=factory():root.Rusha=factory()})("undefined"==typeof self?this:self,function(){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module["default"]}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=3)}([function(module,exports,__webpack_require__){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var RushaCore=__webpack_require__(5),_require=__webpack_require__(1),toHex=_require.toHex,ceilHeapSize=_require.ceilHeapSize,conv=__webpack_require__(6),padlen=function(len){for(len+=9;0<len%64;len+=1);return len},padZeroes=function(bin,len){var h8=new Uint8Array(bin.buffer),om=len%4,align=len-om;switch(om){case 0:h8[align+3]=0;case 1:h8[align+2]=0;case 2:h8[align+1]=0;case 3:h8[align+0]=0;}for(var i=(len>>2)+1;i<bin.length;i++)bin[i]=0},padData=function(bin,chunkLen,msgLen){bin[chunkLen>>2]|=128<<24-(chunkLen%4<<3),bin[(-16&(chunkLen>>2)+2)+14]=0|msgLen/536870912,bin[(-16&(chunkLen>>2)+2)+15]=msgLen<<3},getRawDigest=function(heap,padMaxChunkLen){var io=new Int32Array(heap,padMaxChunkLen+320,5),out=new Int32Array(5),arr=new DataView(out.buffer);return arr.setInt32(0,io[0],!1),arr.setInt32(4,io[1],!1),arr.setInt32(8,io[2],!1),arr.setInt32(12,io[3],!1),arr.setInt32(16,io[4],!1),out},Rusha=function(){function Rusha(chunkSize){if(_classCallCheck(this,Rusha),chunkSize=chunkSize||65536,0<chunkSize%64)throw new Error("Chunk size must be a multiple of 128 bit");this._offset=0,this._maxChunkLen=chunkSize,this._padMaxChunkLen=padlen(chunkSize),this._heap=new ArrayBuffer(ceilHeapSize(this._padMaxChunkLen+320+20)),this._h32=new Int32Array(this._heap),this._h8=new Int8Array(this._heap),this._core=new RushaCore({Int32Array:Int32Array},{},this._heap)}return Rusha.prototype._initState=function(heap,padMsgLen){this._offset=0;var io=new Int32Array(heap,padMsgLen+320,5);io[0]=1732584193,io[1]=-271733879,io[2]=-1732584194,io[3]=271733878,io[4]=-1009589776},Rusha.prototype._padChunk=function(chunkLen,msgLen){var padChunkLen=padlen(chunkLen),view=new Int32Array(this._heap,0,padChunkLen>>2);return padZeroes(view,chunkLen),padData(view,chunkLen,msgLen),padChunkLen},Rusha.prototype._write=function(data,chunkOffset,chunkLen,off){conv(data,this._h8,this._h32,chunkOffset,chunkLen,off||0)},Rusha.prototype._coreCall=function(data,chunkOffset,chunkLen,msgLen,finalize){var padChunkLen=chunkLen;this._write(data,chunkOffset,chunkLen),finalize&&(padChunkLen=this._padChunk(chunkLen,msgLen)),this._core.hash(padChunkLen,this._padMaxChunkLen)},Rusha.prototype.rawDigest=function(str){var msgLen=str.byteLength||str.length||str.size||0;this._initState(this._heap,this._padMaxChunkLen);var chunkOffset=0,chunkLen=this._maxChunkLen;for(chunkOffset=0;msgLen>chunkOffset+chunkLen;chunkOffset+=chunkLen)this._coreCall(str,chunkOffset,chunkLen,msgLen,!1);return this._coreCall(str,chunkOffset,msgLen-chunkOffset,msgLen,!0),getRawDigest(this._heap,this._padMaxChunkLen)},Rusha.prototype.digest=function(str){return toHex(this.rawDigest(str).buffer)},Rusha.prototype.digestFromString=function(str){return this.digest(str)},Rusha.prototype.digestFromBuffer=function(str){return this.digest(str)},Rusha.prototype.digestFromArrayBuffer=function(str){return this.digest(str)},Rusha.prototype.resetState=function(){return this._initState(this._heap,this._padMaxChunkLen),this},Rusha.prototype.append=function(chunk){var chunkOffset=0,chunkLen=chunk.byteLength||chunk.length||chunk.size||0,turnOffset=this._offset%this._maxChunkLen,inputLen=void 0;for(this._offset+=chunkLen;chunkOffset<chunkLen;)inputLen=_Mathmin(chunkLen-chunkOffset,this._maxChunkLen-turnOffset),this._write(chunk,chunkOffset,inputLen,turnOffset),turnOffset+=inputLen,chunkOffset+=inputLen,turnOffset===this._maxChunkLen&&(this._core.hash(this._maxChunkLen,this._padMaxChunkLen),turnOffset=0);return this},Rusha.prototype.getState=function(){var turnOffset=this._offset%this._maxChunkLen,heap=void 0;if(!turnOffset){var io=new Int32Array(this._heap,this._padMaxChunkLen+320,5);heap=io.buffer.slice(io.byteOffset,io.byteOffset+io.byteLength)}else heap=this._heap.slice(0);return{offset:this._offset,heap:heap}},Rusha.prototype.setState=function(state){if(this._offset=state.offset,20===state.heap.byteLength){var io=new Int32Array(this._heap,this._padMaxChunkLen+320,5);io.set(new Int32Array(state.heap))}else this._h32.set(new Int32Array(state.heap));return this},Rusha.prototype.rawEnd=function(){var msgLen=this._offset,chunkLen=msgLen%this._maxChunkLen,padChunkLen=this._padChunk(chunkLen,msgLen);this._core.hash(padChunkLen,this._padMaxChunkLen);var result=getRawDigest(this._heap,this._padMaxChunkLen);return this._initState(this._heap,this._padMaxChunkLen),result},Rusha.prototype.end=function(){return toHex(this.rawEnd().buffer)},Rusha}();module.exports=Rusha,module.exports._core=RushaCore},function(module){for(var precomputedHex=Array(256),i=0;256>i;i++)precomputedHex[i]=(16>i?"0":"")+i.toString(16);module.exports.toHex=function(arrayBuffer){for(var binarray=new Uint8Array(arrayBuffer),res=Array(arrayBuffer.byteLength),_i=0;_i<res.length;_i++)res[_i]=precomputedHex[binarray[_i]];return res.join("")},module.exports.ceilHeapSize=function(v){var p=0;if(65536>=v)return 65536;if(16777216>v)for(p=1;p<v;p<<=1);else for(p=16777216;p<v;p+=16777216);return p},module.exports.isDedicatedWorkerScope=function(self){var isRunningInWorker="WorkerGlobalScope"in self&&self instanceof self.WorkerGlobalScope,isRunningInSharedWorker="SharedWorkerGlobalScope"in self&&self instanceof self.SharedWorkerGlobalScope,isRunningInServiceWorker="ServiceWorkerGlobalScope"in self&&self instanceof self.ServiceWorkerGlobalScope;return isRunningInWorker&&!isRunningInSharedWorker&&!isRunningInServiceWorker}},function(module,exports,__webpack_require__){module.exports=function(){var Rusha=__webpack_require__(0),hashData=function(hasher,data,cb){try{return cb(null,hasher.digest(data))}catch(e){return cb(e)}},hashFile=function(hasher,readTotal,blockSize,file,cb){var reader=new self.FileReader;reader.onloadend=function(){if(reader.error)return cb(reader.error);var buffer=reader.result;readTotal+=reader.result.byteLength;try{hasher.append(buffer)}catch(e){return void cb(e)}readTotal<file.size?hashFile(hasher,readTotal,blockSize,file,cb):cb(null,hasher.end())},reader.readAsArrayBuffer(file.slice(readTotal,readTotal+blockSize))},workerBehaviourEnabled=!0;return self.onmessage=function(event){if(workerBehaviourEnabled){var data=event.data.data,file=event.data.file,id=event.data.id;if("undefined"!=typeof id&&(file||data)){var blockSize=event.data.blockSize||4194304,hasher=new Rusha(blockSize);hasher.resetState();var done=function(err,hash){err?self.postMessage({id:id,error:err.name}):self.postMessage({id:id,hash:hash})};data&&hashData(hasher,data,done),file&&hashFile(hasher,0,blockSize,file,done)}}},function(){workerBehaviourEnabled=!1}}},function(module,exports,__webpack_require__){var work=__webpack_require__(4),Rusha=__webpack_require__(0),createHash=__webpack_require__(7),runWorker=__webpack_require__(2),_require=__webpack_require__(1),isDedicatedWorkerScope=_require.isDedicatedWorkerScope,isRunningInDedicatedWorker="undefined"!=typeof self&&isDedicatedWorkerScope(self);Rusha.disableWorkerBehaviour=isRunningInDedicatedWorker?runWorker():function(){},Rusha.createWorker=function(){var worker=work(2),terminate=worker.terminate;return worker.terminate=function(){URL.revokeObjectURL(worker.objectURL),terminate.call(worker)},worker},Rusha.createHash=createHash,module.exports=Rusha},function(module,exports,__webpack_require__){function webpackBootstrapFunc(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.i=function(value){return value},__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.r=function(exports){Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module["default"]}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="/",__webpack_require__.oe=function(err){throw console.error(err),err};var f=__webpack_require__(__webpack_require__.s=ENTRY_MODULE);return f.default||f}function quoteRegExp(str){return(str+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function getModuleDependencies(sources,module,queueName){var retval={};retval[queueName]=[];var fnString=module.toString(),wrapperSignature=fnString.match(/^function\s?\(\w+,\s*\w+,\s*(\w+)\)/);if(!wrapperSignature)return retval;for(var webpackRequireName=wrapperSignature[1],re=new RegExp("(\\\\n|\\W)"+quoteRegExp(webpackRequireName)+"\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g"),match;match=re.exec(fnString);)"dll-reference"!==match[3]&&retval[queueName].push(match[3]);for(re=new RegExp("\\("+quoteRegExp(webpackRequireName)+"\\(\"(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))\"\\)\\)\\((/\\*.*?\\*/)?s?.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");match=re.exec(fnString);)sources[match[2]]||(retval[queueName].push(match[1]),sources[match[2]]=__webpack_require__(match[1]).m),retval[match[2]]=retval[match[2]]||[],retval[match[2]].push(match[4]);return retval}function hasValuesInQueues(queues){var keys=Object.keys(queues);return keys.reduce(function(hasValues,key){return hasValues||0<queues[key].length},!1)}function getRequiredModules(sources,moduleId){for(var modulesQueue={main:[moduleId]},requiredModules={main:[]},seenModules={main:{}};hasValuesInQueues(modulesQueue);)for(var queues=Object.keys(modulesQueue),i=0;i<queues.length;i++){var queueName=queues[i],queue=modulesQueue[queueName],moduleToCheck=queue.pop();if(seenModules[queueName]=seenModules[queueName]||{},!seenModules[queueName][moduleToCheck]&&sources[queueName][moduleToCheck]){seenModules[queueName][moduleToCheck]=!0,requiredModules[queueName]=requiredModules[queueName]||[],requiredModules[queueName].push(moduleToCheck);for(var newModules=getModuleDependencies(sources,sources[queueName][moduleToCheck],queueName),newModulesKeys=Object.keys(newModules),j=0;j<newModulesKeys.length;j++)modulesQueue[newModulesKeys[j]]=modulesQueue[newModulesKeys[j]]||[],modulesQueue[newModulesKeys[j]]=modulesQueue[newModulesKeys[j]].concat(newModules[newModulesKeys[j]])}}return requiredModules}module.exports=function(moduleId,options){options=options||{};var sources={main:__webpack_require__.m},requiredModules=options.all?{main:Object.keys(sources)}:getRequiredModules(sources,moduleId),src="";Object.keys(requiredModules).filter(function(m){return"main"!==m}).forEach(function(module){for(var entryModule=0;requiredModules[module][entryModule];)entryModule++;requiredModules[module].push(entryModule),sources[module][entryModule]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",src=src+"var "+module+" = ("+webpackBootstrapFunc.toString().replace("ENTRY_MODULE",JSON.stringify(entryModule))+")({"+requiredModules[module].map(function(id){return""+JSON.stringify(id)+": "+sources[module][id].toString()}).join(",")+"});\n"}),src=src+"("+webpackBootstrapFunc.toString().replace("ENTRY_MODULE",JSON.stringify(moduleId))+")({"+requiredModules.main.map(function(id){return""+JSON.stringify(id)+": "+sources.main[id].toString()}).join(",")+"})(self);";var blob=new window.Blob([src],{type:"text/javascript"});if(options.bare)return blob;var URL=window.URL||window.webkitURL||window.mozURL||window.msURL,workerUrl=URL.createObjectURL(blob),worker=new window.Worker(workerUrl);return worker.objectURL=workerUrl,worker}},function(module){module.exports=function(stdlib$846,foreign$847,heap$848){'use asm';var H$849=new stdlib$846.Int32Array(heap$848);return{hash:function(k$851,x$852){k$851|=0,x$852|=0;var i$853=0,j$854=0,y0$855=0,z0$856=0,y1$857=0,z1$858=0,y2$859=0,z2$860=0,y3$861=0,z3$862=0,y4$863=0,z4$864=0,t0$865=0,t1$866=0;for(y0$855=0|H$849[x$852+320>>2],y1$857=0|H$849[x$852+324>>2],y2$859=0|H$849[x$852+328>>2],y3$861=0|H$849[x$852+332>>2],y4$863=0|H$849[x$852+336>>2],i$853=0;(0|i$853)<(0|k$851);i$853=0|i$853+64){for(z0$856=y0$855,z1$858=y1$857,z2$860=y2$859,z3$862=y3$861,z4$864=y4$863,j$854=0;64>(0|j$854);j$854=0|j$854+4)t1$866=0|H$849[i$853+j$854>>2],t0$865=0|(0|(y0$855<<5|y0$855>>>27)+(y1$857&y2$859|~y1$857&y3$861))+(0|(0|t1$866+y4$863)+1518500249),y4$863=y3$861,y3$861=y2$859,y2$859=y1$857<<30|y1$857>>>2,y1$857=y0$855,y0$855=t0$865,H$849[k$851+j$854>>2]=t1$866;for(j$854=0|k$851+64;(0|j$854)<(0|k$851+80);j$854=0|j$854+4)t1$866=(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])<<1|(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])>>>31,t0$865=0|(0|(y0$855<<5|y0$855>>>27)+(y1$857&y2$859|~y1$857&y3$861))+(0|(0|t1$866+y4$863)+1518500249),y4$863=y3$861,y3$861=y2$859,y2$859=y1$857<<30|y1$857>>>2,y1$857=y0$855,y0$855=t0$865,H$849[j$854>>2]=t1$866;for(j$854=0|k$851+80;(0|j$854)<(0|k$851+160);j$854=0|j$854+4)t1$866=(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])<<1|(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])>>>31,t0$865=0|(0|(y0$855<<5|y0$855>>>27)+(y1$857^y2$859^y3$861))+(0|(0|t1$866+y4$863)+1859775393),y4$863=y3$861,y3$861=y2$859,y2$859=y1$857<<30|y1$857>>>2,y1$857=y0$855,y0$855=t0$865,H$849[j$854>>2]=t1$866;for(j$854=0|k$851+160;(0|j$854)<(0|k$851+240);j$854=0|j$854+4)t1$866=(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])<<1|(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])>>>31,t0$865=0|(0|(y0$855<<5|y0$855>>>27)+(y1$857&y2$859|y1$857&y3$861|y2$859&y3$861))+(0|(0|t1$866+y4$863)-1894007588),y4$863=y3$861,y3$861=y2$859,y2$859=y1$857<<30|y1$857>>>2,y1$857=y0$855,y0$855=t0$865,H$849[j$854>>2]=t1$866;for(j$854=0|k$851+240;(0|j$854)<(0|k$851+320);j$854=0|j$854+4)t1$866=(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])<<1|(H$849[j$854-12>>2]^H$849[j$854-32>>2]^H$849[j$854-56>>2]^H$849[j$854-64>>2])>>>31,t0$865=0|(0|(y0$855<<5|y0$855>>>27)+(y1$857^y2$859^y3$861))+(0|(0|t1$866+y4$863)-899497514),y4$863=y3$861,y3$861=y2$859,y2$859=y1$857<<30|y1$857>>>2,y1$857=y0$855,y0$855=t0$865,H$849[j$854>>2]=t1$866;y0$855=0|y0$855+z0$856,y1$857=0|y1$857+z1$858,y2$859=0|y2$859+z2$860,y3$861=0|y3$861+z3$862,y4$863=0|y4$863+z4$864}H$849[x$852+320>>2]=y0$855,H$849[x$852+324>>2]=y1$857,H$849[x$852+328>>2]=y2$859,H$849[x$852+332>>2]=y3$861,H$849[x$852+336>>2]=y4$863}}}},function(module){var _this=this,reader=void 0;"undefined"!=typeof self&&"undefined"!=typeof self.FileReaderSync&&(reader=new self.FileReaderSync);var convStr=function(str,H8,H32,start,len,off){var om=off%4,lm=(len+om)%4,j=len-lm,i;switch(om){case 0:H8[off]=str.charCodeAt(start+3);case 1:H8[0|off+1-(om<<1)]=str.charCodeAt(start+2);case 2:H8[0|off+2-(om<<1)]=str.charCodeAt(start+1);case 3:H8[0|off+3-(om<<1)]=str.charCodeAt(start);}if(!(len<lm+(4-om))){for(i=4-om;i<j;i=0|i+4)H32[off+i>>2]=str.charCodeAt(start+i)<<24|str.charCodeAt(start+i+1)<<16|str.charCodeAt(start+i+2)<<8|str.charCodeAt(start+i+3);switch(lm){case 3:H8[0|off+j+1]=str.charCodeAt(start+j+2);case 2:H8[0|off+j+2]=str.charCodeAt(start+j+1);case 1:H8[0|off+j+3]=str.charCodeAt(start+j);}}},convBuf=function(buf,H8,H32,start,len,off){var om=off%4,lm=(len+om)%4,j=len-lm,i;switch(om){case 0:H8[off]=buf[start+3];case 1:H8[0|off+1-(om<<1)]=buf[start+2];case 2:H8[0|off+2-(om<<1)]=buf[start+1];case 3:H8[0|off+3-(om<<1)]=buf[start];}if(!(len<lm+(4-om))){for(i=4-om;i<j;i=0|i+4)H32[0|off+i>>2]=buf[start+i]<<24|buf[start+i+1]<<16|buf[start+i+2]<<8|buf[start+i+3];switch(lm){case 3:H8[0|off+j+1]=buf[start+j+2];case 2:H8[0|off+j+2]=buf[start+j+1];case 1:H8[0|off+j+3]=buf[start+j];}}},convBlob=function(blob,H8,H32,start,len,off){var i=void 0,om=off%4,lm=(len+om)%4,j=len-lm,buf=new Uint8Array(reader.readAsArrayBuffer(blob.slice(start,start+len)));switch(om){case 0:H8[off]=buf[3];case 1:H8[0|off+1-(om<<1)]=buf[2];case 2:H8[0|off+2-(om<<1)]=buf[1];case 3:H8[0|off+3-(om<<1)]=buf[0];}if(!(len<lm+(4-om))){for(i=4-om;i<j;i=0|i+4)H32[0|off+i>>2]=buf[i]<<24|buf[i+1]<<16|buf[i+2]<<8|buf[i+3];switch(lm){case 3:H8[0|off+j+1]=buf[j+2];case 2:H8[0|off+j+2]=buf[j+1];case 1:H8[0|off+j+3]=buf[j];}}};module.exports=function(data,H8,H32,start,len,off){if("string"==typeof data)return convStr(data,H8,H32,start,len,off);if(data instanceof Array)return convBuf(data,H8,H32,start,len,off);if(_this&&_this.Buffer&&_this.Buffer.isBuffer(data))return convBuf(data,H8,H32,start,len,off);if(data instanceof ArrayBuffer)return convBuf(new Uint8Array(data),H8,H32,start,len,off);if(data.buffer instanceof ArrayBuffer)return convBuf(new Uint8Array(data.buffer,data.byteOffset,data.byteLength),H8,H32,start,len,off);if(data instanceof Blob)return convBlob(data,H8,H32,start,len,off);throw new Error("Unsupported data type.")}},function(module,exports,__webpack_require__){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var Rusha=__webpack_require__(0),_require=__webpack_require__(1),toHex=_require.toHex,Hash=function(){function Hash(){_classCallCheck(this,Hash),this._rusha=new Rusha,this._rusha.resetState()}return Hash.prototype.update=function(data){return this._rusha.append(data),this},Hash.prototype.digest=function digest(encoding){var digest=this._rusha.rawEnd().buffer;if(!encoding)return digest;if("hex"===encoding)return toHex(digest);throw new Error("unsupported digest encoding")},Hash}();module.exports=function(){return new Hash}}])})},{}],92:[function(require,module,exports){function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var buffer=require("buffer"),Buffer=buffer.Buffer;Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(Buffer.prototype),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0===fill?buf.fill(0):"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},{buffer:24}],93:[function(require,module){(function(Buffer){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(stream,cb){var chunks=[];stream.on("data",function(chunk){chunks.push(chunk)}),stream.once("end",function(){cb&&cb(null,Buffer.concat(chunks)),cb=null}),stream.once("error",function(err){cb&&cb(err),cb=null})}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24}],94:[function(require,module){(function(Buffer){(function(){function simpleGet(opts,cb){if(opts=Object.assign({maxRedirects:10},"string"==typeof opts?{url:opts}:opts),cb=once(cb),opts.url){const{hostname,port,protocol,auth,path}=url.parse(opts.url);delete opts.url,hostname||port||protocol||auth?Object.assign(opts,{hostname,port,protocol,auth,path}):opts.path=path}const headers={"accept-encoding":"gzip, deflate"};opts.headers&&Object.keys(opts.headers).forEach(k=>headers[k.toLowerCase()]=opts.headers[k]),opts.headers=headers;let body;opts.body?body=opts.json&&!isStream(opts.body)?JSON.stringify(opts.body):opts.body:opts.form&&(body="string"==typeof opts.form?opts.form:querystring.stringify(opts.form),opts.headers["content-type"]="application/x-www-form-urlencoded"),body&&(!opts.method&&(opts.method="POST"),!isStream(body)&&(opts.headers["content-length"]=Buffer.byteLength(body)),opts.json&&!opts.form&&(opts.headers["content-type"]="application/json")),delete opts.body,delete opts.form,opts.json&&(opts.headers.accept="application/json"),opts.method&&(opts.method=opts.method.toUpperCase());const protocol="https:"===opts.protocol?https:http,req=protocol.request(opts,res=>{if(!1!==opts.followRedirects&&300<=res.statusCode&&400>res.statusCode&&res.headers.location)return opts.url=res.headers.location,delete opts.headers.host,res.resume(),"POST"===opts.method&&[301,302].includes(res.statusCode)&&(opts.method="GET",delete opts.headers["content-length"],delete opts.headers["content-type"]),0==opts.maxRedirects--?cb(new Error("too many redirects")):simpleGet(opts,cb);const tryUnzip="function"==typeof decompressResponse&&"HEAD"!==opts.method;cb(null,tryUnzip?decompressResponse(res):res)});return req.on("timeout",()=>{req.abort(),cb(new Error("Request timed out"))}),req.on("error",cb),isStream(body)?body.on("error",cb).pipe(req):req.end(body),req}module.exports=simpleGet;const concat=require("simple-concat"),decompressResponse=require("decompress-response"),http=require("http"),https=require("https"),once=require("once"),querystring=require("querystring"),url=require("url"),isStream=o=>null!==o&&"object"==typeof o&&"function"==typeof o.pipe;simpleGet.concat=(opts,cb)=>simpleGet(opts,(err,res)=>err?cb(err):void concat(res,(err,data)=>{if(err)return cb(err);if(opts.json)try{data=JSON.parse(data.toString())}catch(err){return cb(err,res,data)}cb(null,res,data)})),["get","post","put","patch","head","delete"].forEach(method=>{simpleGet[method]=(opts,cb)=>("string"==typeof opts&&(opts={url:opts}),simpleGet(Object.assign({method:method.toUpperCase()},opts),cb))})}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24,"decompress-response":22,http:100,https:39,once:59,querystring:67,"simple-concat":93,url:116}],95:[function(require,module){function filterTrickle(sdp){return sdp.replace(/a=ice-options:trickle\s\n/g,"")}function warn(message){console.warn(message)}/*! simple-peer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */const debug=require("debug")("simple-peer"),getBrowserRTC=require("get-browser-rtc"),randombytes=require("randombytes"),stream=require("readable-stream"),queueMicrotask=require("queue-microtask"),errCode=require("err-code"),{Buffer}=require("buffer"),MAX_BUFFERED_AMOUNT=65536;class Peer extends stream.Duplex{constructor(opts){if(opts=Object.assign({allowHalfOpen:!1},opts),super(opts),this._id=randombytes(4).toString("hex").slice(0,7),this._debug("new peer %o",opts),this.channelName=opts.initiator?opts.channelName||randombytes(20).toString("hex"):null,this.initiator=opts.initiator||!1,this.channelConfig=opts.channelConfig||Peer.channelConfig,this.channelNegotiated=this.channelConfig.negotiated,this.config=Object.assign({},Peer.config,opts.config),this.offerOptions=opts.offerOptions||{},this.answerOptions=opts.answerOptions||{},this.sdpTransform=opts.sdpTransform||(sdp=>sdp),this.streams=opts.streams||(opts.stream?[opts.stream]:[]),this.trickle=void 0===opts.trickle||opts.trickle,this.allowHalfTrickle=void 0!==opts.allowHalfTrickle&&opts.allowHalfTrickle,this.iceCompleteTimeout=opts.iceCompleteTimeout||5000,this.destroyed=!1,this.destroying=!1,this._connected=!1,this.remoteAddress=void 0,this.remoteFamily=void 0,this.remotePort=void 0,this.localAddress=void 0,this.localFamily=void 0,this.localPort=void 0,this._wrtc=opts.wrtc&&"object"==typeof opts.wrtc?opts.wrtc:getBrowserRTC(),!this._wrtc)if("undefined"==typeof window)throw errCode(new Error("No WebRTC support: Specify `opts.wrtc` option in this environment"),"ERR_WEBRTC_SUPPORT");else throw errCode(new Error("No WebRTC support: Not a supported browser"),"ERR_WEBRTC_SUPPORT");this._pcReady=!1,this._channelReady=!1,this._iceComplete=!1,this._iceCompleteTimer=null,this._channel=null,this._pendingCandidates=[],this._isNegotiating=!1,this._firstNegotiation=!0,this._batchedNegotiation=!1,this._queuedNegotiation=!1,this._sendersAwaitingStable=[],this._senderMap=new Map,this._closingInterval=null,this._remoteTracks=[],this._remoteStreams=[],this._chunk=null,this._cb=null,this._interval=null;try{this._pc=new this._wrtc.RTCPeerConnection(this.config)}catch(err){return void queueMicrotask(()=>this.destroy(errCode(err,"ERR_PC_CONSTRUCTOR")))}this._isReactNativeWebrtc="number"==typeof this._pc._peerConnectionId,this._pc.oniceconnectionstatechange=()=>{this._onIceStateChange()},this._pc.onicegatheringstatechange=()=>{this._onIceStateChange()},this._pc.onconnectionstatechange=()=>{this._onConnectionStateChange()},this._pc.onsignalingstatechange=()=>{this._onSignalingStateChange()},this._pc.onicecandidate=event=>{this._onIceCandidate(event)},this.initiator||this.channelNegotiated?this._setupData({channel:this._pc.createDataChannel(this.channelName,this.channelConfig)}):this._pc.ondatachannel=event=>{this._setupData(event)},this.streams&&this.streams.forEach(stream=>{this.addStream(stream)}),this._pc.ontrack=event=>{this._onTrack(event)},this._debug("initial negotiation"),this._needsNegotiation(),this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}get bufferSize(){return this._channel&&this._channel.bufferedAmount||0}get connected(){return this._connected&&"open"===this._channel.readyState}address(){return{port:this.localPort,family:this.localFamily,address:this.localAddress}}signal(data){if(this.destroyed)throw errCode(new Error("cannot signal after peer is destroyed"),"ERR_SIGNALING");if("string"==typeof data)try{data=JSON.parse(data)}catch(err){data={}}this._debug("signal()"),data.renegotiate&&this.initiator&&(this._debug("got request to renegotiate"),this._needsNegotiation()),data.transceiverRequest&&this.initiator&&(this._debug("got request for transceiver"),this.addTransceiver(data.transceiverRequest.kind,data.transceiverRequest.init)),data.candidate&&(this._pc.remoteDescription&&this._pc.remoteDescription.type?this._addIceCandidate(data.candidate):this._pendingCandidates.push(data.candidate)),data.sdp&&this._pc.setRemoteDescription(new this._wrtc.RTCSessionDescription(data)).then(()=>{this.destroyed||(this._pendingCandidates.forEach(candidate=>{this._addIceCandidate(candidate)}),this._pendingCandidates=[],"offer"===this._pc.remoteDescription.type&&this._createAnswer())}).catch(err=>{this.destroy(errCode(err,"ERR_SET_REMOTE_DESCRIPTION"))}),data.sdp||data.candidate||data.renegotiate||data.transceiverRequest||this.destroy(errCode(new Error("signal() called with invalid signal data"),"ERR_SIGNALING"))}_addIceCandidate(candidate){const iceCandidateObj=new this._wrtc.RTCIceCandidate(candidate);this._pc.addIceCandidate(iceCandidateObj).catch(err=>{!iceCandidateObj.address||iceCandidateObj.address.endsWith(".local")?warn("Ignoring unsupported ICE candidate."):this.destroy(errCode(err,"ERR_ADD_ICE_CANDIDATE"))})}send(chunk){this._channel.send(chunk)}addTransceiver(kind,init){if(this._debug("addTransceiver()"),this.initiator)try{this._pc.addTransceiver(kind,init),this._needsNegotiation()}catch(err){this.destroy(errCode(err,"ERR_ADD_TRANSCEIVER"))}else this.emit("signal",{type:"transceiverRequest",transceiverRequest:{kind,init}})}addStream(stream){this._debug("addStream()"),stream.getTracks().forEach(track=>{this.addTrack(track,stream)})}addTrack(track,stream){this._debug("addTrack()");const submap=this._senderMap.get(track)||new Map;let sender=submap.get(stream);if(!sender)sender=this._pc.addTrack(track,stream),submap.set(stream,sender),this._senderMap.set(track,submap),this._needsNegotiation();else if(sender.removed)throw errCode(new Error("Track has been removed. You should enable/disable tracks that you want to re-add."),"ERR_SENDER_REMOVED");else throw errCode(new Error("Track has already been added to that stream."),"ERR_SENDER_ALREADY_ADDED")}replaceTrack(oldTrack,newTrack,stream){this._debug("replaceTrack()");const submap=this._senderMap.get(oldTrack),sender=submap?submap.get(stream):null;if(!sender)throw errCode(new Error("Cannot replace track that was never added."),"ERR_TRACK_NOT_ADDED");newTrack&&this._senderMap.set(newTrack,submap),null==sender.replaceTrack?this.destroy(errCode(new Error("replaceTrack is not supported in this browser"),"ERR_UNSUPPORTED_REPLACETRACK")):sender.replaceTrack(newTrack)}removeTrack(track,stream){this._debug("removeSender()");const submap=this._senderMap.get(track),sender=submap?submap.get(stream):null;if(!sender)throw errCode(new Error("Cannot remove track that was never added."),"ERR_TRACK_NOT_ADDED");try{sender.removed=!0,this._pc.removeTrack(sender)}catch(err){"NS_ERROR_UNEXPECTED"===err.name?this._sendersAwaitingStable.push(sender):this.destroy(errCode(err,"ERR_REMOVE_TRACK"))}this._needsNegotiation()}removeStream(stream){this._debug("removeSenders()"),stream.getTracks().forEach(track=>{this.removeTrack(track,stream)})}_needsNegotiation(){this._debug("_needsNegotiation");this._batchedNegotiation||(this._batchedNegotiation=!0,queueMicrotask(()=>{this._batchedNegotiation=!1,this.initiator||!this._firstNegotiation?(this._debug("starting batched negotiation"),this.negotiate()):this._debug("non-initiator initial negotiation request discarded"),this._firstNegotiation=!1}))}negotiate(){this.initiator?this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("start negotiation"),setTimeout(()=>{this._createOffer()},0)):this._isNegotiating?(this._queuedNegotiation=!0,this._debug("already negotiating, queueing")):(this._debug("requesting negotiation from initiator"),this.emit("signal",{type:"renegotiate",renegotiate:!0})),this._isNegotiating=!0}destroy(err){this._destroy(err,()=>{})}_destroy(err,cb){this.destroyed||this.destroying||(this.destroying=!0,this._debug("destroying (error: %s)",err&&(err.message||err)),queueMicrotask(()=>{if(this.destroyed=!0,this.destroying=!1,this._debug("destroy (error: %s)",err&&(err.message||err)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this._connected=!1,this._pcReady=!1,this._channelReady=!1,this._remoteTracks=null,this._remoteStreams=null,this._senderMap=null,clearInterval(this._closingInterval),this._closingInterval=null,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._channel){try{this._channel.close()}catch(err){}this._channel.onmessage=null,this._channel.onopen=null,this._channel.onclose=null,this._channel.onerror=null}if(this._pc){try{this._pc.close()}catch(err){}this._pc.oniceconnectionstatechange=null,this._pc.onicegatheringstatechange=null,this._pc.onsignalingstatechange=null,this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.ondatachannel=null}this._pc=null,this._channel=null,err&&this.emit("error",err),this.emit("close"),cb()}))}_setupData(event){if(!event.channel)return this.destroy(errCode(new Error("Data channel event is missing `channel` property"),"ERR_DATA_CHANNEL"));this._channel=event.channel,this._channel.binaryType="arraybuffer","number"==typeof this._channel.bufferedAmountLowThreshold&&(this._channel.bufferedAmountLowThreshold=MAX_BUFFERED_AMOUNT),this.channelName=this._channel.label,this._channel.onmessage=event=>{this._onChannelMessage(event)},this._channel.onbufferedamountlow=()=>{this._onChannelBufferedAmountLow()},this._channel.onopen=()=>{this._onChannelOpen()},this._channel.onclose=()=>{this._onChannelClose()},this._channel.onerror=err=>{this.destroy(errCode(err,"ERR_DATA_CHANNEL"))};let isClosing=!1;this._closingInterval=setInterval(()=>{this._channel&&"closing"===this._channel.readyState?(isClosing&&this._onChannelClose(),isClosing=!0):isClosing=!1},5000)}_read(){}_write(chunk,encoding,cb){if(this.destroyed)return cb(errCode(new Error("cannot write after peer is destroyed"),"ERR_DATA_CHANNEL"));if(this._connected){try{this.send(chunk)}catch(err){return this.destroy(errCode(err,"ERR_DATA_CHANNEL"))}this._channel.bufferedAmount>MAX_BUFFERED_AMOUNT?(this._debug("start backpressure: bufferedAmount %d",this._channel.bufferedAmount),this._cb=cb):cb(null)}else this._debug("write before connect"),this._chunk=chunk,this._cb=cb}_onFinish(){if(!this.destroyed){const destroySoon=()=>{setTimeout(()=>this.destroy(),1e3)};this._connected?destroySoon():this.once("connect",destroySoon)}}_startIceCompleteTimeout(){this.destroyed||this._iceCompleteTimer||(this._debug("started iceComplete timeout"),this._iceCompleteTimer=setTimeout(()=>{this._iceComplete||(this._iceComplete=!0,this._debug("iceComplete timeout completed"),this.emit("iceTimeout"),this.emit("_iceComplete"))},this.iceCompleteTimeout))}_createOffer(){this.destroyed||this._pc.createOffer(this.offerOptions).then(offer=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(offer.sdp=filterTrickle(offer.sdp)),offer.sdp=this.sdpTransform(offer.sdp);const sendOffer=()=>{if(!this.destroyed){const signal=this._pc.localDescription||offer;this._debug("signal"),this.emit("signal",{type:signal.type,sdp:signal.sdp})}};this._pc.setLocalDescription(offer).then(()=>{this._debug("createOffer success");this.destroyed||(this.trickle||this._iceComplete?sendOffer():this.once("_iceComplete",sendOffer))}).catch(err=>{this.destroy(errCode(err,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(err=>{this.destroy(errCode(err,"ERR_CREATE_OFFER"))})}_requestMissingTransceivers(){this._pc.getTransceivers&&this._pc.getTransceivers().forEach(transceiver=>{transceiver.mid||!transceiver.sender.track||transceiver.requested||(transceiver.requested=!0,this.addTransceiver(transceiver.sender.track.kind))})}_createAnswer(){this.destroyed||this._pc.createAnswer(this.answerOptions).then(answer=>{if(this.destroyed)return;this.trickle||this.allowHalfTrickle||(answer.sdp=filterTrickle(answer.sdp)),answer.sdp=this.sdpTransform(answer.sdp);const sendAnswer=()=>{if(!this.destroyed){const signal=this._pc.localDescription||answer;this._debug("signal"),this.emit("signal",{type:signal.type,sdp:signal.sdp}),this.initiator||this._requestMissingTransceivers()}};this._pc.setLocalDescription(answer).then(()=>{this.destroyed||(this.trickle||this._iceComplete?sendAnswer():this.once("_iceComplete",sendAnswer))}).catch(err=>{this.destroy(errCode(err,"ERR_SET_LOCAL_DESCRIPTION"))})}).catch(err=>{this.destroy(errCode(err,"ERR_CREATE_ANSWER"))})}_onConnectionStateChange(){this.destroyed||"failed"===this._pc.connectionState&&this.destroy(errCode(new Error("Connection failed."),"ERR_CONNECTION_FAILURE"))}_onIceStateChange(){if(this.destroyed)return;const iceConnectionState=this._pc.iceConnectionState,iceGatheringState=this._pc.iceGatheringState;this._debug("iceStateChange (connection: %s) (gathering: %s)",iceConnectionState,iceGatheringState),this.emit("iceStateChange",iceConnectionState,iceGatheringState),("connected"===iceConnectionState||"completed"===iceConnectionState)&&(this._pcReady=!0,this._maybeReady()),"failed"===iceConnectionState&&this.destroy(errCode(new Error("Ice connection failed."),"ERR_ICE_CONNECTION_FAILURE")),"closed"===iceConnectionState&&this.destroy(errCode(new Error("Ice connection closed."),"ERR_ICE_CONNECTION_CLOSED"))}getStats(cb){const flattenValues=report=>("[object Array]"===Object.prototype.toString.call(report.values)&&report.values.forEach(value=>{Object.assign(report,value)}),report);0===this._pc.getStats.length||this._isReactNativeWebrtc?this._pc.getStats().then(res=>{const reports=[];res.forEach(report=>{reports.push(flattenValues(report))}),cb(null,reports)},err=>cb(err)):0<this._pc.getStats.length?this._pc.getStats(res=>{if(this.destroyed)return;const reports=[];res.result().forEach(result=>{const report={};result.names().forEach(name=>{report[name]=result.stat(name)}),report.id=result.id,report.type=result.type,report.timestamp=result.timestamp,reports.push(flattenValues(report))}),cb(null,reports)},err=>cb(err)):cb(null,[])}_maybeReady(){if(this._debug("maybeReady pc %s channel %s",this._pcReady,this._channelReady),this._connected||this._connecting||!this._pcReady||!this._channelReady)return;this._connecting=!0;const findCandidatePair=()=>{this.destroyed||this.getStats((err,items)=>{if(this.destroyed)return;err&&(items=[]);const remoteCandidates={},localCandidates={},candidatePairs={};let foundSelectedCandidatePair=!1;items.forEach(item=>{("remotecandidate"===item.type||"remote-candidate"===item.type)&&(remoteCandidates[item.id]=item),("localcandidate"===item.type||"local-candidate"===item.type)&&(localCandidates[item.id]=item),("candidatepair"===item.type||"candidate-pair"===item.type)&&(candidatePairs[item.id]=item)});const setSelectedCandidatePair=selectedCandidatePair=>{foundSelectedCandidatePair=!0;let local=localCandidates[selectedCandidatePair.localCandidateId];local&&(local.ip||local.address)?(this.localAddress=local.ip||local.address,this.localPort=+local.port):local&&local.ipAddress?(this.localAddress=local.ipAddress,this.localPort=+local.portNumber):"string"==typeof selectedCandidatePair.googLocalAddress&&(local=selectedCandidatePair.googLocalAddress.split(":"),this.localAddress=local[0],this.localPort=+local[1]),this.localAddress&&(this.localFamily=this.localAddress.includes(":")?"IPv6":"IPv4");let remote=remoteCandidates[selectedCandidatePair.remoteCandidateId];remote&&(remote.ip||remote.address)?(this.remoteAddress=remote.ip||remote.address,this.remotePort=+remote.port):remote&&remote.ipAddress?(this.remoteAddress=remote.ipAddress,this.remotePort=+remote.portNumber):"string"==typeof selectedCandidatePair.googRemoteAddress&&(remote=selectedCandidatePair.googRemoteAddress.split(":"),this.remoteAddress=remote[0],this.remotePort=+remote[1]),this.remoteAddress&&(this.remoteFamily=this.remoteAddress.includes(":")?"IPv6":"IPv4"),this._debug("connect local: %s:%s remote: %s:%s",this.localAddress,this.localPort,this.remoteAddress,this.remotePort)};if(items.forEach(item=>{"transport"===item.type&&item.selectedCandidatePairId&&setSelectedCandidatePair(candidatePairs[item.selectedCandidatePairId]),("googCandidatePair"===item.type&&"true"===item.googActiveConnection||("candidatepair"===item.type||"candidate-pair"===item.type)&&item.selected)&&setSelectedCandidatePair(item)}),!foundSelectedCandidatePair&&(!Object.keys(candidatePairs).length||Object.keys(localCandidates).length))return void setTimeout(findCandidatePair,100);if(this._connecting=!1,this._connected=!0,this._chunk){try{this.send(this._chunk)}catch(err){return this.destroy(errCode(err,"ERR_DATA_CHANNEL"))}this._chunk=null,this._debug("sent chunk from \"write before connect\"");const cb=this._cb;this._cb=null,cb(null)}"number"!=typeof this._channel.bufferedAmountLowThreshold&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")})};findCandidatePair()}_onInterval(){this._cb&&this._channel&&!(this._channel.bufferedAmount>MAX_BUFFERED_AMOUNT)&&this._onChannelBufferedAmountLow()}_onSignalingStateChange(){this.destroyed||("stable"===this._pc.signalingState&&(this._isNegotiating=!1,this._debug("flushing sender queue",this._sendersAwaitingStable),this._sendersAwaitingStable.forEach(sender=>{this._pc.removeTrack(sender),this._queuedNegotiation=!0}),this._sendersAwaitingStable=[],this._queuedNegotiation?(this._debug("flushing negotiation queue"),this._queuedNegotiation=!1,this._needsNegotiation()):(this._debug("negotiated"),this.emit("negotiated"))),this._debug("signalingStateChange %s",this._pc.signalingState),this.emit("signalingStateChange",this._pc.signalingState))}_onIceCandidate(event){this.destroyed||(event.candidate&&this.trickle?this.emit("signal",{type:"candidate",candidate:{candidate:event.candidate.candidate,sdpMLineIndex:event.candidate.sdpMLineIndex,sdpMid:event.candidate.sdpMid}}):!event.candidate&&!this._iceComplete&&(this._iceComplete=!0,this.emit("_iceComplete")),event.candidate&&this._startIceCompleteTimeout())}_onChannelMessage(event){if(this.destroyed)return;let data=event.data;data instanceof ArrayBuffer&&(data=Buffer.from(data)),this.push(data)}_onChannelBufferedAmountLow(){if(!this.destroyed&&this._cb){this._debug("ending backpressure: bufferedAmount %d",this._channel.bufferedAmount);const cb=this._cb;this._cb=null,cb(null)}}_onChannelOpen(){this._connected||this.destroyed||(this._debug("on channel open"),this._channelReady=!0,this._maybeReady())}_onChannelClose(){this.destroyed||(this._debug("on channel close"),this.destroy())}_onTrack(event){this.destroyed||event.streams.forEach(eventStream=>{this._debug("on track"),this.emit("track",event.track,eventStream),this._remoteTracks.push({track:event.track,stream:eventStream});this._remoteStreams.some(remoteStream=>remoteStream.id===eventStream.id)||(this._remoteStreams.push(eventStream),queueMicrotask(()=>{this._debug("on stream"),this.emit("stream",eventStream)}))})}_debug(){const args=[].slice.call(arguments);args[0]="["+this._id+"] "+args[0],debug.apply(null,args)}}Peer.WEBRTC_SUPPORT=!!getBrowserRTC(),Peer.config={iceServers:[{urls:["stun:stun.l.google.com:19302","stun:global.stun.twilio.com:3478"]}],sdpSemantics:"unified-plan"},Peer.channelConfig={},module.exports=Peer},{buffer:24,debug:33,"err-code":36,"get-browser-rtc":38,"queue-microtask":68,randombytes:70,"readable-stream":86}],96:[function(require,module){function sha1sync(buf){return rusha.digest(buf)}function sha1(buf,cb){return subtle?void("string"==typeof buf&&(buf=uint8array(buf)),subtle.digest({name:"sha-1"},buf).then(function(result){cb(hex(new Uint8Array(result)))},function(){cb(sha1sync(buf))})):void("undefined"==typeof window?queueMicrotask(()=>cb(sha1sync(buf))):rushaWorkerSha1(buf,function(err,hash){return err?void cb(sha1sync(buf)):void cb(hash)}))}function uint8array(s){for(var l=s.length,array=new Uint8Array(l),i=0;i<l;i++)array[i]=s.charCodeAt(i);return array}function hex(buf){for(var l=buf.length,chars=[],i=0,bite;i<l;i++)bite=buf[i],chars.push((bite>>>4).toString(16)),chars.push((15&bite).toString(16));return chars.join("")}var Rusha=require("rusha"),rushaWorkerSha1=require("./rusha-worker-sha1"),rusha=new Rusha,scope="undefined"==typeof window?self:window,crypto=scope.crypto||scope.msCrypto||{},subtle=crypto.subtle||crypto.webkitSubtle;try{subtle.digest({name:"sha-1"},new Uint8Array).catch(function(){subtle=!1})}catch(err){subtle=!1}module.exports=sha1,module.exports.sync=sha1sync},{"./rusha-worker-sha1":97,rusha:91}],97:[function(require,module){function init(){worker=Rusha.createWorker(),nextTaskId=1,cbs={},worker.onmessage=function(e){var taskId=e.data.id,cb=cbs[taskId];delete cbs[taskId],null==e.data.error?cb(null,e.data.hash):cb(new Error("Rusha worker error: "+e.data.error))}}function sha1(buf,cb){worker||init(),cbs[nextTaskId]=cb,worker.postMessage({id:nextTaskId,data:buf}),nextTaskId+=1}var Rusha=require("rusha"),worker,nextTaskId,cbs;module.exports=sha1},{rusha:91}],98:[function(require,module){(function(Buffer){(function(){const debug=require("debug")("simple-websocket"),randombytes=require("randombytes"),stream=require("readable-stream"),queueMicrotask=require("queue-microtask"),ws=require("ws"),_WebSocket="function"==typeof ws?ws:WebSocket,MAX_BUFFERED_AMOUNT=65536;class Socket extends stream.Duplex{constructor(opts={}){if("string"==typeof opts&&(opts={url:opts}),opts=Object.assign({allowHalfOpen:!1},opts),super(opts),null==opts.url&&null==opts.socket)throw new Error("Missing required `url` or `socket` option");if(null!=opts.url&&null!=opts.socket)throw new Error("Must specify either `url` or `socket` option, not both");if(this._id=randombytes(4).toString("hex").slice(0,7),this._debug("new websocket: %o",opts),this.connected=!1,this.destroyed=!1,this._chunk=null,this._cb=null,this._interval=null,opts.socket)this.url=opts.socket.url,this._ws=opts.socket,this.connected=opts.socket.readyState===_WebSocket.OPEN;else{this.url=opts.url;try{this._ws="function"==typeof ws?new _WebSocket(opts.url,opts):new _WebSocket(opts.url)}catch(err){return void queueMicrotask(()=>this.destroy(err))}}this._ws.binaryType="arraybuffer",this._ws.onopen=()=>{this._onOpen()},this._ws.onmessage=event=>{this._onMessage(event)},this._ws.onclose=()=>{this._onClose()},this._ws.onerror=()=>{this.destroy(new Error("connection error to "+this.url))},this._onFinishBound=()=>{this._onFinish()},this.once("finish",this._onFinishBound)}send(chunk){this._ws.send(chunk)}destroy(err){this._destroy(err,()=>{})}_destroy(err,cb){if(!this.destroyed){if(this._debug("destroy (error: %s)",err&&(err.message||err)),this.readable=this.writable=!1,this._readableState.ended||this.push(null),this._writableState.finished||this.end(),this.connected=!1,this.destroyed=!0,clearInterval(this._interval),this._interval=null,this._chunk=null,this._cb=null,this._onFinishBound&&this.removeListener("finish",this._onFinishBound),this._onFinishBound=null,this._ws){const ws=this._ws,onClose=()=>{ws.onclose=null};if(ws.readyState===_WebSocket.CLOSED)onClose();else try{ws.onclose=onClose,ws.close()}catch(err){onClose()}ws.onopen=null,ws.onmessage=null,ws.onerror=()=>{}}if(this._ws=null,err){if("undefined"!=typeof DOMException&&err instanceof DOMException){const code=err.code;err=new Error(err.message),err.code=code}this.emit("error",err)}this.emit("close"),cb()}}_read(){}_write(chunk,encoding,cb){if(this.destroyed)return cb(new Error("cannot write after socket is destroyed"));if(this.connected){try{this.send(chunk)}catch(err){return this.destroy(err)}"function"!=typeof ws&&this._ws.bufferedAmount>MAX_BUFFERED_AMOUNT?(this._debug("start backpressure: bufferedAmount %d",this._ws.bufferedAmount),this._cb=cb):cb(null)}else this._debug("write before connect"),this._chunk=chunk,this._cb=cb}_onFinish(){if(!this.destroyed){const destroySoon=()=>{setTimeout(()=>this.destroy(),1e3)};this.connected?destroySoon():this.once("connect",destroySoon)}}_onMessage(event){if(this.destroyed)return;let data=event.data;data instanceof ArrayBuffer&&(data=Buffer.from(data)),this.push(data)}_onOpen(){if(!(this.connected||this.destroyed)){if(this.connected=!0,this._chunk){try{this.send(this._chunk)}catch(err){return this.destroy(err)}this._chunk=null,this._debug("sent chunk from \"write before connect\"");const cb=this._cb;this._cb=null,cb(null)}"function"!=typeof ws&&(this._interval=setInterval(()=>this._onInterval(),150),this._interval.unref&&this._interval.unref()),this._debug("connect"),this.emit("connect")}}_onInterval(){if(this._cb&&this._ws&&!(this._ws.bufferedAmount>MAX_BUFFERED_AMOUNT)){this._debug("ending backpressure: bufferedAmount %d",this._ws.bufferedAmount);const cb=this._cb;this._cb=null,cb(null)}}_onClose(){this.destroyed||(this._debug("on close"),this.destroy())}_debug(){const args=[].slice.call(arguments);args[0]="["+this._id+"] "+args[0],debug.apply(null,args)}}Socket.WEBSOCKET_SUPPORT=!!_WebSocket,module.exports=Socket}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24,debug:33,"queue-microtask":68,randombytes:70,"readable-stream":86,ws:22}],99:[function(require,module){var tick=1,maxTick=65535,resolution=4,inc=function(){tick=tick+1&maxTick},timer;module.exports=function(seconds){timer||(timer=setInterval(inc,0|1e3/resolution),timer.unref&&timer.unref());var size=resolution*(seconds||5),buffer=[0],pointer=1,last=tick-1&maxTick;return function(delta){var dist=tick-last&maxTick;for(dist>size&&(dist=size),last=tick;dist--;)pointer===size&&(pointer=0),buffer[pointer]=buffer[0===pointer?size-1:pointer-1],pointer++;delta&&(buffer[pointer-1]+=delta);var top=buffer[pointer-1],btm=buffer.length<size?0:buffer[pointer===size?0:pointer];return buffer.length<resolution?top:(top-btm)*resolution/buffer.length}}},{}],100:[function(require,module,exports){(function(global){(function(){var ClientRequest=require("./lib/request"),response=require("./lib/response"),extend=require("xtend"),statusCodes=require("builtin-status-codes"),url=require("url"),http=exports;http.request=function(opts,cb){opts="string"==typeof opts?url.parse(opts):extend(opts);var defaultProtocol=-1===global.location.protocol.search(/^https?:$/)?"http:":"",protocol=opts.protocol||defaultProtocol,host=opts.hostname||opts.host,port=opts.port,path=opts.path||"/";host&&-1!==host.indexOf(":")&&(host="["+host+"]"),opts.url=(host?protocol+"//"+host:"")+(port?":"+port:"")+path,opts.method=(opts.method||"GET").toUpperCase(),opts.headers=opts.headers||{};var req=new ClientRequest(opts);return cb&&req.on("response",cb),req},http.get=function(opts,cb){var req=http.request(opts,cb);return req.end(),req},http.ClientRequest=ClientRequest,http.IncomingMessage=response.IncomingMessage,http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.globalAgent=new http.Agent,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{"./lib/request":102,"./lib/response":103,"builtin-status-codes":30,url:116,xtend:123}],101:[function(require,module,exports){(function(global){(function(){function getXHR(){if(xhr!==void 0)return xhr;if(global.XMLHttpRequest){xhr=new global.XMLHttpRequest;try{xhr.open("GET",global.XDomainRequest?"/":"https://example.com")}catch(e){xhr=null}}else xhr=null;return xhr}function checkTypeSupport(type){var xhr=getXHR();if(!xhr)return!1;try{return xhr.responseType=type,xhr.responseType===type}catch(e){}return!1}function isFunction(value){return"function"==typeof value}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream),exports.writableStream=isFunction(global.WritableStream),exports.abortController=isFunction(global.AbortController);var xhr;exports.arraybuffer=exports.fetch||checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=exports.fetch||!!getXHR()&&isFunction(getXHR().overrideMimeType),xhr=null}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],102:[function(require,module){(function(process,global,Buffer){(function(){function decideMode(preferBinary,useFetch){return capability.fetch&&useFetch?"fetch":capability.mozchunkedarraybuffer?"moz-chunked-arraybuffer":capability.msstream?"ms-stream":capability.arraybuffer&&preferBinary?"arraybuffer":"text"}function statusValid(xhr){try{var status=xhr.status;return null!==status&&0!==status}catch(e){return!1}}var capability=require("./capability"),inherits=require("inherits"),response=require("./response"),stream=require("readable-stream"),IncomingMessage=response.IncomingMessage,rStates=response.readyStates,ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self),self._opts=opts,self._body=[],self._headers={},opts.auth&&self.setHeader("Authorization","Basic "+Buffer.from(opts.auth).toString("base64")),Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name])});var useFetch=!0,preferBinary;if("disable-fetch"===opts.mode||"requestTimeout"in opts&&!capability.abortController)useFetch=!1,preferBinary=!0;else if("prefer-streaming"===opts.mode)preferBinary=!1;else if("allow-wrong-content-type"===opts.mode)preferBinary=!capability.overrideMimeType;else if(!opts.mode||"default"===opts.mode||"prefer-fast"===opts.mode)preferBinary=!0;else throw new Error("Invalid value for opts.mode");self._mode=decideMode(preferBinary,useFetch),self._fetchTimer=null,self.on("finish",function(){self._onFinish()})};inherits(ClientRequest,stream.Writable),ClientRequest.prototype.setHeader=function(name,value){var self=this,lowerName=name.toLowerCase();-1!==unsafeHeaders.indexOf(lowerName)||(self._headers[lowerName]={name:name,value:value})},ClientRequest.prototype.getHeader=function(name){var header=this._headers[name.toLowerCase()];return header?header.value:null},ClientRequest.prototype.removeHeader=function(name){var self=this;delete self._headers[name.toLowerCase()]},ClientRequest.prototype._onFinish=function(){var self=this;if(!self._destroyed){var opts=self._opts,headersObj=self._headers,body=null;"GET"!==opts.method&&"HEAD"!==opts.method&&(body=new Blob(self._body,{type:(headersObj["content-type"]||{}).value||""}));var headersList=[];if(Object.keys(headersObj).forEach(function(keyName){var name=headersObj[keyName].name,value=headersObj[keyName].value;Array.isArray(value)?value.forEach(function(v){headersList.push([name,v])}):headersList.push([name,value])}),"fetch"===self._mode){var signal=null;if(capability.abortController){var controller=new AbortController;signal=controller.signal,self._fetchAbortController=controller,"requestTimeout"in opts&&0!==opts.requestTimeout&&(self._fetchTimer=global.setTimeout(function(){self.emit("requestTimeout"),self._fetchAbortController&&self._fetchAbortController.abort()},opts.requestTimeout))}global.fetch(self._opts.url,{method:self._opts.method,headers:headersList,body:body||void 0,mode:"cors",credentials:opts.withCredentials?"include":"same-origin",signal:signal}).then(function(response){self._fetchResponse=response,self._connect()},function(reason){global.clearTimeout(self._fetchTimer),self._destroyed||self.emit("error",reason)})}else{var xhr=self._xhr=new global.XMLHttpRequest;try{xhr.open(self._opts.method,self._opts.url,!0)}catch(err){return void process.nextTick(function(){self.emit("error",err)})}"responseType"in xhr&&(xhr.responseType=self._mode),"withCredentials"in xhr&&(xhr.withCredentials=!!opts.withCredentials),"text"===self._mode&&"overrideMimeType"in xhr&&xhr.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in opts&&(xhr.timeout=opts.requestTimeout,xhr.ontimeout=function(){self.emit("requestTimeout")}),headersList.forEach(function(header){xhr.setRequestHeader(header[0],header[1])}),self._response=null,xhr.onreadystatechange=function(){switch(xhr.readyState){case rStates.LOADING:case rStates.DONE:self._onXHRProgress();}},"moz-chunked-arraybuffer"===self._mode&&(xhr.onprogress=function(){self._onXHRProgress()}),xhr.onerror=function(){self._destroyed||self.emit("error",new Error("XHR error"))};try{xhr.send(body)}catch(err){return void process.nextTick(function(){self.emit("error",err)})}}}},ClientRequest.prototype._onXHRProgress=function(){var self=this;!statusValid(self._xhr)||self._destroyed||(!self._response&&self._connect(),self._response._onXHRProgress())},ClientRequest.prototype._connect=function(){var self=this;self._destroyed||(self._response=new IncomingMessage(self._xhr,self._fetchResponse,self._mode,self._fetchTimer),self._response.on("error",function(err){self.emit("error",err)}),self.emit("response",self._response))},ClientRequest.prototype._write=function(chunk,encoding,cb){var self=this;self._body.push(chunk),cb()},ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(){var self=this;self._destroyed=!0,global.clearTimeout(self._fetchTimer),self._response&&(self._response._destroyed=!0),self._xhr?self._xhr.abort():self._fetchAbortController&&self._fetchAbortController.abort()},ClientRequest.prototype.end=function(data,encoding,cb){var self=this;"function"==typeof data&&(cb=data,data=void 0),stream.Writable.prototype.end.call(self,data,encoding,cb)},ClientRequest.prototype.flushHeaders=function(){},ClientRequest.prototype.setTimeout=function(){},ClientRequest.prototype.setNoDelay=function(){},ClientRequest.prototype.setSocketKeepAlive=function(){};var unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,require("buffer").Buffer)},{"./capability":101,"./response":103,_process:62,buffer:24,inherits:42,"readable-stream":86}],103:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require("./capability"),inherits=require("inherits"),stream=require("readable-stream"),rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},IncomingMessage=exports.IncomingMessage=function(xhr,response,mode,fetchTimer){var self=this;if(stream.Readable.call(self),self._mode=mode,self.headers={},self.rawHeaders=[],self.trailers={},self.rawTrailers=[],self.on("end",function(){process.nextTick(function(){self.emit("close")})}),"fetch"===mode){function read(){reader.read().then(function(result){return self._destroyed?void 0:result.done?(global.clearTimeout(fetchTimer),void self.push(null)):void(self.push(Buffer.from(result.value)),read())}).catch(function(err){global.clearTimeout(fetchTimer),self._destroyed||self.emit("error",err)})}if(self._fetchResponse=response,self.url=response.url,self.statusCode=response.status,self.statusMessage=response.statusText,response.headers.forEach(function(header,key){self.headers[key.toLowerCase()]=header,self.rawHeaders.push(key,header)}),capability.writableStream){var writable=new WritableStream({write:function(chunk){return new Promise(function(resolve,reject){self._destroyed?reject():self.push(Buffer.from(chunk))?resolve():self._resumeFetch=resolve})},close:function(){global.clearTimeout(fetchTimer),self._destroyed||self.push(null)},abort:function(err){self._destroyed||self.emit("error",err)}});try{return void response.body.pipeTo(writable).catch(function(err){global.clearTimeout(fetchTimer),self._destroyed||self.emit("error",err)})}catch(e){}}var reader=response.body.getReader();read()}else{self._xhr=xhr,self._pos=0,self.url=xhr.responseURL,self.statusCode=xhr.status,self.statusMessage=xhr.statusText;var headers=xhr.getAllResponseHeaders().split(/\r?\n/);if(headers.forEach(function(header){var matches=header.match(/^([^:]+):\s*(.*)/);if(matches){var key=matches[1].toLowerCase();"set-cookie"===key?(void 0===self.headers[key]&&(self.headers[key]=[]),self.headers[key].push(matches[2])):void 0===self.headers[key]?self.headers[key]=matches[2]:self.headers[key]+=", "+matches[2],self.rawHeaders.push(matches[1],matches[2])}}),self._charset="x-user-defined",!capability.overrideMimeType){var mimeType=self.rawHeaders["mime-type"];if(mimeType){var charsetMatch=mimeType.match(/;\s*charset=([^;])(;|$)/);charsetMatch&&(self._charset=charsetMatch[1].toLowerCase())}self._charset||(self._charset="utf-8")}}};inherits(IncomingMessage,stream.Readable),IncomingMessage.prototype._read=function(){var self=this,resolve=self._resumeFetch;resolve&&(self._resumeFetch=null,resolve())},IncomingMessage.prototype._onXHRProgress=function(){var self=this,xhr=self._xhr,response=null;switch(self._mode){case"text":if(response=xhr.responseText,response.length>self._pos){var newData=response.substr(self._pos);if("x-user-defined"===self._charset){for(var buffer=Buffer.alloc(newData.length),i=0;i<newData.length;i++)buffer[i]=255&newData.charCodeAt(i);self.push(buffer)}else self.push(newData,self._charset);self._pos=response.length}break;case"arraybuffer":if(xhr.readyState!==rStates.DONE||!xhr.response)break;response=xhr.response,self.push(Buffer.from(new Uint8Array(response)));break;case"moz-chunked-arraybuffer":if(response=xhr.response,xhr.readyState!==rStates.LOADING||!response)break;self.push(Buffer.from(new Uint8Array(response)));break;case"ms-stream":if(response=xhr.response,xhr.readyState!==rStates.LOADING)break;var reader=new global.MSStreamReader;reader.onprogress=function(){reader.result.byteLength>self._pos&&(self.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos)))),self._pos=reader.result.byteLength)},reader.onload=function(){self.push(null)},reader.readAsArrayBuffer(response);}self._xhr.readyState===rStates.DONE&&"ms-stream"!==self._mode&&self.push(null)}}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,require("buffer").Buffer)},{"./capability":101,_process:62,buffer:24,inherits:42,"readable-stream":86}],104:[function(require,module){module.exports=async function(stream,mimeType){const blob=await getBlob(stream,mimeType),url=URL.createObjectURL(blob);return url};const getBlob=require("stream-to-blob")},{"stream-to-blob":105}],105:[function(require,module){/*! stream-to-blob. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(stream,mimeType){if(null!=mimeType&&"string"!=typeof mimeType)throw new Error("Invalid mimetype, expected string.");return new Promise((resolve,reject)=>{const chunks=[];stream.on("data",chunk=>chunks.push(chunk)).once("end",()=>{const blob=null==mimeType?new Blob(chunks):new Blob(chunks,{type:mimeType});resolve(blob)}).once("error",reject)})}},{}],106:[function(require,module){(function(Buffer){(function(){/*! stream-with-known-length-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var once=require("once");module.exports=function(stream,length,cb){cb=once(cb);var buf=Buffer.alloc(length),offset=0;stream.on("data",function(chunk){chunk.copy(buf,offset),offset+=chunk.length}).on("end",function(){cb(null,buf)}).on("error",cb)}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24,once:59}],107:[function(require,module,exports){'use strict';function _normalizeEncoding(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0;}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if("string"!=typeof nenc&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd);}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(nb)}function utf8CheckByte(byte){if(127>=byte)return 0;return 6==byte>>5?2:14==byte>>4?3:30==byte>>3?4:2==byte>>6?-1:-2}function utf8CheckIncomplete(self,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);return 0<=nb?(0<nb&&(self.lastNeed=nb-1),nb):--j<i||-2===nb?0:(nb=utf8CheckByte(buf[j]),0<=nb)?(0<nb&&(self.lastNeed=nb-2),nb):--j<i||-2===nb?0:(nb=utf8CheckByte(buf[j]),0<=nb?(0<nb&&(2===nb?nb=0:self.lastNeed=nb-3),nb):0)}function utf8CheckExtraBytes(self,buf){if(128!=(192&buf[0]))return self.lastNeed=0,"\uFFFD";if(1<self.lastNeed&&1<buf.length){if(128!=(192&buf[1]))return self.lastNeed=1,"\uFFFD";if(2<self.lastNeed&&2<buf.length&&128!=(192&buf[2]))return self.lastNeed=2,"\uFFFD"}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf,p);return void 0===r?this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length):r}function utf16Text(buf,i){if(0==(buf.length-i)%2){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(55296<=c&&56319>=c)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0==n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1==n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.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;}};exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),void 0===r)return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""},StringDecoder.prototype.end=function(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"\uFFFD":r},StringDecoder.prototype.text=function(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)},StringDecoder.prototype.fillLast=function(buf){return this.lastNeed<=buf.length?(buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length)}},{"safe-buffer":92}],108:[function(require,module,exports){var base32=require("./thirty-two");exports.encode=base32.encode,exports.decode=base32.decode},{"./thirty-two":109}],109:[function(require,module,exports){(function(Buffer){(function(){'use strict';function quintetCount(buff){var quintets=_Mathfloor(buff.length/5);return 0==buff.length%5?quintets:quintets+1}var byteTable=[255,255,26,27,28,29,30,31,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255];exports.encode=function(plain){Buffer.isBuffer(plain)||(plain=new Buffer(plain));for(var i=0,j=0,shiftIndex=0,digit=0,encoded=new Buffer(8*quintetCount(plain));i<plain.length;){var current=plain[i];3<shiftIndex?(digit=current&255>>shiftIndex,shiftIndex=(shiftIndex+5)%8,digit=digit<<shiftIndex|(i+1<plain.length?plain[i+1]:0)>>8-shiftIndex,i++):(digit=31¤t>>8-(shiftIndex+5),shiftIndex=(shiftIndex+5)%8,0===shiftIndex&&i++),encoded[j]="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".charCodeAt(digit),j++}for(i=j;i<encoded.length;i++)encoded[i]=61;return encoded},exports.decode=function(encoded){var shiftIndex=0,plainDigit=0,plainPos=0,plainChar;Buffer.isBuffer(encoded)||(encoded=new Buffer(encoded));for(var decoded=new Buffer(_Mathceil(5*encoded.length/8)),i=0;i<encoded.length&&!(61===encoded[i]);i++){var encodedByte=encoded[i]-48;if(encodedByte<byteTable.length)plainDigit=byteTable[encodedByte],3>=shiftIndex?(shiftIndex=(shiftIndex+5)%8,0===shiftIndex?(plainChar|=plainDigit,decoded[plainPos]=plainChar,plainPos++,plainChar=0):plainChar|=255&plainDigit<<8-shiftIndex):(shiftIndex=(shiftIndex+5)%8,plainChar|=255&plainDigit>>>shiftIndex,decoded[plainPos]=plainChar,plainPos++,plainChar=255&plainDigit<<8-shiftIndex);else throw new Error("Invalid input - it is not base32 encoded string")}return decoded.slice(0,plainPos)}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24}],110:[function(require,module){var Buffer=require("buffer").Buffer;module.exports=function(buf){if(buf instanceof Uint8Array){if(0===buf.byteOffset&&buf.byteLength===buf.buffer.byteLength)return buf.buffer;if("function"==typeof buf.buffer.slice)return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength)}if(Buffer.isBuffer(buf)){for(var arrayCopy=new Uint8Array(buf.length),len=buf.length,i=0;i<len;i++)arrayCopy[i]=buf[i];return arrayCopy.buffer}throw new Error("Argument must be a Buffer")}},{buffer:24}],111:[function(require,module){(function(process){(function(){/*! torrent-discovery. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */const debug=require("debug")("torrent-discovery"),DHT=require("bittorrent-dht/client"),EventEmitter=require("events").EventEmitter,parallel=require("run-parallel"),Tracker=require("bittorrent-tracker/client"),LSD=require("bittorrent-lsd");module.exports=class Discovery extends EventEmitter{constructor(opts){if(super(),!opts.peerId)throw new Error("Option `peerId` is required");if(!opts.infoHash)throw new Error("Option `infoHash` is required");if(!process.browser&&!opts.port)throw new Error("Option `port` is required");this.peerId="string"==typeof opts.peerId?opts.peerId:opts.peerId.toString("hex"),this.infoHash="string"==typeof opts.infoHash?opts.infoHash.toLowerCase():opts.infoHash.toString("hex"),this._port=opts.port,this._userAgent=opts.userAgent,this.destroyed=!1,this._announce=opts.announce||[],this._intervalMs=opts.intervalMs||900000,this._trackerOpts=null,this._dhtAnnouncing=!1,this._dhtTimeout=!1,this._internalDHT=!1,this._onWarning=err=>{this.emit("warning",err)},this._onError=err=>{this.emit("error",err)},this._onDHTPeer=(peer,infoHash)=>{infoHash.toString("hex")!==this.infoHash||this.emit("peer",`${peer.host}:${peer.port}`,"dht")},this._onTrackerPeer=peer=>{this.emit("peer",peer,"tracker")},this._onTrackerAnnounce=()=>{this.emit("trackerAnnounce")},this._onLSDPeer=peer=>{this.emit("peer",peer,"lsd")};const createDHT=(port,opts)=>{const dht=new DHT(opts);return dht.on("warning",this._onWarning),dht.on("error",this._onError),dht.listen(port),this._internalDHT=!0,dht};!1===opts.tracker?this.tracker=null:opts.tracker&&"object"==typeof opts.tracker?(this._trackerOpts=Object.assign({},opts.tracker),this.tracker=this._createTracker()):this.tracker=this._createTracker(),this.dht=!1===opts.dht||"function"!=typeof DHT?null:opts.dht&&"function"==typeof opts.dht.addNode?opts.dht:opts.dht&&"object"==typeof opts.dht?createDHT(opts.dhtPort,opts.dht):createDHT(opts.dhtPort),this.dht&&(this.dht.on("peer",this._onDHTPeer),this._dhtAnnounce()),this.lsd=!1===opts.lsd||"function"!=typeof LSD?null:this._createLSD()}updatePort(port){port===this._port||(this._port=port,this.dht&&this._dhtAnnounce(),this.tracker&&(this.tracker.stop(),this.tracker.destroy(()=>{this.tracker=this._createTracker()})))}complete(opts){this.tracker&&this.tracker.complete(opts)}destroy(cb){if(!this.destroyed){this.destroyed=!0,clearTimeout(this._dhtTimeout);const tasks=[];this.tracker&&(this.tracker.stop(),this.tracker.removeListener("warning",this._onWarning),this.tracker.removeListener("error",this._onError),this.tracker.removeListener("peer",this._onTrackerPeer),this.tracker.removeListener("update",this._onTrackerAnnounce),tasks.push(cb=>{this.tracker.destroy(cb)})),this.dht&&this.dht.removeListener("peer",this._onDHTPeer),this._internalDHT&&(this.dht.removeListener("warning",this._onWarning),this.dht.removeListener("error",this._onError),tasks.push(cb=>{this.dht.destroy(cb)})),this.lsd&&(this.lsd.removeListener("warning",this._onWarning),this.lsd.removeListener("error",this._onError),this.lsd.removeListener("peer",this._onLSDPeer),tasks.push(cb=>{this.lsd.destroy(cb)})),parallel(tasks,cb),this.dht=null,this.tracker=null,this.lsd=null,this._announce=null}}_createTracker(){const opts=Object.assign({},this._trackerOpts,{infoHash:this.infoHash,announce:this._announce,peerId:this.peerId,port:this._port,userAgent:this._userAgent}),tracker=new Tracker(opts);return tracker.on("warning",this._onWarning),tracker.on("error",this._onError),tracker.on("peer",this._onTrackerPeer),tracker.on("update",this._onTrackerAnnounce),tracker.setInterval(this._intervalMs),tracker.start(),tracker}_dhtAnnounce(){this._dhtAnnouncing||(debug("dht announce"),this._dhtAnnouncing=!0,clearTimeout(this._dhtTimeout),this.dht.announce(this.infoHash,this._port,err=>{this._dhtAnnouncing=!1,debug("dht announce complete"),err&&this.emit("warning",err),this.emit("dhtAnnounce"),this.destroyed||(this._dhtTimeout=setTimeout(()=>{this._dhtAnnounce()},this._intervalMs+_Mathfloor(Math.random()*this._intervalMs/5)),this._dhtTimeout.unref&&this._dhtTimeout.unref())}))}_createLSD(){const opts=Object.assign({},{infoHash:this.infoHash,peerId:this.peerId,port:this._port}),lsd=new LSD(opts);return lsd.on("warning",this._onWarning),lsd.on("error",this._onError),lsd.on("peer",this._onLSDPeer),lsd.start(),lsd}}}).call(this)}).call(this,require("_process"))},{_process:62,"bittorrent-dht/client":22,"bittorrent-lsd":22,"bittorrent-tracker/client":16,debug:33,events:25,"run-parallel":90}],112:[function(require,module){(function(Buffer){(function(){const BLOCK_LENGTH=16384;class Piece{constructor(length){this.length=length,this.missing=length,this.sources=null,this._chunks=_Mathceil(length/BLOCK_LENGTH),this._remainder=length%BLOCK_LENGTH||BLOCK_LENGTH,this._buffered=0,this._buffer=null,this._cancellations=null,this._reservations=0,this._flushed=!1}chunkLength(i){return i===this._chunks-1?this._remainder:BLOCK_LENGTH}chunkLengthRemaining(i){return this.length-i*BLOCK_LENGTH}chunkOffset(i){return i*BLOCK_LENGTH}reserve(){return this.init()?this._cancellations.length?this._cancellations.pop():this._reservations<this._chunks?this._reservations++:-1:-1}reserveRemaining(){if(!this.init())return-1;if(this._reservations<this._chunks){const min=this._reservations;return this._reservations=this._chunks,min}return-1}cancel(i){this.init()&&this._cancellations.push(i)}cancelRemaining(i){this.init()&&(this._reservations=i)}get(i){return this.init()?this._buffer[i]:null}set(i,data,source){if(!this.init())return!1;const len=data.length,blocks=_Mathceil(len/BLOCK_LENGTH);for(let j=0;j<blocks;j++)if(!this._buffer[i+j]){const offset=j*BLOCK_LENGTH,splitData=data.slice(offset,offset+BLOCK_LENGTH);this._buffered++,this._buffer[i+j]=splitData,this.missing-=splitData.length,this.sources.includes(source)||this.sources.push(source)}return this._buffered===this._chunks}flush(){if(!this._buffer||this._chunks!==this._buffered)return null;const buffer=Buffer.concat(this._buffer,this.length);return this._buffer=null,this._cancellations=null,this.sources=null,this._flushed=!0,buffer}init(){return!this._flushed&&(!!this._buffer||(this._buffer=Array(this._chunks),this._cancellations=[],this.sources=[],!0))}}Object.defineProperty(Piece,"BLOCK_LENGTH",{value:16384}),module.exports=Piece}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24}],113:[function(require,module){(function(Buffer){(function(){var isTypedArray=require("is-typedarray").strict;module.exports=function(arr){if(isTypedArray(arr)){var buf=Buffer.from(arr.buffer);return arr.byteLength!==arr.buffer.byteLength&&(buf=buf.slice(arr.byteOffset,arr.byteOffset+arr.byteLength)),buf}return Buffer.from(arr)}}).call(this)}).call(this,require("buffer").Buffer)},{buffer:24,"is-typedarray":45}],114:[function(require,module,exports){var bufferAlloc=require("buffer-alloc"),UINT_32_MAX=_Mathpow(2,32);exports.encodingLength=function(){return 8},exports.encode=function(num,buf,offset){buf||(buf=bufferAlloc(8)),offset||(offset=0);var top=_Mathfloor(num/UINT_32_MAX);return buf.writeUInt32BE(top,offset),buf.writeUInt32BE(num-top*UINT_32_MAX,offset+4),buf},exports.decode=function(buf,offset){offset||(offset=0);var top=buf.readUInt32BE(offset),rem=buf.readUInt32BE(offset+4);return top*UINT_32_MAX+rem},exports.encode.bytes=8,exports.decode.bytes=8},{"buffer-alloc":28}],115:[function(require,module){module.exports=function(arr,i){if(!(i>=arr.length||0>i)){var last=arr.pop();if(i<arr.length){var tmp=arr[i];return arr[i]=last,tmp}return last}}},{}],116:[function(require,module,exports){'use strict';function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}var punycode=require("punycode"),util=require("./util");exports.parse=urlParse,exports.resolve=function(source,relative){return urlParse(source,!1,!0).resolve(relative)},exports.resolveObject=function(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative},exports.format=function(obj){return util.isString(obj)&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)},exports.Url=Url;var unwise=["{","}","|","\\","^","`"].concat(["<",">","\"","`"," ","\r","\n","\t"]),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=-1!==queryIndex&&queryIndex<url.indexOf("#")?"?":"#",uSplit=url.split(splitter);uSplit[0]=uSplit[0].replace(/\\/g,"/"),url=uSplit.join(splitter);var rest=url;if(rest=rest.trim(),!slashesDenoteHost&&1===url.split("#").length){var simplePath=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/.exec(rest);if(simplePath)return this.path=rest,this.href=rest,this.pathname=simplePath[1],simplePath[2]?(this.search=simplePath[2],this.query=parseQueryString?querystring.parse(this.search.substr(1)):this.search.substr(1)):parseQueryString&&(this.search="",this.query={}),this}var proto=/^([a-z0-9.+-]+:)/i.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto,rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes="//"===rest.substr(0,2);slashes&&!(proto&&hostlessProtocol[proto])&&(rest=rest.substr(2),this.slashes=!0)}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){for(var hostEnd=-1,i=0,hec;i<hostEndingChars.length;i++)hec=rest.indexOf(hostEndingChars[i]),-1!==hec&&(-1===hostEnd||hec<hostEnd)&&(hostEnd=hec);var auth,atSign;atSign=-1===hostEnd?rest.lastIndexOf("@"):rest.lastIndexOf("@",hostEnd),-1!==atSign&&(auth=rest.slice(0,atSign),rest=rest.slice(atSign+1),this.auth=decodeURIComponent(auth)),hostEnd=-1;for(var i=0,hec;i<nonHostChars.length;i++)hec=rest.indexOf(nonHostChars[i]),-1!==hec&&(-1===hostEnd||hec<hostEnd)&&(hostEnd=hec);-1===hostEnd&&(hostEnd=rest.length),this.host=rest.slice(0,hostEnd),rest=rest.slice(hostEnd),this.parseHost(),this.hostname=this.hostname||"";var ipv6Hostname="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!ipv6Hostname)for(var hostparts=this.hostname.split(/\./),i=0,l=hostparts.length,part;i<l;i++)if(part=hostparts[i],part&&!part.match(hostnamePartPattern)){for(var newpart="",j=0,k=part.length;j<k;j++)newpart+=127<part.charCodeAt(j)?"x":part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}this.hostname=255<this.hostname.length?"":this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==rest[0]&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length,ae;i<l;i++)if(ae=autoEscape[i],-1!==rest.indexOf(ae)){var esc=encodeURIComponent(ae);esc===ae&&(esc=escape(ae)),rest=rest.split(ae).join(esc)}var hash=rest.indexOf("#");-1!==hash&&(this.hash=rest.substr(hash),rest=rest.slice(0,hash));var qm=rest.indexOf("?");if(-1===qm?parseQueryString&&(this.search="",this.query={}):(this.search=rest.substr(qm),this.query=rest.substr(qm+1),parseQueryString&&(this.query=querystring.parse(this.query)),rest=rest.slice(0,qm)),rest&&(this.pathname=rest),slashedProtocol[lowerProto]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var p=this.pathname||"",s=this.search||"";this.path=p+s}return this.href=this.format(),this},Url.prototype.format=function(){var auth=this.auth||"";auth&&(auth=encodeURIComponent(auth),auth=auth.replace(/%3A/i,":"),auth+="@");var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=!1,query="";this.host?host=auth+this.host:this.hostname&&(host=auth+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(host+=":"+this.port)),this.query&&util.isObject(this.query)&&Object.keys(this.query).length&&(query=querystring.stringify(this.query));var search=this.search||query&&"?"+query||"";return protocol&&":"!==protocol.substr(-1)&&(protocol+=":"),this.slashes||(!protocol||slashedProtocol[protocol])&&!1!==host?(host="//"+(host||""),pathname&&"/"!==pathname.charAt(0)&&(pathname="/"+pathname)):!host&&(host=""),hash&&"#"!==hash.charAt(0)&&(hash="#"+hash),search&&"?"!==search.charAt(0)&&(search="?"+search),pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)}),search=search.replace("#","%23"),protocol+host+pathname+search+hash},Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,!1,!0)).format()},Url.prototype.resolveObject=function(relative){if(util.isString(relative)){var rel=new Url;rel.parse(relative,!1,!0),relative=rel}for(var result=new Url,tkeys=Object.keys(this),tk=0,tkey;tk<tkeys.length;tk++)tkey=tkeys[tk],result[tkey]=this[tkey];if(result.hash=relative.hash,""===relative.href)return result.href=result.format(),result;if(relative.slashes&&!relative.protocol){for(var rkeys=Object.keys(relative),rk=0,rkey;rk<rkeys.length;rk++)rkey=rkeys[rk],"protocol"!==rkey&&(result[rkey]=relative[rkey]);return slashedProtocol[result.protocol]&&result.hostname&&!result.pathname&&(result.path=result.pathname="/"),result.href=result.format(),result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){for(var keys=Object.keys(relative),v=0,k;v<keys.length;v++)k=keys[v],result[k]=relative[k];return result.href=result.format(),result}if(result.protocol=relative.protocol,!relative.host&&!hostlessProtocol[relative.protocol]){for(var relPath=(relative.pathname||"").split("/");relPath.length&&!(relative.host=relPath.shift()););relative.host||(relative.host=""),relative.hostname||(relative.hostname=""),""!==relPath[0]&&relPath.unshift(""),2>relPath.length&&relPath.unshift(""),result.pathname=relPath.join("/")}else result.pathname=relative.pathname;if(result.search=relative.search,result.query=relative.query,result.host=relative.host||"",result.auth=relative.auth,result.hostname=relative.hostname||relative.host,result.port=relative.port,result.pathname||result.search){var p=result.pathname||"",s=result.search||"";result.path=p+s}return result.slashes=result.slashes||relative.slashes,result.href=result.format(),result}var isSourceAbs=result.pathname&&"/"===result.pathname.charAt(0),isRelAbs=relative.host||relative.pathname&&"/"===relative.pathname.charAt(0),mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic&&(result.hostname="",result.port=null,result.host&&(""===srcPath[0]?srcPath[0]=result.host:srcPath.unshift(result.host)),result.host="",relative.protocol&&(relative.hostname=null,relative.port=null,relative.host&&(""===relPath[0]?relPath[0]=relative.host:relPath.unshift(relative.host)),relative.host=null),mustEndAbs=mustEndAbs&&(""===relPath[0]||""===srcPath[0])),isRelAbs)result.host=relative.host||""===relative.host?relative.host:result.host,result.hostname=relative.hostname||""===relative.hostname?relative.hostname:result.hostname,result.search=relative.search,result.query=relative.query,srcPath=relPath;else if(relPath.length)srcPath||(srcPath=[]),srcPath.pop(),srcPath=srcPath.concat(relPath),result.search=relative.search,result.query=relative.query;else if(!util.isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=!!(result.host&&0<result.host.indexOf("@"))&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return result.search=relative.search,result.query=relative.query,util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.path=result.search?"/"+result.search:null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||1<srcPath.length)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;0<=i;i--)last=srcPath[i],"."===last?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");mustEndAbs&&""!==srcPath[0]&&(!srcPath[0]||"/"!==srcPath[0].charAt(0))&&srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=!!(result.host&&0<result.host.indexOf("@"))&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=/:[0-9]*$/.exec(host);port&&(port=port[0],":"!==port&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},{"./util":117,punycode:64,querystring:67}],117:[function(require,module){'use strict';module.exports={isString:function(arg){return"string"==typeof arg},isObject:function(arg){return"object"==typeof arg&&null!==arg},isNull:function(arg){return null===arg},isNullOrUndefined:function(arg){return null==arg}}},{}],118:[function(require,module){(function(Buffer){(function(){/*! ut_metadata. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */const{EventEmitter}=require("events"),bencode=require("bencode"),BitField=require("bitfield").default,debug=require("debug")("ut_metadata"),sha1=require("simple-sha1"),BITFIELD_GROW=1E3,PIECE_LENGTH=16384;module.exports=metadata=>{class utMetadata extends EventEmitter{constructor(wire){super(),this._wire=wire,this._fetching=!1,this._metadataComplete=!1,this._metadataSize=null,this._remainingRejects=null,this._bitfield=new BitField(0,{grow:BITFIELD_GROW}),Buffer.isBuffer(metadata)&&this.setMetadata(metadata)}onHandshake(infoHash){this._infoHash=infoHash}onExtendedHandshake(handshake){return handshake.m&&handshake.m.ut_metadata?handshake.metadata_size?"number"!=typeof handshake.metadata_size||1E7<handshake.metadata_size||0>=handshake.metadata_size?this.emit("warning",new Error("Peer gave invalid metadata size")):void(this._metadataSize=handshake.metadata_size,this._numPieces=_Mathceil(this._metadataSize/PIECE_LENGTH),this._remainingRejects=2*this._numPieces,this._requestPieces()):this.emit("warning",new Error("Peer does not have metadata")):this.emit("warning",new Error("Peer does not support ut_metadata"))}onMessage(buf){let dict,trailer;try{const str=buf.toString(),trailerIndex=str.indexOf("ee")+2;dict=bencode.decode(str.substring(0,trailerIndex)),trailer=buf.slice(trailerIndex)}catch(err){return}switch(dict.msg_type){case 0:this._onRequest(dict.piece);break;case 1:this._onData(dict.piece,trailer,dict.total_size);break;case 2:this._onReject(dict.piece);}}fetch(){this._metadataComplete||(this._fetching=!0,this._metadataSize&&this._requestPieces())}cancel(){this._fetching=!1}setMetadata(metadata){if(this._metadataComplete)return!0;debug("set metadata");try{const info=bencode.decode(metadata).info;info&&(metadata=bencode.encode(info))}catch(err){}return!(this._infoHash&&this._infoHash!==sha1.sync(metadata))&&(this.cancel(),this.metadata=metadata,this._metadataComplete=!0,this._metadataSize=this.metadata.length,this._wire.extendedHandshake.metadata_size=this._metadataSize,this.emit("metadata",bencode.encode({info:bencode.decode(this.metadata)})),!0)}_send(dict,trailer){let buf=bencode.encode(dict);Buffer.isBuffer(trailer)&&(buf=Buffer.concat([buf,trailer])),this._wire.extended("ut_metadata",buf)}_request(piece){this._send({msg_type:0,piece})}_data(piece,buf,totalSize){const msg={msg_type:1,piece};"number"==typeof totalSize&&(msg.total_size=totalSize),this._send(msg,buf)}_reject(piece){this._send({msg_type:2,piece})}_onRequest(piece){if(!this._metadataComplete)return void this._reject(piece);const start=piece*PIECE_LENGTH;let end=start+PIECE_LENGTH;end>this._metadataSize&&(end=this._metadataSize);const buf=this.metadata.slice(start,end);this._data(piece,buf,this._metadataSize)}_onData(piece,buf){buf.length>PIECE_LENGTH||!this._fetching||(buf.copy(this.metadata,piece*PIECE_LENGTH),this._bitfield.set(piece),this._checkDone())}_onReject(piece){0<this._remainingRejects&&this._fetching?(this._request(piece),this._remainingRejects-=1):this.emit("warning",new Error("Peer sent \"reject\" too much"))}_requestPieces(){if(this._fetching){this.metadata=Buffer.alloc(this._metadataSize);for(let piece=0;piece<this._numPieces;piece++)this._request(piece)}}_checkDone(){let done=!0;for(let piece=0;piece<this._numPieces;piece++)if(!this._bitfield.get(piece)){done=!1;break}if(done){const success=this.setMetadata(this.metadata);success||this._failedMetadata()}}_failedMetadata(){this._bitfield=new BitField(0,{grow:BITFIELD_GROW}),this._remainingRejects-=this._numPieces,0<this._remainingRejects?this._requestPieces():this.emit("warning",new Error("Peer sent invalid metadata"))}}return utMetadata.prototype.name="ut_metadata",utMetadata}}).call(this)}).call(this,require("buffer").Buffer)},{bencode:11,bitfield:14,buffer:24,debug:33,events:25,"simple-sha1":96}],119:[function(require,module){(function(global){(function(){function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===(val+"").toLowerCase()}module.exports=function(fn,msg){function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);else config("traceDeprecation")?console.trace(msg):console.warn(msg);warned=!0}return fn.apply(this,arguments)}if(config("noDeprecation"))return fn;var warned=!1;return deprecated}}).call(this)}).call(this,"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global)},{}],120:[function(require,module){(function(Buffer){(function(){function empty(){return{version:0,flags:0,entries:[]}}const bs=require("binary-search"),EventEmitter=require("events"),mp4=require("mp4-stream"),Box=require("mp4-box-encoding"),RangeSliceStream=require("range-slice-stream");class RunLengthIndex{constructor(entries,countName){this._entries=entries,this._countName=countName||"count",this._index=0,this._offset=0,this.value=this._entries[0]}inc(){this._offset++,this._offset>=this._entries[this._index][this._countName]&&(this._index++,this._offset=0),this.value=this._entries[this._index]}}module.exports=class MP4Remuxer extends EventEmitter{constructor(file){super(),this._tracks=[],this._file=file,this._decoder=null,this._findMoov(0)}_findMoov(offset){this._decoder&&this._decoder.destroy();let toSkip=0;this._decoder=mp4.decode();const fileStream=this._file.createReadStream({start:offset});fileStream.pipe(this._decoder);const boxHandler=headers=>{"moov"===headers.type?(this._decoder.removeListener("box",boxHandler),this._decoder.decode(moov=>{fileStream.destroy();try{this._processMoov(moov)}catch(err){err.message=`Cannot parse mp4 file: ${err.message}`,this.emit("error",err)}})):headers.length<4096?(toSkip+=headers.length,this._decoder.ignore()):(this._decoder.removeListener("box",boxHandler),toSkip+=headers.length,fileStream.destroy(),this._decoder.destroy(),this._findMoov(offset+toSkip))};this._decoder.on("box",boxHandler)}_processMoov(moov){const traks=moov.traks;this._tracks=[],this._hasVideo=!1,this._hasAudio=!1;for(let i=0;i<traks.length;i++){const trak=traks[i],stbl=trak.mdia.minf.stbl,stsdEntry=stbl.stsd.entries[0],handlerType=trak.mdia.hdlr.handlerType;let codec,mime;if("vide"===handlerType&&"avc1"===stsdEntry.type){if(this._hasVideo)continue;this._hasVideo=!0,codec="avc1",stsdEntry.avcC&&(codec+=`.${stsdEntry.avcC.mimeCodec}`),mime=`video/mp4; codecs="${codec}"`}else if("soun"===handlerType&&"mp4a"===stsdEntry.type){if(this._hasAudio)continue;this._hasAudio=!0,codec="mp4a",stsdEntry.esds&&stsdEntry.esds.mimeCodec&&(codec+=`.${stsdEntry.esds.mimeCodec}`),mime=`audio/mp4; codecs="${codec}"`}else continue;const samples=[];let sample=0,sampleInChunk=0,chunk=0,offsetInChunk=0,sampleToChunkIndex=0,dts=0;const decodingTimeEntry=new RunLengthIndex(stbl.stts.entries);let presentationOffsetEntry=null;stbl.ctts&&(presentationOffsetEntry=new RunLengthIndex(stbl.ctts.entries));for(let syncSampleIndex=0;;){var currChunkEntry=stbl.stsc.entries[sampleToChunkIndex];const size=stbl.stsz.entries[sample],duration=decodingTimeEntry.value.duration,presentationOffset=presentationOffsetEntry?presentationOffsetEntry.value.compositionOffset:0;let sync=!0;stbl.stss&&(sync=stbl.stss.entries[syncSampleIndex]===sample+1);const chunkOffsetTable=stbl.stco||stbl.co64;if(samples.push({size,duration,dts,presentationOffset,sync,offset:offsetInChunk+chunkOffsetTable.entries[chunk]}),sample++,sample>=stbl.stsz.entries.length)break;if(sampleInChunk++,offsetInChunk+=size,sampleInChunk>=currChunkEntry.samplesPerChunk){sampleInChunk=0,offsetInChunk=0,chunk++;const nextChunkEntry=stbl.stsc.entries[sampleToChunkIndex+1];nextChunkEntry&&chunk+1>=nextChunkEntry.firstChunk&&sampleToChunkIndex++}dts+=duration,decodingTimeEntry.inc(),presentationOffsetEntry&&presentationOffsetEntry.inc(),sync&&syncSampleIndex++}trak.mdia.mdhd.duration=0,trak.tkhd.duration=0;const defaultSampleDescriptionIndex=currChunkEntry.sampleDescriptionId,trackMoov={type:"moov",mvhd:moov.mvhd,traks:[{tkhd:trak.tkhd,mdia:{mdhd:trak.mdia.mdhd,hdlr:trak.mdia.hdlr,elng:trak.mdia.elng,minf:{vmhd:trak.mdia.minf.vmhd,smhd:trak.mdia.minf.smhd,dinf:trak.mdia.minf.dinf,stbl:{stsd:stbl.stsd,stts:empty(),ctts:empty(),stsc:empty(),stsz:empty(),stco:empty(),stss:empty()}}}}],mvex:{mehd:{fragmentDuration:moov.mvhd.duration},trexs:[{trackId:trak.tkhd.trackId,defaultSampleDescriptionIndex,defaultSampleDuration:0,defaultSampleSize:0,defaultSampleFlags:0}]}};this._tracks.push({fragmentSequence:1,trackId:trak.tkhd.trackId,timeScale:trak.mdia.mdhd.timeScale,samples,currSample:null,currTime:null,moov:trackMoov,mime})}if(0===this._tracks.length)return void this.emit("error",new Error("no playable tracks"));moov.mvhd.duration=0,this._ftyp={type:"ftyp",brand:"iso5",brandVersion:0,compatibleBrands:["iso5"]};const ftypBuf=Box.encode(this._ftyp),data=this._tracks.map(track=>{const moovBuf=Box.encode(track.moov);return{mime:track.mime,init:Buffer.concat([ftypBuf,moovBuf])}});this.emit("ready",data)}seek(time){if(!this._tracks)throw new Error("Not ready yet; wait for 'ready' event");this._fileStream&&(this._fileStream.destroy(),this._fileStream=null);let startOffset=-1;if(this._tracks.map((track,i)=>{track.outStream&&track.outStream.destroy(),track.inStream&&(track.inStream.destroy(),track.inStream=null);const outStream=track.outStream=mp4.encode(),fragment=this._generateFragment(i,time);if(!fragment)return outStream.finalize();(-1===startOffset||fragment.ranges[0].start<startOffset)&&(startOffset=fragment.ranges[0].start);const writeFragment=frag=>{outStream.destroyed||outStream.box(frag.moof,err=>{if(err)return this.emit("error",err);if(!outStream.destroyed){const slicedStream=track.inStream.slice(frag.ranges);slicedStream.pipe(outStream.mediaData(frag.length,err=>{if(err)return this.emit("error",err);if(!outStream.destroyed){const nextFrag=this._generateFragment(i);return nextFrag?void writeFragment(nextFrag):outStream.finalize()}}))}})};writeFragment(fragment)}),0<=startOffset){const fileStream=this._fileStream=this._file.createReadStream({start:startOffset});this._tracks.forEach(track=>{track.inStream=new RangeSliceStream(startOffset,{highWaterMark:1e7}),fileStream.pipe(track.inStream)})}return this._tracks.map(track=>track.outStream)}_findSampleBefore(trackInd,time){const track=this._tracks[trackInd],scaledTime=_Mathfloor(track.timeScale*time);let sample=bs(track.samples,scaledTime,(sample,t)=>{const pts=sample.dts+sample.presentationOffset;return pts-t});for(-1===sample?sample=0:0>sample&&(sample=-sample-2);!track.samples[sample].sync;)sample--;return sample}_generateFragment(track,time){const currTrack=this._tracks[track];let firstSample;if(firstSample=void 0===time?currTrack.currSample:this._findSampleBefore(track,time),firstSample>=currTrack.samples.length)return null;const startDts=currTrack.samples[firstSample].dts;let totalLen=0;const ranges=[];for(var currSample=firstSample;currSample<currTrack.samples.length;currSample++){const sample=currTrack.samples[currSample];if(sample.sync&&sample.dts-startDts>=currTrack.timeScale*1)break;totalLen+=sample.size;const currRange=ranges.length-1;0>currRange||ranges[currRange].end!==sample.offset?ranges.push({start:sample.offset,end:sample.offset+sample.size}):ranges[currRange].end+=sample.size}return currTrack.currSample=currSample,{moof:this._generateMoof(track,firstSample,currSample),ranges,length:totalLen}}_generateMoof(track,firstSample,lastSample){const currTrack=this._tracks[track],entries=[];let trunVersion=0;for(let j=firstSample;j<lastSample;j++){const currSample=currTrack.samples[j];0>currSample.presentationOffset&&(trunVersion=1),entries.push({sampleDuration:currSample.duration,sampleSize:currSample.size,sampleFlags:currSample.sync?33554432:16842752,sampleCompositionTimeOffset:currSample.presentationOffset})}const moof={type:"moof",mfhd:{sequenceNumber:currTrack.fragmentSequence++},trafs:[{tfhd:{flags:131072,trackId:currTrack.trackId},tfdt:{baseMediaDecodeTime:currTrack.samples[firstSample].dts},trun:{flags:3841,dataOffset:8,entries,version:trunVersion}}]};return moof.trafs[0].trun.dataOffset+=Box.encodingLength(moof),moof}}}).call(this)}).call(this,require("buffer").Buffer)},{"binary-search":13,buffer:24,events:25,"mp4-box-encoding":52,"mp4-stream":55,"range-slice-stream":71}],121:[function(require,module){function VideoStream(file,mediaElem,opts={}){return this instanceof VideoStream?void(this.detailedError=null,this._elem=mediaElem,this._elemWrapper=new MediaElementWrapper(mediaElem),this._waitingFired=!1,this._trackMeta=null,this._file=file,this._tracks=null,"none"!==this._elem.preload&&this._createMuxer(),this._onError=()=>{this.detailedError=this._elemWrapper.detailedError,this.destroy()},this._onWaiting=()=>{this._waitingFired=!0,this._muxer?this._tracks&&this._pump():this._createMuxer()},mediaElem.autoplay&&(mediaElem.preload="auto"),mediaElem.addEventListener("waiting",this._onWaiting),mediaElem.addEventListener("error",this._onError)):(console.warn("Don't invoke VideoStream without the 'new' keyword."),new VideoStream(file,mediaElem,opts))}const MediaElementWrapper=require("mediasource"),pump=require("pump"),MP4Remuxer=require("./mp4-remuxer");VideoStream.prototype={_createMuxer(){this._muxer=new MP4Remuxer(this._file),this._muxer.on("ready",data=>{this._tracks=data.map(trackData=>{const mediaSource=this._elemWrapper.createWriteStream(trackData.mime);mediaSource.on("error",err=>{this._elemWrapper.error(err)});const track={muxed:null,mediaSource,initFlushed:!1,onInitFlushed:null};return mediaSource.write(trackData.init,err=>{track.initFlushed=!0,track.onInitFlushed&&track.onInitFlushed(err)}),track}),(this._waitingFired||"auto"===this._elem.preload)&&this._pump()}),this._muxer.on("error",err=>{this._elemWrapper.error(err)})},_pump(){const muxed=this._muxer.seek(this._elem.currentTime,!this._tracks);this._tracks.forEach((track,i)=>{const pumpTrack=()=>{track.muxed&&(track.muxed.destroy(),track.mediaSource=this._elemWrapper.createWriteStream(track.mediaSource),track.mediaSource.on("error",err=>{this._elemWrapper.error(err)})),track.muxed=muxed[i],pump(track.muxed,track.mediaSource)};track.initFlushed?pumpTrack():track.onInitFlushed=err=>err?void this._elemWrapper.error(err):void pumpTrack()})},destroy(){this.destroyed||(this.destroyed=!0,this._elem.removeEventListener("waiting",this._onWaiting),this._elem.removeEventListener("error",this._onError),this._tracks&&this._tracks.forEach(track=>{track.muxed&&track.muxed.destroy()}),this._elem.src="")}},module.exports=VideoStream},{"./mp4-remuxer":120,mediasource:48,pump:63}],122:[function(require,module){function wrappy(fn,cb){function wrapper(){for(var args=Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];var ret=fn.apply(this,args),cb=args[args.length-1];return"function"==typeof ret&&ret!==cb&&Object.keys(cb).forEach(function(k){ret[k]=cb[k]}),ret}if(fn&&cb)return wrappy(fn)(cb);if("function"!=typeof fn)throw new TypeError("need wrapper function");return Object.keys(fn).forEach(function(k){wrapper[k]=fn[k]}),wrapper}module.exports=wrappy},{}],123:[function(require,module){module.exports=function(){for(var target={},i=0,source;i<arguments.length;i++)for(var key in source=arguments[i],source)hasOwnProperty.call(source,key)&&(target[key]=source[key]);return target};var hasOwnProperty=Object.prototype.hasOwnProperty},{}],124:[function(require,module){module.exports={version:"0.112.0"}},{}],125:[function(require,module){(function(process,global,Buffer){(function(){function isReadable(obj){return"object"==typeof obj&&null!=obj&&"function"==typeof obj.pipe}function isFileList(obj){return"undefined"!=typeof FileList&&obj instanceof FileList}/*! webtorrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */const{EventEmitter}=require("events"),concat=require("simple-concat"),createTorrent=require("create-torrent"),debug=require("debug")("webtorrent"),DHT=require("bittorrent-dht/client"),loadIPSet=require("load-ip-set"),parallel=require("run-parallel"),parseTorrent=require("parse-torrent"),path=require("path"),Peer=require("simple-peer"),randombytes=require("randombytes"),speedometer=require("speedometer"),ConnPool=require("./lib/conn-pool"),Torrent=require("./lib/torrent"),VERSION=require("./package.json").version,VERSION_STR=VERSION.replace(/\d*./g,v=>`0${v%100}`.slice(-2)).slice(0,4);class WebTorrent extends EventEmitter{constructor(opts={}){super(),this.peerId="string"==typeof opts.peerId?opts.peerId:Buffer.isBuffer(opts.peerId)?opts.peerId.toString("hex"):Buffer.from(`-WW${VERSION_STR}-`+randombytes(9).toString("base64")).toString("hex"),this.peerIdBuffer=Buffer.from(this.peerId,"hex"),this.nodeId="string"==typeof opts.nodeId?opts.nodeId:Buffer.isBuffer(opts.nodeId)?opts.nodeId.toString("hex"):randombytes(20).toString("hex"),this.nodeIdBuffer=Buffer.from(this.nodeId,"hex"),this._debugId=this.peerId.toString("hex").substring(0,7),this.destroyed=!1,this.listening=!1,this.torrentPort=opts.torrentPort||0,this.dhtPort=opts.dhtPort||0,this.tracker=opts.tracker===void 0?{}:opts.tracker,this.lsd=!1!==opts.lsd,this.torrents=[],this.maxConns=+opts.maxConns||55,this.utp=!0===opts.utp,this._debug("new webtorrent (peerId %s, nodeId %s, port %s)",this.peerId,this.nodeId,this.torrentPort),this.tracker&&("object"!=typeof this.tracker&&(this.tracker={}),opts.rtcConfig&&(console.warn("WebTorrent: opts.rtcConfig is deprecated. Use opts.tracker.rtcConfig instead"),this.tracker.rtcConfig=opts.rtcConfig),opts.wrtc&&(console.warn("WebTorrent: opts.wrtc is deprecated. Use opts.tracker.wrtc instead"),this.tracker.wrtc=opts.wrtc),global.WRTC&&!this.tracker.wrtc&&(this.tracker.wrtc=global.WRTC)),"function"==typeof ConnPool?this._connPool=new ConnPool(this):process.nextTick(()=>{this._onListening()}),this._downloadSpeed=speedometer(),this._uploadSpeed=speedometer(),!1!==opts.dht&&"function"==typeof DHT?(this.dht=new DHT(Object.assign({},{nodeId:this.nodeId},opts.dht)),this.dht.once("error",err=>{this._destroy(err)}),this.dht.once("listening",()=>{const address=this.dht.address();address&&(this.dhtPort=address.port)}),this.dht.setMaxListeners(0),this.dht.listen(this.dhtPort)):this.dht=!1,this.enableWebSeeds=!1!==opts.webSeeds;const ready=()=>{this.destroyed||(this.ready=!0,this.emit("ready"))};"function"==typeof loadIPSet&&null!=opts.blocklist?loadIPSet(opts.blocklist,{headers:{"user-agent":`WebTorrent/${VERSION} (https://webtorrent.io)`}},(err,ipSet)=>err?this.error(`Failed to load blocklist: ${err.message}`):void(this.blocked=ipSet,ready())):process.nextTick(ready)}get downloadSpeed(){return this._downloadSpeed()}get uploadSpeed(){return this._uploadSpeed()}get progress(){const torrents=this.torrents.filter(torrent=>1!==torrent.progress),downloaded=torrents.reduce((total,torrent)=>total+torrent.downloaded,0),length=torrents.reduce((total,torrent)=>total+(torrent.length||0),0)||1;return downloaded/length}get ratio(){const uploaded=this.torrents.reduce((total,torrent)=>total+torrent.uploaded,0),received=this.torrents.reduce((total,torrent)=>total+torrent.received,0)||1;return uploaded/received}get(torrentId){if(!(torrentId instanceof Torrent)){let parsed;try{parsed=parseTorrent(torrentId)}catch(err){}if(!parsed)return null;if(!parsed.infoHash)throw new Error("Invalid torrent identifier");for(const torrent of this.torrents)if(torrent.infoHash===parsed.infoHash)return torrent}else if(this.torrents.includes(torrentId))return torrentId;return null}download(torrentId,opts,ontorrent){return console.warn("WebTorrent: client.download() is deprecated. Use client.add() instead"),this.add(torrentId,opts,ontorrent)}add(torrentId,opts={},ontorrent=()=>{}){function onClose(){torrent.removeListener("_infoHash",onInfoHash),torrent.removeListener("ready",onReady),torrent.removeListener("close",onClose)}if(this.destroyed)throw new Error("client is destroyed");"function"==typeof opts&&([opts,ontorrent]=[{},opts]);const onInfoHash=()=>{if(!this.destroyed)for(const t of this.torrents)if(t.infoHash===torrent.infoHash&&t!==torrent)return void torrent._destroy(new Error(`Cannot add duplicate torrent ${torrent.infoHash}`))},onReady=()=>{this.destroyed||(ontorrent(torrent),this.emit("torrent",torrent))};this._debug("add"),opts=opts?Object.assign({},opts):{};const torrent=new Torrent(torrentId,this,opts);return this.torrents.push(torrent),torrent.once("_infoHash",onInfoHash),torrent.once("ready",onReady),torrent.once("close",onClose),torrent}seed(input,opts,onseed){if(this.destroyed)throw new Error("client is destroyed");"function"==typeof opts&&([opts,onseed]=[{},opts]),this._debug("seed"),opts=opts?Object.assign({},opts):{},opts.skipVerify=!0;const isFilePath="string"==typeof input;isFilePath&&(opts.path=path.dirname(input)),opts.createdBy||(opts.createdBy=`WebTorrent/${VERSION_STR}`);const _onseed=torrent=>{this._debug("on seed"),"function"==typeof onseed&&onseed(torrent),torrent.emit("seed"),this.emit("seed",torrent)},torrent=this.add(null,opts,torrent=>{const tasks=[cb=>isFilePath?cb():void torrent.load(streams,cb)];this.dht&&tasks.push(cb=>{torrent.once("dhtAnnounce",cb)}),parallel(tasks,err=>this.destroyed?void 0:err?torrent._destroy(err):void _onseed(torrent))});let streams;return isFileList(input)?input=Array.from(input):!Array.isArray(input)&&(input=[input]),parallel(input.map(item=>cb=>{isReadable(item)?concat(item,cb):cb(null,item)}),(err,input)=>this.destroyed?void 0:err?torrent._destroy(err):void createTorrent.parseInput(input,opts,(err,files)=>this.destroyed?void 0:err?torrent._destroy(err):void(streams=files.map(file=>file.getStream),createTorrent(input,opts,(err,torrentBuf)=>{if(!this.destroyed){if(err)return torrent._destroy(err);const existingTorrent=this.get(torrentBuf);existingTorrent?torrent._destroy(new Error(`Cannot add duplicate torrent ${existingTorrent.infoHash}`)):torrent._onTorrentId(torrentBuf)}})))),torrent}remove(torrentId,opts,cb){if("function"==typeof opts)return this.remove(torrentId,null,opts);this._debug("remove");const torrent=this.get(torrentId);if(!torrent)throw new Error(`No torrent with id ${torrentId}`);this._remove(torrentId,opts,cb)}_remove(torrentId,opts,cb){if("function"==typeof opts)return this._remove(torrentId,null,opts);const torrent=this.get(torrentId);torrent&&(this.torrents.splice(this.torrents.indexOf(torrent),1),torrent.destroy(opts,cb))}address(){return this.listening?this._connPool?this._connPool.tcpServer.address():{address:"0.0.0.0",family:"IPv4",port:0}:null}destroy(cb){if(this.destroyed)throw new Error("client already destroyed");this._destroy(null,cb)}_destroy(err,cb){this._debug("client destroy"),this.destroyed=!0;const tasks=this.torrents.map(torrent=>cb=>{torrent.destroy(cb)});this._connPool&&tasks.push(cb=>{this._connPool.destroy(cb)}),this.dht&&tasks.push(cb=>{this.dht.destroy(cb)}),parallel(tasks,cb),err&&this.emit("error",err),this.torrents=[],this._connPool=null,this.dht=null}_onListening(){if(this._debug("listening"),this.listening=!0,this._connPool){const address=this._connPool.tcpServer.address();address&&(this.torrentPort=address.port)}this.emit("listening")}_debug(){const args=[].slice.call(arguments);args[0]=`[${this._debugId}] ${args[0]}`,debug(...args)}}WebTorrent.WEBRTC_SUPPORT=Peer.WEBRTC_SUPPORT,WebTorrent.VERSION=VERSION,module.exports=WebTorrent}).call(this)}).call(this,require("_process"),"undefined"==typeof global?"undefined"==typeof self?"undefined"==typeof window?{}:window:self:global,require("buffer").Buffer)},{"./lib/conn-pool":22,"./lib/torrent":5,"./package.json":124,_process:62,"bittorrent-dht/client":22,buffer:24,"create-torrent":32,debug:33,events:25,"load-ip-set":22,"parse-torrent":60,path:26,randombytes:70,"run-parallel":90,"simple-concat":93,"simple-peer":95,speedometer:99}]},{},[125])(125)});</script>
<script>/**
* @popperjs/core v2.4.4 - MIT License
*/
"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function n(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)?e.defaultView:window:e}function r(e){return{scrollLeft:(e=n(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return(o(e)?e.ownerDocument:e.document).documentElement}function f(e){return t(s(e)).left+r(e).scrollLeft}function c(e){return n(e).getComputedStyle(e)}function p(e){return e=c(e),/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function l(e,o,c){void 0===c&&(c=!1);var l=s(o);e=t(e);var u=i(o),d={scrollLeft:0,scrollTop:0},m={x:0,y:0};return(u||!u&&!c)&&(("body"!==a(o)||p(l))&&(d=o!==n(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:r(o)),i(o)?((m=t(o)).x+=o.clientLeft,m.y+=o.clientTop):l&&(m.x=f(l))),{x:e.left+d.scrollLeft-m.x,y:e.top+d.scrollTop-m.y,width:e.width,height:e.height}}function u(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function d(e){return"html"===a(e)?e:e.assignedSlot||e.parentNode||e.host||s(e)}function m(e,t){void 0===t&&(t=[]);var r=function e(t){return 0<=["html","body","#document"].indexOf(a(t))?t.ownerDocument.body:i(t)&&p(t)?t:e(d(t))}(e);e="body"===a(r);var o=n(r);return r=e?[o].concat(o.visualViewport||[],p(r)?r:[]):r,t=t.concat(r),e?t:t.concat(m(d(r)))}function h(e){if(!i(e)||"fixed"===c(e).position)return null;if(e=e.offsetParent){var t=s(e);if("body"===a(e)&&"static"===c(e).position&&"static"!==c(t).position)return t}return e}function g(e){for(var t=n(e),r=h(e);r&&0<=["table","td","th"].indexOf(a(r))&&"static"===c(r).position;)r=h(r);if(r&&"body"===a(r)&&"static"===c(r).position)return t;if(!r)e:{for(e=d(e);i(e)&&0>["html","body"].indexOf(a(e));){if("none"!==(r=c(e)).transform||"none"!==r.perspective||r.willChange&&"auto"!==r.willChange){r=e;break e}e=e.parentNode}r=null}return r||t}function b(e){var t=new Map,n=new Set,r=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(o){n.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(r){n.has(r)||(r=t.get(r))&&e(r)})),r.push(o)}(e)})),r}function v(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function y(e){return e.split("-")[0]}function O(e,t){var n=!(!t.getRootNode||!t.getRootNode().host);if(e.contains(t))return!0;if(n)do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function x(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function w(e,o){if("viewport"===o){o=n(e);var a=s(e);o=o.visualViewport;var p=a.clientWidth;a=a.clientHeight;var l=0,u=0;o&&(p=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=o.offsetLeft,u=o.offsetTop)),e=x(e={width:p,height:a,x:l+f(e),y:u})}else i(o)?((e=t(o)).top+=o.clientTop,e.left+=o.clientLeft,e.bottom=e.top+o.clientHeight,e.right=e.left+o.clientWidth,e.width=o.clientWidth,e.height=o.clientHeight,e.x=e.left,e.y=e.top):(u=s(e),e=s(u),l=r(u),o=u.ownerDocument.body,p=Math.max(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Math.max(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-l.scrollLeft+f(u),l=-l.scrollTop,"rtl"===c(o||e).direction&&(u+=Math.max(e.clientWidth,o?o.clientWidth:0)-p),e=x({width:p,height:a,x:u,y:l}));return e}function j(e,t,n){return t="clippingParents"===t?function(e){var t=m(d(e)),n=0<=["absolute","fixed"].indexOf(c(e).position)&&i(e)?g(e):e;return o(n)?t.filter((function(e){return o(e)&&O(e,n)&&"body"!==a(e)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){return n=w(e,n),t.top=Math.max(n.top,t.top),t.right=Math.min(n.right,t.right),t.bottom=Math.min(n.bottom,t.bottom),t.left=Math.max(n.left,t.left),t}),w(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function M(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function E(e){var t=e.reference,n=e.element,r=(e=e.placement)?y(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(r){case"top":o={x:o,y:t.y-n.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-n.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(r=r?M(r):null))switch(i="y"===r?"height":"width",e){case"start":o[r]=Math.floor(o[r])-Math.floor(t[i]/2-n[i]/2);break;case"end":o[r]=Math.floor(o[r])+Math.ceil(t[i]/2-n[i]/2)}return o}function D(e){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),e)}function P(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function k(e,n){void 0===n&&(n={});var r=n;n=void 0===(n=r.placement)?e.placement:n;var i=r.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=r.rootBoundary)?"viewport":i;i=void 0===(i=r.elementContext)?"popper":i;var c=r.altBoundary,p=void 0!==c&&c;r=D("number"!=typeof(r=void 0===(r=r.padding)?0:r)?r:P(r,q));var l=e.elements.reference;c=e.rects.popper,a=j(o(p=e.elements[p?"popper"===i?"reference":"popper":i])?p:p.contextElement||s(e.elements.popper),a,f),p=E({reference:f=t(l),element:c,strategy:"absolute",placement:n}),c=x(Object.assign(Object.assign({},c),p)),f="popper"===i?c:f;var u={top:a.top-f.top+r.top,bottom:f.bottom-a.bottom+r.bottom,left:a.left-f.left+r.left,right:f.right-a.right+r.right};if(e=e.modifiersData.offset,"popper"===i&&e){var d=e[n];Object.keys(u).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";u[e]+=d[n]*t}))}return u}function L(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function B(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,r=void 0===(e=e.defaultOptions)?V:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=r);var s={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},V),r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(i){return a(),s.options=Object.assign(Object.assign(Object.assign({},r),s.options),i),s.scrollParents={reference:o(e)?m(e):e.contextElement?m(e.contextElement):[],popper:m(t)},i=function(e){var t=b(e);return N.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign(Object.assign(Object.assign({},n),t),{},{options:Object.assign(Object.assign({},n.options),t.options),data:Object.assign(Object.assign({},n.data),t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(n,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options;n=void 0===n?{}:n,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:p,options:n}),f.push(t||function(){}))})),p.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference;if(L(t,e=e.popper))for(s.rects={reference:l(t,g(e),"fixed"===s.options.strategy),popper:u(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var n=s.orderedModifiers[t];e=n.fn;var r=n.options;r=void 0===r?{}:r,n=n.name,"function"==typeof e&&(s=e({state:s,options:r,name:n,instance:p})||s)}}},update:v((function(){return new Promise((function(e){p.forceUpdate(),e(s)}))})),destroy:function(){a(),c=!0}};return L(e,t)?(p.setOptions(i).then((function(e){!c&&i.onFirstUpdate&&i.onFirstUpdate(e)})),p):p}}function W(e){var t,r=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,f=e.position,c=e.gpuAcceleration,p=e.adaptive,l=window.devicePixelRatio||1;e=Math.round(a.x*l)/l||0,l=Math.round(a.y*l)/l||0;var u=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var d,m="left",h="top",b=window;if(p){var v=g(r);v===n(r)&&(v=s(r)),"top"===i&&(h="bottom",l-=v.clientHeight-o.height,l*=c?1:-1),"left"===i&&(m="right",e-=v.clientWidth-o.width,e*=c?1:-1)}return r=Object.assign({position:f},p&&_),c?Object.assign(Object.assign({},r),{},((d={})[h]=a?"0":"",d[m]=u?"0":"",d.transform=2>(b.devicePixelRatio||1)?"translate("+e+"px, "+l+"px)":"translate3d("+e+"px, "+l+"px, 0)",d)):Object.assign(Object.assign({},r),{},((t={})[h]=a?l+"px":"",t[m]=u?e+"px":"",t.transform="",t))}function A(e){return e.replace(/left|right|bottom|top/g,(function(e){return U[e]}))}function H(e){return e.replace(/start|end/g,(function(e){return z[e]}))}function T(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function R(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var q=["top","bottom","right","left"],C=q.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),S=[].concat(q,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),N="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),V={placement:"bottom",modifiers:[],strategy:"absolute"},I={passive:!0},_={top:"auto",right:"auto",bottom:"auto",left:"auto"},U={left:"right",right:"left",bottom:"top",top:"bottom"},z={start:"end",end:"start"},F=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=n(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",r.update,I)})),a&&s.addEventListener("resize",r.update,I),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",r.update,I)})),a&&s.removeEventListener("resize",r.update,I)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=E({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e,n=void 0===(n=n.adaptive)||n,e={placement:y(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign(Object.assign({},t.styles.popper),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign(Object.assign({},t.styles.arrow),W(Object.assign(Object.assign({},e),{},{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];i(o)&&a(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),i(r)&&a(r)&&(Object.assign(r.style,e),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,r=void 0===(e=e.options.offset)?[0,0]:e,o=(e=S.reduce((function(e,n){var o=t.rects,i=y(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof r?r(Object.assign(Object.assign({},o),{},{placement:n})):r;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[n]=i,e}),{}))[t.placement],i=o.x;o=o.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=o),t.modifiersData[n]=e}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var r=n.mainAxis;r=void 0===r||r;var o=n.altAxis;o=void 0===o||o;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,c=n.altBoundary,p=n.flipVariations,l=void 0===p||p,u=n.allowedAutoPlacements;p=y(n=t.options.placement),i=i||(p!==n&&l?function(e){if("auto"===y(e))return[];var t=A(e);return[H(e),t,H(t)]}(n):[A(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===y(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,r=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?S:a,f=t.placement.split("-")[1];0===(i=(t=f?i?C:C.filter((function(e){return e.split("-")[1]===f})):q).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var c=i.reduce((function(t,i){return t[i]=k(e,{placement:i,boundary:n,rootBoundary:r,padding:o})[y(i)],t}),{});return Object.keys(c).sort((function(e,t){return c[e]-c[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var m=new Map;p=!0;for(var h=d[0],g=0;g<d.length;g++){var b=d[g],v=y(b),O="start"===b.split("-")[1],x=0<=["top","bottom"].indexOf(v),w=x?"width":"height",j=k(t,{placement:b,boundary:s,rootBoundary:f,altBoundary:c,padding:a});if(O=x?O?"right":"left":O?"bottom":"top",n[w]>i[w]&&(O=A(O)),w=A(O),x=[],r&&x.push(0>=j[v]),o&&x.push(0>=j[O],0>=j[w]),x.every((function(e){return e}))){h=b,p=!1;break}m.set(b,x)}if(p)for(r=function(e){var t=d.find((function(t){if(t=m.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return h=t,"break"},o=l?3:1;0<o&&"break"!==r(o);o--);t.placement!==h&&(t.modifiersData[e]._skip=!0,t.placement=h,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;e=e.name;var r=n.mainAxis,o=void 0===r||r;r=void 0!==(r=n.altAxis)&&r;var i=n.tether;i=void 0===i||i;var a=n.tetherOffset,s=void 0===a?0:a;n=k(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),a=y(t.placement);var f=t.placement.split("-")[1],c=!f,p=M(a);a="x"===p?"y":"x";var l=t.modifiersData.popperOffsets,d=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):s;if(s={x:0,y:0},l){if(o){var b="y"===p?"top":"left",v="y"===p?"bottom":"right",O="y"===p?"height":"width";o=l[p];var x=l[p]+n[b],w=l[p]-n[v],j=i?-m[O]/2:0,E="start"===f?d[O]:m[O];f="start"===f?-m[O]:-d[O],m=t.elements.arrow,m=i&&m?u(m):{width:0,height:0};var D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};b=D[b],v=D[v],m=Math.max(0,Math.min(d[O],m[O])),E=c?d[O]/2-j-m-b-h:E-m-b-h,c=c?-d[O]/2+j+m+v+h:f+m+v+h,h=t.elements.arrow&&g(t.elements.arrow),d=t.modifiersData.offset?t.modifiersData.offset[t.placement][p]:0,h=l[p]+E-d-(h?"y"===p?h.clientTop||0:h.clientLeft||0:0),c=l[p]+c-d,i=Math.max(i?Math.min(x,h):x,Math.min(o,i?Math.max(w,c):w)),l[p]=i,s[p]=i-o}r&&(r=l[a],i=Math.max(r+n["x"===p?"top":"left"],Math.min(r,r-n["x"===p?"bottom":"right"])),l[a]=i,s[a]=i-r),t.modifiersData[e]=s}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state;e=e.name;var r=n.elements.arrow,o=n.modifiersData.popperOffsets,i=y(n.placement),a=M(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",r&&o){var s=n.modifiersData[e+"#persistent"].padding,f=u(r),c="y"===a?"top":"left",p="y"===a?"bottom":"right",l=n.rects.reference[i]+n.rects.reference[a]-o[a]-n.rects.popper[i];o=o[a]-n.rects.reference[a],l=(r=(r=g(r))?"y"===a?r.clientHeight||0:r.clientWidth||0:0)/2-f[i]/2+(l/2-o/2),i=Math.max(s[c],Math.min(l,r-f[i]-s[p])),n.modifiersData[e]=((t={})[a]=i,t.centerOffset=i-l,t)}},effect:function(e){var t=e.state,n=e.options;e=e.name;var r=n.element;if(r=void 0===r?"[data-popper-arrow]":r,n=void 0===(n=n.padding)?0:n,null!=r){if("string"==typeof r&&!(r=t.elements.popper.querySelector(r)))return;O(t.elements.popper,r)&&(t.elements.arrow=r,t.modifiersData[e+"#persistent"]={padding:D("number"!=typeof n?n:P(n,q))})}},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var n=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=k(t,{elementContext:"reference"}),a=k(t,{altBoundary:!0});n=T(i,n),r=T(a,r,o),o=R(n),a=R(r),t.modifiersData[e]={referenceClippingOffsets:n,popperEscapeOffsets:r,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign(Object.assign({},t.attributes.popper),{},{"data-popper-reference-hidden":o,"data-popper-escaped":a})}}],X=B({defaultModifiers:F});e.createPopper=X,e.defaultModifiers=F,e.detectOverflow=k,e.popperGenerator=B,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=popper.min.js.map
</script>
<script>!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).P2PGraph=n()}}(function(){return function o(u,a,l){function c(e,n){if(!a[e]){if(!u[e]){var t="function"==typeof require&&require;if(!n&&t)return t(e,!0);if(s)return s(e,!0);var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}var i=a[e]={exports:{}};u[e][0].call(i.exports,function(n){var t=u[e][1][n];return c(t||n)},i,i.exports,o,u,a,l)}return a[e].exports}for(var s="function"==typeof require&&require,n=0;n<l.length;n++)c(l[n]);return c}({1:[function(n,Ra,t){!function(){var q={version:"3.5.17"},o=[].slice,h=function(n){return o.call(n)},x=this.document;function a(n){return n&&(n.ownerDocument||n.document||n).documentElement}function D(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}if(x)try{h(x.documentElement.childNodes)[0].nodeType}catch(n){h=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),x)try{x.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var t=this.Element.prototype,e=t.setAttribute,r=t.setAttributeNS,i=this.CSSStyleDeclaration.prototype,u=i.setProperty;t.setAttribute=function(n,t){e.call(this,n,t+"")},t.setAttributeNS=function(n,t,e){r.call(this,n,t,e+"")},i.setProperty=function(n,t,e){u.call(this,n,t+"",e)}}function l(n,t){return n<t?-1:t<n?1:t<=n?0:NaN}function c(n){return null===n?NaN:+n}function s(n){return!isNaN(n)}function n(o){return{left:function(n,t,e,r){for(arguments.length<3&&(e=0),arguments.length<4&&(r=n.length);e<r;){var i=e+r>>>1;o(n[i],t)<0?e=i+1:r=i}return e},right:function(n,t,e,r){for(arguments.length<3&&(e=0),arguments.length<4&&(r=n.length);e<r;){var i=e+r>>>1;0<o(n[i],t)?r=i:e=i+1}return e}}}q.ascending=l,q.descending=function(n,t){return t<n?-1:n<t?1:n<=t?0:NaN},q.min=function(n,t){var e,r,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r<=r){e=r;break}for(;++i<o;)null!=(r=n[i])&&r<e&&(e=r)}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r<=r){e=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&r<e&&(e=r)}return e},q.max=function(n,t){var e,r,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r<=r){e=r;break}for(;++i<o;)null!=(r=n[i])&&e<r&&(e=r)}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r<=r){e=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&e<r&&(e=r)}return e},q.extent=function(n,t){var e,r,i,o=-1,u=n.length;if(1===arguments.length){for(;++o<u;)if(null!=(r=n[o])&&r<=r){e=i=r;break}for(;++o<u;)null!=(r=n[o])&&(r<e&&(e=r),i<r&&(i=r))}else{for(;++o<u;)if(null!=(r=t.call(n,n[o],o))&&r<=r){e=i=r;break}for(;++o<u;)null!=(r=t.call(n,n[o],o))&&(r<e&&(e=r),i<r&&(i=r))}return[e,i]},q.sum=function(n,t){var e,r=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)s(e=+n[o])&&(r+=e);else for(;++o<i;)s(e=+t.call(n,n[o],o))&&(r+=e);return r},q.mean=function(n,t){var e,r=0,i=n.length,o=-1,u=i;if(1===arguments.length)for(;++o<i;)s(e=c(n[o]))?r+=e:--u;else for(;++o<i;)s(e=c(t.call(n,n[o],o)))?r+=e:--u;if(u)return r/u},q.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],o=e-r;return o?i+o*(n[r]-i):i},q.median=function(n,t){var e,r=[],i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)s(e=c(n[o]))&&r.push(e);else for(;++o<i;)s(e=c(t.call(n,n[o],o)))&&r.push(e);if(r.length)return q.quantile(r.sort(l),.5)},q.variance=function(n,t){var e,r,i=n.length,o=0,u=0,a=-1,l=0;if(1===arguments.length)for(;++a<i;)s(e=c(n[a]))&&(u+=(r=e-o)*(e-(o+=r/++l)));else for(;++a<i;)s(e=c(t.call(n,n[a],a)))&&(u+=(r=e-o)*(e-(o+=r/++l)));if(1<l)return u/(l-1)},q.deviation=function(){var n=q.variance.apply(this,arguments);return n?Math.sqrt(n):n};var f=n(l);function p(n){return n.length}q.bisectLeft=f.left,q.bisect=q.bisectRight=f.right,q.bisector=function(e){return n(1===e.length?function(n,t){return l(e(n),t)}:e)},q.shuffle=function(n,t,e){(o=arguments.length)<3&&(e=n.length,o<2&&(t=0));for(var r,i,o=e-t;o;)i=Math.random()*o--|0,r=n[o+t],n[o+t]=n[i+t],n[i+t]=r;return n},q.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},q.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t<e;)i[t]=[r,r=n[++t]];return i},q.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=q.min(n,p),r=new Array(e);++t<e;)for(var i,o=-1,u=r[t]=new Array(i);++o<i;)u[o]=n[o][t];return r},q.zip=function(){return q.transpose(arguments)},q.keys=function(n){var t=[];for(var e in n)t.push(e);return t},q.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},q.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},q.merge=function(n){for(var t,e,r,i=n.length,o=-1,u=0;++o<i;)u+=n[o].length;for(e=new Array(u);0<=--i;)for(t=(r=n[i]).length;0<=--t;)e[--u]=r[t];return e};var z=Math.abs;function d(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function m(){this._=Object.create(null)}q.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],o=function(n){var t=1;for(;n*t%1;)t*=10;return t}(z(e)),u=-1;if(n*=o,t*=o,(e*=o)<0)for(;(r=n+e*++u)>t;)i.push(r/o);else for(;(r=n+e*++u)<t;)i.push(r/o);return i},q.map=function(n,t){var e=new m;if(n instanceof m)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,i=-1,o=n.length;if(1===arguments.length)for(;++i<o;)e.set(i,n[i]);else for(;++i<o;)e.set(t.call(n,r=n[i],i),r)}else for(var u in n)e.set(u,n[u]);return e};var g="__proto__",v="\0";function y(n){return(n+="")===g||n[0]===v?v+n:n}function M(n){return(n+="")[0]===v?n.slice(1):n}function _(n){return y(n)in this._}function w(n){return(n=y(n))in this._&&delete this._[n]}function b(){var n=[];for(var t in this._)n.push(M(t));return n}function k(){var n=0;for(var t in this._)++n;return n}function C(){for(var n in this._)return!1;return!0}function E(){this._=Object.create(null)}function R(n){return n}function N(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function S(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=A.length;e<r;++e){var i=A[e]+t;if(i in n)return i}}d(m,{has:_,get:function(n){return this._[y(n)]},set:function(n,t){return this._[y(n)]=t},remove:w,keys:b,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:M(t),value:this._[t]});return n},size:k,empty:C,forEach:function(n){for(var t in this._)n.call(this,M(t),this._[t])}}),q.nest=function(){var f,h,p={},d=[],t=[];function g(e,n,r){if(r>=d.length)return h?h.call(p,n):f?n.sort(f):n;for(var t,i,o,u,a=-1,l=n.length,c=d[r++],s=new m;++a<l;)(u=s.get(t=c(i=n[a])))?u.push(i):s.set(t,[i]);return e?(i=e(),o=function(n,t){i.set(n,g(e,t,r))}):(i={},o=function(n,t){i[n]=g(e,t,r)}),s.forEach(o),i}return p.map=function(n,t){return g(t,n,0)},p.entries=function(n){return function e(n,r){if(r>=d.length)return n;var i=[],o=t[r++];return n.forEach(function(n,t){i.push({key:n,values:e(t,r)})}),o?i.sort(function(n,t){return o(n.key,t.key)}):i}(g(q.map,n,0),0)},p.key=function(n){return d.push(n),p},p.sortKeys=function(n){return t[d.length-1]=n,p},p.sortValues=function(n){return f=n,p},p.rollup=function(n){return h=n,p},p},q.set=function(n){var t=new E;if(n)for(var e=0,r=n.length;e<r;++e)t.add(n[e]);return t},d(E,{has:_,add:function(n){return this._[y(n+="")]=!0,n},remove:w,values:b,size:k,empty:C,forEach:function(n){for(var t in this._)n.call(this,M(t))}}),q.behavior={},q.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=N(n,t,t[e]);return n};var A=["webkit","ms","moz","Moz","o","O"];function L(){}function F(){}function T(i){var o=[],u=new m;function n(){for(var n,t=o,e=-1,r=t.length;++e<r;)(n=t[e].on)&&n.apply(this,arguments);return i}return n.on=function(n,t){var e,r=u.get(n);return arguments.length<2?r&&r.on:(r&&(r.on=null,o=o.slice(0,e=o.indexOf(r)).concat(o.slice(e+1)),u.remove(n)),t&&o.push(u.set(n,{on:t})),i)},n}function j(){q.event.preventDefault()}function P(){for(var n,t=q.event;n=t.sourceEvent;)t=n;return t}function O(i){for(var o=new F,n=0,t=arguments.length;++n<t;)o[arguments[n]]=T(o);return o.of=function(e,r){return function(n){try{var t=n.sourceEvent=q.event;n.target=i,q.event=n,o[n.type].apply(e,r)}finally{q.event=t}}},o}q.dispatch=function(){for(var n=new F,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=T(n);return n},F.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(0<=e&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},q.event=null,q.requote=function(n){return n.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,I={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]};function H(n){return I(n,$),n}var Y=function(n,t){return t.querySelector(n)},Z=function(n,t){return t.querySelectorAll(n)},V=function(n,t){var e=n.matches||n[S(n,"matchesSelector")];return(V=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(Y=function(n,t){return Sizzle(n,t)[0]||null},Z=Sizzle,V=Sizzle.matchesSelector),q.selection=function(){return q.select(x.documentElement)};var $=q.selection.prototype=[];function B(n){return"function"==typeof n?n:function(){return Y(n,this)}}function X(n){return"function"==typeof n?n:function(){return Z(n,this)}}$.select=function(n){var t,e,r,i,o=[];n=B(n);for(var u=-1,a=this.length;++u<a;){o.push(t=[]),t.parentNode=(r=this[u]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(e=n.call(i,i.__data__,l,u)),e&&"__data__"in i&&(e.__data__=i.__data__)):t.push(null)}return H(o)},$.selectAll=function(n){var t,e,r=[];n=X(n);for(var i=-1,o=this.length;++i<o;)for(var u=this[i],a=-1,l=u.length;++a<l;)(e=u[a])&&(r.push(t=h(n.call(e,e.__data__,a,i))),t.parentNode=e);return H(r)};var W="http://www.w3.org/1999/xhtml",J={svg:"http://www.w3.org/2000/svg",xhtml:W,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function G(t,e){return t=q.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function K(n){return n.trim().replace(/\s+/g," ")}function Q(n){return new RegExp("(?:^|\\s+)"+q.requote(n)+"(?:\\s+|$)","g")}function nn(n){return(n+"").trim().split(/^|\s+/)}function tn(e,r){var i=(e=nn(e).map(en)).length;return"function"==typeof r?function(){for(var n=-1,t=r.apply(this,arguments);++n<i;)e[n](this,t)}:function(){for(var n=-1;++n<i;)e[n](this,r)}}function en(r){var i=Q(r);return function(n,t){if(e=n.classList)return t?e.add(r):e.remove(r);var e=n.getAttribute("class")||"";t?(i.lastIndex=0,i.test(e)||n.setAttribute("class",K(e+" "+r))):n.setAttribute("class",K(e.replace(i," ")))}}function rn(t,e,r){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,r)}:function(){this.style.setProperty(t,e,r)}}function on(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function un(e){return"function"==typeof e?e:(e=q.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var n=this.ownerDocument,t=this.namespaceURI;return t===W&&n.documentElement.namespaceURI===W?n.createElement(e):n.createElementNS(t,e)}}function an(){var n=this.parentNode;n&&n.removeChild(this)}function ln(n){return{__data__:n}}function cn(n){return function(){return V(this,n)}}function sn(n,t){for(var e=0,r=n.length;e<r;e++)for(var i,o=n[e],u=0,a=o.length;u<a;u++)(i=o[u])&&t(i,u,e);return n}function fn(n){return I(n,hn),n}q.ns={prefix:J,qualify:function(n){var t=n.indexOf(":"),e=n;return 0<=t&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),J.hasOwnProperty(e)?{space:J[e],local:n}:n}},$.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return(n=q.ns.qualify(n)).local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(G(t,n[t]));return this}return this.each(G(n,t))},$.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=nn(n)).length,i=-1;if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute("class");++i<r;)if(!Q(n[i]).test(t))return!1;return!0}for(t in n)this.each(tn(t,n[t]));return this}return this.each(tn(n,t))},$.style=function(n,t,e){var r=arguments.length;if(r<3){if("string"!=typeof n){for(e in r<2&&(t=""),n)this.each(rn(e,n[e],t));return this}if(r<2){var i=this.node();return D(i).getComputedStyle(i,null).getPropertyValue(n)}e=""}return this.each(rn(n,t,e))},$.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(on(t,n[t]));return this}return this.each(on(n,t))},$.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},$.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},$.append=function(n){return n=un(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},$.insert=function(n,t){return n=un(n),t=B(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},$.remove=function(){return this.each(an)},$.data=function(n,d){var t,e,r=-1,i=this.length;if(!arguments.length){for(n=new Array(i=(t=this[0]).length);++r<i;)(e=t[r])&&(n[r]=e.__data__);return n}function o(n,t){var e,r,i,o=n.length,u=t.length,a=Math.min(o,u),l=new Array(u),c=new Array(u),s=new Array(o);if(d){var f,h=new m,p=new Array(o);for(e=-1;++e<o;)(r=n[e])&&(h.has(f=d.call(r,r.__data__,e))?s[e]=r:h.set(f,r),p[e]=f);for(e=-1;++e<u;)(r=h.get(f=d.call(t,i=t[e],e)))?!0!==r&&((l[e]=r).__data__=i):c[e]=ln(i),h.set(f,!0);for(e=-1;++e<o;)e in p&&!0!==h.get(p[e])&&(s[e]=n[e])}else{for(e=-1;++e<a;)r=n[e],i=t[e],r?(r.__data__=i,l[e]=r):c[e]=ln(i);for(;e<u;++e)c[e]=ln(t[e]);for(;e<o;++e)s[e]=n[e]}c.update=l,c.parentNode=l.parentNode=s.parentNode=n.parentNode,g.push(c),v.push(l),y.push(s)}var g=fn([]),v=H([]),y=H([]);if("function"==typeof n)for(;++r<i;)o(t=this[r],n.call(t,t.parentNode.__data__,r));else for(;++r<i;)o(t=this[r],n);return v.enter=function(){return g},v.exit=function(){return y},v},$.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},$.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=cn(n));for(var o=0,u=this.length;o<u;o++){i.push(t=[]),t.parentNode=(e=this[o]).parentNode;for(var a=0,l=e.length;a<l;a++)(r=e[a])&&n.call(r,r.__data__,a,o)&&t.push(r)}return H(i)},$.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,o=r[i];0<=--i;)(e=r[i])&&(o&&o!==e.nextSibling&&o.parentNode.insertBefore(e,o),o=e);return this},$.sort=function(n){n=function(e){arguments.length||(e=l);return function(n,t){return n&&t?e(n.__data__,t.__data__):!n-!t}}.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},$.each=function(r){return sn(this,function(n,t,e){r.call(n,n.__data__,t,e)})},$.call=function(n){var t=h(arguments);return n.apply(t[0]=this,t),this},$.empty=function(){return!this.node()},$.node=function(){for(var n=0,t=this.length;n<t;n++)for(var e=this[n],r=0,i=e.length;r<i;r++){var o=e[r];if(o)return o}return null},$.size=function(){var n=0;return sn(this,function(){++n}),n};var hn=[];function pn(i,t,e){var r="__on"+i,n=i.indexOf("."),o=gn;0<n&&(i=i.slice(0,n));var u=dn.get(i);function a(){var n=this[r];n&&(this.removeEventListener(i,n,n.$),delete this[r])}return u&&(i=u,o=vn),n?t?function(){var n=o(t,h(arguments));a.call(this),this.addEventListener(i,this[r]=n,n.$=e),n._=t}:a:t?L:function(){var n,t=new RegExp("^__on([^.]+)"+q.requote(i)+"$");for(var e in this)if(n=e.match(t)){var r=this[e];this.removeEventListener(n[1],r,r.$),delete this[e]}}}q.selection.enter=fn,(q.selection.enter.prototype=hn).append=$.append,hn.empty=$.empty,hn.node=$.node,hn.call=$.call,hn.size=$.size,hn.select=function(n){for(var t,e,r,i,o,u=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,u.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,s=i.length;++c<s;)(o=i[c])?(t.push(r[c]=e=n.call(i.parentNode,o.__data__,c,a)),e.__data__=o.__data__):t.push(null)}return H(u)},hn.insert=function(n,t){var u,a,l;return arguments.length<2&&(u=this,t=function(n,t,e){var r,i=u[e].update,o=i.length;for(e!=l&&(l=e,a=0),a<=t&&(a=t+1);!(r=i[a])&&++a<o;);return r}),$.insert.call(this,n,t)},q.select=function(n){var t;return"string"==typeof n?(t=[Y(n,x)]).parentNode=x.documentElement:(t=[n]).parentNode=a(n),H([t])},q.selectAll=function(n){var t;return"string"==typeof n?(t=h(Z(n,x))).parentNode=x.documentElement:(t=h(n)).parentNode=null,H([t])},$.on=function(n,t,e){var r=arguments.length;if(r<3){if("string"!=typeof n){for(e in r<2&&(t=!1),n)this.each(pn(e,n[e],t));return this}if(r<2)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(pn(n,t,e))};var dn=q.map({mouseenter:"mouseover",mouseleave:"mouseout"});function gn(e,r){return function(n){var t=q.event;q.event=n,r[0]=this.__data__;try{e.apply(this,r)}finally{q.event=t}}}function vn(n,t){var e=gn(n,t);return function(n){var t=n.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||e.call(this,n)}}x&&dn.forEach(function(n){"on"+n in x&&dn.remove(n)});var yn,mn=0;function xn(n){var e=".dragsuppress-"+ ++mn,r="click"+e,i=q.select(D(n)).on("touchmove"+e,j).on("dragstart"+e,j).on("selectstart"+e,j);if(null==yn&&(yn=!("onselectstart"in n)&&S(n.style,"userSelect")),yn){var o=a(n).style,u=o[yn];o[yn]="none"}return function(n){if(i.on(e,null),yn&&(o[yn]=u),n){var t=function(){i.on(r,null)};i.on(r,function(){j(),t()},!0),setTimeout(t,0)}}}q.mouse=function(n){return _n(n,P())};var Mn=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function _n(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(Mn<0){var i=D(n);if(i.scrollX||i.scrollY){var o=(e=q.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Mn=!(o.f||o.e),e.remove()}}return Mn?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(n.getScreenCTM().inverse())).x,r.y]}var u=n.getBoundingClientRect();return[t.clientX-u.left-n.clientLeft,t.clientY-u.top-n.clientTop]}function wn(){return q.event.changedTouches[0].identifier}q.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=P().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===e)return _n(n,r)},q.behavior.drag=function(){var g=O(e,"drag","dragstart","dragend"),v=null,n=r(L,q.mouse,D,"mousemove","mouseup"),t=r(wn,q.touch,R,"touchmove","touchend");function e(){this.on("mousedown.drag",n).on("touchstart.drag",t)}function r(s,f,h,p,d){return function(){var r,n=q.event.target.correspondingElement||q.event.target,i=this.parentNode,o=g.of(this,arguments),u=0,a=s(),t=".drag"+(null==a?"":"-"+a),e=q.select(h(n)).on(p+t,function(){var n,t,e=f(i,a);if(!e)return;n=e[0]-c[0],t=e[1]-c[1],u|=n|t,o({type:"drag",x:(c=e)[0]+r[0],y:e[1]+r[1],dx:n,dy:t})}).on(d+t,function(){if(!f(i,a))return;e.on(p+t,null).on(d+t,null),l(u),o({type:"dragend"})}),l=xn(n),c=f(i,a);r=v?[(r=v.apply(this,arguments)).x-c[0],r.y-c[1]]:[0,0],o({type:"dragstart"})}}return e.origin=function(n){return arguments.length?(v=n,e):v},q.rebind(e,g,"on")},q.touches=function(e,n){return arguments.length<2&&(n=P().touches),n?h(n).map(function(n){var t=_n(e,n);return t.identifier=n.identifier,t}):[]};var bn=1e-6,kn=bn*bn,Cn=Math.PI,En=2*Cn,Nn=En-bn,Sn=Cn/2,An=Cn/180,Ln=180/Cn;function Fn(n){return 0<n?1:n<0?-1:0}function Tn(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function zn(n){return 1<n?0:n<-1?Cn:Math.acos(n)}function qn(n){return 1<n?Sn:n<-1?-Sn:Math.asin(n)}function Dn(n){return((n=Math.exp(n))+1/n)/2}function Rn(n){return(n=Math.sin(n/2))*n}var jn=Math.SQRT2;q.interpolateZoom=function(n,t){var e,u,a=n[0],l=n[1],c=n[2],r=t[0],i=t[1],o=t[2],s=r-a,f=i-l,h=s*s+f*f;if(h<kn)u=Math.log(o/c)/jn,e=function(n){return[a+n*s,l+n*f,c*Math.exp(jn*n*u)]};else{var p=Math.sqrt(h),d=(o*o-c*c+4*h)/(2*c*2*p),g=(o*o-c*c-4*h)/(2*o*2*p),v=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);u=(y-v)/jn,e=function(n){var t,e,r=n*u,i=Dn(v),o=c/(2*p)*(i*(e=jn*r+v,((e=Math.exp(2*e))-1)/(e+1))-(t=v,((t=Math.exp(t))-1/t)/2));return[a+o*s,l+o*f,c*i/Dn(jn*r+v)]}}return e.duration=1e3*u,e},q.behavior.zoom=function(){var t,l,e,r,M,i,o,u,a,_={x:0,y:0,k:1},c=[960,500],s=Un,f=250,h=0,w="mousedown.zoom",p="mousemove.zoom",d="mouseup.zoom",b="touchstart.zoom",k=O(g,"zoomstart","zoom","zoomend");function g(n){n.on(w,T).on(On+".zoom",y).on("dblclick.zoom",m).on(b,z)}function C(n){return[(n[0]-_.x)/_.k,(n[1]-_.y)/_.k]}function E(n){_.k=Math.max(s[0],Math.min(s[1],n))}function N(n,t){var e;t=[(e=t)[0]*_.k+_.x,e[1]*_.k+_.y],_.x+=n[0]-t[0],_.y+=n[1]-t[1]}function S(n,t,e,r){n.__chart__={x:_.x,y:_.y,k:_.k},E(Math.pow(2,r)),N(l=t,e),n=q.select(n),0<f&&(n=n.transition().duration(f)),n.call(g.event)}function v(){o&&o.domain(i.range().map(function(n){return(n-_.x)/_.k}).map(i.invert)),a&&a.domain(u.range().map(function(n){return(n-_.y)/_.k}).map(u.invert))}function A(n){h++||n({type:"zoomstart"})}function L(n){v(),n({type:"zoom",scale:_.k,translate:[_.x,_.y]})}function F(n){--h||(n({type:"zoomend"}),l=null)}function T(){var n=this,t=k.of(n,arguments),e=0,r=q.select(D(n)).on(p,function(){e=1,N(q.mouse(n),i),L(t)}).on(d,function(){r.on(p,null).on(d,null),o(e),F(t)}),i=C(q.mouse(n)),o=xn(n);oa.call(n),A(t)}function z(){var c,s=this,f=k.of(s,arguments),h={},p=0,i=".zoom-"+q.event.changedTouches[0].identifier,d="touchmove"+i,g="touchend"+i,v=[],o=q.select(s),u=xn(s);function y(){var n=q.touches(s);return c=_.k,n.forEach(function(n){n.identifier in h&&(h[n.identifier]=C(n))}),n}function n(){var n=q.event.target;q.select(n).on(d,m).on(g,x),v.push(n);for(var t=q.event.changedTouches,e=0,r=t.length;e<r;++e)h[t[e].identifier]=null;var i=y(),o=Date.now();if(1===i.length){if(o-M<500){var u=i[0];S(s,u,h[u.identifier],Math.floor(Math.log(_.k)/Math.LN2)+1),j()}M=o}else if(1<i.length){u=i[0];var a=i[1],l=u[0]-a[0],c=u[1]-a[1];p=l*l+c*c}}function m(){var n,t,e,r,i=q.touches(s);oa.call(s);for(var o=0,u=i.length;o<u;++o,r=null)if(e=i[o],r=h[e.identifier]){if(t)break;n=e,t=r}if(r){var a=(a=e[0]-n[0])*a+(a=e[1]-n[1])*a,l=p&&Math.sqrt(a/p);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],E(l*c)}M=null,N(n,t),L(f)}function x(){if(q.event.touches.length){for(var n=q.event.changedTouches,t=0,e=n.length;t<e;++t)delete h[n[t].identifier];for(var r in h)return void y()}q.selectAll(v).on(i,null),o.on(w,T).on(b,z),u(),F(f)}n(),A(f),o.on(w,null).on(b,n)}function y(){var n=k.of(this,arguments);r?clearTimeout(r):(oa.call(this),t=C(l=e||q.mouse(this)),A(n)),r=setTimeout(function(){r=null,F(n)},50),j(),E(Math.pow(2,.002*Pn())*_.k),N(l,t),L(n)}function m(){var n=q.mouse(this),t=Math.log(_.k)/Math.LN2;S(this,n,C(n),q.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}return On||(On="onwheel"in x?(Pn=function(){return-q.event.deltaY*(q.event.deltaMode?120:1)},"wheel"):"onmousewheel"in x?(Pn=function(){return q.event.wheelDelta},"mousewheel"):(Pn=function(){return-q.event.detail},"MozMousePixelScroll")),g.event=function(n){n.each(function(){var a=k.of(this,arguments),t=_;la?q.select(this).transition().each("start.zoom",function(){_=this.__chart__||{x:0,y:0,k:1},A(a)}).tween("zoom:zoom",function(){var r=c[0],n=c[1],i=l?l[0]:r/2,o=l?l[1]:n/2,u=q.interpolateZoom([(i-_.x)/_.k,(o-_.y)/_.k,r/_.k],[(i-t.x)/t.k,(o-t.y)/t.k,r/t.k]);return function(n){var t=u(n),e=r/t[2];this.__chart__=_={x:i-t[0]*e,y:o-t[1]*e,k:e},L(a)}}).each("interrupt.zoom",function(){F(a)}).each("end.zoom",function(){F(a)}):(this.__chart__=_,A(a),L(a),F(a))})},g.translate=function(n){return arguments.length?(_={x:+n[0],y:+n[1],k:_.k},v(),g):[_.x,_.y]},g.scale=function(n){return arguments.length?(_={x:_.x,y:_.y,k:null},E(+n),v(),g):_.k},g.scaleExtent=function(n){return arguments.length?(s=null==n?Un:[+n[0],+n[1]],g):s},g.center=function(n){return arguments.length?(e=n&&[+n[0],+n[1]],g):e},g.size=function(n){return arguments.length?(c=n&&[+n[0],+n[1]],g):c},g.duration=function(n){return arguments.length?(f=+n,g):f},g.x=function(n){return arguments.length?(i=(o=n).copy(),_={x:0,y:0,k:1},g):o},g.y=function(n){return arguments.length?(u=(a=n).copy(),_={x:0,y:0,k:1},g):a},q.rebind(g,k,"on")};var Pn,On,Un=[0,1/0];function In(){}function Hn(n,t,e){return this instanceof Hn?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof Hn?new Hn(n.h,n.s,n.l):st(""+n,ft,Hn):new Hn(n,t,e)}(q.color=In).prototype.toString=function(){return this.rgb()+""};var Yn=(q.hsl=Hn).prototype=new In;function Zn(n,t,e){var r,i;function o(n){return Math.round(255*(360<(t=n)?t-=360:t<0&&(t+=360),t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r));var t}return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:1<t?1:t,r=2*(e=e<0?0:1<e?1:e)-(i=e<=.5?e*(1+t):e+t-e*t),new ot(o(n+120),o(n),o(n-120))}function Vn(n,t,e){return this instanceof Vn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof Vn?new Vn(n.h,n.c,n.l):tt(n instanceof Xn?n.l:(n=ht((n=q.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new Vn(n,t,e)}Yn.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new Hn(this.h,this.s,this.l/n)},Yn.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new Hn(this.h,this.s,n*this.l)},Yn.rgb=function(){return Zn(this.h,this.s,this.l)};var $n=(q.hcl=Vn).prototype=new In;function Bn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new Xn(e,Math.cos(n*=An)*t,Math.sin(n)*t)}function Xn(n,t,e){return this instanceof Xn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof Xn?new Xn(n.l,n.a,n.b):n instanceof Vn?Bn(n.h,n.c,n.l):ht((n=ot(n)).r,n.g,n.b):new Xn(n,t,e)}$n.brighter=function(n){return new Vn(this.h,this.c,Math.min(100,this.l+Wn*(arguments.length?n:1)))},$n.darker=function(n){return new Vn(this.h,this.c,Math.max(0,this.l-Wn*(arguments.length?n:1)))},$n.rgb=function(){return Bn(this.h,this.c,this.l).rgb()},q.lab=Xn;var Wn=18,Jn=.95047,Gn=1,Kn=1.08883,Qn=Xn.prototype=new In;function nt(n,t,e){var r=(n+16)/116,i=r+t/500,o=r-e/200;return new ot(it(3.2404542*(i=et(i)*Jn)-1.5371385*(r=et(r)*Gn)-.4985314*(o=et(o)*Kn)),it(-.969266*i+1.8760108*r+.041556*o),it(.0556434*i-.2040259*r+1.0572252*o))}function tt(n,t,e){return 0<n?new Vn(Math.atan2(e,t)*Ln,Math.sqrt(t*t+e*e),n):new Vn(NaN,NaN,n)}function et(n){return.206893034<n?n*n*n:(n-4/29)/7.787037}function rt(n){return.008856<n?Math.pow(n,1/3):7.787037*n+4/29}function it(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function ot(n,t,e){return this instanceof ot?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof ot?new ot(n.r,n.g,n.b):st(""+n,ot,Zn):new ot(n,t,e)}function ut(n){return new ot(n>>16,n>>8&255,255&n)}function at(n){return ut(n)+""}Qn.brighter=function(n){return new Xn(Math.min(100,this.l+Wn*(arguments.length?n:1)),this.a,this.b)},Qn.darker=function(n){return new Xn(Math.max(0,this.l-Wn*(arguments.length?n:1)),this.a,this.b)},Qn.rgb=function(){return nt(this.l,this.a,this.b)};var lt=(q.rgb=ot).prototype=new In;function ct(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function st(n,t,e){var r,i,o,u=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(dt(i[0]),dt(i[1]),dt(i[2]))}return(o=gt.get(n))?t(o.r,o.g,o.b):(null==n||"#"!==n.charAt(0)||isNaN(o=parseInt(n.slice(1),16))||(4===n.length?(u=(3840&o)>>4,u|=u>>4,a=240&o,a|=a>>4,l=15&o,l|=l<<4):7===n.length&&(u=(16711680&o)>>16,a=(65280&o)>>8,l=255&o)),t(u,a,l))}function ft(n,t,e){var r,i,o=Math.min(n/=255,t/=255,e/=255),u=Math.max(n,t,e),a=u-o,l=(u+o)/2;return a?(i=l<.5?a/(u+o):a/(2-u-o),r=n==u?(t-e)/a+(t<e?6:0):t==u?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=0<l&&l<1?0:r),new Hn(r,i,l)}function ht(n,t,e){var r=rt((.4124564*(n=pt(n))+.3575761*(t=pt(t))+.1804375*(e=pt(e)))/Jn),i=rt((.2126729*n+.7151522*t+.072175*e)/Gn);return Xn(116*i-16,500*(r-i),200*(i-rt((.0193339*n+.119192*t+.9503041*e)/Kn)))}function pt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function dt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}lt.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b;return t||e||r?(t&&t<30&&(t=30),e&&e<30&&(e=30),r&&r<30&&(r=30),new ot(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new ot(30,30,30)},lt.darker=function(n){return new ot((n=Math.pow(.7,arguments.length?n:1))*this.r,n*this.g,n*this.b)},lt.hsl=function(){return ft(this.r,this.g,this.b)},lt.toString=function(){return"#"+ct(this.r)+ct(this.g)+ct(this.b)};var gt=q.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function vt(n){return"function"==typeof n?n:function(){return n}}function yt(r){return function(n,t,e){return 2===arguments.length&&"function"==typeof t&&(e=t,t=null),mt(n,t,r,e)}}function mt(i,o,u,n){var e,a={},l=q.dispatch("beforesend","progress","load","error"),c={},s=new XMLHttpRequest,f=null;function t(){var n,t,e,r=s.status;if(!r&&((e=(t=s).responseType)&&"text"!==e?t.response:t.responseText)||200<=r&&r<300||304===r){try{n=u.call(a,s)}catch(n){return void l.error.call(a,n)}l.load.call(a,n)}else l.error.call(a,s)}return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(i)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=t:s.onreadystatechange=function(){3<s.readyState&&t()},s.onprogress=function(n){var t=q.event;q.event=n;try{l.progress.call(a,s)}finally{q.event=t}},a.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?c[n]:(null==t?delete c[n]:c[n]=t+"",a)},a.mimeType=function(n){return arguments.length?(o=null==n?null:n+"",a):o},a.responseType=function(n){return arguments.length?(f=n,a):f},a.response=function(n){return u=n,a},["get","post"].forEach(function(n){a[n]=function(){return a.send.apply(a,[n].concat(h(arguments)))}}),a.send=function(n,t,e){if(2===arguments.length&&"function"==typeof t&&(e=t,t=null),s.open(n,i,!0),null==o||"accept"in c||(c.accept=o+",*/*"),s.setRequestHeader)for(var r in c)s.setRequestHeader(r,c[r]);return null!=o&&s.overrideMimeType&&s.overrideMimeType(o),null!=f&&(s.responseType=f),null!=e&&a.on("error",e).on("load",function(n){e(null,n)}),l.beforesend.call(a,s),s.send(null==t?null:t),a},a.abort=function(){return s.abort(),a},q.rebind(a,l,"on"),null==n?a:a.get(1===(e=n).length?function(n,t){e(null==n?t:null)}:e)}gt.forEach(function(n,t){gt.set(n,ut(t))}),q.functor=vt,q.xhr=yt(R),q.dsv=function(i,o){var t=new RegExp('["'+i+"\n]"),h=i.charCodeAt(0);function u(n,t,e){arguments.length<3&&(e=t,t=null);var r=mt(n,o,null==t?a:l(t),e);return r.row=function(n){return arguments.length?r.response(null==(t=n)?a:l(n)):t},r}function a(n){return u.parse(n.responseText)}function l(t){return function(n){return u.parse(n.responseText,t)}}function e(n){return n.map(c).join(i)}function c(n){return t.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}return u.parse=function(n,r){var i;return u.parseRows(n,function(n,t){if(i)return i(n,t-1);var e=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");i=r?function(n,t){return r(e(n),t)}:e})},u.parseRows=function(i,n){var t,o,u={},a={},e=[],l=i.length,c=0,r=0;function s(){if(l<=c)return a;if(o)return o=!1,u;var n=c;if(34===i.charCodeAt(n)){for(var t=n;t++<l;)if(34===i.charCodeAt(t)){if(34!==i.charCodeAt(t+1))break;++t}return c=t+2,13===(e=i.charCodeAt(t+1))?(o=!0,10===i.charCodeAt(t+2)&&++c):10===e&&(o=!0),i.slice(n+1,t).replace(/""/g,'"')}for(;c<l;){var e,r=1;if(10===(e=i.charCodeAt(c++)))o=!0;else if(13===e)o=!0,10===i.charCodeAt(c)&&(++c,++r);else if(e!==h)continue;return i.slice(n,c-r)}return i.slice(n)}for(;(t=s())!==a;){for(var f=[];t!==u&&t!==a;)f.push(t),t=s();n&&null==(f=n(f,r++))||e.push(f)}return e},u.format=function(n){if(Array.isArray(n[0]))return u.formatRows(n);var e=new E,r=[];return n.forEach(function(n){for(var t in n)e.has(t)||r.push(e.add(t))}),[r.map(c).join(i)].concat(n.map(function(t){return r.map(function(n){return c(t[n])}).join(i)})).join("\n")},u.formatRows=function(n){return n.map(e).join("\n")},u},q.csv=q.dsv(",","text/csv"),q.tsv=q.dsv("\t","text/tab-separated-values");var xt,Mt,_t,wt,bt=this[S(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};function kt(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i={c:n,t:e+t,n:null};return Mt?Mt.n=i:xt=i,Mt=i,_t||(wt=clearTimeout(wt),_t=1,bt(Ct)),i}function Ct(){var n=Et(),t=Nt()-n;24<t?(isFinite(t)&&(clearTimeout(wt),wt=setTimeout(Ct,t)),_t=0):(_t=1,bt(Ct))}function Et(){for(var n=Date.now(),t=xt;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Nt(){for(var n,t=xt,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:xt=t.n;return Mt=n,e}function St(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}q.timer=function(){kt.apply(this,arguments)},q.timer.flush=function(){Et(),Nt()},q.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var At=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(function(n,t){var e=Math.pow(10,3*z(8-t));return{scale:8<t?function(n){return n/e}:function(n){return n*e},symbol:n}});q.formatPrefix=function(n,t){var e=0;return(n=+n)&&(n<0&&(n*=-1),t&&(n=q.round(n,St(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),At[8+e/3]};var Lt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ft=q.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=q.round(n,St(n,t))).toFixed(Math.max(0,Math.min(20,St(n*(1+1e-15),t))))}});function Tt(n){return n+""}var zt=q.time={},qt=Date;function Dt(){this._=new Date(1<arguments.length?Date.UTC.apply(this,arguments):arguments[0])}Dt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Rt.setUTCDate.apply(this._,arguments)},setDay:function(){Rt.setUTCDay.apply(this._,arguments)},setFullYear:function(){Rt.setUTCFullYear.apply(this._,arguments)},setHours:function(){Rt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Rt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Rt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Rt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Rt.setUTCSeconds.apply(this._,arguments)},setTime:function(){Rt.setTime.apply(this._,arguments)}};var Rt=Date.prototype;function jt(r,o,u){function n(n){var t=r(n),e=i(t,1);return n-t<e-n?t:e}function a(n){return o(n=r(new qt(n-1)),1),n}function i(n,t){return o(n=new qt(+n),t),n}function l(n,t,e){var r=a(n),i=[];if(1<e)for(;r<t;)u(r)%e||i.push(new Date(+r)),o(r,1);else for(;r<t;)i.push(new Date(+r)),o(r,1);return i}(r.floor=r).round=n,r.ceil=a,r.offset=i,r.range=l;var t=r.utc=Pt(r);return(t.floor=t).round=Pt(n),t.ceil=Pt(a),t.offset=Pt(i),t.range=function(n,t,e){try{var r=new(qt=Dt);return r._=n,l(r,t,e)}finally{qt=Date}},r}function Pt(r){return function(n,t){try{var e=new(qt=Dt);return e._=n,r(e,t)._}finally{qt=Date}}}zt.year=jt(function(n){return(n=zt.day(n)).setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),zt.years=zt.year.range,zt.years.utc=zt.year.utc.range,zt.day=jt(function(n){var t=new qt(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),zt.days=zt.day.range,zt.days.utc=zt.day.utc.range,zt.dayOfYear=function(n){var t=zt.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,e){e=7-e;var t=zt[n]=jt(function(n){return(n=zt.day(n)).setDate(n.getDate()-(n.getDay()+e)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var t=zt.year(n).getDay();return Math.floor((zt.dayOfYear(n)+(t+e)%7)/7)-(t!==e)});zt[n+"s"]=t.range,zt[n+"s"].utc=t.utc.range,zt[n+"OfYear"]=function(n){var t=zt.year(n).getDay();return Math.floor((zt.dayOfYear(n)+(t+e)%7)/7)}}),zt.week=zt.sunday,zt.weeks=zt.sunday.range,zt.weeks.utc=zt.sunday.utc.range,zt.weekOfYear=zt.sundayOfYear;var Ot={"-":"",_:" ",0:"0"},Ut=/^\s*\d+/,It=/^%/;function Ht(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(t)+i:i)}function Yt(n){return new RegExp("^(?:"+n.map(q.requote).join("|")+")","i")}function Zt(n){for(var t=new m,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Vt(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function $t(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Bt(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Xt(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Wt(n,t,e){Ut.lastIndex=0;var r,i=Ut.exec(t.slice(e,e+2));return i?(n.y=(r=+i[0])+(68<r?1900:2e3),e+i[0].length):-1}function Jt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Gt(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Kt(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Qt(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ne(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function te(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ee(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function re(n,t,e){Ut.lastIndex=0;var r=Ut.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ie(n){var t=n.getTimezoneOffset(),e=0<t?"-":"+",r=z(t)/60|0,i=z(t)%60;return e+Ht(r,"0",2)+Ht(i,"0",2)}function oe(n,t,e){It.lastIndex=0;var r=It.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ue(r){for(var n=r.length,t=-1;++t<n;)r[t][0]=this(r[t][0]);return function(n){for(var t=0,e=r[t];!e[1](n);)e=r[++t];return e[0](n)}}q.locale=function(n){return{numberFormat:(t=n,k=t.decimal,a=t.thousands,l=t.grouping,r=t.currency,C=l&&a?function(n,t){for(var e=n.length,r=[],i=0,o=l[0],u=0;0<e&&0<o&&(t<u+o+1&&(o=Math.max(1,t-u)),r.push(n.substring(e-=o,e+o)),!((u+=o+1)>t));)o=l[i=(i+1)%l.length];return r.reverse().join(a)}:R,function(n){var t=Lt.exec(n),s=t[1]||" ",f=t[2]||">",h=t[3]||"-",e=t[4]||"",p=t[5],d=+t[6],g=t[7],v=t[8],y=t[9],m=1,x="",M="",_=!1,w=!0;switch(v&&(v=+v.substring(1)),(p||"0"===s&&"="===f)&&(p=s="0",f="="),y){case"n":g=!0,y="g";break;case"%":m=100,M="%",y="f";break;case"p":m=100,M="%",y="r";break;case"b":case"o":case"x":case"X":"#"===e&&(x="0"+y.toLowerCase());case"c":w=!1;case"d":_=!0,v=0;break;case"s":m=-1,y="r"}"$"===e&&(x=r[0],M=r[1]),"r"!=y||v||(y="g"),null!=v&&("g"==y?v=Math.max(1,Math.min(21,v)):"e"!=y&&"f"!=y||(v=Math.max(0,Math.min(20,v)))),y=Ft.get(y)||Tt;var b=p&&g;return function(n){var t=M;if(_&&n%1)return"";var e=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===h?"":h;if(m<0){var r=q.formatPrefix(n,v);n=r.scale(n),t=r.symbol+M}else n*=m;var i,o,u=(n=y(n,v)).lastIndexOf(".");if(u<0){var a=w?n.lastIndexOf("e"):-1;a<0?(i=n,o=""):(i=n.substring(0,a),o=n.substring(a))}else i=n.substring(0,u),o=k+n.substring(u+1);!p&&g&&(i=C(i,1/0));var l=x.length+i.length+o.length+(b?0:e.length),c=l<d?new Array(l=d-l+1).join(s):"";return b&&(i=C(c+i,c.length?d-o.length:1/0)),e+=x,n=i+o,("<"===f?e+n+c:">"===f?c+e+n:"^"===f?c.substring(0,l>>=1)+e+n+c.substring(l):e+(b?n:c+n))+t}}),timeFormat:function(n){var t=n.dateTime,e=n.date,r=n.time,i=n.periods,o=n.days,u=n.shortDays,a=n.months,l=n.shortMonths;function c(a){var l=a.length;function n(n){for(var t,e,r,i=[],o=-1,u=0;++o<l;)37===a.charCodeAt(o)&&(i.push(a.slice(u,o)),null!=(e=Ot[t=a.charAt(++o)])&&(t=a.charAt(++o)),(r=M[t])&&(t=r(n,null==e?"e"===t?" ":"0":e)),i.push(t),u=o+1);return i.push(a.slice(u,o)),i.join("")}return n.parse=function(n){var t={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(s(t,a,n,0)!=n.length)return null;"p"in t&&(t.H=t.H%12+12*t.p);var e=null!=t.Z&&qt!==Dt,r=new(e?Dt:qt);return"j"in t?r.setFullYear(t.y,0,t.j):"W"in t||"U"in t?("w"in t||(t.w="W"in t?1:0),r.setFullYear(t.y,0,1),r.setFullYear(t.y,0,"W"in t?(t.w+6)%7+7*t.W-(r.getDay()+5)%7:t.w+7*t.U-(r.getDay()+6)%7)):r.setFullYear(t.y,t.m,t.d),r.setHours(t.H+(t.Z/100|0),t.M+t.Z%100,t.S,t.L),e?r._:r},n.toString=function(){return a},n}function s(n,t,e,r){for(var i,o,u,a=0,l=t.length,c=e.length;a<l;){if(c<=r)return-1;if(37===(i=t.charCodeAt(a++))){if(u=t.charAt(a++),!(o=_[u in Ot?t.charAt(a++):u])||(r=o(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}c.multi=(c.utc=function(n){var e=c(n);function t(n){try{var t=new(qt=Dt);return t._=n,e(t)}finally{qt=Date}}return t.parse=function(n){try{qt=Dt;var t=e.parse(n);return t&&t._}finally{qt=Date}},t.toString=e.toString,t}).multi=ue;var f=q.map(),h=Yt(o),p=Zt(o),d=Yt(u),g=Zt(u),v=Yt(a),y=Zt(a),m=Yt(l),x=Zt(l);i.forEach(function(n,t){f.set(n.toLowerCase(),t)});var M={a:function(n){return u[n.getDay()]},A:function(n){return o[n.getDay()]},b:function(n){return l[n.getMonth()]},B:function(n){return a[n.getMonth()]},c:c(t),d:function(n,t){return Ht(n.getDate(),t,2)},e:function(n,t){return Ht(n.getDate(),t,2)},H:function(n,t){return Ht(n.getHours(),t,2)},I:function(n,t){return Ht(n.getHours()%12||12,t,2)},j:function(n,t){return Ht(1+zt.dayOfYear(n),t,3)},L:function(n,t){return Ht(n.getMilliseconds(),t,3)},m:function(n,t){return Ht(n.getMonth()+1,t,2)},M:function(n,t){return Ht(n.getMinutes(),t,2)},p:function(n){return i[+(12<=n.getHours())]},S:function(n,t){return Ht(n.getSeconds(),t,2)},U:function(n,t){return Ht(zt.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Ht(zt.mondayOfYear(n),t,2)},x:c(e),X:c(r),y:function(n,t){return Ht(n.getFullYear()%100,t,2)},Y:function(n,t){return Ht(n.getFullYear()%1e4,t,4)},Z:ie,"%":function(){return"%"}},_={a:function(n,t,e){d.lastIndex=0;var r=d.exec(t.slice(e));return r?(n.w=g.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(n,t,e){h.lastIndex=0;var r=h.exec(t.slice(e));return r?(n.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(n,t,e){m.lastIndex=0;var r=m.exec(t.slice(e));return r?(n.m=x.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(n,t,e){v.lastIndex=0;var r=v.exec(t.slice(e));return r?(n.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(n,t,e){return s(n,M.c.toString(),t,e)},d:Kt,e:Kt,H:ne,I:ne,j:Qt,L:re,m:Gt,M:te,p:function(n,t,e){var r=f.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)},S:ee,U:$t,w:Vt,W:Bt,x:function(n,t,e){return s(n,M.x.toString(),t,e)},X:function(n,t,e){return s(n,M.X.toString(),t,e)},y:Wt,Y:Xt,Z:Jt,"%":oe};return c}(n)};var t,k,a,l,r,C};var ae=q.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function le(){}q.format=ae.numberFormat,q.geo={},le.prototype={s:0,t:0,add:function(n){se(n,this.t,ce),se(ce.s,this.s,this),this.s?this.t+=ce.t:this.s=ce.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ce=new le;function se(n,t,e){var r=e.s=n+t,i=r-n,o=r-i;e.t=n-o+(t-i)}function fe(n,t){n&&pe.hasOwnProperty(n.type)&&pe[n.type](n,t)}q.geo.stream=function(n,t){n&&he.hasOwnProperty(n.type)?he[n.type](n,t):fe(n,t)};var he={Feature:function(n,t){fe(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)fe(e[r].geometry,t)}},pe={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){de(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)de(e[r],t,0)},Polygon:function(n,t){ge(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)ge(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)fe(e[r],t)}};function de(n,t,e){var r,i=-1,o=n.length-e;for(t.lineStart();++i<o;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function ge(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)de(n[e],t,1);t.polygonEnd()}q.geo.area=function(n){return ve=0,q.geo.stream(n,Ae),ve};var ve,ye,me,xe,Me,_e,we,be,ke,Ce,Ee,Ne,Se=new le,Ae={sphere:function(){ve+=4*Cn},point:L,lineStart:L,lineEnd:L,polygonStart:function(){Se.reset(),Ae.lineStart=Le},polygonEnd:function(){var n=2*Se;ve+=n<0?4*Cn+n:n,Ae.lineStart=Ae.lineEnd=Ae.point=L}};function Le(){var e,r,s,f,h;function i(n,t){t=t*An/2+Cn/4;var e=(n*=An)-s,r=0<=e?1:-1,i=r*e,o=Math.cos(t),u=Math.sin(t),a=h*u,l=f*o+a*Math.cos(i),c=a*r*Math.sin(i);Se.add(Math.atan2(c,l)),s=n,f=o,h=u}Ae.point=function(n,t){Ae.point=i,s=(e=n)*An,f=Math.cos(t=(r=t)*An/2+Cn/4),h=Math.sin(t)},Ae.lineEnd=function(){i(e,r)}}function Fe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function Te(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function ze(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function qe(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function De(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Re(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function je(n){return[Math.atan2(n[1],n[0]),qn(n[2])]}function Pe(n,t){return z(n[0]-t[0])<bn&&z(n[1]-t[1])<bn}q.geo.bounds=function(){var s,f,h,p,d,r,i,g,o,l,c,v={point:y,lineStart:n,lineEnd:t,polygonStart:function(){v.point=e,v.lineStart=a,v.lineEnd=m,o=0,Ae.polygonStart()},polygonEnd:function(){Ae.polygonEnd(),v.point=y,v.lineStart=n,v.lineEnd=t,Se<0?(s=-(h=180),f=-(p=90)):bn<o?p=90:o<-bn&&(f=-90),c[0]=s,c[1]=h}};function y(n,t){l.push(c=[s=n,h=n]),t<f&&(f=t),p<t&&(p=t)}function u(n,t){var e=Fe([n*An,t*An]);if(g){var r=ze(g,e),i=ze([r[1],-r[0],0],r);Re(i),i=je(i);var o=n-d,u=0<o?1:-1,a=i[0]*Ln*u,l=180<z(o);if(l^(u*d<a&&a<u*n)){var c=i[1]*Ln;p<c&&(p=c)}else if(l^(u*d<(a=(a+360)%360-180)&&a<u*n)){(c=-i[1]*Ln)<f&&(f=c)}else t<f&&(f=t),p<t&&(p=t);l?n<d?x(s,n)>x(s,h)&&(h=n):x(n,h)>x(s,h)&&(s=n):s<=h?(n<s&&(s=n),h<n&&(h=n)):d<n?x(s,n)>x(s,h)&&(h=n):x(n,h)>x(s,h)&&(s=n)}else y(n,t);g=e,d=n}function n(){v.point=u}function t(){c[0]=s,c[1]=h,v.point=y,g=null}function e(n,t){if(g){var e=n-d;o+=180<z(e)?e+(0<e?360:-360):e}else r=n,i=t;Ae.point(n,t),u(n,t)}function a(){Ae.lineStart()}function m(){e(r,i),Ae.lineEnd(),z(o)>bn&&(s=-(h=180)),c[0]=s,c[1]=h,g=null}function x(n,t){return(t-=n)<0?t+360:t}function M(n,t){return n[0]-t[0]}function _(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}return function(n){if(p=h=-(s=f=1/0),l=[],q.geo.stream(n,v),i=l.length){l.sort(M);for(var t=1,e=[a=l[0]];t<i;++t)_((o=l[t])[0],a)||_(o[1],a)?(x(a[0],o[1])>x(a[0],a[1])&&(a[1]=o[1]),x(o[0],a[1])>x(a[0],a[1])&&(a[0]=o[0])):e.push(a=o);for(var r,i,o,u=-1/0,a=(t=0,e[i=e.length-1]);t<=i;a=o,++t)o=e[t],(r=x(a[1],o[0]))>u&&(u=r,s=o[0],h=a[1])}return l=c=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,p]]}}(),q.geo.centroid=function(n){ye=me=xe=Me=_e=we=be=ke=Ce=Ee=Ne=0,q.geo.stream(n,Oe);var t=Ce,e=Ee,r=Ne,i=t*t+e*e+r*r;return i<kn&&(t=we,e=be,r=ke,me<bn&&(t=xe,e=Me,r=_e),(i=t*t+e*e+r*r)<kn)?[NaN,NaN]:[Math.atan2(e,t)*Ln,qn(r/Math.sqrt(i))*Ln]};var Oe={sphere:L,point:Ue,lineStart:He,lineEnd:Ye,polygonStart:function(){Oe.lineStart=Ze},polygonEnd:function(){Oe.lineStart=He}};function Ue(n,t){n*=An;var e=Math.cos(t*=An);Ie(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Ie(n,t,e){xe+=(n-xe)/++ye,Me+=(t-Me)/ye,_e+=(e-_e)/ye}function He(){var a,l,c;function r(n,t){n*=An;var e=Math.cos(t*=An),r=e*Math.cos(n),i=e*Math.sin(n),o=Math.sin(t),u=Math.atan2(Math.sqrt((u=l*o-c*i)*u+(u=c*r-a*o)*u+(u=a*i-l*r)*u),a*r+l*i+c*o);me+=u,we+=u*(a+(a=r)),be+=u*(l+(l=i)),ke+=u*(c+(c=o)),Ie(a,l,c)}Oe.point=function(n,t){n*=An;var e=Math.cos(t*=An);a=e*Math.cos(n),l=e*Math.sin(n),c=Math.sin(t),Oe.point=r,Ie(a,l,c)}}function Ye(){Oe.point=Ue}function Ze(){var r,i,p,d,g;function o(n,t){n*=An;var e=Math.cos(t*=An),r=e*Math.cos(n),i=e*Math.sin(n),o=Math.sin(t),u=d*o-g*i,a=g*r-p*o,l=p*i-d*r,c=Math.sqrt(u*u+a*a+l*l),s=p*r+d*i+g*o,f=c&&-zn(s)/c,h=Math.atan2(c,s);Ce+=f*u,Ee+=f*a,Ne+=f*l,me+=h,we+=h*(p+(p=r)),be+=h*(d+(d=i)),ke+=h*(g+(g=o)),Ie(p,d,g)}Oe.point=function(n,t){r=n,i=t,Oe.point=o,n*=An;var e=Math.cos(t*=An);p=e*Math.cos(n),d=e*Math.sin(n),g=Math.sin(t),Ie(p,d,g)},Oe.lineEnd=function(){o(r,i),Oe.lineEnd=Ye,Oe.point=Ue}}function Ve(e,r){function n(n,t){return n=e(n,t),r(n[0],n[1])}return e.invert&&r.invert&&(n.invert=function(n,t){return(n=r.invert(n,t))&&e.invert(n[0],n[1])}),n}function $e(){return!0}function Be(n,t,e,r,a){var l=[],c=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(Pe(e,r)){a.lineStart();for(var i=0;i<t;++i)a.point((e=n[i])[0],e[1]);a.lineEnd()}else{var o=new We(e,n,null,!0),u=new We(e,null,o,!1);o.o=u,l.push(o),c.push(u),u=new We(r,null,o=new We(r,n,null,!1),!0),o.o=u,l.push(o),c.push(u)}}}),c.sort(t),Xe(l),Xe(c),l.length){for(var i=0,o=e,u=c.length;i<u;++i)c[i].e=o=!o;for(var s,f,h=l[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;s=p.z,a.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(i=0,u=s.length;i<u;++i)a.point((f=s[i])[0],f[1]);else r(p.x,p.n.x,1,a);p=p.n}else{if(d)for(i=(s=p.p.z).length-1;0<=i;--i)a.point((f=s[i])[0],f[1]);else r(p.x,p.p.x,-1,a);p=p.p}s=(p=p.o).z,d=!d}while(!p.v);a.lineEnd()}}}function Xe(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function We(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Je(m,x,M,_){return function(r,u){var a,i=x(u),t=r.invert(_[0],_[1]),e={point:o,lineStart:l,lineEnd:c,polygonStart:function(){e.point=g,e.lineStart=v,e.lineEnd=y,a=[],s=[]},polygonEnd:function(){e.point=o,e.lineStart=l,e.lineEnd=c,a=q.merge(a);var n=function(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],o=0,u=0;Se.reset();for(var a=0,l=t.length;a<l;++a){var c=t[a],s=c.length;if(s)for(var f=c[0],h=f[0],p=f[1]/2+Cn/4,d=Math.sin(p),g=Math.cos(p),v=1;;){v===s&&(v=0);var y=(n=c[v])[0],m=n[1]/2+Cn/4,x=Math.sin(m),M=Math.cos(m),_=y-h,w=0<=_?1:-1,b=w*_,k=Cn<b,C=d*x;if(Se.add(Math.atan2(C*w*Math.sin(b),g*M+C*Math.cos(b))),o+=k?_+w*En:_,k^e<=h^e<=y){var E=ze(Fe(f),Fe(n));Re(E);var N=ze(i,E);Re(N);var S=(k^0<=_?-1:1)*qn(N[2]);(S<r||r===S&&(E[0]||E[1]))&&(u+=k^0<=_?1:-1)}if(!v++)break;h=y,d=x,g=M,f=n}}return(o<-bn||o<bn&&Se<-bn)^1&u}(t,s);a.length?(d||(u.polygonStart(),d=!0),Be(a,Qe,n,M,u)):n&&(d||(u.polygonStart(),d=!0),u.lineStart(),M(null,null,1,u),u.lineEnd()),d&&(u.polygonEnd(),d=!1),a=s=null},sphere:function(){u.polygonStart(),u.lineStart(),M(null,null,1,u),u.lineEnd(),u.polygonEnd()}};function o(n,t){var e=r(n,t);m(n=e[0],t=e[1])&&u.point(n,t)}function n(n,t){var e=r(n,t);i.point(e[0],e[1])}function l(){e.point=n,i.lineStart()}function c(){e.point=o,i.lineEnd()}var s,f,h=Ke(),p=x(h),d=!1;function g(n,t){f.push([n,t]);var e=r(n,t);p.point(e[0],e[1])}function v(){p.lineStart(),f=[]}function y(){g(f[0][0],f[0][1]),p.lineEnd();var n,t=p.clean(),e=h.buffer(),r=e.length;if(f.pop(),s.push(f),f=null,r)if(1&t){var i,o=-1;if(0<(r=(n=e[0]).length-1)){for(d||(u.polygonStart(),d=!0),u.lineStart();++o<r;)u.point((i=n[o])[0],i[1]);u.lineEnd()}}else 1<r&&2&t&&e.push(e.pop().concat(e.shift())),a.push(e.filter(Ge))}return e}}function Ge(n){return 1<n.length}function Ke(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(n,t){e.push([n,t])},lineEnd:L,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){1<t.length&&t.push(t.pop().concat(t.shift()))}}}function Qe(n,t){return((n=n.x)[0]<0?n[1]-Sn-bn:Sn-n[1])-((t=t.x)[0]<0?t[1]-Sn-bn:Sn-t[1])}var nr=Je($e,function(f){var h,p=NaN,d=NaN,g=NaN;return{lineStart:function(){f.lineStart(),h=1},point:function(n,t){var e,r,i,o,u,a,l,c=0<n?Cn:-Cn,s=z(n-p);z(s-Cn)<bn?(f.point(p,d=0<(d+t)/2?Sn:-Sn),f.point(g,d),f.lineEnd(),f.lineStart(),f.point(c,d),f.point(n,d),h=0):g!==c&&Cn<=s&&(z(p-g)<bn&&(p-=g*bn),z(n-c)<bn&&(n-=c*bn),e=p,r=d,i=n,o=t,l=Math.sin(e-i),d=z(l)>bn?Math.atan((Math.sin(r)*(a=Math.cos(o))*Math.sin(i)-Math.sin(o)*(u=Math.cos(r))*Math.sin(e))/(u*a*l)):(r+o)/2,f.point(g,d),f.lineEnd(),f.lineStart(),f.point(c,d),h=0),f.point(p=n,d=t),g=c},lineEnd:function(){f.lineEnd(),p=d=NaN},clean:function(){return 2-h}}},function(n,t,e,r){var i;if(null==n)i=e*Sn,r.point(-Cn,i),r.point(0,i),r.point(Cn,i),r.point(Cn,0),r.point(Cn,-i),r.point(0,-i),r.point(-Cn,-i),r.point(-Cn,0),r.point(-Cn,i);else if(z(n[0]-t[0])>bn){var o=n[0]<t[0]?Cn:-Cn;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])},[-Cn,-Cn/2]);function tr(s,f,h,p){return function(n){var t,e=n.a,r=n.b,i=e.x,o=e.y,u=0,a=1,l=r.x-i,c=r.y-o;if(t=s-i,l||!(0<t)){if(t/=l,l<0){if(t<u)return;t<a&&(a=t)}else if(0<l){if(a<t)return;u<t&&(u=t)}if(t=h-i,l||!(t<0)){if(t/=l,l<0){if(a<t)return;u<t&&(u=t)}else if(0<l){if(t<u)return;t<a&&(a=t)}if(t=f-o,c||!(0<t)){if(t/=c,c<0){if(t<u)return;t<a&&(a=t)}else if(0<c){if(a<t)return;u<t&&(u=t)}if(t=p-o,c||!(t<0)){if(t/=c,c<0){if(a<t)return;u<t&&(u=t)}else if(0<c){if(t<u)return;t<a&&(a=t)}return 0<u&&(n.a={x:i+u*l,y:o+u*c}),a<1&&(n.b={x:i+a*l,y:o+a*c}),n}}}}}}var er=1e9;function rr(M,_,w,b){return function(i){var r,s,o,u,a,l,c,f,h,p,d,g=i,n=Ke(),v=tr(M,_,w,b),t={point:e,lineStart:function(){t.point=x,s&&s.push(o=[]);p=!0,h=!1,c=f=NaN},lineEnd:function(){r&&(x(u,a),l&&h&&n.rejoin(),r.push(n.buffer()));t.point=e,h&&i.lineEnd()},polygonStart:function(){i=n,r=[],s=[],d=!0},polygonEnd:function(){i=g,r=q.merge(r);var n=function(n){for(var t=0,e=s.length,r=n[1],i=0;i<e;++i)for(var o,u=1,a=s[i],l=a.length,c=a[0];u<l;++u)o=a[u],c[1]<=r?o[1]>r&&0<Tn(c,o,n)&&++t:o[1]<=r&&Tn(c,o,n)<0&&--t,c=o;return 0!==t}([M,b]),t=d&&n,e=r.length;(t||e)&&(i.polygonStart(),t&&(i.lineStart(),y(null,null,1,i),i.lineEnd()),e&&Be(r,C,n,y,i),i.polygonEnd()),r=s=o=null}};function y(n,t,e,r){var i=0,o=0;if(null==n||(i=k(n,e))!==(o=k(t,e))||E(n,t)<0^0<e)for(;r.point(0===i||3===i?M:w,1<i?b:_),(i=(i+e+4)%4)!==o;);else r.point(t[0],t[1])}function m(n,t){return M<=n&&n<=w&&_<=t&&t<=b}function e(n,t){m(n,t)&&i.point(n,t)}function x(n,t){var e=m(n=Math.max(-er,Math.min(er,n)),t=Math.max(-er,Math.min(er,t)));if(s&&o.push([n,t]),p)u=n,a=t,p=!1,(l=e)&&(i.lineStart(),i.point(n,t));else if(e&&h)i.point(n,t);else{var r={a:{x:c,y:f},b:{x:n,y:t}};v(r)?(h||(i.lineStart(),i.point(r.a.x,r.a.y)),i.point(r.b.x,r.b.y),e||i.lineEnd(),d=!1):e&&(i.lineStart(),i.point(n,t),d=!1)}c=n,f=t,h=e}return t};function k(n,t){return z(n[0]-M)<bn?0<t?0:3:z(n[0]-w)<bn?0<t?2:1:z(n[1]-_)<bn?0<t?1:0:0<t?3:2}function C(n,t){return E(n.x,t.x)}function E(n,t){var e=k(n,1),r=k(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}}function ir(n){var t=0,e=Cn/3,r=Er(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Cn/180,e=n[1]*Cn/180):[t/Cn*180,e/Cn*180]},i}function or(n,t){var e=Math.sin(n),r=(e+Math.sin(t))/2,i=1+e*(2*r-e),o=Math.sqrt(i)/r;function u(n,t){var e=Math.sqrt(i-2*r*Math.sin(t))/r;return[e*Math.sin(n*=r),o-e*Math.cos(n)]}return u.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/r,qn((i-(n*n+e*e)*r*r)/(2*r))]},u}q.geo.clipExtent=function(){var t,e,r,i,o,u,a={stream:function(n){return o&&(o.valid=!1),(o=u(n)).valid=!0,o},extent:function(n){return arguments.length?(u=rr(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),o&&(o.valid=!1,o=null),a):[[t,e],[r,i]]}};return a.extent([[0,0],[960,500]])},(q.geo.conicEqualArea=function(){return ir(or)}).raw=or,q.geo.albers=function(){return q.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},q.geo.albersUsa=function(){var r,i,o,u,a=q.geo.albers(),l=q.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=q.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(n,t){r=[n,t]}};function f(n){var t=n[0],e=n[1];return r=null,i(t,e),r||(o(t,e),r)||u(t,e),r}return f.invert=function(n){var t=a.scale(),e=a.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(.12<=i&&i<.234&&-.425<=r&&r<-.214?l:.166<=i&&i<.234&&-.214<=r&&r<-.115?c:a).invert(n)},f.stream=function(n){var e=a.stream(n),r=l.stream(n),i=c.stream(n);return{point:function(n,t){e.point(n,t),r.point(n,t),i.point(n,t)},sphere:function(){e.sphere(),r.sphere(),i.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),i.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),i.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),i.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),i.polygonEnd()}}},f.precision=function(n){return arguments.length?(a.precision(n),l.precision(n),c.precision(n),f):a.precision()},f.scale=function(n){return arguments.length?(a.scale(n),l.scale(.35*n),c.scale(n),f.translate(a.translate())):a.scale()},f.translate=function(n){if(!arguments.length)return a.translate();var t=a.scale(),e=+n[0],r=+n[1];return i=a.translate(n).clipExtent([[e-.455*t,r-.238*t],[e+.455*t,r+.238*t]]).stream(s).point,o=l.translate([e-.307*t,r+.201*t]).clipExtent([[e-.425*t+bn,r+.12*t+bn],[e-.214*t-bn,r+.234*t-bn]]).stream(s).point,u=c.translate([e-.205*t,r+.212*t]).clipExtent([[e-.214*t+bn,r+.166*t+bn],[e-.115*t-bn,r+.234*t-bn]]).stream(s).point,f},f.scale(1070)};var ur,ar,lr,cr,sr,fr,hr={point:L,lineStart:L,lineEnd:L,polygonStart:function(){ar=0,hr.lineStart=pr},polygonEnd:function(){hr.lineStart=hr.lineEnd=hr.point=L,ur+=z(ar/2)}};function pr(){var e,r,i,o;function u(n,t){ar+=o*n-i*t,i=n,o=t}hr.point=function(n,t){hr.point=u,e=i=n,r=o=t},hr.lineEnd=function(){u(e,r)}}var dr={point:function(n,t){n<lr&&(lr=n);sr<n&&(sr=n);t<cr&&(cr=t);fr<t&&(fr=t)},lineStart:L,lineEnd:L,polygonStart:L,polygonEnd:L};function gr(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}var vr,yr={point:mr,lineStart:xr,lineEnd:Mr,polygonStart:function(){yr.lineStart=_r},polygonEnd:function(){yr.point=mr,yr.lineStart=xr,yr.lineEnd=Mr}};function mr(n,t){xe+=n,Me+=t,++_e}function xr(){var o,u;function e(n,t){var e=n-o,r=t-u,i=Math.sqrt(e*e+r*r);we+=i*(o+n)/2,be+=i*(u+t)/2,ke+=i,mr(o=n,u=t)}yr.point=function(n,t){yr.point=e,mr(o=n,u=t)}}function Mr(){yr.point=mr}function _r(){var e,r,o,u;function i(n,t){var e=n-o,r=t-u,i=Math.sqrt(e*e+r*r);we+=i*(o+n)/2,be+=i*(u+t)/2,ke+=i,Ce+=(i=u*n-o*t)*(o+n),Ee+=i*(u+t),Ne+=3*i,mr(o=n,u=t)}yr.point=function(n,t){yr.point=i,mr(e=o=n,r=u=t)},yr.lineEnd=function(){i(e,r)}}function wr(A){var L=.5,F=Math.cos(30*An),_=16;function t(n){return(_?function(i){var e,r,o,u,a,l,c,s,f,h,p,d,g={point:n,lineStart:t,lineEnd:y,polygonStart:function(){i.polygonStart(),g.lineStart=m},polygonEnd:function(){i.polygonEnd(),g.lineStart=t}};function n(n,t){n=A(n,t),i.point(n[0],n[1])}function t(){s=NaN,g.point=v,i.lineStart()}function v(n,t){var e=Fe([n,t]),r=A(n,t);T(s,f,c,h,p,d,s=r[0],f=r[1],c=n,h=e[0],p=e[1],d=e[2],_,i),i.point(s,f)}function y(){g.point=n,i.lineEnd()}function m(){t(),g.point=x,g.lineEnd=M}function x(n,t){v(e=n,t),r=s,o=f,u=h,a=p,l=d,g.point=v}function M(){T(s,f,c,h,p,d,r,o,e,u,a,l,_,i),(g.lineEnd=y)()}return g}:function(e){return kr(e,function(n,t){n=A(n,t),e.point(n[0],n[1])})})(n)}function T(n,t,e,r,i,o,u,a,l,c,s,f,h,p){var d=u-n,g=a-t,v=d*d+g*g;if(4*L<v&&h--){var y=r+c,m=i+s,x=o+f,M=Math.sqrt(y*y+m*m+x*x),_=Math.asin(x/=M),w=z(z(x)-1)<bn||z(e-l)<bn?(e+l)/2:Math.atan2(m,y),b=A(w,_),k=b[0],C=b[1],E=k-n,N=C-t,S=g*E-d*N;(L<S*S/v||.3<z((d*E+g*N)/v-.5)||r*c+i*s+o*f<F)&&(T(n,t,e,r,i,o,k,C,w,y/=M,m/=M,x,h,p),p.point(k,C),T(k,C,w,y,m,x,u,a,l,c,s,f,h,p))}}return t.precision=function(n){return arguments.length?(_=0<(L=n*n)&&16,t):Math.sqrt(L)},t}function br(n){this.stream=n}function kr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Cr(n){return Er(function(){return n})()}function Er(n){var e,t,r,i,o,u,a=wr(function(n,t){return[(n=e(n,t))[0]*l+i,o-n[1]*l]}),l=150,c=480,s=250,f=0,h=0,p=0,d=0,g=0,v=nr,y=R,m=null,x=null;function M(n){return[(n=r(n[0]*An,n[1]*An))[0]*l+i,o-n[1]*l]}function _(n){return(n=r.invert((n[0]-i)/l,(o-n[1])/l))&&[n[0]*Ln,n[1]*Ln]}function w(){r=Ve(t=Lr(p,d,g),e);var n=e(f,h);return i=c-n[0]*l,o=s+n[1]*l,b()}function b(){return u&&(u.valid=!1,u=null),M}return M.stream=function(n){return u&&(u.valid=!1),(u=Nr(v(t,a(y(n))))).valid=!0,u},M.clipAngle=function(n){return arguments.length?(v=null==n?(m=n,nr):function(i){var E=Math.cos(i),p=0<E,d=z(E)>bn;return Je(g,function(a){var l,c,s,f,h;return{lineStart:function(){f=s=!1,h=1},point:function(n,t){var e,r=[n,t],i=g(n,t),o=p?i?0:y(n,t):i?y(n+(n<0?Cn:-Cn),t):0;if(!l&&(f=s=i)&&a.lineStart(),i!==s&&(e=v(l,r),(Pe(l,e)||Pe(r,e))&&(r[0]+=bn,r[1]+=bn,i=g(r[0],r[1]))),i!==s)h=0,i?(a.lineStart(),e=v(r,l),a.point(e[0],e[1])):(e=v(l,r),a.point(e[0],e[1]),a.lineEnd()),l=e;else if(d&&l&&p^i){var u;o&c||!(u=v(r,l,!0))||(h=0,p?(a.lineStart(),a.point(u[0][0],u[0][1]),a.point(u[1][0],u[1][1]),a.lineEnd()):(a.point(u[1][0],u[1][1]),a.lineEnd(),a.lineStart(),a.point(u[0][0],u[0][1])))}!i||l&&Pe(l,r)||a.point(r[0],r[1]),l=r,s=i,c=o},lineEnd:function(){s&&a.lineEnd(),l=null},clean:function(){return h|(f&&s)<<1}}},qr(i,6*An),p?[0,-i]:[-Cn,i-Cn]);function g(n,t){return Math.cos(n)*Math.cos(t)>E}function v(n,t,e){var r=[1,0,0],i=ze(Fe(n),Fe(t)),o=Te(i,i),u=i[0],a=o-u*u;if(!a)return!e&&n;var l=E*o/a,c=-E*u/a,s=ze(r,i),f=De(r,l);qe(f,De(i,c));var h=s,p=Te(f,h),d=Te(h,h),g=p*p-d*(Te(f,f)-1);if(!(g<0)){var v=Math.sqrt(g),y=De(h,(-p-v)/d);if(qe(y,f),y=je(y),!e)return y;var m,x=n[0],M=t[0],_=n[1],w=t[1];M<x&&(m=x,x=M,M=m);var b=M-x,k=z(b-Cn)<bn;if(!k&&w<_&&(m=_,_=w,w=m),k||b<bn?k?0<_+w^y[1]<(z(y[0]-x)<bn?_:w):_<=y[1]&&y[1]<=w:Cn<b^(x<=y[0]&&y[0]<=M)){var C=De(h,(-p+v)/d);return qe(C,f),[y,je(C)]}}}function y(n,t){var e=p?i:Cn-i,r=0;return n<-e?r|=1:e<n&&(r|=2),t<-e?r|=4:e<t&&(r|=8),r}}((m=+n)*An),b()):m},M.clipExtent=function(n){return arguments.length?(y=(x=n)?rr(n[0][0],n[0][1],n[1][0],n[1][1]):R,b()):x},M.scale=function(n){return arguments.length?(l=+n,w()):l},M.translate=function(n){return arguments.length?(c=+n[0],s=+n[1],w()):[c,s]},M.center=function(n){return arguments.length?(f=n[0]%360*An,h=n[1]%360*An,w()):[f*Ln,h*Ln]},M.rotate=function(n){return arguments.length?(p=n[0]%360*An,d=n[1]%360*An,g=2<n.length?n[2]%360*An:0,w()):[p*Ln,d*Ln,g*Ln]},q.rebind(M,a,"precision"),function(){return e=n.apply(this,arguments),M.invert=e.invert&&_,w()}}function Nr(e){return kr(e,function(n,t){e.point(n*An,t*An)})}function Sr(n,t){return[n,t]}function Ar(n,t){return[Cn<n?n-En:n<-Cn?n+En:n,t]}function Lr(n,t,e){return n?t||e?Ve(Tr(n),zr(t,e)):Tr(n):t||e?zr(t,e):Ar}function Fr(e){return function(n,t){return[Cn<(n+=e)?n-En:n<-Cn?n+En:n,t]}}function Tr(n){var t=Fr(n);return t.invert=Fr(-n),t}function zr(n,t){var a=Math.cos(n),l=Math.sin(n),c=Math.cos(t),s=Math.sin(t);function e(n,t){var e=Math.cos(t),r=Math.cos(n)*e,i=Math.sin(n)*e,o=Math.sin(t),u=o*a+r*l;return[Math.atan2(i*c-u*s,r*a-o*l),qn(u*c+i*s)]}return e.invert=function(n,t){var e=Math.cos(t),r=Math.cos(n)*e,i=Math.sin(n)*e,o=Math.sin(t),u=o*c-i*s;return[Math.atan2(i*c+o*s,r*a+u*l),qn(u*a-r*l)]},e}function qr(a,l){var c=Math.cos(a),s=Math.sin(a);return function(n,t,e,r){var i=e*l;null!=n?(n=Dr(c,n),t=Dr(c,t),(0<e?n<t:t<n)&&(n+=e*En)):(n=a+e*En,t=a-.5*i);for(var o,u=n;0<e?t<u:u<t;u-=i)r.point((o=je([c,-s*Math.cos(u),-s*Math.sin(u)]))[0],o[1])}}function Dr(n,t){var e=Fe(t);e[0]-=n,Re(e);var r=zn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-bn)%(2*Math.PI)}function Rr(n,t,e){var r=q.range(n,t-bn,e).concat(t);return function(t){return r.map(function(n){return[t,n]})}}function jr(n,t,e){var r=q.range(n,t-bn,e).concat(t);return function(t){return r.map(function(n){return[n,t]})}}function Pr(n){return n.source}function Or(n){return n.target}q.geo.path=function(){var r,t,i,e,o,u=4.5;function a(n){return n&&("function"==typeof u&&e.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(e)),q.geo.stream(n,o)),e.result()}function l(){return o=null,a}return a.area=function(n){return ur=0,q.geo.stream(n,i(hr)),ur},a.centroid=function(n){return xe=Me=_e=we=be=ke=Ce=Ee=Ne=0,q.geo.stream(n,i(yr)),Ne?[Ce/Ne,Ee/Ne]:ke?[we/ke,be/ke]:_e?[xe/_e,Me/_e]:[NaN,NaN]},a.bounds=function(n){return sr=fr=-(lr=cr=1/0),q.geo.stream(n,i(dr)),[[lr,cr],[sr,fr]]},a.projection=function(n){return arguments.length?(i=(r=n)?n.stream||(e=n,t=wr(function(n,t){return e([n*Ln,t*Ln])}),function(n){return Nr(t(n))}):R,l()):r;var e,t},a.context=function(n){return arguments.length?(e=null==(t=n)?new function(){var e=gr(4.5),r=[],i={point:n,lineStart:function(){i.point=t},lineEnd:u,polygonStart:function(){i.lineEnd=a},polygonEnd:function(){i.lineEnd=u,i.point=n},pointRadius:function(n){return e=gr(n),i},result:function(){if(r.length){var n=r.join("");return r=[],n}}};function n(n,t){r.push("M",n,",",t,e)}function t(n,t){r.push("M",n,",",t),i.point=o}function o(n,t){r.push("L",n,",",t)}function u(){i.point=n}function a(){r.push("Z")}return i}:new function(e){var r=4.5,i={point:n,lineStart:function(){i.point=t},lineEnd:u,polygonStart:function(){i.lineEnd=a},polygonEnd:function(){i.lineEnd=u,i.point=n},pointRadius:function(n){return r=n,i},result:L};function n(n,t){e.moveTo(n+r,t),e.arc(n,t,r,0,En)}function t(n,t){e.moveTo(n,t),i.point=o}function o(n,t){e.lineTo(n,t)}function u(){i.point=n}function a(){e.closePath()}return i}(n),"function"!=typeof u&&e.pointRadius(u),l()):t},a.pointRadius=function(n){return arguments.length?(u="function"==typeof n?n:(e.pointRadius(+n),+n),a):u},a.projection(q.geo.albersUsa()).context(null)},q.geo.transform=function(r){return{stream:function(n){var t=new br(n);for(var e in r)t[e]=r[e];return t}}},br.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},q.geo.projection=Cr,q.geo.projectionMutator=Er,(q.geo.equirectangular=function(){return Cr(Sr)}).raw=Sr.invert=Sr,q.geo.rotation=function(t){function n(n){return(n=t(n[0]*An,n[1]*An))[0]*=Ln,n[1]*=Ln,n}return t=Lr(t[0]%360*An,t[1]*An,2<t.length?t[2]*An:0),n.invert=function(n){return(n=t.invert(n[0]*An,n[1]*An))[0]*=Ln,n[1]*=Ln,n},n},Ar.invert=Sr,q.geo.circle=function(){var t,i,o=[0,0],e=6;function r(){var n="function"==typeof o?o.apply(this,arguments):o,e=Lr(-n[0]*An,-n[1]*An,0).invert,r=[];return i(null,null,1,{point:function(n,t){r.push(n=e(n,t)),n[0]*=Ln,n[1]*=Ln}}),{type:"Polygon",coordinates:[r]}}return r.origin=function(n){return arguments.length?(o=n,r):o},r.angle=function(n){return arguments.length?(i=qr((t=+n)*An,e*An),r):t},r.precision=function(n){return arguments.length?(i=qr(t*An,(e=+n)*An),r):e},r.angle(90)},q.geo.distance=function(n,t){var e,r=(t[0]-n[0])*An,i=n[1]*An,o=t[1]*An,u=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),s=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((e=f*u)*e+(e=c*s-l*f*a)*e),l*s+c*f*a)},q.geo.graticule=function(){var t,e,r,i,o,u,a,l,c,s,f,h,p=10,d=p,g=90,v=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:n()}}function n(){return q.range(Math.ceil(i/g)*g,r,g).map(f).concat(q.range(Math.ceil(l/v)*v,a,v).map(h)).concat(q.range(Math.ceil(e/p)*p,t,p).filter(function(n){return z(n%g)>bn}).map(c)).concat(q.range(Math.ceil(u/d)*d,o,d).filter(function(n){return z(n%v)>bn}).map(s))}return m.lines=function(){return n().map(function(n){return{type:"LineString",coordinates:n}})},m.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(h(a).slice(1),f(r).reverse().slice(1),h(l).reverse().slice(1))]}},m.extent=function(n){return arguments.length?m.majorExtent(n).minorExtent(n):m.minorExtent()},m.majorExtent=function(n){return arguments.length?(i=+n[0][0],r=+n[1][0],l=+n[0][1],a=+n[1][1],r<i&&(n=i,i=r,r=n),a<l&&(n=l,l=a,a=n),m.precision(y)):[[i,l],[r,a]]},m.minorExtent=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],u=+n[0][1],o=+n[1][1],t<e&&(n=e,e=t,t=n),o<u&&(n=u,u=o,o=n),m.precision(y)):[[e,u],[t,o]]},m.step=function(n){return arguments.length?m.majorStep(n).minorStep(n):m.minorStep()},m.majorStep=function(n){return arguments.length?(g=+n[0],v=+n[1],m):[g,v]},m.minorStep=function(n){return arguments.length?(p=+n[0],d=+n[1],m):[p,d]},m.precision=function(n){return arguments.length?(y=+n,c=Rr(u,o,90),s=jr(e,t,y),f=Rr(l,a,90),h=jr(i,r,y),m):y},m.majorExtent([[-180,-90+bn],[180,90-bn]]).minorExtent([[-180,-80-bn],[180,80+bn]])},q.geo.greatArc=function(){var t,e,r=Pr,i=Or;function o(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}return o.distance=function(){return q.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},o.source=function(n){return arguments.length?(t="function"==typeof(r=n)?null:n,o):r},o.target=function(n){return arguments.length?(e="function"==typeof(i=n)?null:n,o):i},o.precision=function(){return arguments.length?o:0},o},q.geo.interpolate=function(n,t){return e=n[0]*An,r=n[1]*An,i=t[0]*An,o=t[1]*An,u=Math.cos(r),a=Math.sin(r),l=Math.cos(o),c=Math.sin(o),s=u*Math.cos(e),f=u*Math.sin(e),h=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Rn(o-r)+u*l*Rn(i-e))),g=1/Math.sin(d),(v=d?function(n){var t=Math.sin(n*=d)*g,e=Math.sin(d-n)*g,r=e*s+t*h,i=e*f+t*p,o=e*a+t*c;return[Math.atan2(i,r)*Ln,Math.atan2(o,Math.sqrt(r*r+i*i))*Ln]}:function(){return[e*Ln,r*Ln]}).distance=d,v;var e,r,i,o,u,a,l,c,s,f,h,p,d,g,v},q.geo.length=function(n){return vr=0,q.geo.stream(n,Ur),vr};var Ur={sphere:L,point:L,lineStart:function(){var u,a,l;function e(n,t){var e=Math.sin(t*=An),r=Math.cos(t),i=z((n*=An)-u),o=Math.cos(i);vr+=Math.atan2(Math.sqrt((i=r*Math.sin(i))*i+(i=l*e-a*r*o)*i),a*e+l*r*o),u=n,a=e,l=r}Ur.point=function(n,t){u=n*An,a=Math.sin(t*=An),l=Math.cos(t),Ur.point=e},Ur.lineEnd=function(){Ur.point=Ur.lineEnd=L}},lineEnd:L,polygonStart:L,polygonEnd:L};function Ir(o,u){function n(n,t){var e=Math.cos(n),r=Math.cos(t),i=o(e*r);return[i*r*Math.sin(n),i*Math.sin(t)]}return n.invert=function(n,t){var e=Math.sqrt(n*n+t*t),r=u(e),i=Math.sin(r),o=Math.cos(r);return[Math.atan2(n*i,e*o),Math.asin(e&&t*i/e)]},n}var Hr=Ir(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(q.geo.azimuthalEqualArea=function(){return Cr(Hr)}).raw=Hr;var Yr=Ir(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},R);function Zr(n,t){var e=Math.cos(n),r=function(n){return Math.tan(Cn/4+n/2)},i=n===t?Math.sin(n):Math.log(e/Math.cos(t))/Math.log(r(t)/r(n)),o=e*Math.pow(r(n),i)/i;if(!i)return Br;function u(n,t){0<o?t<-Sn+bn&&(t=-Sn+bn):Sn-bn<t&&(t=Sn-bn);var e=o/Math.pow(r(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}return u.invert=function(n,t){var e=o-t,r=Fn(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Sn]},u}function Vr(n,t){var e=Math.cos(n),r=n===t?Math.sin(n):(e-Math.cos(t))/(t-n),i=e/r+n;if(z(r)<bn)return Sr;function o(n,t){var e=i-t;return[e*Math.sin(r*n),i-e*Math.cos(r*n)]}return o.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/r,i-Fn(r)*Math.sqrt(n*n+e*e)]},o}(q.geo.azimuthalEquidistant=function(){return Cr(Yr)}).raw=Yr,(q.geo.conicConformal=function(){return ir(Zr)}).raw=Zr,(q.geo.conicEquidistant=function(){return ir(Vr)}).raw=Vr;var $r=Ir(function(n){return 1/n},Math.atan);function Br(n,t){return[n,Math.log(Math.tan(Cn/4+t/2))]}function Xr(n){var i,o=Cr(n),u=o.scale,a=o.translate,l=o.clipExtent;return o.scale=function(){var n=u.apply(o,arguments);return n===o?i?o.clipExtent(null):o:n},o.translate=function(){var n=a.apply(o,arguments);return n===o?i?o.clipExtent(null):o:n},o.clipExtent=function(n){var t=l.apply(o,arguments);if(t===o){if(i=null==n){var e=Cn*u(),r=a();l([[r[0]-e,r[1]-e],[r[0]+e,r[1]+e]])}}else i&&(t=null);return t},o.clipExtent(null)}(q.geo.gnomonic=function(){return Cr($r)}).raw=$r,Br.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Sn]},(q.geo.mercator=function(){return Xr(Br)}).raw=Br;var Wr=Ir(function(){return 1},Math.asin);(q.geo.orthographic=function(){return Cr(Wr)}).raw=Wr;var Jr=Ir(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});function Gr(n,t){return[Math.log(Math.tan(Cn/4+t/2)),-n]}function Kr(n){return n[0]}function Qr(n){return n[1]}function ni(n){for(var t=n.length,e=[0,1],r=2,i=2;i<t;i++){for(;1<r&&Tn(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function ti(n,t){return n[0]-t[0]||n[1]-t[1]}(q.geo.stereographic=function(){return Cr(Jr)}).raw=Jr,Gr.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Sn]},(q.geo.transverseMercator=function(){var n=Xr(Gr),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):[(n=t())[1],-n[0]]},n.rotate=function(n){return n?e([n[0],n[1],2<n.length?n[2]+90:90]):[(n=e())[0],n[1],n[2]-90]},e([0,0,90])}).raw=Gr,q.geom={},q.geom.hull=function(n){var h=Kr,p=Qr;if(arguments.length)return t(n);function t(n){if(n.length<3)return[];var t,e=vt(h),r=vt(p),i=n.length,o=[],u=[];for(t=0;t<i;t++)o.push([+e.call(this,n[t],t),+r.call(this,n[t],t),t]);for(o.sort(ti),t=0;t<i;t++)u.push([o[t][0],-o[t][1]]);var a=ni(o),l=ni(u),c=l[0]===a[0],s=l[l.length-1]===a[a.length-1],f=[];for(t=a.length-1;0<=t;--t)f.push(n[o[a[t]][2]]);for(t=+c;t<l.length-s;++t)f.push(n[o[l[t]][2]]);return f}return t.x=function(n){return arguments.length?(h=n,t):h},t.y=function(n){return arguments.length?(p=n,t):p},t},q.geom.polygon=function(n){return I(n,ei),n};var ei=q.geom.polygon.prototype=[];function ri(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function ii(n,t,e,r){var i=n[0],o=e[0],u=t[0]-i,a=r[0]-o,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(a*(l-c)-f*(i-o))/(f*u-a*s);return[i+h*u,l+h*s]}function oi(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}ei.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},ei.centroid=function(n){var t,e,r=-1,i=this.length,o=0,u=0,a=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],o+=(t[0]+a[0])*e,u+=(t[1]+a[1])*e;return[o*n,u*n]},ei.clip=function(n){for(var t,e,r,i,o,u,a=oi(n),l=-1,c=this.length-oi(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,i=this[l],o=t[(r=t.length-a)-1],e=-1;++e<r;)ri(u=t[e],s,i)?(ri(o,s,i)||n.push(ii(o,u,s,i)),n.push(u)):ri(o,s,i)&&n.push(ii(o,u,s,i)),o=u;a&&n.push(n[0]),s=i}return n};var ui,ai,li,ci,si,fi=[],hi=[];function pi(n){var t=fi.pop()||new function(){Ai(this),this.edge=this.site=this.circle=null};return t.site=n,t}function di(n){wi(n),li.remove(n),fi.push(n),Ai(n)}function gi(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},o=n.P,u=n.N,a=[n];di(n);for(var l=o;l.circle&&z(e-l.circle.x)<bn&&z(r-l.circle.cy)<bn;)o=l.P,a.unshift(l),di(l),l=o;a.unshift(l),wi(l);for(var c=u;c.circle&&z(e-c.circle.x)<bn&&z(r-c.circle.cy)<bn;)u=c.N,a.push(c),di(c),c=u;a.push(c),wi(c);var s,f=a.length;for(s=1;s<f;++s)c=a[s],l=a[s-1],Ei(c.edge,l.site,c.site,i);l=a[0],(c=a[f-1]).edge=Ci(l.site,c.site,null,i),_i(l),_i(c)}function vi(n){for(var t,e,r,i,o=n.x,u=n.y,a=li._;a;)if(r=yi(a,u)-o,bn<r)a=a.L;else{if(i=o-mi(a,u),!(bn<i)){-bn<r?(t=a.P,e=a):-bn<i?e=(t=a).N:t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=pi(n);if(li.insert(t,l),t||e){if(t===e)return wi(t),e=pi(t.site),li.insert(l,e),l.edge=e.edge=Ci(t.site,l.site),_i(t),void _i(e);if(e){wi(t),wi(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,p=n.y-f,d=e.site,g=d.x-s,v=d.y-f,y=2*(h*v-p*g),m=h*h+p*p,x=g*g+v*v,M={x:(v*m-p*x)/y+s,y:(h*x-g*m)/y+f};Ei(e.edge,c,d,M),l.edge=Ci(c,n,null,M),e.edge=Ci(n,d,null,M),_i(t),_i(e)}else l.edge=Ci(t.site,l.site)}}function yi(n,t){var e=n.site,r=e.x,i=e.y,o=i-t;if(!o)return r;var u=n.P;if(!u)return-1/0;var a=(e=u.site).x,l=e.y,c=l-t;if(!c)return a;var s=a-r,f=1/o-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+i-o/2)))/f+r:(r+a)/2}function mi(n,t){var e=n.N;if(e)return yi(e,t);var r=n.site;return r.y===t?r.x:1/0}function xi(n){this.site=n,this.edges=[]}function Mi(n,t){return t.angle-n.angle}function _i(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,o=e.site;if(r!==o){var u=i.x,a=i.y,l=r.x-u,c=r.y-a,s=o.x-u,f=2*(l*(v=o.y-a)-c*s);if(!(-kn<=f)){var h=l*l+c*c,p=s*s+v*v,d=(v*h-c*p)/f,g=(l*p-s*h)/f,v=g+a,y=hi.pop()||new function(){Ai(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=n,y.site=i,y.x=d+u,y.y=v+Math.sqrt(d*d+g*g),y.cy=v,n.circle=y;for(var m=null,x=si._;x;)if(y.y<x.y||y.y===x.y&&y.x<=x.x){if(!x.L){m=x.P;break}x=x.L}else{if(!x.R){m=x;break}x=x.R}si.insert(m,y),m||(ci=y)}}}}function wi(n){var t=n.circle;t&&(t.P||(ci=t.N),si.remove(t),hi.push(t),Ai(t),n.circle=null)}function bi(n,t){var e=n.b;if(e)return!0;var r,i,o=n.a,u=t[0][0],a=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,p=s.y,d=f.x,g=f.y,v=(h+d)/2,y=(p+g)/2;if(g===p){if(v<u||a<=v)return;if(d<h){if(o){if(o.y>=c)return}else o={x:v,y:l};e={x:v,y:c}}else{if(o){if(o.y<l)return}else o={x:v,y:c};e={x:v,y:l}}}else if(i=y-(r=(h-d)/(g-p))*v,r<-1||1<r)if(d<h){if(o){if(o.y>=c)return}else o={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(o){if(o.y<l)return}else o={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else if(p<g){if(o){if(o.x>=a)return}else o={x:u,y:r*u+i};e={x:a,y:r*a+i}}else{if(o){if(o.x<u)return}else o={x:a,y:r*a+i};e={x:u,y:r*u+i}}return n.a=o,n.b=e,!0}function ki(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ci(n,t,e,r){var i=new ki(n,t);return ui.push(i),e&&Ei(i,n,t,e),r&&Ei(i,t,n,r),ai[n.i].edges.push(new Ni(i,n,t)),ai[t.i].edges.push(new Ni(i,t,n)),i}function Ei(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function Ni(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Si(){this._=null}function Ai(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function Li(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Fi(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Ti(n){for(;n.L;)n=n.L;return n}function zi(n,t){var e,r,i,o=n.sort(qi).pop();for(ui=[],ai=new Array(n.length),li=new Si,si=new Si;;)if(i=ci,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===e&&o.y===r||(ai[o.i]=new xi(o),vi(o),e=o.x,r=o.y),o=n.pop();else{if(!i)break;gi(i.arc)}t&&(function(n){for(var t,e=ui,r=tr(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)(!bi(t=e[i],n)||!r(t)||z(t.a.x-t.b.x)<bn&&z(t.a.y-t.b.y)<bn)&&(t.a=t.b=null,e.splice(i,1))}(t),function(n){for(var t,e,r,i,o,u,a,l,c,s,f=n[0][0],h=n[1][0],p=n[0][1],d=n[1][1],g=ai,v=g.length;v--;)if((o=g[v])&&o.prepare())for(l=(a=o.edges).length,u=0;u<l;)r=(s=a[u].end()).x,i=s.y,t=(c=a[++u%l].start()).x,e=c.y,(z(r-t)>bn||z(i-e)>bn)&&(a.splice(u,0,new Ni((y=o.site,m=s,x=z(r-f)<bn&&bn<d-i?{x:f,y:z(t-f)<bn?e:d}:z(i-d)<bn&&bn<h-r?{x:z(e-d)<bn?t:h,y:d}:z(r-h)<bn&&bn<i-p?{x:h,y:z(t-h)<bn?e:p}:z(i-p)<bn&&bn<r-f?{x:z(e-p)<bn?t:f,y:p}:null,M=void 0,M=new ki(y,null),M.a=m,M.b=x,ui.push(M),M),o.site,null)),++l);var y,m,x,M}(t));var u={cells:ai,edges:ui};return li=si=ui=ai=null,u}function qi(n,t){return t.y-n.y||t.x-n.x}xi.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)(n=t[e].edge).b&&n.a||t.splice(e,1);return t.sort(Mi),t.length},Ni.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Si.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=Ti(this._),t.P=null,(t.N=n).P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(Li(this,e),e=(n=e).U),e.C=!1,r.C=!0,Fi(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(Fi(this,e),e=(n=e).U),e.C=!1,r.C=!0,Li(this,r)),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,o=n.L,u=n.R;if(e=o?u?Ti(u):o:u,i?i.L===n?i.L=e:i.R=e:this._=e,o&&u?(r=e.C,e.C=n.C,((e.L=o).U=e)!==u?(i=e.U,e.U=n.U,n=e.R,i.L=n,(e.R=u).U=e):(e.U=i,n=(i=e).R)):(r=n.C,n=e),n&&(n.U=i),!r)if(n&&n.C)n.C=!1;else{do{if(n===this._)break;if(n===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Li(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Fi(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Li(this,i),n=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,Fi(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Li(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,Fi(this,i),n=this._;break}t.C=!0,i=(n=i).U}while(!n.C);n&&(n.C=!1)}}},q.geom.voronoi=function(n){var t=Kr,e=Qr,r=t,i=e,s=Di;if(n)return o(n);function o(i){var o=new Array(i.length),u=s[0][0],a=s[0][1],l=s[1][0],c=s[1][1];return zi(f(i),s).cells.forEach(function(n,t){var e=n.edges,r=n.site;(o[t]=e.length?e.map(function(n){var t=n.start();return[t.x,t.y]}):r.x>=u&&r.x<=l&&r.y>=a&&r.y<=c?[[u,c],[l,c],[l,a],[u,a]]:[]).point=i[t]}),o}function f(n){return n.map(function(n,t){return{x:Math.round(r(n,t)/bn)*bn,y:Math.round(i(n,t)/bn)*bn,i:t}})}return o.links=function(t){return zi(f(t)).edges.filter(function(n){return n.l&&n.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},o.triangles=function(h){var p=[];return zi(f(h)).cells.forEach(function(n,t){for(var e,r,i,o,u=n.site,a=n.edges.sort(Mi),l=-1,c=a.length,s=a[c-1].edge,f=s.l===u?s.r:s.l;++l<c;)s,e=f,f=(s=a[l].edge).l===u?s.r:s.l,t<e.i&&t<f.i&&(i=e,o=f,((r=u).x-o.x)*(i.y-r.y)-(r.x-i.x)*(o.y-r.y)<0)&&p.push([h[t],h[e.i],h[f.i]])}),p},o.x=function(n){return arguments.length?(r=vt(t=n),o):t},o.y=function(n){return arguments.length?(i=vt(e=n),o):e},o.clipExtent=function(n){return arguments.length?(s=null==n?Di:n,o):s===Di?null:s},o.size=function(n){return arguments.length?o.clipExtent(n&&[[0,0],n]):s===Di?null:s&&s[1]},o};var Di=[[-1e6,-1e6],[1e6,1e6]];function Ri(n){return n.x}function ji(n){return n.y}function Pi(n,t){n=q.rgb(n),t=q.rgb(t);var e=n.r,r=n.g,i=n.b,o=t.r-e,u=t.g-r,a=t.b-i;return function(n){return"#"+ct(Math.round(e+o*n))+ct(Math.round(r+u*n))+ct(Math.round(i+a*n))}}function Oi(n,t){var e,r={},i={};for(e in n)e in t?r[e]=Zi(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function Ui(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ii(n,r){var t,e,i,o=Hi.lastIndex=Yi.lastIndex=0,u=-1,a=[],l=[];for(n+="",r+="";(t=Hi.exec(n))&&(e=Yi.exec(r));)(i=e.index)>o&&(i=r.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(t=t[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,l.push({i:u,x:Ui(t,e)})),o=Yi.lastIndex;return o<r.length&&(i=r.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?l[0]?(r=l[0].x,function(n){return r(n)+""}):function(){return r}:(r=l.length,function(n){for(var t,e=0;e<r;++e)a[(t=l[e]).i]=t.x(n);return a.join("")})}q.geom.delaunay=function(n){return q.geom.voronoi().triangles(n)},q.geom.quadtree=function(n,m,x,M,_){var w,b=Kr,C=Qr;if(w=arguments.length)return b=Ri,C=ji,3===w&&(_=x,M=m,x=m=0),t(n);function t(n){var t,e,r,i,o,u,a,l,c,s=vt(b),f=vt(C);if(null!=m)u=m,a=x,l=M,c=_;else if(l=c=-(u=a=1/0),e=[],r=[],o=n.length,w)for(i=0;i<o;++i)(t=n[i]).x<u&&(u=t.x),t.y<a&&(a=t.y),t.x>l&&(l=t.x),t.y>c&&(c=t.y),e.push(t.x),r.push(t.y);else for(i=0;i<o;++i){var h=+s(t=n[i],i),p=+f(t,i);h<u&&(u=h),p<a&&(a=p),l<h&&(l=h),c<p&&(c=p),e.push(h),r.push(p)}var d=l-u,g=c-a;function v(n,t,e,r,i,o,u,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,c=n.y;if(null!=l)if(z(l-e)+z(c-r)<.01)y(n,t,e,r,i,o,u,a);else{var s=n.point;n.x=n.y=n.point=null,y(n,s,l,c,i,o,u,a),y(n,t,e,r,i,o,u,a)}else n.x=e,n.y=r,n.point=t}else y(n,t,e,r,i,o,u,a)}function y(n,t,e,r,i,o,u,a){var l=.5*(i+u),c=.5*(o+a),s=l<=e,f=c<=r,h=f<<1|s;n.leaf=!1,s?i=l:u=l,f?o=c:a=c,v(n=n.nodes[h]||(n.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(n){v(k,n,+s(n,++i),+f(n,i),u,a,l,c)}}),t,e,r,i,o,u,a)}g<d?c=a+d:l=u+g;var k={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(n){v(k,n,+s(n,++i),+f(n,i),u,a,l,c)}};if(k.visit=function(n){!function n(t,e,r,i,o,u){if(!t(e,r,i,o,u)){var a=.5*(r+o),l=.5*(i+u),c=e.nodes;c[0]&&n(t,c[0],r,i,a,l),c[1]&&n(t,c[1],a,i,o,l),c[2]&&n(t,c[2],r,l,a,u),c[3]&&n(t,c[3],a,l,o,u)}}(n,k,u,a,l,c)},k.find=function(n){return t=k,v=n[0],y=n[1],b=1/0,function n(t,e,r,i,o){if(!(M<e||_<r||i<m||o<x)){if(u=t.point){var u,a=v-t.x,l=y-t.y,c=a*a+l*l;if(c<b){var s=Math.sqrt(b=c);m=v-s,x=y-s,M=v+s,_=y+s,w=u}}for(var f=t.nodes,h=.5*(e+i),p=.5*(r+o),d=(p<=y)<<1|h<=v,g=d+4;d<g;++d)if(t=f[3&d])switch(3&d){case 0:n(t,e,r,h,p);break;case 1:n(t,h,r,i,p);break;case 2:n(t,e,p,h,o);break;case 3:n(t,h,p,i,o)}}}(t,m=u,x=a,M=l,_=c),w;var t,v,y,m,x,M,_,w,b},i=-1,null==m){for(;++i<o;)v(k,n[i],e[i],r[i],u,a,l,c);--i}else n.forEach(k.add);return e=r=n=t=null,k}return t.x=function(n){return arguments.length?(b=n,t):b},t.y=function(n){return arguments.length?(C=n,t):C},t.extent=function(n){return arguments.length?(null==n?m=x=M=_=null:(m=+n[0][0],x=+n[0][1],M=+n[1][0],_=+n[1][1]),t):null==m?null:[[m,x],[M,_]]},t.size=function(n){return arguments.length?(null==n?m=x=M=_=null:(m=x=0,M=+n[0],_=+n[1]),t):null==m?null:[M-m,_-x]},t},q.interpolateRgb=Pi,q.interpolateObject=Oi,q.interpolateNumber=Ui,q.interpolateString=Ii;var Hi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Yi=new RegExp(Hi.source,"g");function Zi(n,t){for(var e,r=q.interpolators.length;0<=--r&&!(e=q.interpolators[r](n,t)););return e}function Vi(n,t){var e,r=[],i=[],o=n.length,u=t.length,a=Math.min(n.length,t.length);for(e=0;e<a;++e)r.push(Zi(n[e],t[e]));for(;e<o;++e)i[e]=n[e];for(;e<u;++e)i[e]=t[e];return function(n){for(e=0;e<a;++e)i[e]=r[e](n);return i}}q.interpolate=Zi,q.interpolators=[function(n,t){var e=typeof t;return("string"===e?gt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?Pi:Ii:t instanceof In?Pi:Array.isArray(t)?Vi:"object"===e&&isNaN(t)?Oi:Ui)(n,t)}],q.interpolateArray=Vi;var $i=function(){return R},Bi=q.map({linear:$i,poly:function(t){return function(n){return Math.pow(n,t)}},quad:function(){return Gi},cubic:function(){return Ki},sin:function(){return no},exp:function(){return to},circle:function(){return eo},elastic:function(t,e){var r;arguments.length<2&&(e=.45);arguments.length?r=e/En*Math.asin(1/t):(t=1,r=e/4);return function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-r)*En/e)}},back:function(t){t||(t=1.70158);return function(n){return n*n*((t+1)*n-t)}},bounce:function(){return ro}}),Xi=q.map({in:R,out:Wi,"in-out":Ji,"out-in":function(n){return Ji(Wi(n))}});function Wi(t){return function(n){return 1-t(1-n)}}function Ji(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function Gi(n){return n*n}function Ki(n){return n*n*n}function Qi(n){if(n<=0)return 0;if(1<=n)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function no(n){return 1-Math.cos(n*Sn)}function to(n){return Math.pow(2,10*(n-1))}function eo(n){return 1-Math.sqrt(1-n*n)}function ro(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function io(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function oo(n){var t,e,r,i=[n.a,n.b],o=[n.c,n.d],u=ao(i),a=uo(i,o),l=ao(((t=o)[0]+=(r=-a)*(e=i)[0],t[1]+=r*e[1],t))||0;i[0]*o[1]<o[0]*i[1]&&(i[0]*=-1,i[1]*=-1,u*=-1,a*=-1),this.rotate=(u?Math.atan2(i[1],i[0]):Math.atan2(-o[0],o[1]))*Ln,this.translate=[n.e,n.f],this.scale=[u,l],this.skew=l?Math.atan2(a,l)*Ln:0}function uo(n,t){return n[0]*t[0]+n[1]*t[1]}function ao(n){var t=Math.sqrt(uo(n,n));return t&&(n[0]/=t,n[1]/=t),t}q.ease=function(n){var t,e=n.indexOf("-"),r=0<=e?n.slice(0,e):n,i=0<=e?n.slice(e+1):"in";return r=Bi.get(r)||$i,i=Xi.get(i)||R,t=i(r.apply(null,o.call(arguments,1))),function(n){return n<=0?0:1<=n?1:t(n)}},q.interpolateHcl=function(n,t){n=q.hcl(n),t=q.hcl(t);var e=n.h,r=n.c,i=n.l,o=t.h-e,u=t.c-r,a=t.l-i;isNaN(u)&&(u=0,r=isNaN(r)?t.c:r);isNaN(o)?(o=0,e=isNaN(e)?t.h:e):180<o?o-=360:o<-180&&(o+=360);return function(n){return Bn(e+o*n,r+u*n,i+a*n)+""}},q.interpolateHsl=function(n,t){n=q.hsl(n),t=q.hsl(t);var e=n.h,r=n.s,i=n.l,o=t.h-e,u=t.s-r,a=t.l-i;isNaN(u)&&(u=0,r=isNaN(r)?t.s:r);isNaN(o)?(o=0,e=isNaN(e)?t.h:e):180<o?o-=360:o<-180&&(o+=360);return function(n){return Zn(e+o*n,r+u*n,i+a*n)+""}},q.interpolateLab=function(n,t){n=q.lab(n),t=q.lab(t);var e=n.l,r=n.a,i=n.b,o=t.l-e,u=t.a-r,a=t.b-i;return function(n){return nt(e+o*n,r+u*n,i+a*n)+""}},q.interpolateRound=io,q.transform=function(n){var e=x.createElementNS(q.ns.prefix.svg,"g");return(q.transform=function(n){if(null!=n){e.setAttribute("transform",n);var t=e.transform.baseVal.consolidate()}return new oo(t?t.matrix:lo)})(n)},oo.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var lo={a:1,b:0,c:0,d:1,e:0,f:0};function co(n){return n.length?n.pop()+",":""}function so(n,t){var e,r,i,o,u,a,l,c,s=[],f=[];return n=q.transform(n),t=q.transform(t),function(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:Ui(n[0],t[0])},{i:i-2,x:Ui(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}(n.translate,t.translate,s,f),e=n.rotate,r=t.rotate,i=s,o=f,e!==r?(180<e-r?r+=360:180<r-e&&(e+=360),o.push({i:i.push(co(i)+"rotate(",null,")")-2,x:Ui(e,r)})):r&&i.push(co(i)+"rotate("+r+")"),u=n.skew,a=t.skew,l=s,c=f,u!==a?c.push({i:l.push(co(l)+"skewX(",null,")")-2,x:Ui(u,a)}):a&&l.push(co(l)+"skewX("+a+")"),function(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(co(e)+"scale(",null,",",null,")");r.push({i:i-4,x:Ui(n[0],t[0])},{i:i-2,x:Ui(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(co(e)+"scale("+t+")")}(n.scale,t.scale,s,f),n=t=null,function(n){for(var t,e=-1,r=f.length;++e<r;)s[(t=f[e]).i]=t.x(n);return s.join("")}}function fo(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function ho(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function po(n){for(var t=n.source,e=n.target,r=function(n,t){if(n===t)return n;var e=go(n),r=go(t),i=e.pop(),o=r.pop(),u=null;for(;i===o;)u=i,i=e.pop(),o=r.pop();return u}(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;e!==r;)i.splice(o,0,e),e=e.parent;return i}function go(n){for(var t=[],e=n.parent;null!=e;)t.push(n),e=(n=e).parent;return t.push(n),t}function vo(n){n.fixed|=2}function yo(n){n.fixed&=-7}function mo(n){n.fixed|=4,n.px=n.x,n.py=n.y}function xo(n){n.fixed&=-5}q.interpolateTransform=so,q.layout={},q.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(po(n[e]));return t}},q.layout.chord=function(){var v,y,m,x,M,_,w,t={},b=0;function n(){var n,t,e,r,i,o={},u=[],a=q.range(x),l=[];for(v=[],y=[],n=0,r=-1;++r<x;){for(t=0,i=-1;++i<x;)t+=m[r][i];u.push(t),l.push(q.range(x)),n+=t}for(M&&a.sort(function(n,t){return M(u[n],u[t])}),_&&l.forEach(function(n,e){n.sort(function(n,t){return _(m[e][n],m[e][t])})}),n=(En-b*x)/n,t=0,r=-1;++r<x;){for(e=t,i=-1;++i<x;){var c=a[r],s=l[c][i],f=m[c][s],h=t,p=t+=f*n;o[c+"-"+s]={index:c,subindex:s,startAngle:h,endAngle:p,value:f}}y[c]={index:c,startAngle:e,endAngle:t,value:u[c]},t+=b}for(r=-1;++r<x;)for(i=r-1;++i<x;){var d=o[r+"-"+i],g=o[i+"-"+r];(d.value||g.value)&&v.push(d.value<g.value?{source:g,target:d}:{source:d,target:g})}w&&k()}function k(){v.sort(function(n,t){return w((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}return t.matrix=function(n){return arguments.length?(x=(m=n)&&m.length,v=y=null,t):m},t.padding=function(n){return arguments.length?(b=n,v=y=null,t):b},t.sortGroups=function(n){return arguments.length?(M=n,v=y=null,t):M},t.sortSubgroups=function(n){return arguments.length?(_=n,v=null,t):_},t.sortChords=function(n){return arguments.length?(w=n,v&&k(),t):w},t.chords=function(){return v||n(),v},t.groups=function(){return y||n(),y},t},q.layout.force=function(){var f,n,h,p,d,g,i={},v=q.dispatch("start","tick","end"),y=[1,1],m=.9,o=Mo,u=_o,x=-30,s=wo,M=.1,_=.64,w=[],b=[];function k(c){return function(n,t,e,r){if(n.point!==c){var i=n.cx-c.x,o=n.cy-c.y,u=r-t,a=i*i+o*o;if(u*u/_<a){if(a<s){var l=n.charge/a;c.px-=i*l,c.py-=o*l}return!0}if(n.point&&a&&a<s){l=n.pointCharge/a;c.px-=i*l,c.py-=o*l}}return!n.charge}}function t(n){n.px=q.event.x,n.py=q.event.y,i.resume()}return i.tick=function(){if((h*=.99)<.005)return f=null,v.end({type:"end",alpha:h=0}),!0;var n,t,e,r,i,o,u,a,l,c=w.length,s=b.length;for(t=0;t<s;++t)r=(e=b[t]).source,(o=(a=(i=e.target).x-r.x)*a+(l=i.y-r.y)*l)&&(a*=o=h*d[t]*((o=Math.sqrt(o))-p[t])/o,l*=o,i.x-=a*(u=r.weight+i.weight?r.weight/(r.weight+i.weight):.5),i.y-=l*u,r.x+=a*(u=1-u),r.y+=l*u);if((u=h*M)&&(a=y[0]/2,l=y[1]/2,t=-1,u))for(;++t<c;)(e=w[t]).x+=(a-e.x)*u,e.y+=(l-e.y)*u;if(x)for(!function n(t,e,r){var i=0,o=0;t.charge=0;if(!t.leaf)for(var u,a=t.nodes,l=a.length,c=-1;++c<l;)null!=(u=a[c])&&(n(u,e,r),t.charge+=u.charge,i+=u.charge*u.cx,o+=u.charge*u.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var s=e*r[t.point.index];t.charge+=t.pointCharge=s,i+=s*t.point.x,o+=s*t.point.y}t.cx=i/t.charge;t.cy=o/t.charge}(n=q.geom.quadtree(w),h,g),t=-1;++t<c;)(e=w[t]).fixed||n.visit(k(e));for(t=-1;++t<c;)(e=w[t]).fixed?(e.x=e.px,e.y=e.py):(e.x-=(e.px-(e.px=e.x))*m,e.y-=(e.py-(e.py=e.y))*m);v.tick({type:"tick",alpha:h})},i.nodes=function(n){return arguments.length?(w=n,i):w},i.links=function(n){return arguments.length?(b=n,i):b},i.size=function(n){return arguments.length?(y=n,i):y},i.linkDistance=function(n){return arguments.length?(o="function"==typeof n?n:+n,i):o},i.distance=i.linkDistance,i.linkStrength=function(n){return arguments.length?(u="function"==typeof n?n:+n,i):u},i.friction=function(n){return arguments.length?(m=+n,i):m},i.charge=function(n){return arguments.length?(x="function"==typeof n?n:+n,i):x},i.chargeDistance=function(n){return arguments.length?(s=n*n,i):Math.sqrt(s)},i.gravity=function(n){return arguments.length?(M=+n,i):M},i.theta=function(n){return arguments.length?(_=n*n,i):Math.sqrt(_)},i.alpha=function(n){return arguments.length?(n=+n,h?0<n?h=n:(f.c=null,f.t=NaN,f=null,v.end({type:"end",alpha:h=0})):0<n&&(v.start({type:"start",alpha:h=n}),f=kt(i.tick)),i):h},i.start=function(){var a,l,n,c=w.length,s=b.length,t=y[0],e=y[1];for(a=0;a<c;++a)(n=w[a]).index=a,n.weight=0;for(a=0;a<s;++a)"number"==typeof(n=b[a]).source&&(n.source=w[n.source]),"number"==typeof n.target&&(n.target=w[n.target]),++n.source.weight,++n.target.weight;for(a=0;a<c;++a)n=w[a],isNaN(n.x)&&(n.x=r("x",t)),isNaN(n.y)&&(n.y=r("y",e)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(p=[],"function"==typeof o)for(a=0;a<s;++a)p[a]=+o.call(this,b[a],a);else for(a=0;a<s;++a)p[a]=o;if(d=[],"function"==typeof u)for(a=0;a<s;++a)d[a]=+u.call(this,b[a],a);else for(a=0;a<s;++a)d[a]=u;if(g=[],"function"==typeof x)for(a=0;a<c;++a)g[a]=+x.call(this,w[a],a);else for(a=0;a<c;++a)g[a]=x;function r(n,t){if(!l){for(l=new Array(c),o=0;o<c;++o)l[o]=[];for(o=0;o<s;++o){var e=b[o];l[e.source.index].push(e.target),l[e.target.index].push(e.source)}}for(var r,i=l[a],o=-1,u=i.length;++o<u;)if(!isNaN(r=i[o][n]))return r;return Math.random()*t}return i.resume()},i.resume=function(){return i.alpha(.1)},i.stop=function(){return i.alpha(0)},i.drag=function(){if(n||(n=q.behavior.drag().origin(R).on("dragstart.force",vo).on("drag.force",t).on("dragend.force",yo)),!arguments.length)return n;this.on("mouseover.force",mo).on("mouseout.force",xo).call(n)},q.rebind(i,v,"on")};var Mo=20,_o=1,wo=1/0;function bo(n,t){return q.rebind(n,t,"sort","children","value"),(n.nodes=n).links=Ao,n}function ko(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;0<=--r;)e.push(i[r])}function Co(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(o=n.children)&&(i=o.length))for(var i,o,u=-1;++u<i;)e.push(o[u]);for(;null!=(n=r.pop());)t(n)}function Eo(n){return n.children}function No(n){return n.value}function So(n,t){return t.value-n.value}function Ao(n){return q.merge(n.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}q.layout.hierarchy=function(){var a=So,l=Eo,c=No;function s(n){var t,e=[n],r=[];for(n.depth=0;null!=(t=e.pop());)if(r.push(t),(o=l.call(s,t,t.depth))&&(i=o.length)){for(var i,o,u;0<=--i;)e.push(u=o[i]),u.parent=t,u.depth=t.depth+1;c&&(t.value=0),t.children=o}else c&&(t.value=+c.call(s,t,t.depth)||0),delete t.children;return Co(n,function(n){var t,e;a&&(t=n.children)&&t.sort(a),c&&(e=n.parent)&&(e.value+=n.value)}),r}return s.sort=function(n){return arguments.length?(a=n,s):a},s.children=function(n){return arguments.length?(l=n,s):l},s.value=function(n){return arguments.length?(c=n,s):c},s.revalue=function(n){return c&&(ko(n,function(n){n.children&&(n.value=0)}),Co(n,function(n){var t;n.children||(n.value=+c.call(s,n,n.depth)||0),(t=n.parent)&&(t.value+=n.value)})),n},s},q.layout.partition=function(){var r=q.layout.hierarchy(),i=[1,1];function t(n,t){var e=r.call(this,n,t);return function n(t,e,r,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(u=o.length)){var u,a,l,c=-1;for(r=t.value?r/t.value:0;++c<u;)n(a=o[c],e,l=a.value*r,i),e+=l}}(e[0],0,i[0],i[1]/function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,o=-1;++o<i;)r=Math.max(r,n(e[o]));return 1+r}(e[0])),e}return t.size=function(n){return arguments.length?(i=n,t):i},bo(t,r)},q.layout.pie=function(){var h=Number,p=Lo,d=0,g=En,v=0;function y(e){var t,n=e.length,r=e.map(function(n,t){return+h.call(y,n,t)}),i=+("function"==typeof d?d.apply(this,arguments):d),o=("function"==typeof g?g.apply(this,arguments):g)-i,u=Math.min(Math.abs(o)/n,+("function"==typeof v?v.apply(this,arguments):v)),a=u*(o<0?-1:1),l=q.sum(r),c=l?(o-n*a)/l:0,s=q.range(n),f=[];return null!=p&&s.sort(p===Lo?function(n,t){return r[t]-r[n]}:function(n,t){return p(e[n],e[t])}),s.forEach(function(n){f[n]={data:e[n],value:t=r[n],startAngle:i,endAngle:i+=t*c+a,padAngle:u}}),f}return y.value=function(n){return arguments.length?(h=n,y):h},y.sort=function(n){return arguments.length?(p=n,y):p},y.startAngle=function(n){return arguments.length?(d=n,y):d},y.endAngle=function(n){return arguments.length?(g=n,y):g},y.padAngle=function(n){return arguments.length?(v=n,y):v},y};var Lo={};function Fo(n){return n.x}function To(n){return n.y}function zo(n,t,e){n.y0=t,n.y=e}q.layout.stack=function(){var f=R,h=Ro,p=jo,d=zo,g=Fo,v=To;function y(n,t){if(!(o=n.length))return n;var e=n.map(function(n,t){return f.call(y,n,t)}),r=e.map(function(n){return n.map(function(n,t){return[g.call(y,n,t),v.call(y,n,t)]})}),i=h.call(y,r,t);e=q.permute(e,i),r=q.permute(r,i);var o,u,a,l,c=p.call(y,r,t),s=e[0].length;for(a=0;a<s;++a)for(d.call(y,e[0][a],l=c[a],r[0][a][1]),u=1;u<o;++u)d.call(y,e[u][a],l+=r[u-1][a][1],r[u][a][1]);return n}return y.values=function(n){return arguments.length?(f=n,y):f},y.order=function(n){return arguments.length?(h="function"==typeof n?n:qo.get(n)||Ro,y):h},y.offset=function(n){return arguments.length?(p="function"==typeof n?n:Do.get(n)||jo,y):p},y.x=function(n){return arguments.length?(g=n,y):g},y.y=function(n){return arguments.length?(v=n,y):v},y.out=function(n){return arguments.length?(d=n,y):d},y};var qo=q.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(Po),o=n.map(Oo),u=q.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],s=[];for(t=0;t<r;++t)e=u[t],a<l?(a+=o[e],c.push(e)):(l+=o[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return q.range(n.length).reverse()},default:Ro}),Do=q.map({silhouette:function(n){var t,e,r,i=n.length,o=n[0].length,u=[],a=0,l=[];for(e=0;e<o;++e){for(r=t=0;t<i;t++)r+=n[t][e][1];a<r&&(a=r),u.push(r)}for(e=0;e<o;++e)l[e]=(a-u[e])/2;return l},wiggle:function(n){var t,e,r,i,o,u,a,l,c,s=n.length,f=n[0],h=f.length,p=[];for(p[0]=l=c=0,e=1;e<h;++e){for(i=t=0;t<s;++t)i+=n[t][e][1];for(o=t=0,a=f[e][0]-f[e-1][0];t<s;++t){for(r=0,u=(n[t][e][1]-n[t][e-1][1])/(2*a);r<t;++r)u+=(n[r][e][1]-n[r][e-1][1])/a;o+=u*n[t][e][1]}p[e]=l-=i?o/i*a:0,l<c&&(c=l)}for(e=0;e<h;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,o=n[0].length,u=1/i,a=[];for(e=0;e<o;++e){for(r=t=0;t<i;t++)r+=n[t][e][1];if(r)for(t=0;t<i;t++)n[t][e][1]/=r;else for(t=0;t<i;t++)n[t][e][1]=u}for(e=0;e<o;++e)a[e]=0;return a},zero:jo});function Ro(n){return q.range(n.length)}function jo(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function Po(n){for(var t,e=1,r=0,i=n[0][1],o=n.length;e<o;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function Oo(n){return n.reduce(Uo,0)}function Uo(n,t){return n+t[1]}function Io(n,t){return Ho(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Ho(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,o=[];++e<=t;)o[e]=i*e+r;return o}function Yo(n){return[q.min(n),q.max(n)]}function Zo(n,t){return n.value-t.value}function Vo(n,t){var e=n._pack_next;(n._pack_next=t)._pack_prev=n,(t._pack_next=e)._pack_prev=t}function $o(n,t){(n._pack_next=t)._pack_prev=n}function Bo(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return e*e+r*r<.999*i*i}function Xo(n){if((t=n.children)&&(l=t.length)){var t,e,r,i,o,u,a,l,c=1/0,s=-1/0,f=1/0,h=-1/0;if(t.forEach(Wo),(e=t[0]).x=-e.r,e.y=0,x(e),1<l&&((r=t[1]).x=r.r,r.y=0,x(r),2<l))for(Go(e,r,i=t[2]),x(i),Vo(e,i),Vo(e._pack_prev=i,r),r=e._pack_next,o=3;o<l;o++){Go(e,r,i=t[o]);var p=0,d=1,g=1;for(u=r._pack_next;u!==r;u=u._pack_next,d++)if(Bo(u,i)){p=1;break}if(1==p)for(a=e._pack_prev;a!==u._pack_prev&&!Bo(a,i);a=a._pack_prev,g++);p?(d<g||d==g&&r.r<e.r?$o(e,r=u):$o(e=a,r),o--):(Vo(e,i),x(r=i))}var v=(c+s)/2,y=(f+h)/2,m=0;for(o=0;o<l;o++)(i=t[o]).x-=v,i.y-=y,m=Math.max(m,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=m,t.forEach(Jo)}function x(n){c=Math.min(n.x-n.r,c),s=Math.max(n.x+n.r,s),f=Math.min(n.y-n.r,f),h=Math.max(n.y+n.r,h)}}function Wo(n){n._pack_next=n._pack_prev=n}function Jo(n){delete n._pack_next,delete n._pack_prev}function Go(n,t,e){var r=n.r+e.r,i=t.x-n.x,o=t.y-n.y;if(r&&(i||o)){var u=t.r+e.r,a=i*i+o*o,l=.5+((r*=r)-(u*=u))/(2*a),c=Math.sqrt(Math.max(0,2*u*(r+a)-(r-=a)*r-u*u))/(2*a);e.x=n.x+l*i+c*o,e.y=n.y+l*o-c*i}else e.x=n.x+r,e.y=n.y}function Ko(n,t){return n.parent==t.parent?1:2}function Qo(n){var t=n.children;return t.length?t[0]:n.t}function nu(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function tu(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function eu(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function ru(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],o=n.dy-t[0]-t[2];return i<0&&(e+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:e,y:r,dx:i,dy:o}}function iu(n){var t=n[0],e=n[n.length-1];return t<e?[t,e]:[e,t]}function ou(n){return n.rangeExtent?n.rangeExtent():iu(n.range())}function uu(n,t,e,r){var i=e(n[0],n[1]),o=r(t[0],t[1]);return function(n){return o(i(n))}}function au(n,t){var e,r=0,i=n.length-1,o=n[r],u=n[i];return u<o&&(e=r,r=i,i=e,e=o,o=u,u=e),n[r]=t.floor(o),n[i]=t.ceil(u),n}function lu(t){return t?{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}:cu}q.layout.histogram=function(){var f=!0,h=Number,p=Yo,d=Io;function e(n,t){for(var e,r,i=[],o=n.map(h,this),u=p.call(this,o,t),a=d.call(this,u,o,t),l=(t=-1,o.length),c=a.length-1,s=f?1:1/l;++t<c;)(e=i[t]=[]).dx=a[t+1]-(e.x=a[t]),e.y=0;if(0<c)for(t=-1;++t<l;)(r=o[t])>=u[0]&&r<=u[1]&&((e=i[q.bisect(a,r,1,c)-1]).y+=s,e.push(n[t]));return i}return e.value=function(n){return arguments.length?(h=n,e):h},e.range=function(n){return arguments.length?(p=vt(n),e):p},e.bins=function(t){return arguments.length?(d="number"==typeof t?function(n){return Ho(n,t)}:vt(t),e):d},e.frequency=function(n){return arguments.length?(f=!!n,e):f},e},q.layout.pack=function(){var l,c=q.layout.hierarchy().sort(Zo),s=0,f=[1,1];function t(n,t){var e=c.call(this,n,t),r=e[0],i=f[0],o=f[1],u=null==l?Math.sqrt:"function"==typeof l?l:function(){return l};if(r.x=r.y=0,Co(r,function(n){n.r=+u(n.value)}),Co(r,Xo),s){var a=s*(l?1:Math.max(2*r.r/i,2*r.r/o))/2;Co(r,function(n){n.r+=a}),Co(r,Xo),Co(r,function(n){n.r-=a})}return function n(t,e,r,i){var o=t.children;t.x=e+=i*t.x;t.y=r+=i*t.y;t.r*=i;if(o)for(var u=-1,a=o.length;++u<a;)n(o[u],e,r,i)}(r,i/2,o/2,l?1:1/Math.max(2*r.r/i,2*r.r/o)),e}return t.size=function(n){return arguments.length?(f=n,t):f},t.radius=function(n){return arguments.length?(l=null==n||"function"==typeof n?n:+n,t):l},t.padding=function(n){return arguments.length?(s=+n,t):s},bo(t,c)},q.layout.tree=function(){var f=q.layout.hierarchy().sort(null).value(null),g=Ko,h=[1,1],p=null;function t(n,t){var e=f.call(this,n,t),r=e[0],i=function(n){var t,e={A:null,children:[n]},r=[e];for(;null!=(t=r.pop());)for(var i,o=t.children,u=0,a=o.length;u<a;++u)r.push((o[u]=i={_:o[u],parent:t,children:(i=o[u].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:u}).a=i);return e.children[0]}(r);if(Co(i,d),i.parent.m=-i.z,ko(i,v),p)ko(r,y);else{var o=r,u=r,a=r;ko(r,function(n){n.x<o.x&&(o=n),n.x>u.x&&(u=n),n.depth>a.depth&&(a=n)});var l=g(o,u)/2-o.x,c=h[0]/(u.x+g(u,o)/2+l),s=h[1]/(a.depth||1);ko(r,function(n){n.x=(n.x+l)*c,n.y=n.depth*s})}return e}function d(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){!function(n){var t,e=0,r=0,i=n.children,o=i.length;for(;0<=--o;)(t=i[o]).z+=e,t.m+=e,e+=t.s+(r+=t.c)}(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+g(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+g(n._,r._));n.parent.A=function(n,t,e){if(t){for(var r,i=n,o=n,u=t,a=i.parent.children[0],l=i.m,c=o.m,s=u.m,f=a.m;u=nu(u),i=Qo(i),u&&i;)a=Qo(a),(o=nu(o)).a=n,0<(r=u.z+s-i.z-l+g(u._,i._))&&(tu((p=n,d=e,(h=u).a.parent===p.parent?h.a:d),n,r),l+=r,c+=r),s+=u.m,l+=i.m,f+=a.m,c+=o.m;u&&!nu(o)&&(o.t=u,o.m+=s-c),i&&!Qo(a)&&(a.t=i,a.m+=l-f,e=n)}var h,p,d;return e}(n,r,n.parent.A||e[0])}function v(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function y(n){n.x*=h[0],n.y=n.depth*h[1]}return t.separation=function(n){return arguments.length?(g=n,t):g},t.size=function(n){return arguments.length?(p=null==(h=n)?y:null,t):p?null:h},t.nodeSize=function(n){return arguments.length?(p=null==(h=n)?null:y,t):p?h:null},bo(t,f)},q.layout.cluster=function(){var s=q.layout.hierarchy().sort(null).value(null),f=Ko,h=[1,1],p=!1;function t(n,t){var i,e=s.call(this,n,t),r=e[0],o=0;Co(r,function(n){var t,e,r=n.children;r&&r.length?(n.x=(e=r).reduce(function(n,t){return n+t.x},0)/e.length,n.y=(t=r,1+q.max(t,function(n){return n.y}))):(n.x=i?o+=f(n,i):0,n.y=0,i=n)});var u=function n(t){var e=t.children;return e&&e.length?n(e[0]):t}(r),a=function n(t){var e,r=t.children;return r&&(e=r.length)?n(r[e-1]):t}(r),l=u.x-f(u,a)/2,c=a.x+f(a,u)/2;return Co(r,p?function(n){n.x=(n.x-r.x)*h[0],n.y=(r.y-n.y)*h[1]}:function(n){n.x=(n.x-l)/(c-l)*h[0],n.y=(1-(r.y?n.y/r.y:1))*h[1]}),e}return t.separation=function(n){return arguments.length?(f=n,t):f},t.size=function(n){return arguments.length?(p=null==(h=n),t):p?null:h},t.nodeSize=function(n){return arguments.length?(p=null!=(h=n),t):p?h:null},bo(t,s)},q.layout.treemap=function(){var r,i=q.layout.hierarchy(),s=Math.round,o=[1,1],u=null,f=eu,a=!1,h="squarify",l=.5*(1+Math.sqrt(5));function p(n,t){for(var e,r,i=-1,o=n.length;++i<o;)r=(e=n[i]).value*(t<0?0:t),e.area=isNaN(r)||r<=0?0:r}function d(n){var t=n.children;if(t&&t.length){var e,r,i,o=f(n),u=[],a=t.slice(),l=1/0,c="slice"===h?o.dx:"dice"===h?o.dy:"slice-dice"===h?1&n.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(p(a,o.dx*o.dy/n.value),u.area=0;0<(i=a.length);)u.push(e=a[i-1]),u.area+=e.area,"squarify"!==h||(r=g(u,c))<=l?(a.pop(),l=r):(u.area-=u.pop().area,v(u,c,o,!1),c=Math.min(o.dx,o.dy),u.length=u.area=0,l=1/0);u.length&&(v(u,c,o,!0),u.length=u.area=0),t.forEach(d)}}function c(n){var t=n.children;if(t&&t.length){var e,r=f(n),i=t.slice(),o=[];for(p(i,r.dx*r.dy/n.value),o.area=0;e=i.pop();)o.push(e),o.area+=e.area,null!=e.z&&(v(o,e.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);t.forEach(c)}}function g(n,t){for(var e,r=n.area,i=0,o=1/0,u=-1,a=n.length;++u<a;)(e=n[u].area)&&(e<o&&(o=e),i<e&&(i=e));return t*=t,(r*=r)?Math.max(t*i*l/r,r/(t*o*l)):1/0}function v(n,t,e,r){var i,o=-1,u=n.length,a=e.x,l=e.y,c=t?s(n.area/t):0;if(t==e.dx){for((r||c>e.dy)&&(c=e.dy);++o<u;)(i=n[o]).x=a,i.y=l,i.dy=c,a+=i.dx=Math.min(e.x+e.dx-a,c?s(i.area/c):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=c,e.dy-=c}else{for((r||c>e.dx)&&(c=e.dx);++o<u;)(i=n[o]).x=a,i.y=l,i.dx=c,l+=i.dy=Math.min(e.y+e.dy-l,c?s(i.area/c):0);i.z=!1,i.dy+=e.y+e.dy-l,e.x+=c,e.dx-=c}}function y(n){var t=r||i(n),e=t[0];return e.x=e.y=0,e.value?(e.dx=o[0],e.dy=o[1]):e.dx=e.dy=0,r&&i.revalue(e),p([e],e.dx*e.dy/e.value),(r?c:d)(e),a&&(r=t),t}return y.size=function(n){return arguments.length?(o=n,y):o},y.padding=function(e){if(!arguments.length)return u;function n(n){return ru(n,e)}var t;return f=null==(u=e)?eu:"function"==(t=typeof e)?function(n){var t=e.call(y,n,n.depth);return null==t?eu(n):ru(n,"number"==typeof t?[t,t,t,t]:t)}:("number"===t&&(e=[e,e,e,e]),n),y},y.round=function(n){return arguments.length?(s=n?Math.round:Number,y):s!=Number},y.sticky=function(n){return arguments.length?(a=n,r=null,y):a},y.ratio=function(n){return arguments.length?(l=n,y):l},y.mode=function(n){return arguments.length?(h=n+"",y):h},bo(y,i)},q.random={normal:function(r,i){var n=arguments.length;return n<2&&(i=1),n<1&&(r=0),function(){for(var n,t,e;!(e=(n=2*Math.random()-1)*n+(t=2*Math.random()-1)*t)||1<e;);return r+i*n*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(){var n=q.random.normal.apply(q,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=q.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(e){return function(){for(var n=0,t=0;t<e;t++)n+=Math.random();return n}}},q.scale={};var cu={floor:R,ceil:R};function su(e,n,t,r){var i=[],o=[],u=0,a=Math.min(e.length,n.length)-1;for(e[a]<e[0]&&(e=e.slice().reverse(),n=n.slice().reverse());++u<=a;)i.push(t(e[u-1],e[u])),o.push(r(n[u-1],n[u]));return function(n){var t=q.bisect(e,n,1,a)-1;return o[t](i[t](n))}}function fu(n,t){return q.rebind(n,t,"range","rangeRound","interpolate","clamp")}function hu(n,t){return au(n,lu(pu(n,t)[2])),au(n,lu(pu(n,t)[2])),n}function pu(n,t){null==t&&(t=10);var e=iu(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function du(n,t){return q.range.apply(q,pu(n,t))}function gu(n,t,e){var r,i,o,u=pu(n,t);if(e){var a=Lt.exec(e);if(a.shift(),"s"===a[8]){var l=q.formatPrefix(Math.max(z(u[0]),z(u[1])));return a[7]||(a[7]="."+yu(l.scale(u[2]))),a[8]="f",e=q.format(a.join("")),function(n){return e(l.scale(n))+l.symbol}}a[7]||(a[7]="."+(r=a[8],o=yu((i=u)[2]),r in vu?Math.abs(o-yu(Math.max(z(i[0]),z(i[1]))))+ +("e"!==r):o-2*("%"===r))),e=a.join("")}else e=",."+yu(u[2])+"f";return q.format(e)}q.scale.linear=function(){return function n(e,r,i,o){var u,a;function t(){var n=2<Math.min(e.length,r.length)?su:uu,t=o?ho:fo;return u=n(e,r,t,i),a=n(r,e,t,Zi),l}function l(n){return u(n)}l.invert=function(n){return a(n)};l.domain=function(n){return arguments.length?(e=n.map(Number),t()):e};l.range=function(n){return arguments.length?(r=n,t()):r};l.rangeRound=function(n){return l.range(n).interpolate(io)};l.clamp=function(n){return arguments.length?(o=n,t()):o};l.interpolate=function(n){return arguments.length?(i=n,t()):i};l.ticks=function(n){return du(e,n)};l.tickFormat=function(n,t){return gu(e,n,t)};l.nice=function(n){return hu(e,n),t()};l.copy=function(){return n(e,r,i,o)};return t()}([0,1],[0,1],Zi,!1)};var vu={s:1,g:1,p:1,r:1,e:1};function yu(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}q.scale.log=function(){return function n(t,l,c,s){function f(n){return(c?Math.log(n<0?0:n):-Math.log(0<n?0:-n))/Math.log(l)}function h(n){return c?Math.pow(l,n):-Math.pow(l,-n)}function i(n){return t(f(n))}i.invert=function(n){return h(t.invert(n))};i.domain=function(n){return arguments.length?(c=0<=n[0],t.domain((s=n.map(Number)).map(f)),i):s};i.base=function(n){return arguments.length?(l=+n,t.domain(s.map(f)),i):l};i.nice=function(){var n=au(s.map(f),c?Math:xu);return t.domain(n),s=n.map(h),i};i.ticks=function(){var n=iu(s),t=[],e=n[0],r=n[1],i=Math.floor(f(e)),o=Math.ceil(f(r)),u=l%1?2:l;if(isFinite(o-i)){if(c){for(;i<o;i++)for(var a=1;a<u;a++)t.push(h(i)*a);t.push(h(i))}else for(t.push(h(i));i++<o;)for(var a=u-1;0<a;a--)t.push(h(i)*a);for(i=0;t[i]<e;i++);for(o=t.length;t[o-1]>r;o--);t=t.slice(i,o)}return t};i.tickFormat=function(n,e){if(!arguments.length)return mu;arguments.length<2?e=mu:"function"!=typeof e&&(e=q.format(e));var r=Math.max(1,l*n/i.ticks().length);return function(n){var t=n/h(Math.round(f(n)));return t*l<l-.5&&(t*=l),t<=r?e(n):""}};i.copy=function(){return n(t.copy(),l,c,s)};return fu(i,t)}(q.scale.linear().domain([0,1]),10,!0,[1,10])};var mu=q.format(".0e"),xu={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};function Mu(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}q.scale.pow=function(){return function n(t,e,r){var i=Mu(e),o=Mu(1/e);function u(n){return t(i(n))}u.invert=function(n){return o(t.invert(n))};u.domain=function(n){return arguments.length?(t.domain((r=n.map(Number)).map(i)),u):r};u.ticks=function(n){return du(r,n)};u.tickFormat=function(n,t){return gu(r,n,t)};u.nice=function(n){return u.domain(hu(r,n))};u.exponent=function(n){return arguments.length?(i=Mu(e=n),o=Mu(1/e),t.domain(r.map(i)),u):e};u.copy=function(){return n(t.copy(),e,r)};return fu(u,t)}(q.scale.linear(),1,[0,1])},q.scale.sqrt=function(){return q.scale.pow().exponent(.5)},q.scale.ordinal=function(){return function n(a,l){var i,c,s;function f(n){return c[((i.get(n)||("range"===l.t?i.set(n,a.push(n)):NaN))-1)%c.length]}function h(t,e){return q.range(a.length).map(function(n){return t+e*n})}f.domain=function(n){if(!arguments.length)return a;a=[],i=new m;for(var t,e=-1,r=n.length;++e<r;)i.has(t=n[e])||i.set(t,a.push(t));return f[l.t].apply(f,l.a)};f.range=function(n){return arguments.length?(c=n,s=0,l={t:"range",a:arguments},f):c};f.rangePoints=function(n,t){arguments.length<2&&(t=0);var e=n[0],r=n[1],i=a.length<2?(e=(e+r)/2,0):(r-e)/(a.length-1+t);return c=h(e+i*t/2,i),s=0,l={t:"rangePoints",a:arguments},f};f.rangeRoundPoints=function(n,t){arguments.length<2&&(t=0);var e=n[0],r=n[1],i=a.length<2?(e=r=Math.round((e+r)/2),0):(r-e)/(a.length-1+t)|0;return c=h(e+Math.round(i*t/2+(r-e-(a.length-1+t)*i)/2),i),s=0,l={t:"rangeRoundPoints",a:arguments},f};f.rangeBands=function(n,t,e){arguments.length<2&&(t=0),arguments.length<3&&(e=t);var r=n[1]<n[0],i=n[r-0],o=n[1-r],u=(o-i)/(a.length-t+2*e);return c=h(i+u*e,u),r&&c.reverse(),s=u*(1-t),l={t:"rangeBands",a:arguments},f};f.rangeRoundBands=function(n,t,e){arguments.length<2&&(t=0),arguments.length<3&&(e=t);var r=n[1]<n[0],i=n[r-0],o=n[1-r],u=Math.floor((o-i)/(a.length-t+2*e));return c=h(i+Math.round((o-i-(a.length-t)*u)/2),u),r&&c.reverse(),s=Math.round(u*(1-t)),l={t:"rangeRoundBands",a:arguments},f};f.rangeBand=function(){return s};f.rangeExtent=function(){return iu(l.a[0])};f.copy=function(){return n(a,l)};return f.domain(a)}([],{t:"range",a:[[]]})},q.scale.category10=function(){return q.scale.ordinal().range(_u)},q.scale.category20=function(){return q.scale.ordinal().range(wu)},q.scale.category20b=function(){return q.scale.ordinal().range(bu)},q.scale.category20c=function(){return q.scale.ordinal().range(ku)};var _u=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(at),wu=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(at),bu=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(at),ku=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(at);function Cu(){return 0}q.scale.quantile=function(){return function n(e,r){var i;function t(){var n=0,t=r.length;for(i=[];++n<t;)i[n-1]=q.quantile(e,n/t);return o}function o(n){if(!isNaN(n=+n))return r[q.bisect(i,n)]}o.domain=function(n){return arguments.length?(e=n.map(c).filter(s).sort(l),t()):e};o.range=function(n){return arguments.length?(r=n,t()):r};o.quantiles=function(){return i};o.invertExtent=function(n){return(n=r.indexOf(n))<0?[NaN,NaN]:[0<n?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]};o.copy=function(){return n(e,r)};return t()}([],[])},q.scale.quantize=function(){return function n(t,e,r){var i,o;function u(n){return r[Math.max(0,Math.min(o,Math.floor(i*(n-t))))]}function a(){return i=r.length/(e-t),o=r.length-1,u}u.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],a()):[t,e]};u.range=function(n){return arguments.length?(r=n,a()):r};u.invertExtent=function(n){return[n=(n=r.indexOf(n))<0?NaN:n/i+t,n+1/i]};u.copy=function(){return n(t,e,r)};return a()}(0,1,[0,1])},q.scale.threshold=function(){return function n(t,e){function r(n){if(n<=n)return e[q.bisect(t,n)]}r.domain=function(n){return arguments.length?(t=n,r):t};r.range=function(n){return arguments.length?(e=n,r):e};r.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]};r.copy=function(){return n(t,e)};return r}([.5],[0,1])},q.scale.identity=function(){return function n(e){function t(n){return+n}t.invert=t;t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e};t.ticks=function(n){return du(e,n)};t.tickFormat=function(n,t){return gu(e,n,t)};t.copy=function(){return n(e)};return t}([0,1])},q.svg={},q.svg.arc=function(){var P=Nu,O=Su,U=Cu,I=Eu,H=Au,Y=Lu,Z=Fu;function t(){var n=Math.max(0,+P.apply(this,arguments)),t=Math.max(0,+O.apply(this,arguments)),e=H.apply(this,arguments)-Sn,r=Y.apply(this,arguments)-Sn,i=Math.abs(r-e),o=r<e?0:1;if(t<n&&(u=t,t=n,n=u),Nn<=i)return V(t,o)+(n?V(n,1-o):"")+"Z";var u,a,l,c,s,f,h,p,d,g,v,y,m=0,x=0,M=[];if((c=(+Z.apply(this,arguments)||0)/2)&&(l=I===Eu?Math.sqrt(n*n+t*t):+I.apply(this,arguments),o||(x*=-1),t&&(x=qn(l/t*Math.sin(c))),n&&(m=qn(l/n*Math.sin(c)))),t){s=t*Math.cos(e+x),f=t*Math.sin(e+x),h=t*Math.cos(r-x),p=t*Math.sin(r-x);var _=Math.abs(r-e-2*x)<=Cn?0:1;if(x&&Tu(s,f,h,p)===o^_){var w=(e+r)/2;s=t*Math.cos(w),f=t*Math.sin(w),h=p=null}}else s=f=0;if(n){d=n*Math.cos(r-m),g=n*Math.sin(r-m),v=n*Math.cos(e+m),y=n*Math.sin(e+m);var b=Math.abs(e-r+2*m)<=Cn?0:1;if(m&&Tu(d,g,v,y)===1-o^b){var k=(e+r)/2;d=n*Math.cos(k),g=n*Math.sin(k),v=y=null}}else d=g=0;if(bn<i&&.001<(u=Math.min(Math.abs(t-n)/2,+U.apply(this,arguments)))){a=n<t^o?0:1;var C=u,E=u;if(i<Cn){var N=null==v?[d,g]:null==h?[s,f]:ii([s,f],[v,y],[h,p],[d,g]),S=s-N[0],A=f-N[1],L=h-N[0],F=p-N[1],T=1/Math.sin(Math.acos((S*L+A*F)/(Math.sqrt(S*S+A*A)*Math.sqrt(L*L+F*F)))/2),z=Math.sqrt(N[0]*N[0]+N[1]*N[1]);E=Math.min(u,(n-z)/(T-1)),C=Math.min(u,(t-z)/(T+1))}if(null!=h){var q=zu(null==v?[d,g]:[v,y],[s,f],t,C,o),D=zu([h,p],[d,g],t,C,o);u===C?M.push("M",q[0],"A",C,",",C," 0 0,",a," ",q[1],"A",t,",",t," 0 ",1-o^Tu(q[1][0],q[1][1],D[1][0],D[1][1]),",",o," ",D[1],"A",C,",",C," 0 0,",a," ",D[0]):M.push("M",q[0],"A",C,",",C," 0 1,",a," ",D[0])}else M.push("M",s,",",f);if(null!=v){var R=zu([s,f],[v,y],n,-E,o),j=zu([d,g],null==h?[s,f]:[h,p],n,-E,o);u===E?M.push("L",j[0],"A",E,",",E," 0 0,",a," ",j[1],"A",n,",",n," 0 ",o^Tu(j[1][0],j[1][1],R[1][0],R[1][1]),",",1-o," ",R[1],"A",E,",",E," 0 0,",a," ",R[0]):M.push("L",j[0],"A",E,",",E," 0 0,",a," ",R[0])}else M.push("L",d,",",g)}else M.push("M",s,",",f),null!=h&&M.push("A",t,",",t," 0 ",_,",",o," ",h,",",p),M.push("L",d,",",g),null!=v&&M.push("A",n,",",n," 0 ",b,",",1-o," ",v,",",y);return M.push("Z"),M.join("")}function V(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}return t.innerRadius=function(n){return arguments.length?(P=vt(n),t):P},t.outerRadius=function(n){return arguments.length?(O=vt(n),t):O},t.cornerRadius=function(n){return arguments.length?(U=vt(n),t):U},t.padRadius=function(n){return arguments.length?(I=n==Eu?Eu:vt(n),t):I},t.startAngle=function(n){return arguments.length?(H=vt(n),t):H},t.endAngle=function(n){return arguments.length?(Y=vt(n),t):Y},t.padAngle=function(n){return arguments.length?(Z=vt(n),t):Z},t.centroid=function(){var n=(+P.apply(this,arguments)+ +O.apply(this,arguments))/2,t=(+H.apply(this,arguments)+ +Y.apply(this,arguments))/2-Sn;return[Math.cos(t)*n,Math.sin(t)*n]},t};var Eu="auto";function Nu(n){return n.innerRadius}function Su(n){return n.outerRadius}function Au(n){return n.startAngle}function Lu(n){return n.endAngle}function Fu(n){return n&&n.padAngle}function Tu(n,t,e,r){return 0<(n-e)*t-(t-r)*n?0:1}function zu(n,t,e,r,i){var o=n[0]-t[0],u=n[1]-t[1],a=(i?r:-r)/Math.sqrt(o*o+u*u),l=a*u,c=-a*o,s=n[0]+l,f=n[1]+c,h=t[0]+l,p=t[1]+c,d=(s+h)/2,g=(f+p)/2,v=h-s,y=p-f,m=v*v+y*y,x=e-r,M=s*p-h*f,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-M*M)),w=(M*y-v*_)/m,b=(-M*v-y*_)/m,k=(M*y+v*_)/m,C=(-M*v+y*_)/m,E=w-d,N=b-g,S=k-d,A=C-g;return S*S+A*A<E*E+N*N&&(w=k,b=C),[[w-l,b-c],[w*e/x,b*e/x]]}function qu(c){var s=Kr,f=Qr,h=$e,p=Ru,t=p.key,d=.7;function e(n){var t,e=[],r=[],i=-1,o=n.length,u=vt(s),a=vt(f);function l(){e.push("M",p(c(r),d))}for(;++i<o;)h.call(this,t=n[i],i)?r.push([+u.call(this,t,i),+a.call(this,t,i)]):r.length&&(l(),r=[]);return r.length&&l(),e.length?e.join(""):null}return e.x=function(n){return arguments.length?(s=n,e):s},e.y=function(n){return arguments.length?(f=n,e):f},e.defined=function(n){return arguments.length?(h=n,e):h},e.interpolate=function(n){return arguments.length?(t="function"==typeof n?p=n:(p=Du.get(n)||Ru).key,e):t},e.tension=function(n){return arguments.length?(d=n,e):d},e}q.svg.line=function(){return qu(R)};var Du=q.map({linear:Ru,"linear-closed":ju,step:function(n){var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];for(;++t<e;)i.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);1<e&&i.push("H",r[0]);return i.join("")},"step-before":Pu,"step-after":Ou,basis:Hu,"basis-open":function(n){if(n.length<4)return Ru(n);var t,e=[],r=-1,i=n.length,o=[0],u=[0];for(;++r<3;)t=n[r],o.push(t[0]),u.push(t[1]);e.push(Yu($u,o)+","+Yu($u,u)),--r;for(;++r<i;)t=n[r],o.shift(),o.push(t[0]),u.shift(),u.push(t[1]),Bu(e,o,u);return e.join("")},"basis-closed":function(n){var t,e,r=-1,i=n.length,o=i+4,u=[],a=[];for(;++r<4;)e=n[r%i],u.push(e[0]),a.push(e[1]);t=[Yu($u,u),",",Yu($u,a)],--r;for(;++r<o;)e=n[r%i],u.shift(),u.push(e[0]),a.shift(),a.push(e[1]),Bu(t,u,a);return t.join("")},bundle:function(n,t){var e=n.length-1;if(e)for(var r,i,o=n[0][0],u=n[0][1],a=n[e][0]-o,l=n[e][1]-u,c=-1;++c<=e;)r=n[c],i=c/e,r[0]=t*r[0]+(1-t)*(o+i*a),r[1]=t*r[1]+(1-t)*(u+i*l);return Hu(n)},cardinal:function(n,t){return n.length<3?Ru(n):n[0]+Uu(n,Iu(n,t))},"cardinal-open":function(n,t){return n.length<4?Ru(n):n[1]+Uu(n.slice(1,-1),Iu(n,t))},"cardinal-closed":function(n,t){return n.length<3?ju(n):n[0]+Uu((n.push(n[0]),n),Iu([n[n.length-2]].concat(n,[n[1]]),t))},monotone:function(n){return n.length<3?Ru(n):n[0]+Uu(n,function(n){var t,e,r,i,o=[],u=function(n){var t=0,e=n.length-1,r=[],i=n[0],o=n[1],u=r[0]=Xu(i,o);for(;++t<e;)r[t]=(u+(u=Xu(i=o,o=n[t+1])))/2;return r[t]=u,r}(n),a=-1,l=n.length-1;for(;++a<l;)t=Xu(n[a],n[a+1]),z(t)<bn?u[a]=u[a+1]=0:(e=u[a]/t,r=u[a+1]/t,9<(i=e*e+r*r)&&(i=3*t/Math.sqrt(i),u[a]=i*e,u[a+1]=i*r));a=-1;for(;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+u[a]*u[a])),o.push([i||0,u[a]*i||0]);return o}(n))}});function Ru(n){return 1<n.length?n.join("L"):n+"Z"}function ju(n){return n.join("L")+"Z"}function Pu(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("V",(r=n[t])[1],"H",r[0]);return i.join("")}function Ou(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r=n[t])[0],"V",r[1]);return i.join("")}function Uu(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return Ru(n);var e=n.length!=t.length,r="",i=n[0],o=n[1],u=t[0],a=u,l=1;if(e&&(r+="Q"+(o[0]-2*u[0]/3)+","+(o[1]-2*u[1]/3)+","+o[0]+","+o[1],i=n[1],l=2),1<t.length){a=t[1],o=n[l],l++,r+="C"+(i[0]+u[0])+","+(i[1]+u[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var c=2;c<t.length;c++,l++)o=n[l],a=t[c],r+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}if(e){var s=n[l];r+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function Iu(n,t){for(var e,r=[],i=(1-t)/2,o=n[0],u=n[1],a=1,l=n.length;++a<l;)e=o,o=u,u=n[a],r.push([i*(u[0]-e[0]),i*(u[1]-e[1])]);return r}function Hu(n){if(n.length<3)return Ru(n);var t=1,e=n.length,r=n[0],i=r[0],o=r[1],u=[i,i,i,(r=n[1])[0]],a=[o,o,o,r[1]],l=[i,",",o,"L",Yu($u,u),",",Yu($u,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],u.shift(),u.push(r[0]),a.shift(),a.push(r[1]),Bu(l,u,a);return n.pop(),l.push("L",r),l.join("")}function Yu(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}Du.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Zu=[0,2/3,1/3,0],Vu=[0,1/3,2/3,0],$u=[0,1/6,2/3,1/6];function Bu(n,t,e){n.push("C",Yu(Zu,t),",",Yu(Zu,e),",",Yu(Vu,t),",",Yu(Vu,e),",",Yu($u,t),",",Yu($u,e))}function Xu(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Wu(n){for(var t,e,r,i=-1,o=n.length;++i<o;)e=(t=n[i])[0],r=t[1]-Sn,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Ju(d){var g=Kr,v=Kr,y=0,m=Qr,x=$e,M=Ru,t=M.key,_=M,w="L",b=.7;function e(n){var t,e,r,i=[],o=[],u=[],a=-1,l=n.length,c=vt(g),s=vt(y),f=g===v?function(){return e}:vt(v),h=y===m?function(){return r}:vt(m);function p(){i.push("M",M(d(u),b),w,_(d(o.reverse()),b),"Z")}for(;++a<l;)x.call(this,t=n[a],a)?(o.push([e=+c.call(this,t,a),r=+s.call(this,t,a)]),u.push([+f.call(this,t,a),+h.call(this,t,a)])):o.length&&(p(),o=[],u=[]);return o.length&&p(),i.length?i.join(""):null}return e.x=function(n){return arguments.length?(g=v=n,e):v},e.x0=function(n){return arguments.length?(g=n,e):g},e.x1=function(n){return arguments.length?(v=n,e):v},e.y=function(n){return arguments.length?(y=m=n,e):m},e.y0=function(n){return arguments.length?(y=n,e):y},e.y1=function(n){return arguments.length?(m=n,e):m},e.defined=function(n){return arguments.length?(x=n,e):x},e.interpolate=function(n){return arguments.length?(t="function"==typeof n?M=n:(M=Du.get(n)||Ru).key,_=M.reverse||M,w=M.closed?"M":"L",e):t},e.tension=function(n){return arguments.length?(b=n,e):b},e}function Gu(n){return n.radius}function Ku(n){return[n.x,n.y]}function Qu(){return 64}function na(){return"circle"}function ta(n){var t=Math.sqrt(n/Cn);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}q.svg.line.radial=function(){var n=qu(Wu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},(Pu.reverse=Ou).reverse=Pu,q.svg.area=function(){return Ju(R)},q.svg.area.radial=function(){var n=Ju(Wu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},q.svg.chord=function(){var u=Pr,a=Or,l=Gu,c=Au,s=Lu;function t(n,t){var e,r,i=f(this,u,n,t),o=f(this,a,n,t);return"M"+i.p0+h(i.r,i.p1,i.a1-i.a0)+(r=o,(e=i).a0==r.a0&&e.a1==r.a1?p(i.r,i.p1,i.r,i.p0):p(i.r,i.p1,o.r,o.p0)+h(o.r,o.p1,o.a1-o.a0)+p(o.r,o.p1,i.r,i.p0))+"Z"}function f(n,t,e,r){var i=t.call(n,e,r),o=l.call(n,i,r),u=c.call(n,i,r)-Sn,a=s.call(n,i,r)-Sn;return{r:o,a0:u,a1:a,p0:[o*Math.cos(u),o*Math.sin(u)],p1:[o*Math.cos(a),o*Math.sin(a)]}}function h(n,t,e){return"A"+n+","+n+" 0 "+ +(Cn<e)+",1 "+t}function p(n,t,e,r){return"Q 0,0 "+r}return t.radius=function(n){return arguments.length?(l=vt(n),t):l},t.source=function(n){return arguments.length?(u=vt(n),t):u},t.target=function(n){return arguments.length?(a=vt(n),t):a},t.startAngle=function(n){return arguments.length?(c=vt(n),t):c},t.endAngle=function(n){return arguments.length?(s=vt(n),t):s},t},q.svg.diagonal=function(){var u=Pr,a=Or,l=Ku;function t(n,t){var e=u.call(this,n,t),r=a.call(this,n,t),i=(e.y+r.y)/2,o=[e,{x:e.x,y:i},{x:r.x,y:i},r];return"M"+(o=o.map(l))[0]+"C"+o[1]+" "+o[2]+" "+o[3]}return t.source=function(n){return arguments.length?(u=vt(n),t):u},t.target=function(n){return arguments.length?(a=vt(n),t):a},t.projection=function(n){return arguments.length?(l=n,t):l},t},q.svg.diagonal.radial=function(){var n=q.svg.diagonal(),t=Ku,e=n.projection;return n.projection=function(n){return arguments.length?e((r=t=n,function(){var n=r.apply(this,arguments),t=n[0],e=n[1]-Sn;return[t*Math.cos(e),t*Math.sin(e)]})):t;var r},n},q.svg.symbol=function(){var e=na,r=Qu;function t(n,t){return(ea.get(e.call(this,n,t))||ta)(r.call(this,n,t))}return t.type=function(n){return arguments.length?(e=vt(n),t):e},t.size=function(n){return arguments.length?(r=vt(n),t):r},t};var ea=q.map({circle:ta,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*ia)),e=t*ia;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/ra),e=t*ra/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/ra),e=t*ra/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});q.svg.symbolTypes=ea.keys();var ra=Math.sqrt(3),ia=Math.tan(30*An);$.transition=function(n){for(var t,e,r=la||++fa,i=da(n),o=[],u=ca||{time:Date.now(),ease:Qi,delay:0,duration:250},a=-1,l=this.length;++a<l;){o.push(t=[]);for(var c=this[a],s=-1,f=c.length;++s<f;)(e=c[s])&&ga(e,s,i,r,u),t.push(e)}return aa(o,i,r)},$.interrupt=function(n){return this.each(null==n?oa:ua(da(n)))};var oa=ua(da());function ua(r){return function(){var n,t,e;(n=this[r])&&(e=n[t=n.active])&&(e.timer.c=null,e.timer.t=NaN,--n.count?delete n[t]:delete this[r],n.active+=.5,e.event&&e.event.interrupt.call(this,this.__data__,e.index))}}function aa(n,t,e){return I(n,sa),n.namespace=t,n.id=e,n}var la,ca,sa=[],fa=0;function ha(n,r,i,o){var u=n.id,a=n.namespace;return sn(n,"function"==typeof i?function(n,t,e){n[a][u].tween.set(r,o(i.call(n,n.__data__,t,e)))}:(i=o(i),function(n){n[a][u].tween.set(r,i)}))}function pa(n){return null==n&&(n=""),function(){this.textContent=n}}function da(n){return null==n?"__transition__":"__transition_"+n+"__"}function ga(o,u,i,a,n){var l,c,s,f,h,p=o[i]||(o[i]={active:0,count:0}),d=p[a];function e(n){var t=p.active,e=p[t];for(var r in e&&(e.timer.c=null,e.timer.t=NaN,--p.count,delete p[t],e.event&&e.event.interrupt.call(o,o.__data__,e.index)),p)if(+r<a){var i=p[r];i.timer.c=null,i.timer.t=NaN,--p.count,delete p[r]}c.c=g,kt(function(){return c.c&&g(n||1)&&(c.c=null,c.t=NaN),1},0,l),p.active=a,d.event&&d.event.start.call(o,o.__data__,u),h=[],d.tween.forEach(function(n,t){(t=t.call(o,o.__data__,u))&&h.push(t)}),f=d.ease,s=d.duration}function g(n){for(var t=n/s,e=f(t),r=h.length;0<r;)h[--r].call(o,e);if(1<=t)return d.event&&d.event.end.call(o,o.__data__,u),--p.count?delete p[a]:delete o[i],1}d||(l=n.time,c=kt(function(n){var t=d.delay;if(c.t=t+l,t<=n)return e(n-t);c.c=e},0,l),d=p[a]={tween:new m,time:l,timer:c,delay:n.delay,duration:n.duration,ease:n.ease,index:u},n=null,++p.count)}sa.call=$.call,sa.empty=$.empty,sa.node=$.node,sa.size=$.size,q.transition=function(n,t){return n&&n.transition?la?n.transition(t):n:q.selection().transition(n)},(q.transition.prototype=sa).select=function(n){var t,e,r,i=this.id,o=this.namespace,u=[];n=B(n);for(var a=-1,l=this.length;++a<l;){u.push(t=[]);for(var c=this[a],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),ga(e,s,o,i,r[o][i]),t.push(e)):t.push(null)}return aa(u,o,i)},sa.selectAll=function(n){var t,e,r,i,o,u=this.id,a=this.namespace,l=[];n=X(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,p=f.length;++h<p;)if(r=f[h]){o=r[a][u],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var d=-1,g=e.length;++d<g;)(i=e[d])&&ga(i,d,a,u,o),t.push(i)}return aa(l,a,u)},sa.filter=function(n){var t,e,r=[];"function"!=typeof n&&(n=cn(n));for(var i=0,o=this.length;i<o;i++){r.push(t=[]);for(var u,a=0,l=(u=this[i]).length;a<l;a++)(e=u[a])&&n.call(e,e.__data__,a,i)&&t.push(e)}return aa(r,this.namespace,this.id)},sa.tween=function(t,e){var r=this.id,i=this.namespace;return arguments.length<2?this.node()[i][r].tween.get(t):sn(this,null==e?function(n){n[i][r].tween.remove(t)}:function(n){n[i][r].tween.set(t,e)})},sa.attr=function(n,t){if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var r="transform"==n?so:Zi,i=q.ns.qualify(n);function o(){this.removeAttribute(i)}function u(){this.removeAttributeNS(i.space,i.local)}return ha(this,"attr."+n,t,i.local?function(e){return null==e?u:(e+="",function(){var t,n=this.getAttributeNS(i.space,i.local);return n!==e&&(t=r(n,e),function(n){this.setAttributeNS(i.space,i.local,t(n))})})}:function(e){return null==e?o:(e+="",function(){var t,n=this.getAttribute(i);return n!==e&&(t=r(n,e),function(n){this.setAttribute(i,t(n))})})})},sa.attrTween=function(n,r){var i=q.ns.qualify(n);return this.tween("attr."+n,i.local?function(n,t){var e=r.call(this,n,t,this.getAttributeNS(i.space,i.local));return e&&function(n){this.setAttributeNS(i.space,i.local,e(n))}}:function(n,t){var e=r.call(this,n,t,this.getAttribute(i));return e&&function(n){this.setAttribute(i,e(n))}})},sa.style=function(r,n,i){var t=arguments.length;if(t<3){if("string"!=typeof r){for(i in t<2&&(n=""),r)this.style(i,r[i],n);return this}i=""}function o(){this.style.removeProperty(r)}return ha(this,"style."+r,n,function(e){return null==e?o:(e+="",function(){var t,n=D(this).getComputedStyle(this,null).getPropertyValue(r);return n!==e&&(t=Zi(n,e),function(n){this.style.setProperty(r,t(n),i)})})})},sa.styleTween=function(r,i,o){return arguments.length<3&&(o=""),this.tween("style."+r,function(n,t){var e=i.call(this,n,t,D(this).getComputedStyle(this,null).getPropertyValue(r));return e&&function(n){this.style.setProperty(r,e(n),o)}})},sa.text=function(n){return ha(this,"text",n,pa)},sa.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var n;this[t].count<2&&(n=this.parentNode)&&n.removeChild(this)})},sa.ease=function(t){var e=this.id,r=this.namespace;return arguments.length<1?this.node()[r][e].ease:("function"!=typeof t&&(t=q.ease.apply(q,arguments)),sn(this,function(n){n[r][e].ease=t}))},sa.delay=function(r){var i=this.id,o=this.namespace;return arguments.length<1?this.node()[o][i].delay:sn(this,"function"==typeof r?function(n,t,e){n[o][i].delay=+r.call(n,n.__data__,t,e)}:(r=+r,function(n){n[o][i].delay=r}))},sa.duration=function(r){var i=this.id,o=this.namespace;return arguments.length<1?this.node()[o][i].duration:sn(this,"function"==typeof r?function(n,t,e){n[o][i].duration=Math.max(1,r.call(n,n.__data__,t,e))}:(r=Math.max(1,r),function(n){n[o][i].duration=r}))},sa.each=function(r,e){var i=this.id,o=this.namespace;if(arguments.length<2){var n=ca,t=la;try{la=i,sn(this,function(n,t,e){ca=n[o][i],r.call(n,n.__data__,t,e)})}finally{ca=n,la=t}}else sn(this,function(n){var t=n[o][i];(t.event||(t.event=q.dispatch("start","end","interrupt"))).on(r,e)});return this},sa.transition=function(){for(var n,t,e,r=this.id,i=++fa,o=this.namespace,u=[],a=0,l=this.length;a<l;a++){u.push(n=[]);for(var c,s=0,f=(c=this[a]).length;s<f;s++)(t=c[s])&&ga(t,s,o,i,{time:(e=t[o][r]).time,ease:e.ease,delay:e.delay+e.duration,duration:e.duration}),n.push(t)}return aa(u,o,i)},q.svg.axis=function(){var E,N=q.scale.linear(),S=va,A=6,L=6,F=3,T=[10],z=null;function e(n){n.each(function(){var n,t=q.select(this),e=this.__chart__||N,r=this.__chart__=N.copy(),i=null==z?r.ticks?r.ticks.apply(r,T):r.domain():z,o=null==E?r.tickFormat?r.tickFormat.apply(r,T):R:E,u=t.selectAll(".tick").data(i,r),a=u.enter().insert("g",".domain").attr("class","tick").style("opacity",bn),l=q.transition(u.exit()).style("opacity",bn).remove(),c=q.transition(u.order()).style("opacity",1),s=Math.max(A,0)+F,f=ou(r),h=t.selectAll(".domain").data([0]),p=(h.enter().append("path").attr("class","domain"),q.transition(h));a.append("line"),a.append("text");var d,g,v,y,m=a.select("line"),x=c.select("line"),M=u.select("text").text(o),_=a.select("text"),w=c.select("text"),b="top"===S||"left"===S?-1:1;if("bottom"===S||"top"===S?(n=ma,d="x",v="y",g="x2",y="y2",M.attr("dy",b<0?"0em":".71em").style("text-anchor","middle"),p.attr("d","M"+f[0]+","+b*L+"V0H"+f[1]+"V"+b*L)):(n=xa,d="y",v="x",g="y2",y="x2",M.attr("dy",".32em").style("text-anchor",b<0?"end":"start"),p.attr("d","M"+b*L+","+f[0]+"H0V"+f[1]+"H"+b*L)),m.attr(y,b*A),_.attr(v,b*s),x.attr(g,0).attr(y,b*A),w.attr(d,0).attr(v,b*s),r.rangeBand){var k=r,C=k.rangeBand()/2;e=r=function(n){return k(n)+C}}else e.rangeBand?e=r:l.call(n,r,e);a.call(n,e,r),c.call(n,r,r)})}return e.scale=function(n){return arguments.length?(N=n,e):N},e.orient=function(n){return arguments.length?(S=n in ya?n+"":va,e):S},e.ticks=function(){return arguments.length?(T=h(arguments),e):T},e.tickValues=function(n){return arguments.length?(z=n,e):z},e.tickFormat=function(n){return arguments.length?(E=n,e):E},e.tickSize=function(n){var t=arguments.length;return t?(A=+n,L=+arguments[t-1],e):A},e.innerTickSize=function(n){return arguments.length?(A=+n,e):A},e.outerTickSize=function(n){return arguments.length?(L=+n,e):L},e.tickPadding=function(n){return arguments.length?(F=+n,e):F},e.tickSubdivide=function(){return arguments.length&&e},e};var va="bottom",ya={top:1,right:1,bottom:1,left:1};function ma(n,e,r){n.attr("transform",function(n){var t=e(n);return"translate("+(isFinite(t)?t:r(n))+",0)"})}function xa(n,e,r){n.attr("transform",function(n){var t=e(n);return"translate(0,"+(isFinite(t)?t:r(n))+")"})}q.svg.brush=function(){var m,x,M=O(N,"brushstart","brush","brushend"),_=null,w=null,b=[0,0],k=[0,0],C=!0,E=!0,u=_a[0];function N(n){n.each(function(){var n=q.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",a).on("touchstart.brush",a),t=n.selectAll(".background").data([0]);t.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),n.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var e=n.selectAll(".resize").data(u,R);e.exit().remove(),e.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Ma[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),e.style("display",N.empty()?"none":null);var r,i=q.transition(n),o=q.transition(t);_&&(r=ou(_),o.attr("x",r[0]).attr("width",r[1]-r[0]),A(i)),w&&(r=ou(w),o.attr("y",r[0]).attr("height",r[1]-r[0]),L(i)),S(i)})}function S(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+b[+/e$/.test(n)]+","+k[+/^s/.test(n)]+")"})}function A(n){n.select(".extent").attr("x",b[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",b[1]-b[0])}function L(n){n.select(".extent").attr("y",k[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",k[1]-k[0])}function a(){var f,e,r=this,n=q.select(q.event.target),i=M.of(r,arguments),o=q.select(r),t=n.datum(),u=!/^(n|s)$/.test(t)&&_,a=!/^(e|w)$/.test(t)&&w,h=n.classed("extent"),l=xn(r),p=q.mouse(r),c=q.select(D(r)).on("keydown.brush",function(){32==q.event.keyCode&&(h||(f=null,p[0]-=b[1],p[1]-=k[1],h=2),j())}).on("keyup.brush",function(){32==q.event.keyCode&&2==h&&(p[0]+=b[1],p[1]+=k[1],h=0,j())});if(q.event.changedTouches?c.on("touchmove.brush",g).on("touchend.brush",y):c.on("mousemove.brush",g).on("mouseup.brush",y),o.interrupt().selectAll("*").interrupt(),h)p[0]=b[0]-p[0],p[1]=k[0]-p[1];else if(t){var s=+/w$/.test(t),d=+/^n/.test(t);e=[b[1-s]-p[0],k[1-d]-p[1]],p[0]=b[s],p[1]=k[d]}else q.event.altKey&&(f=p.slice());function g(){var n=q.mouse(r),t=!1;e&&(n[0]+=e[0],n[1]+=e[1]),h||(q.event.altKey?(f||(f=[(b[0]+b[1])/2,(k[0]+k[1])/2]),p[0]=b[+(n[0]<f[0])],p[1]=k[+(n[1]<f[1])]):f=null),u&&v(n,_,0)&&(A(o),t=!0),a&&v(n,w,1)&&(L(o),t=!0),t&&(S(o),i({type:"brush",mode:h?"move":"resize"}))}function v(n,t,e){var r,i,o=ou(t),u=o[0],a=o[1],l=p[e],c=e?k:b,s=c[1]-c[0];if(h&&(u-=l,a-=s+l),r=(e?E:C)?Math.max(u,Math.min(a,n[e])):n[e],h?i=(r+=l)+s:(f&&(l=Math.max(u,Math.min(a,2*f[e]-r))),l<r?(i=r,r=l):i=l),c[0]!=r||c[1]!=i)return e?x=null:m=null,c[0]=r,c[1]=i,!0}function y(){g(),o.style("pointer-events","all").selectAll(".resize").style("display",N.empty()?"none":null),q.select("body").style("cursor",null),c.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),l(),i({type:"brushend"})}o.style("pointer-events","none").selectAll(".resize").style("display",null),q.select("body").style("cursor",n.style("cursor")),i({type:"brushstart"}),g()}return N.event=function(n){n.each(function(){var r=M.of(this,arguments),i={x:b,y:k,i:m,j:x},n=this.__chart__||i;this.__chart__=i,la?q.select(this).transition().each("start.brush",function(){m=n.i,x=n.j,b=n.x,k=n.y,r({type:"brushstart"})}).tween("brush:brush",function(){var t=Vi(b,i.x),e=Vi(k,i.y);return m=x=null,function(n){b=i.x=t(n),k=i.y=e(n),r({type:"brush",mode:"resize"})}}).each("end.brush",function(){m=i.i,x=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})}):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))})},N.x=function(n){return arguments.length?(u=_a[!(_=n)<<1|!w],N):_},N.y=function(n){return arguments.length?(u=_a[!_<<1|!(w=n)],N):w},N.clamp=function(n){return arguments.length?(_&&w?(C=!!n[0],E=!!n[1]):_?C=!!n:w&&(E=!!n),N):_&&w?[C,E]:_?C:w?E:null},N.extent=function(n){var t,e,r,i,o;return arguments.length?(_&&(t=n[0],e=n[1],w&&(t=t[0],e=e[0]),m=[t,e],_.invert&&(t=_(t),e=_(e)),e<t&&(o=t,t=e,e=o),t==b[0]&&e==b[1]||(b=[t,e])),w&&(r=n[0],i=n[1],_&&(r=r[1],i=i[1]),x=[r,i],w.invert&&(r=w(r),i=w(i)),i<r&&(o=r,r=i,i=o),r==k[0]&&i==k[1]||(k=[r,i])),N):(_&&(m?(t=m[0],e=m[1]):(t=b[0],e=b[1],_.invert&&(t=_.invert(t),e=_.invert(e)),e<t&&(o=t,t=e,e=o))),w&&(x?(r=x[0],i=x[1]):(r=k[0],i=k[1],w.invert&&(r=w.invert(r),i=w.invert(i)),i<r&&(o=r,r=i,i=o))),_&&w?[[t,r],[e,i]]:_?[t,e]:w&&[r,i])},N.clear=function(){return N.empty()||(b=[0,0],k=[0,0],m=x=null),N},N.empty=function(){return!!_&&b[0]==b[1]||!!w&&k[0]==k[1]},q.rebind(N,M,"on")};var Ma={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},_a=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],wa=zt.format=ae.timeFormat,ba=wa.utc,ka=ba("%Y-%m-%dT%H:%M:%S.%LZ");function Ca(n){return n.toISOString()}function Ea(t,i,n){function u(n){return t(n)}function a(n,t){var e=(n[1]-n[0])/t,r=q.bisect(Sa,e);return r==Sa.length?[i.year,pu(n.map(function(n){return n/31536e6}),t)[2]]:r?i[e/Sa[r-1]<Sa[r]/e?r-1:r]:[Fa,pu(n,t)[2]]}return u.invert=function(n){return Na(t.invert(n))},u.domain=function(n){return arguments.length?(t.domain(n),u):t.domain().map(Na)},u.nice=function(t,e){var n=u.domain(),r=iu(n),i=null==t?a(r,10):"number"==typeof t&&a(r,t);function o(n){return!isNaN(n)&&!t.range(n,Na(+n+1),e).length}return i&&(t=i[0],e=i[1]),u.domain(au(n,1<e?{floor:function(n){for(;o(n=t.floor(n));)n=Na(n-1);return n},ceil:function(n){for(;o(n=t.ceil(n));)n=Na(+n+1);return n}}:t))},u.ticks=function(n,t){var e=iu(u.domain()),r=null==n?a(e,10):"number"==typeof n?a(e,n):!n.range&&[{range:n},t];return r&&(n=r[0],t=r[1]),n.range(e[0],Na(+e[1]+1),t<1?1:t)},u.tickFormat=function(){return n},u.copy=function(){return Ea(t.copy(),i,n)},fu(u,t)}function Na(n){return new Date(n)}wa.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ca:ka,Ca.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Ca.toString=ka.toString,zt.second=jt(function(n){return new qt(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),zt.seconds=zt.second.range,zt.seconds.utc=zt.second.utc.range,zt.minute=jt(function(n){return new qt(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),zt.minutes=zt.minute.range,zt.minutes.utc=zt.minute.utc.range,zt.hour=jt(function(n){var t=n.getTimezoneOffset()/60;return new qt(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),zt.hours=zt.hour.range,zt.hours.utc=zt.hour.utc.range,zt.month=jt(function(n){return(n=zt.day(n)).setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),zt.months=zt.month.range,zt.months.utc=zt.month.utc.range;var Sa=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Aa=[[zt.second,1],[zt.second,5],[zt.second,15],[zt.second,30],[zt.minute,1],[zt.minute,5],[zt.minute,15],[zt.minute,30],[zt.hour,1],[zt.hour,3],[zt.hour,6],[zt.hour,12],[zt.day,1],[zt.day,2],[zt.week,1],[zt.month,1],[zt.month,3],[zt.year,1]],La=wa.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",$e]]),Fa={range:function(n,t,e){return q.range(Math.ceil(n/e)*e,+t,e).map(Na)},floor:R,ceil:R};Aa.year=zt.year,zt.scale=function(){return Ea(q.scale.linear(),Aa,La)};var Ta=Aa.map(function(n){return[n[0].utc,n[1]]}),za=ba.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",$e]]);function qa(n){return JSON.parse(n.responseText)}function Da(n){var t=x.createRange();return t.selectNode(x.body),t.createContextualFragment(n.responseText)}Ta.year=zt.year.utc,zt.scale.utc=function(){return Ea(q.scale.linear(),Ta,za)},q.text=yt(function(n){return n.responseText}),q.json=function(n,t){return mt(n,"application/json",qa,t)},q.html=function(n,t){return mt(n,"text/html",Da,t)},q.xml=yt(function(n){return n.responseXML}),"object"==typeof Ra&&Ra.exports?Ra.exports=q:this.d3=q}()},{}],2:[function(e,r,o){(function(t){function n(){var n;try{n=o.storage.debug}catch(n){}return!n&&void 0!==t&&"env"in t&&(n=t.env.DEBUG),n}(o=r.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},o.formatArgs=function(n){var t=this.useColors;if(n[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+n[0]+(t?"%c ":" ")+"+"+o.humanize(this.diff),!t)return;var e="color: "+this.color;n.splice(1,0,e,"color: inherit");var r=0,i=0;n[0].replace(/%[a-zA-Z%]/g,function(n){"%%"!==n&&(r++,"%c"===n&&(i=r))}),n.splice(i,0,e)},o.save=function(n){try{null==n?o.storage.removeItem("debug"):o.storage.debug=n}catch(n){}},o.load=n,o.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},o.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(n){}}(),o.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],o.formatters.j=function(n){try{return JSON.stringify(n)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}},o.enable(n())}).call(this,e("_process"))},{"./debug":3,_process:7}],3:[function(n,t,l){function e(n){var r;function a(){if(a.enabled){var i=a,n=+new Date,t=n-(r||n);i.diff=t,i.prev=r,i.curr=n,r=n;for(var o=new Array(arguments.length),e=0;e<o.length;e++)o[e]=arguments[e];o[0]=l.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var u=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,function(n,t){if("%%"===n)return n;u++;var e=l.formatters[t];if("function"==typeof e){var r=o[u];n=e.call(i,r),o.splice(u,1),u--}return n}),l.formatArgs.call(i,o),(a.log||l.log||console.log.bind(console)).apply(i,o)}}return a.namespace=n,a.enabled=l.enabled(n),a.useColors=l.useColors(),a.color=function(n){var t,e=0;for(t in n)e=(e<<5)-e+n.charCodeAt(t),e|=0;return l.colors[Math.abs(e)%l.colors.length]}(n),a.destroy=i,"function"==typeof l.init&&l.init(a),l.instances.push(a),a}function i(){var n=l.instances.indexOf(this);return-1!==n&&(l.instances.splice(n,1),!0)}(l=t.exports=e.debug=e.default=e).coerce=function(n){return n instanceof Error?n.stack||n.message:n},l.disable=function(){l.enable("")},l.enable=function(n){var t;l.save(n),l.names=[],l.skips=[];var e=("string"==typeof n?n:"").split(/[\s,]+/),r=e.length;for(t=0;t<r;t++)e[t]&&("-"===(n=e[t].replace(/\*/g,".*?"))[0]?l.skips.push(new RegExp("^"+n.substr(1)+"$")):l.names.push(new RegExp("^"+n+"$")));for(t=0;t<l.instances.length;t++){var i=l.instances[t];i.enabled=l.enabled(i.namespace)}},l.enabled=function(n){if("*"===n[n.length-1])return!0;var t,e;for(t=0,e=l.skips.length;t<e;t++)if(l.skips[t].test(n))return!1;for(t=0,e=l.names.length;t<e;t++)if(l.names[t].test(n))return!0;return!1},l.humanize=n("ms"),l.instances=[],l.names=[],l.skips=[],l.formatters={}},{ms:6}],4:[function(n,t,e){var l=Object.create||function(n){var t=function(){};return t.prototype=n,new t},u=Object.keys||function(n){var t=[];for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(e);return e},o=Function.prototype.bind||function(n){var t=this;return function(){return t.apply(n,arguments)}};function r(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=l(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}((t.exports=r).EventEmitter=r).prototype._events=void 0,r.prototype._maxListeners=void 0;var i,a=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),i=0===c.x}catch(n){i=!1}function s(n){return void 0===n._maxListeners?r.defaultMaxListeners:n._maxListeners}function f(n,t,e,r){var i,o,u;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if((o=n._events)?(o.newListener&&(n.emit("newListener",t,e.listener?e.listener:e),o=n._events),u=o[t]):(o=n._events=l(null),n._eventsCount=0),u){if("function"==typeof u?u=o[t]=r?[e,u]:[u,e]:r?u.unshift(e):u.push(e),!u.warned&&(i=s(n))&&0<i&&u.length>i){u.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+u.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');a.name="MaxListenersExceededWarning",a.emitter=n,a.type=t,a.count=u.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",a.name,a.message)}}else u=o[t]=e,++n._eventsCount;return n}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var n=new Array(arguments.length),t=0;t<n.length;++t)n[t]=arguments[t];this.listener.apply(this.target,n)}}function p(n,t,e){var r={fired:!1,wrapFn:void 0,target:n,type:t,listener:e},i=o.call(h,r);return i.listener=e,r.wrapFn=i}function d(n){var t=this._events;if(t){var e=t[n];if("function"==typeof e)return 1;if(e)return e.length}return 0}function g(n,t){for(var e=new Array(t),r=0;r<t;++r)e[r]=n[r];return e}i?Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(n){if("number"!=typeof n||n<0||n!=n)throw new TypeError('"defaultMaxListeners" must be a positive number');a=n}}):r.defaultMaxListeners=a,r.prototype.setMaxListeners=function(n){if("number"!=typeof n||n<0||isNaN(n))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=n,this},r.prototype.getMaxListeners=function(){return s(this)},r.prototype.emit=function(n){var t,e,r,i,o,u,a="error"===n;if(u=this._events)a=a&&null==u.error;else if(!a)return!1;if(a){if(1<arguments.length&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(e=u[n]))return!1;var c="function"==typeof e;switch(r=arguments.length){case 1:!function(n,t,e){if(t)n.call(e);else for(var r=n.length,i=g(n,r),o=0;o<r;++o)i[o].call(e)}(e,c,this);break;case 2:!function(n,t,e,r){if(t)n.call(e,r);else for(var i=n.length,o=g(n,i),u=0;u<i;++u)o[u].call(e,r)}(e,c,this,arguments[1]);break;case 3:!function(n,t,e,r,i){if(t)n.call(e,r,i);else for(var o=n.length,u=g(n,o),a=0;a<o;++a)u[a].call(e,r,i)}(e,c,this,arguments[1],arguments[2]);break;case 4:!function(n,t,e,r,i,o){if(t)n.call(e,r,i,o);else for(var u=n.length,a=g(n,u),l=0;l<u;++l)a[l].call(e,r,i,o)}(e,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(n,t,e,r){if(t)n.apply(e,r);else for(var i=n.length,o=g(n,i),u=0;u<i;++u)o[u].apply(e,r)}(e,c,this,i)}return!0},r.prototype.on=r.prototype.addListener=function(n,t){return f(this,n,t,!1)},r.prototype.prependListener=function(n,t){return f(this,n,t,!0)},r.prototype.once=function(n,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(n,p(this,n,t)),this},r.prototype.prependOnceListener=function(n,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(n,p(this,n,t)),this},r.prototype.removeListener=function(n,t){var e,r,i,o,u;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(e=r[n]))return this;if(e===t||e.listener===t)0==--this._eventsCount?this._events=l(null):(delete r[n],r.removeListener&&this.emit("removeListener",n,e.listener||t));else if("function"!=typeof e){for(i=-1,o=e.length-1;0<=o;o--)if(e[o]===t||e[o].listener===t){u=e[o].listener,i=o;break}if(i<0)return this;0===i?e.shift():function(n,t){for(var e=t,r=e+1,i=n.length;r<i;e+=1,r+=1)n[e]=n[r];n.pop()}(e,i),1===e.length&&(r[n]=e[0]),r.removeListener&&this.emit("removeListener",n,u||t)}return this},r.prototype.removeAllListeners=function(n){var t,e,r;if(!(e=this._events))return this;if(!e.removeListener)return 0===arguments.length?(this._events=l(null),this._eventsCount=0):e[n]&&(0==--this._eventsCount?this._events=l(null):delete e[n]),this;if(0===arguments.length){var i,o=u(e);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=l(null),this._eventsCount=0,this}if("function"==typeof(t=e[n]))this.removeListener(n,t);else if(t)for(r=t.length-1;0<=r;r--)this.removeListener(n,t[r]);return this},r.prototype.listeners=function(n){var t,e=this._events;return e&&(t=e[n])?"function"==typeof t?[t.listener||t]:function(n){for(var t=new Array(n.length),e=0;e<t.length;++e)t[e]=n[e].listener||n[e];return t}(t):[]},r.listenerCount=function(n,t){return"function"==typeof n.listenerCount?n.listenerCount(t):d.call(n,t)},r.prototype.listenerCount=d,r.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],5:[function(n,t,e){"function"==typeof Object.create?t.exports=function(n,t){n.super_=t,n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(n,t){n.super_=t;var e=function(){};e.prototype=t.prototype,n.prototype=new e,n.prototype.constructor=n}},{}],6:[function(n,t,e){var i=1e3,o=60*i,u=60*o,a=24*u,l=365.25*a;function c(n,t,e){if(!(n<t))return n<1.5*t?Math.floor(n/t)+" "+e:Math.ceil(n/t)+" "+e+"s"}t.exports=function(n,t){t=t||{};var e,r=typeof n;if("string"===r&&0<n.length)return function(n){if(100<(n=String(n)).length)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(!t)return;var e=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return e*l;case"days":case"day":case"d":return e*a;case"hours":case"hour":case"hrs":case"hr":case"h":return e*u;case"minutes":case"minute":case"mins":case"min":case"m":return e*o;case"seconds":case"second":case"secs":case"sec":case"s":return e*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}(n);if("number"===r&&!1===isNaN(n))return t.long?c(e=n,a,"day")||c(e,u,"hour")||c(e,o,"minute")||c(e,i,"second")||e+" ms":function(n){if(a<=n)return Math.round(n/a)+"d";if(u<=n)return Math.round(n/u)+"h";if(o<=n)return Math.round(n/o)+"m";if(i<=n)return Math.round(n/i)+"s";return n+"ms"}(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))}},{}],7:[function(n,t,e){var r,i,o=t.exports={};function u(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(r===setTimeout)return setTimeout(t,0);if((r===u||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(n){try{return r.call(null,t,0)}catch(n){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:u}catch(n){r=u}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(n){i=a}}();var c,s=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?s=c.concat(s):h=-1,s.length&&d())}function d(){if(!f){var n=l(p);f=!0;for(var t=s.length;t;){for(c=s,s=[];++h<t;)c&&c[h].run();h=-1,t=s.length}c=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(n){try{return i.call(null,t)}catch(n){return i.call(this,t)}}}(n)}}function g(n,t){this.fun=n,this.array=t}function v(){}o.nextTick=function(n){var t=new Array(arguments.length-1);if(1<arguments.length)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];s.push(new g(n,t)),1!==s.length||f||l(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(n){return[]},o.binding=function(n){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(n){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],8:[function(n,t,e){t.exports=function(n,t){var e,r,i,o,u=0;return function(){e=this,r=arguments;var n=new Date-u;return o||(t<=n?a():o=setTimeout(a,t-n)),i};function a(){o=0,u=+new Date,i=n.apply(e,r),r=e=null}}},{}],9:[function(n,t,e){t.exports=f;var i=n("d3"),a=n("debug")("p2p-graph"),o=n("events"),r=n("inherits"),u=n("throttleit"),l={links:{width:.7,maxWidth:5,maxBytes:2097152}},c={color:"#C8C8C8"},s={method:function(n,t){return n.me?i.hsl(210,.7,.725):n.seeder?i.hsl(120,.7,.725):i.hsl(55,.7,.725)},hover:"#A9A9A9",dep:"#252929"};function f(n){var r=this;if(!(r instanceof f))return new f(n);o.call(r),"string"==typeof n&&(n=document.querySelector(n)),r._root=n,r._model={nodes:[],links:[],focused:null},r._model.links.forEach(function(n){var t=r._model.nodes[n.source],e=r._model.nodes[n.target];t.children=t.children||[],t.children.push(n.target),e.parents=e.parents||[],e.parents.push(n.source)}),r._svg=i.select(r._root).append("svg"),r._resize(),r._force=i.layout.force().size([r._width,r._height]).nodes(r._model.nodes).links(r._model.links).on("tick",function(){r._link.attr("x1",function(n){return n.source.x}).attr("y1",function(n){return n.source.y}).attr("x2",function(n){return n.target.x}).attr("y2",function(n){return n.target.y}),r._node.attr("cx",function(n){return n.x}).attr("cy",function(n){return n.y}),r._node.attr("transform",function(n){return"translate("+n.x+","+n.y+")"})}),r._node=r._svg.selectAll(".node"),r._link=r._svg.selectAll(".link"),r._update(),r._resizeThrottled=u(function(){r._resize()},500),window.addEventListener("resize",r._resizeThrottled)}r(f,o),f.prototype.list=function(){return a("list"),this._model.nodes},f.prototype.add=function(n){if(a("add %s %o",n.id,n),this._getNode(n.id))throw new Error("add: cannot add duplicate node");this._model.nodes.push(n),this._update()},f.prototype.remove=function(n){a("remove %s",n);var t=this._getNodeIndex(n);if(-1===t)throw new Error("remove: node does not exist");this._model.focused&&this._model.focused.id===n&&(this._model.focused=null,this.emit("select",!1)),this._model.nodes.splice(t,1),this._update()},f.prototype.connect=function(n,t){a("connect %s %s",n,t);var e=this._getNode(n);if(!e)throw new Error("connect: invalid source id");var r=this._getNode(t);if(!r)throw new Error("connect: invalid target id");if(this.getLink(e.index,r.index))throw new Error("connect: cannot make duplicate connection");this._model.links.push({source:e.index,target:r.index}),this._update()},f.prototype.disconnect=function(n,t){a("disconnect %s %s",n,t);var e=this._getNode(n);if(!e)throw new Error("disconnect: invalid source id");var r=this._getNode(t);if(!r)throw new Error("disconnect: invalid target id");var i=this.getLinkIndex(e.index,r.index);if(-1===i)throw new Error("disconnect: connection does not exist");this._model.links.splice(i,1),this._update()},f.prototype.hasPeer=function(){var t=this,n=Array.prototype.slice.call(arguments,0);return a("Checking for peers:",n),n.every(function(n){return t._getNode(n)})},f.prototype.hasLink=function(n,t){var e=this._getNode(n);if(!e)throw new Error("hasLink: invalid source id");var r=this._getNode(t);if(!r)throw new Error("hasLink: invalid target id");return!!this.getLink(e.index,r.index)},f.prototype.areConnected=function(n,t){var e=this._getNode(n);if(!e)throw new Error("areConnected: invalid source id");var r=this._getNode(t);if(!r)throw new Error("areConnected: invalid target id");return this.getLink(e.index,r.index)||this.getLink(r.index,e.index)},f.prototype.unchoke=function(n,t){a("unchoke %s %s",n,t)},f.prototype.choke=function(n,t){a("choke %s %s",n,t)},f.prototype.seed=function(n,t){if(a(n,"isSeeding:",t),"boolean"!=typeof t)throw new Error("seed: 2nd param must be a boolean");var e=this._getNodeIndex(n);if(-1===e)throw new Error("seed: node does not exist");this._model.nodes[e].seeder=t,this._update()},f.prototype.rate=function(n,t,e){if(a("rate update:",n+"<->"+t,"at",e),"number"!=typeof e||e<0)throw new Error("rate: 3th param must be a positive number");var r=this._getNode(n);if(!r)throw new Error("rate: invalid source id");var i=this._getNode(t);if(!i)throw new Error("rate: invalid target id");var o,u=this.getLinkIndex(r.index,i.index);if(-1===u)throw new Error("rate: connection does not exist");this._model.links[u].rate=(o=e,Math.min(o,l.links.maxBytes)*l.links.maxWidth/l.links.maxBytes),a("rate:",this._model.links[u].rate),this._update()},f.prototype.getLink=function(n,t){for(var e=0,r=this._model.links.length;e<r;e+=1){var i=this._model.links[e];if(i.source===this._model.nodes[n]&&i.target===this._model.nodes[t])return i}return null},f.prototype.destroy=function(){a("destroy"),this._root.remove(),window.removeEventListener("resize",this._resizeThrottled),this._root=null,this._resizeThrottled=null},f.prototype._update=function(){var e=this;e._link=e._link.data(e._model.links),e._node=e._node.data(e._model.nodes,function(n){return n.id}),e._link.enter().insert("line",".node").attr("class","link").style("stroke",c.color).style("opacity",.5),e._link.exit().remove(),e._link.style("stroke-width",function(n){return n.rate?n.rate<l.links.width?l.links.width:n.rate:l.links.width});var n=e._node.enter().append("g").attr("class","node");n.call(e._force.drag),n.append("circle").on("mouseover",function(n){i.select(this).style("fill",s.hover),i.selectAll(e._childNodes(n)).style("fill",s.hover).style("stroke",s.method).style("stroke-width",2),i.selectAll(e._parentNodes(n)).style("fill",s.dep).style("stroke",s.method).style("stroke-width",2)}).on("mouseout",function(n){i.select(this).style("fill",s.method),i.selectAll(e._childNodes(n)).style("fill",s.method).style("stroke",null),i.selectAll(e._parentNodes(n)).style("fill",s.method).style("stroke",null)}).on("click",function(t){if(e._model.focused===t)return e._force.charge(-200*e._scale()).linkDistance(100*e._scale()).linkStrength(1).start(),e._node.style("opacity",1),e._link.style("opacity",.3),e._model.focused=null,void e.emit("select",!1);e._model.focused=t,e.emit("select",t.id),e._node.style("opacity",function(n){return n.active=e._connected(t,n),n.active?1:.2}),e._force.charge(function(n){return(n.active?-100:-5)*e._scale()}).linkDistance(function(n){return(n.source.active&&n.target.active?100:60)*e._scale()}).linkStrength(function(n){return(n.source===t||n.target===t?1:0)*e._scale()}).start(),e._link.style("opacity",function(n,t){return n.source.active&&n.target.active?1:.02})}),e._node.select("circle").attr("r",function(n){return e._scale()*(n.me?15:10)}).style("fill",s.method),n.append("text").attr("class","text").text(function(n){return n.name}),e._node.select("text").attr("font-size",function(n){return n.me?16*e._scale():12*e._scale()}).attr("dx",0).attr("dy",function(n){return n.me?-22*e._scale():-15*e._scale()}),e._node.exit().remove(),e._force.linkDistance(100*e._scale()).charge(-200*e._scale()).start()},f.prototype._childNodes=function(n){var t=this;return n.children?n.children.map(function(n){return t._node[0][n]}).filter(function(n){return n}):[]},f.prototype._parentNodes=function(n){var t=this;return n.parents?n.parents.map(function(n){return t._node[0][n]}).filter(function(n){return n}):[]},f.prototype._connected=function(n,t){return t.id===n.id||n.children&&-1!==n.children.indexOf(t.id)||t.children&&-1!==t.children.indexOf(n.id)||t.parents&&-1!==t.parents.indexOf(n.id)||n.parents&&-1!==n.parents.indexOf(t.id)},f.prototype._getNode=function(n){for(var t=0,e=this._model.nodes.length;t<e;t+=1){var r=this._model.nodes[t];if(r.id===n)return r}return null},f.prototype._scale=function(){var n=this._model.nodes.length;return n<10?1:Math.max(.2,1-(n-10)/100)},f.prototype._resize=function(n){var t=this;t._width=t._root.offsetWidth,t._height=t._root.offsetHeight,t._svg.attr("width",t._width).attr("height",t._height),t._force&&t._force.size([t._width,t._height]).resume()},f.prototype._getNodeIndex=function(n){for(var t=0,e=this._model.nodes.length;t<e;t+=1){if(this._model.nodes[t].id===n)return t}return-1},f.prototype.getLinkIndex=function(n,t){for(var e=0,r=this._model.links.length;e<r;e+=1){var i=this._model.links[e];if(i.source===this._model.nodes[n]&&i.target===this._model.nodes[t])return e}return-1}},{d3:1,debug:2,events:4,inherits:5,throttleit:8}]},{},[9])(9)});
</script>
<script>/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w});
</script>
<script>/**
* @license
* https://github.com/bitcoincashjs/bchaddr
* Copyright (c) 2018 Emilio Almansi
* Distributed under the MIT software license, see the accompanying
* file LICENSE or http://www.opensource.org/licenses/mit-license.php.
*/
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).bchaddr=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer;module.exports=function(ALPHABET){for(var ALPHABET_MAP={},BASE=ALPHABET.length,LEADER=ALPHABET.charAt(0),z=0;z<ALPHABET.length;z++){var x=ALPHABET.charAt(z);if(void 0!==ALPHABET_MAP[x])throw new TypeError(x+" is ambiguous");ALPHABET_MAP[x]=z}function decodeUnsafe(string){if("string"!=typeof string)throw new TypeError("Expected String");if(0===string.length)return Buffer.allocUnsafe(0);for(var bytes=[0],i=0;i<string.length;i++){var value=ALPHABET_MAP[string[i]];if(void 0===value)return;for(var j=0,carry=value;j<bytes.length;++j)carry+=bytes[j]*BASE,bytes[j]=255&carry,carry>>=8;for(;carry>0;)bytes.push(255&carry),carry>>=8}for(var k=0;string[k]===LEADER&&k<string.length-1;++k)bytes.push(0);return Buffer.from(bytes.reverse())}return{encode:function(source){if(0===source.length)return"";for(var digits=[0],i=0;i<source.length;++i){for(var j=0,carry=source[i];j<digits.length;++j)carry+=digits[j]<<8,digits[j]=carry%BASE,carry=carry/BASE|0;for(;carry>0;)digits.push(carry%BASE),carry=carry/BASE|0}for(var string="",k=0;0===source[k]&&k<source.length-1;++k)string+=LEADER;for(var q=digits.length-1;q>=0;--q)string+=ALPHABET[digits[q]];return string},decodeUnsafe:decodeUnsafe,decode:function(string){var buffer=decodeUnsafe(string);if(buffer)return buffer;throw new Error("Non-base"+BASE+" character")}}}},{"safe-buffer":40}],2:[function(require,module,exports){"use strict";exports.byteLength=function(b64){return 3*b64.length/4-placeHoldersCount(b64)},exports.toByteArray=function(b64){var i,l,tmp,placeHolders,arr,len=b64.length;placeHolders=placeHoldersCount(b64),arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0;i<l;i+=4)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[L++]=tmp>>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp);return arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,output="",parts=[],i=0,len2=len-extraBytes;i<len2;i+=16383)parts.push(encodeChunk(uint8,i,i+16383>len2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="=");return parts.push(output),parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;function placeHoldersCount(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===b64[len-2]?2:"="===b64[len-1]?1:0}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output.push(lookup[(num=tmp)>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],3:[function(require,module,exports){var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),LOG_MAX_INT=Math.log(MAX_INT);function Integer(v,radix){return void 0===v?Integer[0]:void 0!==radix?10==+radix?parseValue(v):parseBase(v,radix):parseValue(v)}function BigInteger(value,sign){this.value=value,this.sign=sign,this.isSmall=!1}function SmallInteger(value){this.value=value,this.sign=value<0,this.isSmall=!0}function isPrecise(n){return-MAX_INT<n&&n<MAX_INT}function smallToArray(n){return n<1e7?[n]:n<1e14?[n%1e7,Math.floor(n/1e7)]:[n%1e7,Math.floor(n/1e7)%1e7,Math.floor(n/1e14)]}function arrayToSmall(arr){trim(arr);var length=arr.length;if(length<4&&compareAbs(arr,MAX_INT_ARR)<0)switch(length){case 0:return 0;case 1:return arr[0];case 2:return arr[0]+arr[1]*BASE;default:return arr[0]+(arr[1]+arr[2]*BASE)*BASE}return arr}function trim(v){for(var i=v.length;0===v[--i];);v.length=i+1}function createArray(length){for(var x=new Array(length),i=-1;++i<length;)x[i]=0;return x}function truncate(n){return n>0?Math.floor(n):Math.ceil(n)}function add(a,b){var sum,i,l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE;for(i=0;i<l_b;i++)carry=(sum=a[i]+b[i]+carry)>=base?1:0,r[i]=sum-carry*base;for(;i<l_a;)carry=(sum=a[i]+carry)===base?1:0,r[i++]=sum-carry*base;return carry>0&&r.push(carry),r}function addAny(a,b){return a.length>=b.length?add(a,b):add(b,a)}function addSmall(a,carry){var sum,i,l=a.length,r=new Array(l),base=BASE;for(i=0;i<l;i++)sum=a[i]-base+carry,carry=Math.floor(sum/base),r[i]=sum-carry*base,carry+=1;for(;carry>0;)r[i++]=carry%base,carry=Math.floor(carry/base);return r}function subtract(a,b){var i,difference,a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE;for(i=0;i<b_l;i++)(difference=a[i]-borrow-b[i])<0?(difference+=base,borrow=1):borrow=0,r[i]=difference;for(i=b_l;i<a_l;i++){if(!((difference=a[i]-borrow)<0)){r[i++]=difference;break}difference+=base,r[i]=difference}for(;i<a_l;i++)r[i]=a[i];return trim(r),r}function subtractSmall(a,b,sign){var i,difference,l=a.length,r=new Array(l),carry=-b,base=BASE;for(i=0;i<l;i++)difference=a[i]+carry,carry=Math.floor(difference/base),difference%=base,r[i]=difference<0?difference+base:difference;return"number"==typeof(r=arrayToSmall(r))?(sign&&(r=-r),new SmallInteger(r)):new BigInteger(r,sign)}function multiplyLong(a,b){var product,carry,i,a_i,a_l=a.length,b_l=b.length,r=createArray(a_l+b_l),base=BASE;for(i=0;i<a_l;++i){a_i=a[i];for(var j=0;j<b_l;++j)product=a_i*b[j]+r[i+j],carry=Math.floor(product/base),r[i+j]=product-carry*base,r[i+j+1]+=carry}return trim(r),r}function multiplySmall(a,b){var product,i,l=a.length,r=new Array(l),base=BASE,carry=0;for(i=0;i<l;i++)product=a[i]*b+carry,carry=Math.floor(product/base),r[i]=product-carry*base;for(;carry>0;)r[i++]=carry%base,carry=Math.floor(carry/base);return r}function shiftLeft(x,n){for(var r=[];n-- >0;)r.push(0);return r.concat(x)}function multiplySmallAndArray(a,b,sign){return new BigInteger(a<BASE?multiplySmall(b,a):multiplyLong(b,smallToArray(a)),sign)}function square(a){var product,carry,i,a_i,l=a.length,r=createArray(l+l),base=BASE;for(i=0;i<l;i++){a_i=a[i];for(var j=0;j<l;j++)product=a_i*a[j]+r[i+j],carry=Math.floor(product/base),r[i+j]=product-carry*base,r[i+j+1]+=carry}return trim(r),r}function divModSmall(value,lambda){var i,q,remainder,divisor,length=value.length,quotient=createArray(length),base=BASE;for(remainder=0,i=length-1;i>=0;--i)remainder=(divisor=remainder*base+value[i])-(q=truncate(divisor/lambda))*lambda,quotient[i]=0|q;return[quotient,0|remainder]}function divModAny(self,v){var value,quotient,n=parseValue(v),a=self.value,b=n.value;if(0===b)throw new Error("Cannot divide by zero");if(self.isSmall)return n.isSmall?[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]:[Integer[0],self];if(n.isSmall){if(1===b)return[self,Integer[0]];if(-1==b)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(abs<BASE){quotient=arrayToSmall((value=divModSmall(a,abs))[0]);var remainder=value[1];return self.sign&&(remainder=-remainder),"number"==typeof quotient?(self.sign!==n.sign&&(quotient=-quotient),[new SmallInteger(quotient),new SmallInteger(remainder)]):[new BigInteger(quotient,self.sign!==n.sign),new SmallInteger(remainder)]}b=smallToArray(abs)}var comparison=compareAbs(a,b);if(-1===comparison)return[Integer[0],self];if(0===comparison)return[Integer[self.sign===n.sign?1:-1],Integer[0]];quotient=(value=a.length+b.length<=200?function(a,b){var quotientDigit,shift,carry,borrow,i,l,q,a_l=a.length,b_l=b.length,base=BASE,result=createArray(b.length),divisorMostSignificantDigit=b[b_l-1],lambda=Math.ceil(base/(2*divisorMostSignificantDigit)),remainder=multiplySmall(a,lambda),divisor=multiplySmall(b,lambda);for(remainder.length<=a_l&&remainder.push(0),divisor.push(0),divisorMostSignificantDigit=divisor[b_l-1],shift=a_l-b_l;shift>=0;shift--){for(quotientDigit=base-1,remainder[shift+b_l]!==divisorMostSignificantDigit&&(quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)),carry=0,borrow=0,l=divisor.length,i=0;i<l;i++)carry+=quotientDigit*divisor[i],q=Math.floor(carry/base),borrow+=remainder[shift+i]-(carry-q*base),carry=q,borrow<0?(remainder[shift+i]=borrow+base,borrow=-1):(remainder[shift+i]=borrow,borrow=0);for(;0!==borrow;){for(quotientDigit-=1,carry=0,i=0;i<l;i++)(carry+=remainder[shift+i]-base+divisor[i])<0?(remainder[shift+i]=carry+base,carry=0):(remainder[shift+i]=carry,carry=1);borrow+=carry}result[shift]=quotientDigit}return remainder=divModSmall(remainder,lambda)[0],[arrayToSmall(result),arrayToSmall(remainder)]}(a,b):function(a,b){for(var guess,xlen,highx,highy,check,a_l=a.length,b_l=b.length,result=[],part=[],base=BASE;a_l;)if(part.unshift(a[--a_l]),trim(part),compareAbs(part,b)<0)result.push(0);else{highx=part[(xlen=part.length)-1]*base+part[xlen-2],highy=b[b_l-1]*base+b[b_l-2],xlen>b_l&&(highx=(highx+1)*base),guess=Math.ceil(highx/highy);do{if(compareAbs(check=multiplySmall(b,guess),part)<=0)break;guess--}while(guess);result.push(guess),part=subtract(part,check)}return result.reverse(),[arrayToSmall(result),arrayToSmall(part)]}(a,b))[0];var qSign=self.sign!==n.sign,mod=value[1],mSign=self.sign;return"number"==typeof quotient?(qSign&&(quotient=-quotient),quotient=new SmallInteger(quotient)):quotient=new BigInteger(quotient,qSign),"number"==typeof mod?(mSign&&(mod=-mod),mod=new SmallInteger(mod)):mod=new BigInteger(mod,mSign),[quotient,mod]}function compareAbs(a,b){if(a.length!==b.length)return a.length>b.length?1:-1;for(var i=a.length-1;i>=0;i--)if(a[i]!==b[i])return a[i]>b[i]?1:-1;return 0}function isBasicPrime(v){var n=v.abs();return!n.isUnit()&&(!!(n.equals(2)||n.equals(3)||n.equals(5))||!(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))&&(!!n.lesser(25)||void 0))}BigInteger.prototype=Object.create(Integer.prototype),SmallInteger.prototype=Object.create(Integer.prototype),BigInteger.prototype.add=function(v){var n=parseValue(v);if(this.sign!==n.sign)return this.subtract(n.negate());var a=this.value,b=n.value;return n.isSmall?new BigInteger(addSmall(a,Math.abs(b)),this.sign):new BigInteger(addAny(a,b),this.sign)},BigInteger.prototype.plus=BigInteger.prototype.add,SmallInteger.prototype.add=function(v){var n=parseValue(v),a=this.value;if(a<0!==n.sign)return this.subtract(n.negate());var b=n.value;if(n.isSmall){if(isPrecise(a+b))return new SmallInteger(a+b);b=smallToArray(Math.abs(b))}return new BigInteger(addSmall(b,Math.abs(a)),a<0)},SmallInteger.prototype.plus=SmallInteger.prototype.add,BigInteger.prototype.subtract=function(v){var n=parseValue(v);if(this.sign!==n.sign)return this.add(n.negate());var a=this.value,b=n.value;return n.isSmall?subtractSmall(a,Math.abs(b),this.sign):function(a,b,sign){var value;return compareAbs(a,b)>=0?value=subtract(a,b):(value=subtract(b,a),sign=!sign),"number"==typeof(value=arrayToSmall(value))?(sign&&(value=-value),new SmallInteger(value)):new BigInteger(value,sign)}(a,b,this.sign)},BigInteger.prototype.minus=BigInteger.prototype.subtract,SmallInteger.prototype.subtract=function(v){var n=parseValue(v),a=this.value;if(a<0!==n.sign)return this.add(n.negate());var b=n.value;return n.isSmall?new SmallInteger(a-b):subtractSmall(b,Math.abs(a),a>=0)},SmallInteger.prototype.minus=SmallInteger.prototype.subtract,BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)},SmallInteger.prototype.negate=function(){var sign=this.sign,small=new SmallInteger(-this.value);return small.sign=!sign,small},BigInteger.prototype.abs=function(){return new BigInteger(this.value,!1)},SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))},BigInteger.prototype.multiply=function(v){var abs,l1,l2,n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign;if(n.isSmall){if(0===b)return Integer[0];if(1===b)return this;if(-1===b)return this.negate();if((abs=Math.abs(b))<BASE)return new BigInteger(multiplySmall(a,abs),sign);b=smallToArray(abs)}return l1=a.length,l2=b.length,new BigInteger(-.012*l1-.012*l2+15e-6*l1*l2>0?function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n),ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),product=addAny(addAny(ac,shiftLeft(subtract(subtract(multiplyKaratsuba(addAny(a,b),addAny(c,d)),ac),bd),n)),shiftLeft(bd,2*n));return trim(product),product}(a,b):multiplyLong(a,b),sign)},BigInteger.prototype.times=BigInteger.prototype.multiply,SmallInteger.prototype._multiplyBySmall=function(a){return isPrecise(a.value*this.value)?new SmallInteger(a.value*this.value):multiplySmallAndArray(Math.abs(a.value),smallToArray(Math.abs(this.value)),this.sign!==a.sign)},BigInteger.prototype._multiplyBySmall=function(a){return 0===a.value?Integer[0]:1===a.value?this:-1===a.value?this.negate():multiplySmallAndArray(Math.abs(a.value),this.value,this.sign!==a.sign)},SmallInteger.prototype.multiply=function(v){return parseValue(v)._multiplyBySmall(this)},SmallInteger.prototype.times=SmallInteger.prototype.multiply,BigInteger.prototype.square=function(){return new BigInteger(square(this.value),!1)},SmallInteger.prototype.square=function(){var value=this.value*this.value;return isPrecise(value)?new SmallInteger(value):new BigInteger(square(smallToArray(Math.abs(this.value))),!1)},BigInteger.prototype.divmod=function(v){var result=divModAny(this,v);return{quotient:result[0],remainder:result[1]}},SmallInteger.prototype.divmod=BigInteger.prototype.divmod,BigInteger.prototype.divide=function(v){return divModAny(this,v)[0]},SmallInteger.prototype.over=SmallInteger.prototype.divide=BigInteger.prototype.over=BigInteger.prototype.divide,BigInteger.prototype.mod=function(v){return divModAny(this,v)[1]},SmallInteger.prototype.remainder=SmallInteger.prototype.mod=BigInteger.prototype.remainder=BigInteger.prototype.mod,BigInteger.prototype.pow=function(v){var value,x,y,n=parseValue(v),a=this.value,b=n.value;if(0===b)return Integer[1];if(0===a)return Integer[0];if(1===a)return Integer[1];if(-1===a)return n.isEven()?Integer[1]:Integer[-1];if(n.sign)return Integer[0];if(!n.isSmall)throw new Error("The exponent "+n.toString()+" is too large.");if(this.isSmall&&isPrecise(value=Math.pow(a,b)))return new SmallInteger(truncate(value));for(x=this,y=Integer[1];!0&b&&(y=y.times(x),--b),0!==b;)b/=2,x=x.square();return y},SmallInteger.prototype.pow=BigInteger.prototype.pow,BigInteger.prototype.modPow=function(exp,mod){if(exp=parseValue(exp),(mod=parseValue(mod)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=Integer[1],base=this.mod(mod);exp.isPositive();){if(base.isZero())return Integer[0];exp.isOdd()&&(r=r.multiply(base).mod(mod)),exp=exp.divide(2),base=base.square().mod(mod)}return r},SmallInteger.prototype.modPow=BigInteger.prototype.modPow,BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;return n.isSmall?1:compareAbs(a,b)},SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;return n.isSmall?a===(b=Math.abs(b))?0:a>b?1:-1:-1},BigInteger.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var n=parseValue(v),a=this.value,b=n.value;return this.sign!==n.sign?n.sign?1:-1:n.isSmall?this.sign?-1:1:compareAbs(a,b)*(this.sign?-1:1)},BigInteger.prototype.compareTo=BigInteger.prototype.compare,SmallInteger.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var n=parseValue(v),a=this.value,b=n.value;return n.isSmall?a==b?0:a>b?1:-1:a<0!==n.sign?a<0?-1:1:a<0?1:-1},SmallInteger.prototype.compareTo=SmallInteger.prototype.compare,BigInteger.prototype.equals=function(v){return 0===this.compare(v)},SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals,BigInteger.prototype.notEquals=function(v){return 0!==this.compare(v)},SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals,BigInteger.prototype.greater=function(v){return this.compare(v)>0},SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater,BigInteger.prototype.lesser=function(v){return this.compare(v)<0},SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser,BigInteger.prototype.greaterOrEquals=function(v){return this.compare(v)>=0},SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals,BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0},SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals,BigInteger.prototype.isEven=function(){return 0==(1&this.value[0])},SmallInteger.prototype.isEven=function(){return 0==(1&this.value)},BigInteger.prototype.isOdd=function(){return 1==(1&this.value[0])},SmallInteger.prototype.isOdd=function(){return 1==(1&this.value)},BigInteger.prototype.isPositive=function(){return!this.sign},SmallInteger.prototype.isPositive=function(){return this.value>0},BigInteger.prototype.isNegative=function(){return this.sign},SmallInteger.prototype.isNegative=function(){return this.value<0},BigInteger.prototype.isUnit=function(){return!1},SmallInteger.prototype.isUnit=function(){return 1===Math.abs(this.value)},BigInteger.prototype.isZero=function(){return!1},SmallInteger.prototype.isZero=function(){return 0===this.value},BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v),value=n.value;return 0!==value&&(1===value||(2===value?this.isEven():this.mod(n).equals(Integer[0])))},SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy,BigInteger.prototype.isPrime=function(){var isPrime=isBasicPrime(this);if(void 0!==isPrime)return isPrime;for(var d,t,i,x,n=this.abs(),nPrev=n.prev(),a=[2,3,5,7,11,13,17,19],b=nPrev;b.isEven();)b=b.divide(2);for(i=0;i<a.length;i++)if(!(x=bigInt(a[i]).modPow(b,n)).equals(Integer[1])&&!x.equals(nPrev)){for(t=!0,d=b;t&&d.lesser(nPrev);d=d.multiply(2))(x=x.square().mod(n)).equals(nPrev)&&(t=!1);if(t)return!1}return!0},SmallInteger.prototype.isPrime=BigInteger.prototype.isPrime,BigInteger.prototype.isProbablePrime=function(iterations){var isPrime=isBasicPrime(this);if(void 0!==isPrime)return isPrime;for(var n=this.abs(),t=void 0===iterations?5:iterations,i=0;i<t;i++){if(!bigInt.randBetween(2,n.minus(2)).modPow(n.prev(),n).isUnit())return!1}return!0},SmallInteger.prototype.isProbablePrime=BigInteger.prototype.isProbablePrime,BigInteger.prototype.modInv=function(n){for(var q,lastT,lastR,t=bigInt.zero,newT=bigInt.one,r=parseValue(n),newR=this.abs();!newR.equals(bigInt.zero);)q=r.divide(newR),lastT=t,lastR=r,t=newT,r=newR,newT=lastT.subtract(q.multiply(newT)),newR=lastR.subtract(q.multiply(newR));if(!r.equals(1))throw new Error(this.toString()+" and "+n.toString()+" are not co-prime");return-1===t.compare(0)&&(t=t.add(n)),this.isNegative()?t.negate():t},SmallInteger.prototype.modInv=BigInteger.prototype.modInv,BigInteger.prototype.next=function(){var value=this.value;return this.sign?subtractSmall(value,1,this.sign):new BigInteger(addSmall(value,1),this.sign)},SmallInteger.prototype.next=function(){var value=this.value;return value+1<MAX_INT?new SmallInteger(value+1):new BigInteger(MAX_INT_ARR,!1)},BigInteger.prototype.prev=function(){var value=this.value;return this.sign?new BigInteger(addSmall(value,1),!0):subtractSmall(value,1,this.sign)},SmallInteger.prototype.prev=function(){var value=this.value;return value-1>-MAX_INT?new SmallInteger(value-1):new BigInteger(MAX_INT_ARR,!0)};for(var powersOfTwo=[1];2*powersOfTwo[powersOfTwo.length-1]<=BASE;)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return("number"==typeof n||"string"==typeof n)&&+Math.abs(n)<=BASE||n instanceof BigInteger&&n.value.length<=1}function bitwise(x,y,fn){y=parseValue(y);for(var xSign=x.isNegative(),ySign=y.isNegative(),xRem=xSign?x.not():x,yRem=ySign?y.not():y,xDigit=0,yDigit=0,xDivMod=null,yDivMod=null,result=[];!xRem.isZero()||!yRem.isZero();)xDigit=(xDivMod=divModAny(xRem,highestPower2))[1].toJSNumber(),xSign&&(xDigit=highestPower2-1-xDigit),yDigit=(yDivMod=divModAny(yRem,highestPower2))[1].toJSNumber(),ySign&&(yDigit=highestPower2-1-yDigit),xRem=xDivMod[0],yRem=yDivMod[0],result.push(fn(xDigit,yDigit));for(var sum=0!==fn(xSign?1:0,ySign?1:0)?bigInt(-1):bigInt(0),i=result.length-1;i>=0;i-=1)sum=sum.multiply(highestPower2).add(bigInt(result[i]));return sum}BigInteger.prototype.shiftLeft=function(n){if(!shift_isSmall(n))throw new Error(String(n)+" is too large for shifting.");if((n=+n)<0)return this.shiftRight(-n);for(var result=this;n>=powers2Length;)result=result.multiply(highestPower2),n-=powers2Length-1;return result.multiply(powersOfTwo[n])},SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft,BigInteger.prototype.shiftRight=function(n){var remQuo;if(!shift_isSmall(n))throw new Error(String(n)+" is too large for shifting.");if((n=+n)<0)return this.shiftLeft(-n);for(var result=this;n>=powers2Length;){if(result.isZero())return result;result=(remQuo=divModAny(result,highestPower2))[1].isNegative()?remQuo[0].prev():remQuo[0],n-=powers2Length-1}return(remQuo=divModAny(result,powersOfTwo[n]))[1].isNegative()?remQuo[0].prev():remQuo[0]},SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight,BigInteger.prototype.not=function(){return this.negate().prev()},SmallInteger.prototype.not=BigInteger.prototype.not,BigInteger.prototype.and=function(n){return bitwise(this,n,function(a,b){return a&b})},SmallInteger.prototype.and=BigInteger.prototype.and,BigInteger.prototype.or=function(n){return bitwise(this,n,function(a,b){return a|b})},SmallInteger.prototype.or=BigInteger.prototype.or,BigInteger.prototype.xor=function(n){return bitwise(this,n,function(a,b){return a^b})},SmallInteger.prototype.xor=BigInteger.prototype.xor;var LOBMASK_I=1<<30,LOBMASK_BI=(BASE&-BASE)*(BASE&-BASE)|LOBMASK_I;function roughLOB(n){var v=n.value,x="number"==typeof v?v|LOBMASK_I:v[0]+v[1]*BASE|LOBMASK_BI;return x&-x}function max(a,b){return a=parseValue(a),b=parseValue(b),a.greater(b)?a:b}function min(a,b){return a=parseValue(a),b=parseValue(b),a.lesser(b)?a:b}function gcd(a,b){if(a=parseValue(a).abs(),b=parseValue(b).abs(),a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;for(var d,t,c=Integer[1];a.isEven()&&b.isEven();)d=Math.min(roughLOB(a),roughLOB(b)),a=a.divide(d),b=b.divide(d),c=c.multiply(d);for(;a.isEven();)a=a.divide(roughLOB(a));do{for(;b.isEven();)b=b.divide(roughLOB(b));a.greater(b)&&(t=b,b=a,a=t),b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}var parseBase=function(text,base){for(var length=text.length,absBase=Math.abs(base),i=0;i<length;i++){if("-"!==(c=text[i].toLowerCase())&&/[a-z0-9]/.test(c)){if(/[0-9]/.test(c)&&+c>=absBase){if("1"===c&&1===absBase)continue;throw new Error(c+" is not a valid digit in base "+base+".")}if(c.charCodeAt(0)-87>=absBase)throw new Error(c+" is not a valid digit in base "+base+".")}}if(2<=base&&base<=36&&length<=LOG_MAX_INT/Math.log(base)){var result=parseInt(text,base);if(isNaN(result))throw new Error(c+" is not a valid digit in base "+base+".");return new SmallInteger(parseInt(text,base))}base=parseValue(base);var digits=[],isNegative="-"===text[0];for(i=isNegative?1:0;i<text.length;i++){var c,charCode=(c=text[i].toLowerCase()).charCodeAt(0);if(48<=charCode&&charCode<=57)digits.push(parseValue(c));else if(97<=charCode&&charCode<=122)digits.push(parseValue(c.charCodeAt(0)-87));else{if("<"!==c)throw new Error(c+" is not a valid character");var start=i;do{i++}while(">"!==text[i]);digits.push(parseValue(text.slice(start+1,i)))}}return parseBaseFromArray(digits,base,isNegative)};function parseBaseFromArray(digits,base,isNegative){var i,val=Integer[0],pow=Integer[1];for(i=digits.length-1;i>=0;i--)val=val.add(digits[i].times(pow)),pow=pow.times(base);return isNegative?val.negate():val}function stringify(digit){var v=digit.value;return"number"==typeof v&&(v=[v]),1===v.length&&v[0]<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(v[0]):"<"+v+">"}function toBase(n,base){if((base=bigInt(base)).isZero()){if(n.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1))return n.isZero()?"0":n.isNegative()?new Array(1-n).join("10"):"1"+new Array(+n).join("01");var minusSign="";if(n.isNegative()&&base.isPositive()&&(minusSign="-",n=n.abs()),base.equals(1))return n.isZero()?"0":minusSign+new Array(+n+1).join(1);for(var divmod,out=[],left=n;left.isNegative()||left.compareAbs(base)>=0;){left=(divmod=left.divmod(base)).quotient;var digit=divmod.remainder;digit.isNegative()&&(digit=base.minus(digit).abs(),left=left.next()),out.push(stringify(digit))}return out.push(stringify(left)),minusSign+out.reverse().join("")}function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return new SmallInteger(x);throw"Invalid integer: "+v}var sign="-"===v[0];sign&&(v=v.slice(1));var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(2===split.length){var exp=split[1];if("+"===exp[0]&&(exp=exp.slice(1)),(exp=+exp)!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0],decimalPlace=text.indexOf(".");if(decimalPlace>=0&&(exp-=text.length-decimalPlace-1,text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)),exp<0)throw new Error("Cannot include negative exponent part for integers");v=text+=new Array(exp+1).join("0")}if(!/^([0-9][0-9]*)$/.test(v))throw new Error("Invalid integer: "+v);for(var r=[],max=v.length,l=LOG_BASE,min=max-l;max>0;)r.push(+v.slice(min,max)),(min-=l)<0&&(min=0),max-=l;return trim(r),new BigInteger(r,sign)}function parseValue(v){return"number"==typeof v?function(v){if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}(v):"string"==typeof v?parseStringValue(v):v}BigInteger.prototype.toString=function(radix){if(void 0===radix&&(radix=10),10!==radix)return toBase(this,radix);for(var digit,v=this.value,l=v.length,str=String(v[--l]);--l>=0;)digit=String(v[l]),str+="0000000".slice(digit.length)+digit;return(this.sign?"-":"")+str},SmallInteger.prototype.toString=function(radix){return void 0===radix&&(radix=10),10!=radix?toBase(this,radix):String(this.value)},BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()},BigInteger.prototype.valueOf=function(){return+this.toString()},BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf,SmallInteger.prototype.valueOf=function(){return this.value},SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;for(var i=0;i<1e3;i++)Integer[i]=new SmallInteger(i),i>0&&(Integer[-i]=new SmallInteger(-i));return Integer.one=Integer[1],Integer.zero=Integer[0],Integer.minusOne=Integer[-1],Integer.max=max,Integer.min=min,Integer.gcd=gcd,Integer.lcm=function(a,b){return a=parseValue(a).abs(),b=parseValue(b).abs(),a.divide(gcd(a,b)).multiply(b)},Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger},Integer.randBetween=function(a,b){var low=min(a=parseValue(a),b=parseValue(b)),range=max(a,b).subtract(low).add(1);if(range.isSmall)return low.add(Math.floor(Math.random()*range));for(var result=[],restricted=!0,i=range.value.length-1;i>=0;i--){var top=restricted?range.value[i]:BASE,digit=truncate(Math.random()*top);result.unshift(digit),digit<top&&(restricted=!1)}return result=arrayToSmall(result),low.add("number"==typeof result?new SmallInteger(result):new BigInteger(result,!1))},Integer.fromArray=function(digits,base,isNegative){return parseBaseFromArray(digits.map(parseValue),parseValue(base||10),isNegative)},Integer}();void 0!==module&&module.hasOwnProperty("exports")&&(module.exports=bigInt)},{}],4:[function(require,module,exports){},{}],5:[function(require,module,exports){var basex=require("base-x");module.exports=basex("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},{"base-x":1}],6:[function(require,module,exports){"use strict";var base58=require("bs58"),Buffer=require("safe-buffer").Buffer;module.exports=function(checksumFn){function decodeRaw(buffer){var payload=buffer.slice(0,-4),checksum=buffer.slice(-4),newChecksum=checksumFn(payload);if(!(checksum[0]^newChecksum[0]|checksum[1]^newChecksum[1]|checksum[2]^newChecksum[2]|checksum[3]^newChecksum[3]))return payload}return{encode:function(payload){var checksum=checksumFn(payload);return base58.encode(Buffer.concat([payload,checksum],payload.length+4))},decode:function(string){var payload=decodeRaw(base58.decode(string));if(!payload)throw new Error("Invalid checksum");return payload},decodeUnsafe:function(string){var buffer=base58.decodeUnsafe(string);if(buffer)return decodeRaw(buffer)}}}},{bs58:5,"safe-buffer":40}],7:[function(require,module,exports){"use strict";var createHash=require("create-hash"),bs58checkBase=require("./base");module.exports=bs58checkBase(function(buffer){var tmp=createHash("sha256").update(buffer).digest();return createHash("sha256").update(tmp).digest()})},{"./base":6,"create-hash":15}],8:[function(require,module,exports){"use strict";var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=function(length){+length!=length&&(length=0);return Buffer.alloc(+length)},exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;function createBuffer(length){if(length>K_MAX_LENGTH)throw new RangeError("Invalid typed array length");var buf=new Uint8Array(length);return buf.__proto__=Buffer.prototype,buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('"value" argument must not be a number');return isArrayBuffer(value)?function(array,byteOffset,length){if(byteOffset<0||array.byteLength<byteOffset)throw new RangeError("'offset' is out of bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("'length' is out of bounds");var buf;buf=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length);return buf.__proto__=Buffer.prototype,buf}(value,encodingOrOffset,length):"string"==typeof value?function(string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);actual!==length&&(buf=buf.slice(0,actual));return buf}(value,encodingOrOffset):function(obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length),buf=createBuffer(len);return 0===buf.length?buf:(obj.copy(buf,0,0,len),buf)}if(obj){if(isArrayBufferView(obj)||"length"in obj)return"number"!=typeof obj.length||numberIsNaN(obj.length)?createBuffer(0):fromArrayLike(obj);if("Buffer"===obj.type&&Array.isArray(obj.data))return fromArrayLike(obj.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be a number');if(size<0)throw new RangeError('"size" argument must not be negative')}function allocUnsafe(size){return assertSize(size),createBuffer(size<0?0:0|checked(size))}function fromArrayLike(array){for(var length=array.length<0?0:0|checked(array.length),buf=createBuffer(length),i=0;i<length;i+=1)buf[i]=255&array[i];return buf}function checked(length){if(length>=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(isArrayBufferView(string)||isArrayBuffer(string))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0:return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else-1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;if(strLen%2!=0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(numberIsNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(function(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(function(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i<end;){var secondByte,thirdByte,fourthByte,tempCodePoint,firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);var res="",i=0;for(;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}(res)}exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=function(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()}catch(e){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(size,fill,encoding){return function(size,fill,encoding){return assertSize(size),size<=0?createBuffer(size):void 0!==fill?"string"==typeof encoding?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill):createBuffer(size)}(size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)},Buffer.isBuffer=function(b){return null!=b&&!0===b._isBuffer},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!Array.isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(len%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(len%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):function(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}.apply(this,arguments)},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return-1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset>>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len)<0&&(start=0):start>len&&(start=len),end<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);var newBuf=this.subarray(start,end);return newBuf.__proto__=Buffer.prototype,newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var i,len=end-start;if(this===target&&start<targetStart&&targetStart<end)for(i=len-1;i>=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3)for(i=0;i<len;++i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),1===val.length){var code=val.charCodeAt(0);code<256&&(val=code)}if(void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding)}else"number"==typeof val&&(val&=255);if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;var i;if(start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:new Buffer(val,encoding),len=bytes.length;for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){var codePoint;units=units||1/0;for(var length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if((codePoint=string.charCodeAt(i))>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=str.trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isArrayBuffer(obj){return obj instanceof ArrayBuffer||null!=obj&&null!=obj.constructor&&"ArrayBuffer"===obj.constructor.name&&"number"==typeof obj.byteLength}function isArrayBufferView(obj){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(obj)}function numberIsNaN(obj){return obj!=obj}},{"base64-js":2,ieee754:20}],9:[function(require,module,exports){"use strict";var validate=require("./validation").validate,CHARSET="qpzry9x8gf2tvdw0s3jn54khce6mua7l",CHARSET_INVERSE_INDEX={q:0,p:1,z:2,r:3,y:4,9:5,x:6,8:7,g:8,f:9,2:10,t:11,v:12,d:13,w:14,0:15,s:16,3:17,j:18,n:19,5:20,4:21,k:22,h:23,c:24,e:25,6:26,m:27,u:28,a:29,7:30,l:31};module.exports={encode:function(data){validate(data instanceof Uint8Array,"Invalid data: "+data+".");for(var base32="",i=0;i<data.length;++i){var value=data[i];validate(0<=value&&value<32,"Invalid value: "+value+"."),base32+=CHARSET[value]}return base32},decode:function(string){validate("string"==typeof string,"Invalid base32-encoded string: "+string+".");for(var data=new Uint8Array(string.length),i=0;i<string.length;++i){var value=string[i];validate(value in CHARSET_INVERSE_INDEX,"Invalid value: "+value+"."),data[i]=CHARSET_INVERSE_INDEX[value]}return data}}},{"./validation":12}],10:[function(require,module,exports){"use strict";var base32=require("./base32"),bigInt=require("big-integer"),convertBits=require("./convertBits"),validation=require("./validation"),validate=validation.validate;var ValidationError=validation.ValidationError,VALID_PREFIXES=["bitcoincash","bchtest","bchreg"];function prefixToUint5Array(prefix){for(var result=new Uint8Array(prefix.length),i=0;i<prefix.length;++i)result[i]=31&prefix[i].charCodeAt(0);return result}function concat(a,b){var ab=new Uint8Array(a.length+b.length);return ab.set(a),ab.set(b,a.length),ab}function polymod(data){for(var GENERATOR=[656907472481,522768456162,0xf33e5fb3c4,748107326120,130178868336],checksum=bigInt(1),i=0;i<data.length;++i){var value=data[i],topBits=checksum.shiftRight(35);checksum=checksum.and(34359738367).shiftLeft(5).xor(value);for(var j=0;j<GENERATOR.length;++j)topBits.shiftRight(j).and(1).equals(1)&&(checksum=checksum.xor(GENERATOR[j]))}return checksum.xor(1)}function hasSingleCase(string){return string===string.toLowerCase()||string===string.toUpperCase()}module.exports={encode:function(prefix,type,hash){validate("string"==typeof prefix&&function(prefix){return hasSingleCase(prefix)&&-1!==VALID_PREFIXES.indexOf(prefix.toLowerCase())}(prefix),"Invalid prefix: "+prefix+"."),validate("string"==typeof type,"Invalid type: "+type+"."),validate(hash instanceof Uint8Array,"Invalid hash: "+hash+".");var data,prefixData=concat(prefixToUint5Array(prefix),new Uint8Array(1)),versionByte=function(type){switch(type){case"P2PKH":return 0;case"P2SH":return 8;default:throw new ValidationError("Invalid type: "+type+".")}}(type)+function(hash){switch(8*hash.length){case 160:return 0;case 192:return 1;case 224:return 2;case 256:return 3;case 320:return 4;case 384:return 5;case 448:return 6;case 512:return 7;default:throw new ValidationError("Invalid hash size: "+hash.length+".")}}(hash),payloadData=(data=concat(Uint8Array.of(versionByte),hash),convertBits(data,8,5)),payload=concat(payloadData,function(checksum){for(var result=new Uint8Array(8),i=0;i<8;++i)result[7-i]=checksum.and(31).toJSNumber(),checksum=checksum.shiftRight(5);return result}(polymod(concat(concat(prefixData,payloadData),new Uint8Array(8)))));return prefix+":"+base32.encode(payload)},decode:function(address){validate("string"==typeof address&&hasSingleCase(address),"Invalid address: "+address+".");var pieces=address.toLowerCase().split(":");validate(2===pieces.length,"Missing prefix: "+address+".");var prefix=pieces[0],payload=base32.decode(pieces[1]);validate(function(prefix,payload){return polymod(concat(concat(prefixToUint5Array(prefix),new Uint8Array(1)),payload)).equals(0)}(prefix,payload),"Invalid checksum: "+address+".");var data,payloadData=(data=payload.slice(0,-8),convertBits(data,5,8,!0)),versionByte=payloadData[0],hash=payloadData.slice(1);return validate(function(versionByte){switch(7&versionByte){case 0:return 160;case 1:return 192;case 2:return 224;case 3:return 256;case 4:return 320;case 5:return 384;case 6:return 448;case 7:return 512}}(versionByte)===8*hash.length,"Invalid hash size: "+address+"."),{prefix:prefix,type:function(versionByte){switch(120&versionByte){case 0:return"P2PKH";case 8:return"P2SH";default:throw new ValidationError("Invalid address type in version byte: "+versionByte+".")}}(versionByte),hash:hash}},ValidationError:ValidationError}},{"./base32":9,"./convertBits":11,"./validation":12,"big-integer":3}],11:[function(require,module,exports){"use strict";var validate=require("./validation").validate;module.exports=function(data,from,to,strictMode){for(var length=strictMode?Math.floor(data.length*from/to):Math.ceil(data.length*from/to),mask=(1<<to)-1,result=new Uint8Array(length),index=0,accumulator=0,bits=0,i=0;i<data.length;++i){var value=data[i];for(validate(0<=value&&value>>from==0,"Invalid value: "+value+"."),accumulator=accumulator<<from|value,bits+=from;bits>=to;)bits-=to,result[index]=accumulator>>bits&mask,++index}return strictMode?validate(bits<from&&0==(accumulator<<to-bits&mask),"Input cannot be converted to "+to+" bits without padding, but strict mode was used."):bits>0&&(result[index]=accumulator<<to-bits&mask,++index),result}},{"./validation":12}],12:[function(require,module,exports){"use strict";function ValidationError(message){var error=new Error;this.name=error.name="ValidationError",this.message=error.message=message,this.stack=error.stack}ValidationError.prototype=Object.create(Error.prototype),module.exports={ValidationError:ValidationError,validate:function(condition,message){if(!condition)throw new ValidationError(message)}}},{}],13:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,Transform=require("stream").Transform,StringDecoder=require("string_decoder").StringDecoder;function CipherBase(hashMode){Transform.call(this),this.hashMode="string"==typeof hashMode,this.hashMode?this[hashMode]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}require("inherits")(CipherBase,Transform),CipherBase.prototype.update=function(data,inputEnc,outputEnc){"string"==typeof data&&(data=Buffer.from(data,inputEnc));var outData=this._update(data);return this.hashMode?this:(outputEnc&&(outData=this._toString(outData,outputEnc)),outData)},CipherBase.prototype.setAutoPadding=function(){},CipherBase.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},CipherBase.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},CipherBase.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},CipherBase.prototype._transform=function(data,_,next){var err;try{this.hashMode?this._update(data):this.push(this._update(data))}catch(e){err=e}finally{next(err)}},CipherBase.prototype._flush=function(done){var err;try{this.push(this.__final())}catch(e){err=e}done(err)},CipherBase.prototype._finalOrDigest=function(outputEnc){var outData=this.__final()||Buffer.alloc(0);return outputEnc&&(outData=this._toString(outData,outputEnc,!0)),outData},CipherBase.prototype._toString=function(value,enc,fin){if(this._decoder||(this._decoder=new StringDecoder(enc),this._encoding=enc),this._encoding!==enc)throw new Error("can't switch encodings");var out=this._decoder.write(value);return fin&&(out+=this._decoder.end()),out},module.exports=CipherBase},{inherits:21,"safe-buffer":40,stream:49,string_decoder:50}],14:[function(require,module,exports){(function(Buffer){function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=function(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)},exports.isBoolean=function(arg){return"boolean"==typeof arg},exports.isNull=function(arg){return null===arg},exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=function(arg){return"number"==typeof arg},exports.isString=function(arg){return"string"==typeof arg},exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=function(arg){return void 0===arg},exports.isRegExp=function(re){return"[object RegExp]"===objectToString(re)},exports.isObject=function(arg){return"object"==typeof arg&&null!==arg},exports.isDate=function(d){return"[object Date]"===objectToString(d)},exports.isError=function(e){return"[object Error]"===objectToString(e)||e instanceof Error},exports.isFunction=function(arg){return"function"==typeof arg},exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=Buffer.isBuffer}).call(this,{isBuffer:require("../../is-buffer/index.js")})},{"../../is-buffer/index.js":22}],15:[function(require,module,exports){(function(Buffer){"use strict";var inherits=require("inherits"),md5=require("./md5"),RIPEMD160=require("ripemd160"),sha=require("sha.js"),Base=require("cipher-base");function HashNoConstructor(hash){Base.call(this,"digest"),this._hash=hash,this.buffers=[]}function Hash(hash){Base.call(this,"digest"),this._hash=hash}inherits(HashNoConstructor,Base),HashNoConstructor.prototype._update=function(data){this.buffers.push(data)},HashNoConstructor.prototype._final=function(){var buf=Buffer.concat(this.buffers),r=this._hash(buf);return this.buffers=null,r},inherits(Hash,Base),Hash.prototype._update=function(data){this._hash.update(data)},Hash.prototype._final=function(){return this._hash.digest()},module.exports=function(alg){return"md5"===(alg=alg.toLowerCase())?new HashNoConstructor(md5):new Hash("rmd160"===alg||"ripemd160"===alg?new RIPEMD160:sha(alg))}}).call(this,require("buffer").Buffer)},{"./md5":17,buffer:8,"cipher-base":13,inherits:21,ripemd160:39,"sha.js":42}],16:[function(require,module,exports){(function(Buffer){"use strict";var intSize=4,zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);module.exports=function(buf,fn){var arr=fn(function(buf){if(buf.length%intSize!=0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}for(var arr=new Array(buf.length>>>2),i=0,j=0;i<buf.length;i+=intSize,j++)arr[j]=buf.readInt32LE(i);return arr}(buf),8*buf.length);buf=new Buffer(16);for(var i=0;i<arr.length;i++)buf.writeInt32LE(arr[i],i<<2,!0);return buf}}).call(this,require("buffer").Buffer)},{buffer:8}],17:[function(require,module,exports){"use strict";var makeHash=require("./make-hash");function core_md5(x,len){x[len>>5]|=128<<len%32,x[14+(len+64>>>9<<4)]=len;for(var a=1732584193,b=-271733879,c=-1732584194,d=271733878,i=0;i<x.length;i+=16){var olda=a,oldb=b,oldc=c,oldd=d;b=md5_ii(b=md5_ii(b=md5_ii(b=md5_ii(b=md5_hh(b=md5_hh(b=md5_hh(b=md5_hh(b=md5_gg(b=md5_gg(b=md5_gg(b=md5_gg(b=md5_ff(b=md5_ff(b=md5_ff(b=md5_ff(b,c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+0],7,-680876936),b,c,x[i+1],12,-389564586),a,b,x[i+2],17,606105819),d,a,x[i+3],22,-1044525330),c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+4],7,-176418897),b,c,x[i+5],12,1200080426),a,b,x[i+6],17,-1473231341),d,a,x[i+7],22,-45705983),c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+8],7,1770035416),b,c,x[i+9],12,-1958414417),a,b,x[i+10],17,-42063),d,a,x[i+11],22,-1990404162),c=md5_ff(c,d=md5_ff(d,a=md5_ff(a,b,c,d,x[i+12],7,1804603682),b,c,x[i+13],12,-40341101),a,b,x[i+14],17,-1502002290),d,a,x[i+15],22,1236535329),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+1],5,-165796510),b,c,x[i+6],9,-1069501632),a,b,x[i+11],14,643717713),d,a,x[i+0],20,-373897302),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+5],5,-701558691),b,c,x[i+10],9,38016083),a,b,x[i+15],14,-660478335),d,a,x[i+4],20,-405537848),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+9],5,568446438),b,c,x[i+14],9,-1019803690),a,b,x[i+3],14,-187363961),d,a,x[i+8],20,1163531501),c=md5_gg(c,d=md5_gg(d,a=md5_gg(a,b,c,d,x[i+13],5,-1444681467),b,c,x[i+2],9,-51403784),a,b,x[i+7],14,1735328473),d,a,x[i+12],20,-1926607734),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+5],4,-378558),b,c,x[i+8],11,-2022574463),a,b,x[i+11],16,1839030562),d,a,x[i+14],23,-35309556),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+1],4,-1530992060),b,c,x[i+4],11,1272893353),a,b,x[i+7],16,-155497632),d,a,x[i+10],23,-1094730640),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+13],4,681279174),b,c,x[i+0],11,-358537222),a,b,x[i+3],16,-722521979),d,a,x[i+6],23,76029189),c=md5_hh(c,d=md5_hh(d,a=md5_hh(a,b,c,d,x[i+9],4,-640364487),b,c,x[i+12],11,-421815835),a,b,x[i+15],16,530742520),d,a,x[i+2],23,-995338651),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+0],6,-198630844),b,c,x[i+7],10,1126891415),a,b,x[i+14],15,-1416354905),d,a,x[i+5],21,-57434055),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+12],6,1700485571),b,c,x[i+3],10,-1894986606),a,b,x[i+10],15,-1051523),d,a,x[i+1],21,-2054922799),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+8],6,1873313359),b,c,x[i+15],10,-30611744),a,b,x[i+6],15,-1560198380),d,a,x[i+13],21,1309151649),c=md5_ii(c,d=md5_ii(d,a=md5_ii(a,b,c,d,x[i+4],6,-145523070),b,c,x[i+11],10,-1120210379),a,b,x[i+2],15,718787259),d,a,x[i+9],21,-343485551),a=safe_add(a,olda),b=safe_add(b,oldb),c=safe_add(c,oldc),d=safe_add(d,oldd)}return[a,b,c,d]}function md5_cmn(q,a,b,x,s,t){return safe_add((num=safe_add(safe_add(a,q),safe_add(x,t)))<<(cnt=s)|num>>>32-cnt,b);var num,cnt}function md5_ff(a,b,c,d,x,s,t){return md5_cmn(b&c|~b&d,a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn(b&d|c&~d,a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|~d),a,b,x,s,t)}function safe_add(x,y){var lsw=(65535&x)+(65535&y);return(x>>16)+(y>>16)+(lsw>>16)<<16|65535&lsw}module.exports=function(buf){return makeHash(buf,core_md5)}},{"./make-hash":16}],18:[function(require,module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if("number"!=typeof n||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((er=arguments[1])instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(isUndefined(handler=this._events[type]))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),len=(listeners=handler.slice()).length,i=0;i<len;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(length=(list=this._events[type]).length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(isFunction(listeners=this._events[type]))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){return this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},{}],19:[function(require,module,exports){(function(Buffer){"use strict";var Transform=require("stream").Transform;function HashBase(blockSize){Transform.call(this),this._block=new Buffer(blockSize),this._blockSize=blockSize,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}require("inherits")(HashBase,Transform),HashBase.prototype._transform=function(chunk,encoding,callback){var error=null;try{"buffer"!==encoding&&(chunk=new Buffer(chunk,encoding)),this.update(chunk)}catch(err){error=err}callback(error)},HashBase.prototype._flush=function(callback){var error=null;try{this.push(this._digest())}catch(err){error=err}callback(error)},HashBase.prototype.update=function(data,encoding){if(!Buffer.isBuffer(data)&&"string"!=typeof data)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");Buffer.isBuffer(data)||(data=new Buffer(data,encoding||"binary"));for(var block=this._block,offset=0;this._blockOffset+data.length-offset>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)block[i++]=data[offset++];this._update(),this._blockOffset=0}for(;offset<data.length;)block[this._blockOffset++]=data[offset++];for(var j=0,carry=8*data.length;carry>0;++j)this._length[j]+=carry,(carry=this._length[j]/4294967296|0)>0&&(this._length[j]-=4294967296*carry);return this},HashBase.prototype._update=function(data){throw new Error("_update is not implemented")},HashBase.prototype.digest=function(encoding){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var digest=this._digest();return void 0!==encoding&&(digest=digest.toString(encoding)),digest},HashBase.prototype._digest=function(){throw new Error("_digest is not implemented")},module.exports=HashBase}).call(this,require("buffer").Buffer)},{buffer:8,inherits:21,stream:49}],20:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),(value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias))*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],21:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],22:[function(require,module,exports){function isBuffer(obj){return!!obj.constructor&&"function"==typeof obj.constructor.isBuffer&&obj.constructor.isBuffer(obj)}module.exports=function(obj){return null!=obj&&(isBuffer(obj)||function(obj){return"function"==typeof obj.readFloatLE&&"function"==typeof obj.slice&&isBuffer(obj.slice(0,0))}(obj)||!!obj._isBuffer)}},{}],23:[function(require,module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},{}],24:[function(require,module,exports){(function(process){"use strict";!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=function(fn,arg1,arg2,arg3){if("function"!=typeof fn)throw new TypeError('"callback" argument must be a function');var args,i,len=arguments.length;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1)});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3)});default:for(args=new Array(len-1),i=0;i<args.length;)args[i++]=arguments[i];return process.nextTick(function(){fn.apply(null,args)})}}:module.exports=process.nextTick}).call(this,require("_process"))},{_process:25}],25:[function(require,module,exports){var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,function(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],26:[function(require,module,exports){module.exports=require("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":27}],27:[function(require,module,exports){"use strict";var processNextTick=require("process-nextick-args"),objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);Readable.call(this,options),Writable.call(this,options),options&&!1===options.readable&&(this.readable=!1),options&&!1===options.writable&&(this.writable=!1),this.allowHalfOpen=!0,options&&!1===options.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",onend)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(value){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=value,this._writableState.destroyed=value)}}),Duplex.prototype._destroy=function(err,cb){this.push(null),this.end(),processNextTick(cb,err)}},{"./_stream_readable":29,"./_stream_writable":31,"core-util-is":14,inherits:21,"process-nextick-args":24}],28:[function(require,module,exports){"use strict";module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":30,"core-util-is":14,inherits:21}],29:[function(require,module,exports){(function(process,global){"use strict";var processNextTick=require("process-nextick-args");module.exports=Readable;var Duplex,isArray=require("isarray");Readable.ReadableState=ReadableState;require("events").EventEmitter;var EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream=require("./internal/streams/stream"),Buffer=require("safe-buffer").Buffer,OurUint8Array=global.Uint8Array||function(){};var util=require("core-util-is");util.inherits=require("inherits");var debugUtil=require("util"),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder,BufferList=require("./internal/streams/BufferList"),destroyImpl=require("./internal/streams/destroy");util.inherits(Readable,Stream);var kProxyEvents=["error","close","destroy","pause","resume"];function ReadableState(options,stream){Duplex=Duplex||require("./_stream_duplex"),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){if(Duplex=Duplex||require("./_stream_duplex"),!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,options&&("function"==typeof options.read&&(this._read=options.read),"function"==typeof options.destroy&&(this._destroy=options.destroy)),Stream.call(this)}function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){var er,state=stream._readableState;null===chunk?(state.reading=!1,function(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}(stream,state)):(skipChunkCheck||(er=function(state,chunk){var er;obj=chunk,Buffer.isBuffer(obj)||obj instanceof OurUint8Array||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk"));var obj;return er}(state,chunk)),er?stream.emit("error",er):state.objectMode||chunk&&chunk.length>0?("string"==typeof chunk||state.objectMode||Object.getPrototypeOf(chunk)===Buffer.prototype||(chunk=function(chunk){return Buffer.from(chunk)}(chunk)),addToFront?state.endEmitted?stream.emit("error",new Error("stream.unshift() after end event")):addChunk(stream,state,chunk,!0):state.ended?stream.emit("error",new Error("stream.push() after EOF")):(state.reading=!1,state.decoder&&!encoding?(chunk=state.decoder.write(chunk),state.objectMode||0!==chunk.length?addChunk(stream,state,chunk,!1):maybeReadMore(stream,state)):addChunk(stream,state,chunk,!1))):addToFront||(state.reading=!1));return function(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}(state)}function addChunk(stream,state,chunk,addToFront){state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(value){this._readableState&&(this._readableState.destroyed=value)}}),Readable.prototype.destroy=destroyImpl.destroy,Readable.prototype._undestroy=destroyImpl.undestroy,Readable.prototype._destroy=function(err,cb){this.push(null),cb(err)},Readable.prototype.push=function(chunk,encoding){var skipChunkCheck,state=this._readableState;return state.objectMode?skipChunkCheck=!0:"string"==typeof chunk&&((encoding=encoding||state.defaultEncoding)!==state.encoding&&(chunk=Buffer.from(chunk,encoding),encoding=""),skipChunkCheck=!0),readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)},Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!=n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=function(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){return 0===state.length?null:(state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=function(n,list,hasStrings){var ret;n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):ret=n===list.head.data.length?list.shift():hasStrings?function(n,list){var p=list.head,c=1,ret=p.data;n-=ret.length;for(;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length?ret+=str:ret+=str.slice(0,n),0===(n-=nb)){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}(n,list):function(n,list){var ret=Buffer.allocUnsafe(n),p=list.head,c=1;p.data.copy(ret),n-=p.data.length;for(;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),0===(n-=nb)){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}(n,list);return ret}(n,state.buffer,state.decoder),ret);var ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(0===(n=howMuchToRead(n,state))&&state.ended)return 0===state.length&&endReadable(this),null;var ret,doRead=state.needReadable;return debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&debug("length less than watermark",doRead=!0),state.ended||state.reading?debug("reading or ended",doRead=!1):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state))),null===(ret=n>0?fromList(n,state):null)?(state.needReadable=!0,n=0):state.length-=n,0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var endFn=(!pipeOpts||!1!==pipeOpts.end)&&dest!==process.stdout&&dest!==process.stderr?onend:unpipe;function onunpipe(readable,unpipeInfo){debug("onunpipe"),readable===src&&unpipeInfo&&!1===unpipeInfo.hasUnpiped&&(unpipeInfo.hasUnpiped=!0,debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain())}function onend(){debug("onend"),dest.end()}state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=function(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}(src);dest.on("drain",ondrain);var cleanedUp=!1;var increasedAwaitDrain=!1;function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1,!1!==dest.write(chunk)||increasedAwaitDrain||((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&-1!==indexOf(state.pipes,dest))&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,increasedAwaitDrain=!0),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}return src.on("data",ondata),function(emitter,event,fn){if("function"==typeof emitter.prependListener)return emitter.prependListener(event,fn);emitter._events&&emitter._events[event]?isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn)}(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this,unpipeInfo),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,unpipeInfo);return this}var index=indexOf(state.pipes,dest);return-1===index?this:(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this,unpipeInfo),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev)!1!==this._readableState.flowing&&this.resume();else if("readable"===ev){var state=this._readableState;state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,function(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),!state.objectMode||null!==chunk&&void 0!==chunk)&&((state.objectMode||chunk&&chunk.length)&&(self.push(chunk)||(paused=!0,stream.pause())))});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],self.emit.bind(self,kProxyEvents[n]));return self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":27,"./internal/streams/BufferList":32,"./internal/streams/destroy":33,"./internal/streams/stream":34,_process:25,"core-util-is":14,events:18,inherits:21,isarray:23,"process-nextick-args":24,"safe-buffer":40,"string_decoder/":50,util:4}],30:[function(require,module,exports){"use strict";module.exports=Transform;var Duplex=require("./_stream_duplex"),util=require("core-util-is");function TransformState(stream){this.afterTransform=function(er,data){return function(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("write callback called multiple times"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data);cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(er,data){done(stream,er,data)}):done(stream)})}function done(stream,er,data){if(er)return stream.emit("error",er);null!==data&&void 0!==data&&stream.push(data);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length != 0");if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}util.inherits=require("inherits"),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0},Transform.prototype._destroy=function(err,cb){var _this=this;Duplex.prototype._destroy.call(this,err,function(err2){cb(err2),_this.emit("close")})}},{"./_stream_duplex":27,"core-util-is":14,inherits:21}],31:[function(require,module,exports){(function(process,global){"use strict";var processNextTick=require("process-nextick-args");function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){!function(corkReq,state,err){var entry=corkReq.entry;corkReq.entry=null;for(;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=corkReq:state.corkedRequestsFree=corkReq}(_this,state)}}module.exports=Writable;var Duplex,asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var internalUtil={deprecate:require("util-deprecate")},Stream=require("./internal/streams/stream"),Buffer=require("safe-buffer").Buffer,OurUint8Array=global.Uint8Array||function(){};var realHasInstance,destroyImpl=require("./internal/streams/destroy");function nop(){}function WritableState(options,stream){Duplex=Duplex||require("./_stream_duplex"),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=!1===options.decodeStrings;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){!function(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(function(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}(state),er)!function(stream,state,sync,er,cb){--state.pendingcb,sync?(processNextTick(cb,er),processNextTick(finishMaybe,stream,state),stream._writableState.errorEmitted=!0,stream.emit("error",er)):(cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er),finishMaybe(stream,state))}(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(options){if(Duplex=Duplex||require("./_stream_duplex"),!(realHasInstance.call(Writable,this)||this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev),"function"==typeof options.destroy&&(this._destroy=options.destroy),"function"==typeof options.final&&(this._final=options.final)),Stream.call(this)}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function afterWrite(stream,state,finished,cb){finished||function(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0,allBuffers=!0;entry;)buffer[count]=entry,entry.isBuf||(allBuffers=!1),entry=entry.next,count+=1;buffer.allBuffers=allBuffers,doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state)}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback;if(doWrite(stream,state,!1,state.objectMode?1:chunk.length,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final(function(err){state.pendingcb--,err&&stream.emit("error",err),state.prefinished=!0,stream.emit("prefinish"),finishMaybe(stream,state)})}function finishMaybe(stream,state){var need=needFinish(state);return need&&(!function(stream,state){state.prefinished||state.finalCalled||("function"==typeof stream._final?(state.pendingcb++,state.finalCalled=!0,processNextTick(callFinal,stream,state)):(state.prefinished=!0,stream.emit("prefinish")))}(stream,state),0===state.pendingcb&&(state.finished=!0,stream.emit("finish"))),need}util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(_){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return!!realHasInstance.call(this,object)||object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var obj,state=this._writableState,ret=!1,isBuf=(obj=chunk,(Buffer.isBuffer(obj)||obj instanceof OurUint8Array)&&!state.objectMode);return isBuf&&!Buffer.isBuffer(chunk)&&(chunk=function(chunk){return Buffer.from(chunk)}(chunk)),"function"==typeof encoding&&(cb=encoding,encoding=null),isBuf?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?function(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}(this,cb):(isBuf||function(stream,state,chunk,cb){var valid=!0,er=!1;return null===chunk?er=new TypeError("May not write null values to stream"):"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream.emit("error",er),processNextTick(cb,er),valid=!1),valid}(this,state,chunk,cb))&&(state.pendingcb++,ret=function(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=function(state,chunk,encoding){state.objectMode||!1===state.decodeStrings||"string"!=typeof chunk||(chunk=Buffer.from(chunk,encoding));return chunk}(state,chunk,encoding);chunk!==newChunk&&(isBuf=!0,encoding="buffer",chunk=newChunk)}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;ret||(state.needDrain=!0);if(state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest={chunk:chunk,encoding:encoding,isBuf:isBuf,callback:cb,next:null},last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}(this,state,isBuf,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||function(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb));state.ended=!0,stream.writable=!1}(this,state,cb)},Object.defineProperty(Writable.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(value){this._writableState&&(this._writableState.destroyed=value)}}),Writable.prototype.destroy=destroyImpl.destroy,Writable.prototype._undestroy=destroyImpl.undestroy,Writable.prototype._destroy=function(err,cb){this.end(),cb(err)}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":27,"./internal/streams/destroy":33,"./internal/streams/stream":34,_process:25,"core-util-is":14,inherits:21,"process-nextick-args":24,"safe-buffer":40,"util-deprecate":51}],32:[function(require,module,exports){"use strict";var Buffer=require("safe-buffer").Buffer;module.exports=function(){function BufferList(){!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(0===this.length)return Buffer.alloc(0);if(1===this.length)return this.head.data;for(var src,target,offset,ret=Buffer.allocUnsafe(n>>>0),p=this.head,i=0;p;)src=p.data,target=ret,offset=i,src.copy(target,offset),i+=p.data.length,p=p.next;return ret},BufferList}()},{"safe-buffer":40}],33:[function(require,module,exports){"use strict";var processNextTick=require("process-nextick-args");function emitErrorNT(self,err){self.emit("error",err)}module.exports={destroy:function(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;readableDestroyed||writableDestroyed?cb?cb(err):!err||this._writableState&&this._writableState.errorEmitted||processNextTick(emitErrorNT,this,err):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(err||null,function(err){!cb&&err?(processNextTick(emitErrorNT,_this,err),_this._writableState&&(_this._writableState.errorEmitted=!0)):cb&&cb(err)}))},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":24}],34:[function(require,module,exports){module.exports=require("events").EventEmitter},{events:18}],35:[function(require,module,exports){module.exports=require("./readable").PassThrough},{"./readable":36}],36:[function(require,module,exports){(exports=module.exports=require("./lib/_stream_readable.js")).Stream=exports,exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":27,"./lib/_stream_passthrough.js":28,"./lib/_stream_readable.js":29,"./lib/_stream_transform.js":30,"./lib/_stream_writable.js":31}],37:[function(require,module,exports){module.exports=require("./readable").Transform},{"./readable":36}],38:[function(require,module,exports){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":31}],39:[function(require,module,exports){(function(Buffer){"use strict";var inherits=require("inherits"),HashBase=require("hash-base");function RIPEMD160(){HashBase.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function rotl(x,n){return x<<n|x>>>32-n}function fn1(a,b,c,d,e,m,k,s){return rotl(a+(b^c^d)+m+k|0,s)+e|0}function fn2(a,b,c,d,e,m,k,s){return rotl(a+(b&c|~b&d)+m+k|0,s)+e|0}function fn3(a,b,c,d,e,m,k,s){return rotl(a+((b|~c)^d)+m+k|0,s)+e|0}function fn4(a,b,c,d,e,m,k,s){return rotl(a+(b&d|c&~d)+m+k|0,s)+e|0}function fn5(a,b,c,d,e,m,k,s){return rotl(a+(b^(c|~d))+m+k|0,s)+e|0}inherits(RIPEMD160,HashBase),RIPEMD160.prototype._update=function(){for(var m=new Array(16),i=0;i<16;++i)m[i]=this._block.readInt32LE(4*i);var al=this._a,bl=this._b,cl=this._c,dl=this._d,el=this._e;el=fn1(el,al=fn1(al,bl,cl,dl,el,m[0],0,11),bl,cl=rotl(cl,10),dl,m[1],0,14),bl=fn1(bl=rotl(bl,10),cl=fn1(cl,dl=fn1(dl,el,al,bl,cl,m[2],0,15),el,al=rotl(al,10),bl,m[3],0,12),dl,el=rotl(el,10),al,m[4],0,5),dl=fn1(dl=rotl(dl,10),el=fn1(el,al=fn1(al,bl,cl,dl,el,m[5],0,8),bl,cl=rotl(cl,10),dl,m[6],0,7),al,bl=rotl(bl,10),cl,m[7],0,9),al=fn1(al=rotl(al,10),bl=fn1(bl,cl=fn1(cl,dl,el,al,bl,m[8],0,11),dl,el=rotl(el,10),al,m[9],0,13),cl,dl=rotl(dl,10),el,m[10],0,14),cl=fn1(cl=rotl(cl,10),dl=fn1(dl,el=fn1(el,al,bl,cl,dl,m[11],0,15),al,bl=rotl(bl,10),cl,m[12],0,6),el,al=rotl(al,10),bl,m[13],0,7),el=fn2(el=rotl(el,10),al=fn1(al,bl=fn1(bl,cl,dl,el,al,m[14],0,9),cl,dl=rotl(dl,10),el,m[15],0,8),bl,cl=rotl(cl,10),dl,m[7],1518500249,7),bl=fn2(bl=rotl(bl,10),cl=fn2(cl,dl=fn2(dl,el,al,bl,cl,m[4],1518500249,6),el,al=rotl(al,10),bl,m[13],1518500249,8),dl,el=rotl(el,10),al,m[1],1518500249,13),dl=fn2(dl=rotl(dl,10),el=fn2(el,al=fn2(al,bl,cl,dl,el,m[10],1518500249,11),bl,cl=rotl(cl,10),dl,m[6],1518500249,9),al,bl=rotl(bl,10),cl,m[15],1518500249,7),al=fn2(al=rotl(al,10),bl=fn2(bl,cl=fn2(cl,dl,el,al,bl,m[3],1518500249,15),dl,el=rotl(el,10),al,m[12],1518500249,7),cl,dl=rotl(dl,10),el,m[0],1518500249,12),cl=fn2(cl=rotl(cl,10),dl=fn2(dl,el=fn2(el,al,bl,cl,dl,m[9],1518500249,15),al,bl=rotl(bl,10),cl,m[5],1518500249,9),el,al=rotl(al,10),bl,m[2],1518500249,11),el=fn2(el=rotl(el,10),al=fn2(al,bl=fn2(bl,cl,dl,el,al,m[14],1518500249,7),cl,dl=rotl(dl,10),el,m[11],1518500249,13),bl,cl=rotl(cl,10),dl,m[8],1518500249,12),bl=fn3(bl=rotl(bl,10),cl=fn3(cl,dl=fn3(dl,el,al,bl,cl,m[3],1859775393,11),el,al=rotl(al,10),bl,m[10],1859775393,13),dl,el=rotl(el,10),al,m[14],1859775393,6),dl=fn3(dl=rotl(dl,10),el=fn3(el,al=fn3(al,bl,cl,dl,el,m[4],1859775393,7),bl,cl=rotl(cl,10),dl,m[9],1859775393,14),al,bl=rotl(bl,10),cl,m[15],1859775393,9),al=fn3(al=rotl(al,10),bl=fn3(bl,cl=fn3(cl,dl,el,al,bl,m[8],1859775393,13),dl,el=rotl(el,10),al,m[1],1859775393,15),cl,dl=rotl(dl,10),el,m[2],1859775393,14),cl=fn3(cl=rotl(cl,10),dl=fn3(dl,el=fn3(el,al,bl,cl,dl,m[7],1859775393,8),al,bl=rotl(bl,10),cl,m[0],1859775393,13),el,al=rotl(al,10),bl,m[6],1859775393,6),el=fn3(el=rotl(el,10),al=fn3(al,bl=fn3(bl,cl,dl,el,al,m[13],1859775393,5),cl,dl=rotl(dl,10),el,m[11],1859775393,12),bl,cl=rotl(cl,10),dl,m[5],1859775393,7),bl=fn4(bl=rotl(bl,10),cl=fn4(cl,dl=fn3(dl,el,al,bl,cl,m[12],1859775393,5),el,al=rotl(al,10),bl,m[1],2400959708,11),dl,el=rotl(el,10),al,m[9],2400959708,12),dl=fn4(dl=rotl(dl,10),el=fn4(el,al=fn4(al,bl,cl,dl,el,m[11],2400959708,14),bl,cl=rotl(cl,10),dl,m[10],2400959708,15),al,bl=rotl(bl,10),cl,m[0],2400959708,14),al=fn4(al=rotl(al,10),bl=fn4(bl,cl=fn4(cl,dl,el,al,bl,m[8],2400959708,15),dl,el=rotl(el,10),al,m[12],2400959708,9),cl,dl=rotl(dl,10),el,m[4],2400959708,8),cl=fn4(cl=rotl(cl,10),dl=fn4(dl,el=fn4(el,al,bl,cl,dl,m[13],2400959708,9),al,bl=rotl(bl,10),cl,m[3],2400959708,14),el,al=rotl(al,10),bl,m[7],2400959708,5),el=fn4(el=rotl(el,10),al=fn4(al,bl=fn4(bl,cl,dl,el,al,m[15],2400959708,6),cl,dl=rotl(dl,10),el,m[14],2400959708,8),bl,cl=rotl(cl,10),dl,m[5],2400959708,6),bl=fn5(bl=rotl(bl,10),cl=fn4(cl,dl=fn4(dl,el,al,bl,cl,m[6],2400959708,5),el,al=rotl(al,10),bl,m[2],2400959708,12),dl,el=rotl(el,10),al,m[4],2840853838,9),dl=fn5(dl=rotl(dl,10),el=fn5(el,al=fn5(al,bl,cl,dl,el,m[0],2840853838,15),bl,cl=rotl(cl,10),dl,m[5],2840853838,5),al,bl=rotl(bl,10),cl,m[9],2840853838,11),al=fn5(al=rotl(al,10),bl=fn5(bl,cl=fn5(cl,dl,el,al,bl,m[7],2840853838,6),dl,el=rotl(el,10),al,m[12],2840853838,8),cl,dl=rotl(dl,10),el,m[2],2840853838,13),cl=fn5(cl=rotl(cl,10),dl=fn5(dl,el=fn5(el,al,bl,cl,dl,m[10],2840853838,12),al,bl=rotl(bl,10),cl,m[14],2840853838,5),el,al=rotl(al,10),bl,m[1],2840853838,12),el=fn5(el=rotl(el,10),al=fn5(al,bl=fn5(bl,cl,dl,el,al,m[3],2840853838,13),cl,dl=rotl(dl,10),el,m[8],2840853838,14),bl,cl=rotl(cl,10),dl,m[11],2840853838,11),bl=fn5(bl=rotl(bl,10),cl=fn5(cl,dl=fn5(dl,el,al,bl,cl,m[6],2840853838,8),el,al=rotl(al,10),bl,m[15],2840853838,5),dl,el=rotl(el,10),al,m[13],2840853838,6),dl=rotl(dl,10);var ar=this._a,br=this._b,cr=this._c,dr=this._d,er=this._e;er=fn5(er,ar=fn5(ar,br,cr,dr,er,m[5],1352829926,8),br,cr=rotl(cr,10),dr,m[14],1352829926,9),br=fn5(br=rotl(br,10),cr=fn5(cr,dr=fn5(dr,er,ar,br,cr,m[7],1352829926,9),er,ar=rotl(ar,10),br,m[0],1352829926,11),dr,er=rotl(er,10),ar,m[9],1352829926,13),dr=fn5(dr=rotl(dr,10),er=fn5(er,ar=fn5(ar,br,cr,dr,er,m[2],1352829926,15),br,cr=rotl(cr,10),dr,m[11],1352829926,15),ar,br=rotl(br,10),cr,m[4],1352829926,5),ar=fn5(ar=rotl(ar,10),br=fn5(br,cr=fn5(cr,dr,er,ar,br,m[13],1352829926,7),dr,er=rotl(er,10),ar,m[6],1352829926,7),cr,dr=rotl(dr,10),er,m[15],1352829926,8),cr=fn5(cr=rotl(cr,10),dr=fn5(dr,er=fn5(er,ar,br,cr,dr,m[8],1352829926,11),ar,br=rotl(br,10),cr,m[1],1352829926,14),er,ar=rotl(ar,10),br,m[10],1352829926,14),er=fn4(er=rotl(er,10),ar=fn5(ar,br=fn5(br,cr,dr,er,ar,m[3],1352829926,12),cr,dr=rotl(dr,10),er,m[12],1352829926,6),br,cr=rotl(cr,10),dr,m[6],1548603684,9),br=fn4(br=rotl(br,10),cr=fn4(cr,dr=fn4(dr,er,ar,br,cr,m[11],1548603684,13),er,ar=rotl(ar,10),br,m[3],1548603684,15),dr,er=rotl(er,10),ar,m[7],1548603684,7),dr=fn4(dr=rotl(dr,10),er=fn4(er,ar=fn4(ar,br,cr,dr,er,m[0],1548603684,12),br,cr=rotl(cr,10),dr,m[13],1548603684,8),ar,br=rotl(br,10),cr,m[5],1548603684,9),ar=fn4(ar=rotl(ar,10),br=fn4(br,cr=fn4(cr,dr,er,ar,br,m[10],1548603684,11),dr,er=rotl(er,10),ar,m[14],1548603684,7),cr,dr=rotl(dr,10),er,m[15],1548603684,7),cr=fn4(cr=rotl(cr,10),dr=fn4(dr,er=fn4(er,ar,br,cr,dr,m[8],1548603684,12),ar,br=rotl(br,10),cr,m[12],1548603684,7),er,ar=rotl(ar,10),br,m[4],1548603684,6),er=fn4(er=rotl(er,10),ar=fn4(ar,br=fn4(br,cr,dr,er,ar,m[9],1548603684,15),cr,dr=rotl(dr,10),er,m[1],1548603684,13),br,cr=rotl(cr,10),dr,m[2],1548603684,11),br=fn3(br=rotl(br,10),cr=fn3(cr,dr=fn3(dr,er,ar,br,cr,m[15],1836072691,9),er,ar=rotl(ar,10),br,m[5],1836072691,7),dr,er=rotl(er,10),ar,m[1],1836072691,15),dr=fn3(dr=rotl(dr,10),er=fn3(er,ar=fn3(ar,br,cr,dr,er,m[3],1836072691,11),br,cr=rotl(cr,10),dr,m[7],1836072691,8),ar,br=rotl(br,10),cr,m[14],1836072691,6),ar=fn3(ar=rotl(ar,10),br=fn3(br,cr=fn3(cr,dr,er,ar,br,m[6],1836072691,6),dr,er=rotl(er,10),ar,m[9],1836072691,14),cr,dr=rotl(dr,10),er,m[11],1836072691,12),cr=fn3(cr=rotl(cr,10),dr=fn3(dr,er=fn3(er,ar,br,cr,dr,m[8],1836072691,13),ar,br=rotl(br,10),cr,m[12],1836072691,5),er,ar=rotl(ar,10),br,m[2],1836072691,14),er=fn3(er=rotl(er,10),ar=fn3(ar,br=fn3(br,cr,dr,er,ar,m[10],1836072691,13),cr,dr=rotl(dr,10),er,m[0],1836072691,13),br,cr=rotl(cr,10),dr,m[4],1836072691,7),br=fn2(br=rotl(br,10),cr=fn2(cr,dr=fn3(dr,er,ar,br,cr,m[13],1836072691,5),er,ar=rotl(ar,10),br,m[8],2053994217,15),dr,er=rotl(er,10),ar,m[6],2053994217,5),dr=fn2(dr=rotl(dr,10),er=fn2(er,ar=fn2(ar,br,cr,dr,er,m[4],2053994217,8),br,cr=rotl(cr,10),dr,m[1],2053994217,11),ar,br=rotl(br,10),cr,m[3],2053994217,14),ar=fn2(ar=rotl(ar,10),br=fn2(br,cr=fn2(cr,dr,er,ar,br,m[11],2053994217,14),dr,er=rotl(er,10),ar,m[15],2053994217,6),cr,dr=rotl(dr,10),er,m[0],2053994217,14),cr=fn2(cr=rotl(cr,10),dr=fn2(dr,er=fn2(er,ar,br,cr,dr,m[5],2053994217,6),ar,br=rotl(br,10),cr,m[12],2053994217,9),er,ar=rotl(ar,10),br,m[2],2053994217,12),er=fn2(er=rotl(er,10),ar=fn2(ar,br=fn2(br,cr,dr,er,ar,m[13],2053994217,9),cr,dr=rotl(dr,10),er,m[9],2053994217,12),br,cr=rotl(cr,10),dr,m[7],2053994217,5),br=fn1(br=rotl(br,10),cr=fn2(cr,dr=fn2(dr,er,ar,br,cr,m[10],2053994217,15),er,ar=rotl(ar,10),br,m[14],2053994217,8),dr,er=rotl(er,10),ar,m[12],0,8),dr=fn1(dr=rotl(dr,10),er=fn1(er,ar=fn1(ar,br,cr,dr,er,m[15],0,5),br,cr=rotl(cr,10),dr,m[10],0,12),ar,br=rotl(br,10),cr,m[4],0,9),ar=fn1(ar=rotl(ar,10),br=fn1(br,cr=fn1(cr,dr,er,ar,br,m[1],0,12),dr,er=rotl(er,10),ar,m[5],0,5),cr,dr=rotl(dr,10),er,m[8],0,14),cr=fn1(cr=rotl(cr,10),dr=fn1(dr,er=fn1(er,ar,br,cr,dr,m[7],0,6),ar,br=rotl(br,10),cr,m[6],0,8),er,ar=rotl(ar,10),br,m[2],0,13),er=fn1(er=rotl(er,10),ar=fn1(ar,br=fn1(br,cr,dr,er,ar,m[13],0,6),cr,dr=rotl(dr,10),er,m[14],0,5),br,cr=rotl(cr,10),dr,m[0],0,15),br=fn1(br=rotl(br,10),cr=fn1(cr,dr=fn1(dr,er,ar,br,cr,m[3],0,13),er,ar=rotl(ar,10),br,m[9],0,11),dr,er=rotl(er,10),ar,m[11],0,11),dr=rotl(dr,10);var t=this._b+cl+dr|0;this._b=this._c+dl+er|0,this._c=this._d+el+ar|0,this._d=this._e+al+br|0,this._e=this._a+bl+cr|0,this._a=t},RIPEMD160.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var buffer=new Buffer(20);return buffer.writeInt32LE(this._a,0),buffer.writeInt32LE(this._b,4),buffer.writeInt32LE(this._c,8),buffer.writeInt32LE(this._d,12),buffer.writeInt32LE(this._e,16),buffer},module.exports=RIPEMD160}).call(this,require("buffer").Buffer)},{buffer:8,"hash-base":19,inherits:21}],40:[function(require,module,exports){var buffer=require("buffer"),Buffer=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key]}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length)}Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow?module.exports=buffer:(copyProps(buffer,exports),exports.Buffer=SafeBuffer),copyProps(Buffer,SafeBuffer),SafeBuffer.from=function(arg,encodingOrOffset,length){if("number"==typeof arg)throw new TypeError("Argument must not be a number");return Buffer(arg,encodingOrOffset,length)},SafeBuffer.alloc=function(size,fill,encoding){if("number"!=typeof size)throw new TypeError("Argument must be a number");var buf=Buffer(size);return void 0!==fill?"string"==typeof encoding?buf.fill(fill,encoding):buf.fill(fill):buf.fill(0),buf},SafeBuffer.allocUnsafe=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return Buffer(size)},SafeBuffer.allocUnsafeSlow=function(size){if("number"!=typeof size)throw new TypeError("Argument must be a number");return buffer.SlowBuffer(size)}},{buffer:8}],41:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer;function Hash(blockSize,finalSize){this._block=Buffer.alloc(blockSize),this._finalSize=finalSize,this._blockSize=blockSize,this._len=0}Hash.prototype.update=function(data,enc){"string"==typeof data&&(enc=enc||"utf8",data=Buffer.from(data,enc));for(var block=this._block,blockSize=this._blockSize,length=data.length,accum=this._len,offset=0;offset<length;){for(var assigned=accum%blockSize,remainder=Math.min(length-offset,blockSize-assigned),i=0;i<remainder;i++)block[assigned+i]=data[offset+i];offset+=remainder,(accum+=remainder)%blockSize==0&&this._update(block)}return this._len+=length,this},Hash.prototype.digest=function(enc){var rem=this._len%this._blockSize;this._block[rem]=128,this._block.fill(0,rem+1),rem>=this._finalSize&&(this._update(this._block),this._block.fill(0));var bits=8*this._len;if(bits<=4294967295)this._block.writeUInt32BE(bits,this._blockSize-4);else{var lowBits=4294967295&bits,highBits=(bits-lowBits)/4294967296;this._block.writeUInt32BE(highBits,this._blockSize-8),this._block.writeUInt32BE(lowBits,this._blockSize-4)}this._update(this._block);var hash=this._hash();return enc?hash.toString(enc):hash},Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")},module.exports=Hash},{"safe-buffer":40}],42:[function(require,module,exports){(exports=module.exports=function(algorithm){algorithm=algorithm.toLowerCase();var Algorithm=exports[algorithm];if(!Algorithm)throw new Error(algorithm+" is not supported (we accept pull requests)");return new Algorithm}).sha=require("./sha"),exports.sha1=require("./sha1"),exports.sha224=require("./sha224"),exports.sha256=require("./sha256"),exports.sha384=require("./sha384"),exports.sha512=require("./sha512")},{"./sha":43,"./sha1":44,"./sha224":45,"./sha256":46,"./sha384":47,"./sha512":48}],43:[function(require,module,exports){var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);function Sha(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){return 0===s?b&c|~b&d:2===s?b&c|b&d|c&d:b^c^d}inherits(Sha,Hash),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(M){for(var num,W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<80;++i)W[i]=W[i-3]^W[i-8]^W[i-14]^W[i-16];for(var j=0;j<80;++j){var s=~~(j/20),t=0|((num=a)<<5|num>>>27)+ft(s,b,c,d)+e+W[j]+K[s];e=d,d=c,c=rotl30(b),b=a,a=t}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha.prototype._hash=function(){var H=Buffer.allocUnsafe(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha},{"./hash":41,inherits:21,"safe-buffer":40}],44:[function(require,module,exports){var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[1518500249,1859775393,-1894007588,-899497514],W=new Array(80);function Sha1(){this.init(),this._w=W,Hash.call(this,64,56)}function rotl5(num){return num<<5|num>>>27}function rotl30(num){return num<<30|num>>>2}function ft(s,b,c,d){return 0===s?b&c|~b&d:2===s?b&c|b&d|c&d:b^c^d}inherits(Sha1,Hash),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(M){for(var num,W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<80;++i)W[i]=(num=W[i-3]^W[i-8]^W[i-14]^W[i-16],num<<1|num>>>31);for(var j=0;j<80;++j){var s=~~(j/20),t=rotl5(a)+ft(s,b,c,d)+e+W[j]+K[s]|0;e=d,d=c,c=rotl30(b),b=a,a=t}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha1.prototype._hash=function(){var H=Buffer.allocUnsafe(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha1},{"./hash":41,inherits:21,"safe-buffer":40}],45:[function(require,module,exports){var inherits=require("inherits"),Sha256=require("./sha256"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,W=new Array(64);function Sha224(){this.init(),this._w=W,Hash.call(this,64,56)}inherits(Sha224,Sha256),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var H=Buffer.allocUnsafe(28);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H},module.exports=Sha224},{"./hash":41,"./sha256":46,inherits:21,"safe-buffer":40}],46:[function(require,module,exports){var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],W=new Array(64);function Sha256(){this.init(),this._w=W,Hash.call(this,64,56)}function ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x){return(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10)}function sigma1(x){return(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7)}function gamma0(x){return(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3}inherits(Sha256,Hash),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(M){for(var x,W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,f=0|this._f,g=0|this._g,h=0|this._h,i=0;i<16;++i)W[i]=M.readInt32BE(4*i);for(;i<64;++i)W[i]=0|(x=W[i-2],((x>>>17|x<<15)^(x>>>19|x<<13)^x>>>10)+W[i-7]+gamma0(W[i-15])+W[i-16]);for(var j=0;j<64;++j){var T1=h+sigma1(e)+ch(e,f,g)+K[j]+W[j]|0,T2=sigma0(a)+maj(a,b,c)|0;h=g,g=f,f=e,e=d+T1|0,d=c,c=b,b=a,a=T1+T2|0}this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=h+this._h|0},Sha256.prototype._hash=function(){var H=Buffer.allocUnsafe(32);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H.writeInt32BE(this._h,28),H},module.exports=Sha256},{"./hash":41,inherits:21,"safe-buffer":40}],47:[function(require,module,exports){var inherits=require("inherits"),SHA512=require("./sha512"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,W=new Array(160);function Sha384(){this.init(),this._w=W,Hash.call(this,128,112)}inherits(Sha384,SHA512),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var H=Buffer.allocUnsafe(48);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),H},module.exports=Sha384},{"./hash":41,"./sha512":48,inherits:21,"safe-buffer":40}],48:[function(require,module,exports){var inherits=require("inherits"),Hash=require("./hash"),Buffer=require("safe-buffer").Buffer,K=[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],W=new Array(160);function Sha512(){this.init(),this._w=W,Hash.call(this,128,112)}function Ch(x,y,z){return z^x&(y^z)}function maj(x,y,z){return x&y|z&(x|y)}function sigma0(x,xl){return(x>>>28|xl<<4)^(xl>>>2|x<<30)^(xl>>>7|x<<25)}function sigma1(x,xl){return(x>>>14|xl<<18)^(x>>>18|xl<<14)^(xl>>>9|x<<23)}function Gamma0(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^x>>>7}function Gamma0l(x,xl){return(x>>>1|xl<<31)^(x>>>8|xl<<24)^(x>>>7|xl<<25)}function Gamma1(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^x>>>6}function Gamma1l(x,xl){return(x>>>19|xl<<13)^(xl>>>29|x<<3)^(x>>>6|xl<<26)}function getCarry(a,b){return a>>>0<b>>>0?1:0}inherits(Sha512,Hash),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(M){for(var W=this._w,ah=0|this._ah,bh=0|this._bh,ch=0|this._ch,dh=0|this._dh,eh=0|this._eh,fh=0|this._fh,gh=0|this._gh,hh=0|this._hh,al=0|this._al,bl=0|this._bl,cl=0|this._cl,dl=0|this._dl,el=0|this._el,fl=0|this._fl,gl=0|this._gl,hl=0|this._hl,i=0;i<32;i+=2)W[i]=M.readInt32BE(4*i),W[i+1]=M.readInt32BE(4*i+4);for(;i<160;i+=2){var xh=W[i-30],xl=W[i-30+1],gamma0=Gamma0(xh,xl),gamma0l=Gamma0l(xl,xh),gamma1=Gamma1(xh=W[i-4],xl=W[i-4+1]),gamma1l=Gamma1l(xl,xh),Wi7h=W[i-14],Wi7l=W[i-14+1],Wi16h=W[i-32],Wi16l=W[i-32+1],Wil=gamma0l+Wi7l|0,Wih=gamma0+Wi7h+getCarry(Wil,gamma0l)|0;Wih=(Wih=Wih+gamma1+getCarry(Wil=Wil+gamma1l|0,gamma1l)|0)+Wi16h+getCarry(Wil=Wil+Wi16l|0,Wi16l)|0,W[i]=Wih,W[i+1]=Wil}for(var j=0;j<160;j+=2){Wih=W[j],Wil=W[j+1];var majh=maj(ah,bh,ch),majl=maj(al,bl,cl),sigma0h=sigma0(ah,al),sigma0l=sigma0(al,ah),sigma1h=sigma1(eh,el),sigma1l=sigma1(el,eh),Kih=K[j],Kil=K[j+1],chh=Ch(eh,fh,gh),chl=Ch(el,fl,gl),t1l=hl+sigma1l|0,t1h=hh+sigma1h+getCarry(t1l,hl)|0;t1h=(t1h=(t1h=t1h+chh+getCarry(t1l=t1l+chl|0,chl)|0)+Kih+getCarry(t1l=t1l+Kil|0,Kil)|0)+Wih+getCarry(t1l=t1l+Wil|0,Wil)|0;var t2l=sigma0l+majl|0,t2h=sigma0h+majh+getCarry(t2l,sigma0l)|0;hh=gh,hl=gl,gh=fh,gl=fl,fh=eh,fl=el,eh=dh+t1h+getCarry(el=dl+t1l|0,dl)|0,dh=ch,dl=cl,ch=bh,cl=bl,bh=ah,bl=al,ah=t1h+t2h+getCarry(al=t1l+t2l|0,t1l)|0}this._al=this._al+al|0,this._bl=this._bl+bl|0,this._cl=this._cl+cl|0,this._dl=this._dl+dl|0,this._el=this._el+el|0,this._fl=this._fl+fl|0,this._gl=this._gl+gl|0,this._hl=this._hl+hl|0,this._ah=this._ah+ah+getCarry(this._al,al)|0,this._bh=this._bh+bh+getCarry(this._bl,bl)|0,this._ch=this._ch+ch+getCarry(this._cl,cl)|0,this._dh=this._dh+dh+getCarry(this._dl,dl)|0,this._eh=this._eh+eh+getCarry(this._el,el)|0,this._fh=this._fh+fh+getCarry(this._fl,fl)|0,this._gh=this._gh+gh+getCarry(this._gl,gl)|0,this._hh=this._hh+hh+getCarry(this._hl,hl)|0},Sha512.prototype._hash=function(){var H=Buffer.allocUnsafe(64);function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),H},module.exports=Sha512},{"./hash":41,inherits:21,"safe-buffer":40}],49:[function(require,module,exports){module.exports=Stream;var EE=require("events").EventEmitter;function Stream(){EE.call(this)}require("inherits")(Stream,EE),Stream.Readable=require("readable-stream/readable.js"),Stream.Writable=require("readable-stream/writable.js"),Stream.Duplex=require("readable-stream/duplex.js"),Stream.Transform=require("readable-stream/transform.js"),Stream.PassThrough=require("readable-stream/passthrough.js"),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){var source=this;function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&!1===options.end||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},{events:18,inherits:21,"readable-stream/duplex.js":26,"readable-stream/passthrough.js":35,"readable-stream/readable.js":36,"readable-stream/transform.js":37,"readable-stream/writable.js":38}],50:[function(require,module,exports){"use strict";var Buffer=require("safe-buffer").Buffer,isEncoding=Buffer.isEncoding||function(encoding){switch((encoding=""+encoding)&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function StringDecoder(encoding){var nb;switch(this.encoding=function(enc){var nenc=function(enc){if(!enc)return"utf8";for(var retried;;)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}(enc);if("string"!=typeof nenc&&(Buffer.isEncoding===isEncoding||!isEncoding(enc)))throw new Error("Unknown encoding: "+enc);return nenc||enc}(encoding),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer.allocUnsafe(nb)}function utf8CheckByte(byte){return byte<=127?0:byte>>5==6?2:byte>>4==14?3:byte>>3==30?4:-1}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=function(self,buf,p){if(128!=(192&buf[0]))return self.lastNeed=0,"�".repeat(p);if(self.lastNeed>1&&buf.length>1){if(128!=(192&buf[1]))return self.lastNeed=1,"�".repeat(p+1);if(self.lastNeed>2&&buf.length>2&&128!=(192&buf[2]))return self.lastNeed=2,"�".repeat(p+2)}}(this,buf,p);return void 0!==r?r:this.lastNeed<=buf.length?(buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(buf.copy(this.lastChar,p,0,buf.length),void(this.lastNeed-=buf.length))}function utf16Text(buf,i){if((buf.length-i)%2==0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;return 0===n?buf.toString("base64",i):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=buf[buf.length-1]:(this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1]),buf.toString("base64",i,buf.length-n))}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}exports.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(buf){if(0===buf.length)return"";var r,i;if(this.lastNeed){if(void 0===(r=this.fillLast(buf)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<buf.length?r?r+this.text(buf,i):this.text(buf,i):r||""},StringDecoder.prototype.end=function(buf){var r=buf&&buf.length?this.write(buf):"";return this.lastNeed?r+"�".repeat(this.lastTotal-this.lastNeed):r},StringDecoder.prototype.text=function(buf,i){var total=function(self,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);if(nb>=0)return nb>0&&(self.lastNeed=nb-1),nb;if(--j<i)return 0;if((nb=utf8CheckByte(buf[j]))>=0)return nb>0&&(self.lastNeed=nb-2),nb;if(--j<i)return 0;if((nb=utf8CheckByte(buf[j]))>=0)return nb>0&&(2===nb?nb=0:self.lastNeed=nb-3),nb;return 0}(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)},StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length}},{"safe-buffer":40}],51:[function(require,module,exports){(function(global){function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=function(fn,msg){if(config("noDeprecation"))return fn;var warned=!1;return function(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],52:[function(require,module,exports){(function(Buffer){var bs58check=require("bs58check"),cashaddr=require("cashaddrjs"),Format={Legacy:"legacy",Bitpay:"bitpay",Cashaddr:"cashaddr"},Network={Mainnet:"mainnet",Testnet:"testnet"},Type={};function detectAddressFormat(address){return decodeAddress(address).format}function detectAddressNetwork(address){return decodeAddress(address).network}function detectAddressType(address){return decodeAddress(address).type}Type.P2PKH="p2pkh",Type.P2SH="p2sh";var VERSION_BYTE={};function decodeAddress(address){try{return function(address){try{var payload=bs58check.decode(address),versionByte=payload[0],hash=Array.prototype.slice.call(payload,1);switch(versionByte){case VERSION_BYTE[Format.Legacy][Network.Mainnet][Type.P2PKH]:return{hash:hash,format:Format.Legacy,network:Network.Mainnet,type:Type.P2PKH};case VERSION_BYTE[Format.Legacy][Network.Mainnet][Type.P2SH]:return{hash:hash,format:Format.Legacy,network:Network.Mainnet,type:Type.P2SH};case VERSION_BYTE[Format.Legacy][Network.Testnet][Type.P2PKH]:return{hash:hash,format:Format.Legacy,network:Network.Testnet,type:Type.P2PKH};case VERSION_BYTE[Format.Legacy][Network.Testnet][Type.P2SH]:return{hash:hash,format:Format.Legacy,network:Network.Testnet,type:Type.P2SH};case VERSION_BYTE[Format.Bitpay][Network.Mainnet][Type.P2PKH]:return{hash:hash,format:Format.Bitpay,network:Network.Mainnet,type:Type.P2PKH};case VERSION_BYTE[Format.Bitpay][Network.Mainnet][Type.P2SH]:return{hash:hash,format:Format.Bitpay,network:Network.Mainnet,type:Type.P2SH}}}catch(error){}throw new InvalidAddressError}(address)}catch(error){}try{return function(address){if(-1!==address.indexOf(":"))try{return decodeCashAddressWithPrefix(address)}catch(error){}else for(var prefixes=["bitcoincash","bchtest","regtest"],i=0;i<prefixes.length;++i)try{var prefix=prefixes[i];return decodeCashAddressWithPrefix(prefix+":"+address)}catch(error){}throw new InvalidAddressError}(address)}catch(error){}throw new InvalidAddressError}function decodeCashAddressWithPrefix(address){try{var decoded=cashaddr.decode(address),hash=Array.prototype.slice.call(decoded.hash,0),type="P2PKH"===decoded.type?Type.P2PKH:Type.P2SH;switch(decoded.prefix){case"bitcoincash":return{hash:hash,format:Format.Cashaddr,network:Network.Mainnet,type:type};case"bchtest":case"regtest":return{hash:hash,format:Format.Cashaddr,network:Network.Testnet,type:type}}}catch(error){}throw new InvalidAddressError}function InvalidAddressError(){var error=new Error;this.name=error.name="InvalidAddressError",this.message=error.message="Received an invalid Bitcoin Cash address as input.",this.stack=error.stack}VERSION_BYTE[Format.Legacy]={},VERSION_BYTE[Format.Legacy][Network.Mainnet]={},VERSION_BYTE[Format.Legacy][Network.Mainnet][Type.P2PKH]=0,VERSION_BYTE[Format.Legacy][Network.Mainnet][Type.P2SH]=5,VERSION_BYTE[Format.Legacy][Network.Testnet]={},VERSION_BYTE[Format.Legacy][Network.Testnet][Type.P2PKH]=111,VERSION_BYTE[Format.Legacy][Network.Testnet][Type.P2SH]=196,VERSION_BYTE[Format.Bitpay]={},VERSION_BYTE[Format.Bitpay][Network.Mainnet]={},VERSION_BYTE[Format.Bitpay][Network.Mainnet][Type.P2PKH]=28,VERSION_BYTE[Format.Bitpay][Network.Mainnet][Type.P2SH]=40,VERSION_BYTE[Format.Bitpay][Network.Testnet]={},VERSION_BYTE[Format.Bitpay][Network.Testnet][Type.P2PKH]=111,VERSION_BYTE[Format.Bitpay][Network.Testnet][Type.P2SH]=196,InvalidAddressError.prototype=Object.create(Error.prototype),module.exports={Format:Format,Network:Network,Type:Type,detectAddressFormat:detectAddressFormat,detectAddressNetwork:detectAddressNetwork,detectAddressType:detectAddressType,toLegacyAddress:function(address){var decoded=decodeAddress(address);return decoded.format===Format.Legacy?address:function(decoded){var versionByte=VERSION_BYTE[Format.Legacy][decoded.network][decoded.type],buffer=Buffer.alloc(1+decoded.hash.length);return buffer[0]=versionByte,buffer.set(decoded.hash,1),bs58check.encode(buffer)}(decoded)},toBitpayAddress:function(address){var decoded=decodeAddress(address);return decoded.format===Format.Bitpay?address:function(decoded){var versionByte=VERSION_BYTE[Format.Bitpay][decoded.network][decoded.type],buffer=Buffer.alloc(1+decoded.hash.length);return buffer[0]=versionByte,buffer.set(decoded.hash,1),bs58check.encode(buffer)}(decoded)},toCashAddress:function(address){return function(decoded){var prefix=decoded.network===Network.Mainnet?"bitcoincash":"bchtest",type=decoded.type===Type.P2PKH?"P2PKH":"P2SH",hash=Uint8Array.from(decoded.hash);return cashaddr.encode(prefix,type,hash)}(decodeAddress(address))},isLegacyAddress:function(address){return detectAddressFormat(address)===Format.Legacy},isBitpayAddress:function(address){return detectAddressFormat(address)===Format.Bitpay},isCashAddress:function(address){return detectAddressFormat(address)===Format.Cashaddr},isMainnetAddress:function(address){return detectAddressNetwork(address)===Network.Mainnet},isTestnetAddress:function(address){return detectAddressNetwork(address)===Network.Testnet},isP2PKHAddress:function(address){return detectAddressType(address)===Type.P2PKH},isP2SHAddress:function(address){return detectAddressType(address)===Type.P2SH},InvalidAddressError:InvalidAddressError}}).call(this,require("buffer").Buffer)},{bs58check:7,buffer:8,cashaddrjs:10}]},{},[52])(52)});
</script>
<script>(function(n){var h={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:d,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:d,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:d,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};h._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/;h._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;h.def=l(h.def).replace("label",h._label).replace("title",h._title).getRegex();h.bullet=/(?:[*+-]|\d+\.)/;h.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;h.item=l(h.item,"gm").replace(/bull/g,h.bullet).getRegex();h.list=l(h.list).replace(/bull/g,h.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+h.def.source+")").getRegex();h._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";h._comment=/<!--(?!-?>)[\s\S]*?-->/;h.html=l(h.html,"i").replace("comment",h._comment).replace("tag",h._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();h.paragraph=l(h.paragraph).replace("hr",h.hr).replace("heading",h.heading).replace("lheading",h.lheading).replace("tag",h._tag).getRegex();h.blockquote=l(h.blockquote).replace("paragraph",h.paragraph).getRegex();h.normal=f({},h);h.gfm=f({},h.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});h.gfm.paragraph=l(h.paragraph).replace("(?!","(?!"+h.gfm.fences.source.replace("\\1","\\2")+"|"+h.list.source.replace("\\1","\\3")+"|").getRegex();h.tables=f({},h.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/});h.pedantic=f({},h.normal,{html:l("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",h._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/});function g(s){this.tokens=[];this.tokens.links={};this.options=s||k.defaults;this.rules=h.normal;if(this.options.pedantic){this.rules=h.pedantic}else{if(this.options.gfm){if(this.options.tables){this.rules=h.tables}else{this.rules=h.gfm}}}}g.rules=h;g.lex=function(u,s){var t=new g(s);return t.lex(u)};g.prototype.lex=function(s){s=s.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(s,true)};g.prototype.token=function(t,C){t=t.replace(/^ +$/gm,"");var z,x,E,B,D,F,s,y,G,v,u,w,A;while(t){if(E=this.rules.newline.exec(t)){t=t.substring(E[0].length);if(E[0].length>1){this.tokens.push({type:"space"})}}if(E=this.rules.code.exec(t)){t=t.substring(E[0].length);E=E[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?E.replace(/\n+$/,""):E});continue}if(E=this.rules.fences.exec(t)){t=t.substring(E[0].length);this.tokens.push({type:"code",lang:E[2],text:E[3]||""});continue}if(E=this.rules.heading.exec(t)){t=t.substring(E[0].length);this.tokens.push({type:"heading",depth:E[1].length,text:E[2]});continue}if(C&&(E=this.rules.nptable.exec(t))){F={type:"table",header:q(E[1].replace(/^ *| *\| *$/g,"")),align:E[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:E[3]?E[3].replace(/\n$/,"").split("\n"):[]};if(F.header.length===F.align.length){t=t.substring(E[0].length);for(y=0;y<F.align.length;y++){if(/^ *-+: *$/.test(F.align[y])){F.align[y]="right"}else{if(/^ *:-+: *$/.test(F.align[y])){F.align[y]="center"}else{if(/^ *:-+ *$/.test(F.align[y])){F.align[y]="left"}else{F.align[y]=null}}}}for(y=0;y<F.cells.length;y++){F.cells[y]=q(F.cells[y],F.header.length)}this.tokens.push(F);continue}}if(E=this.rules.hr.exec(t)){t=t.substring(E[0].length);this.tokens.push({type:"hr"});continue}if(E=this.rules.blockquote.exec(t)){t=t.substring(E[0].length);this.tokens.push({type:"blockquote_start"});E=E[0].replace(/^ *> ?/gm,"");this.token(E,C);this.tokens.push({type:"blockquote_end"});continue}if(E=this.rules.list.exec(t)){t=t.substring(E[0].length);B=E[2];u=B.length>1;this.tokens.push({type:"list_start",ordered:u,start:u?+B:""});E=E[0].match(this.rules.item);z=false;v=E.length;y=0;for(;y<v;y++){F=E[y];s=F.length;F=F.replace(/^ *([*+-]|\d+\.) +/,"");if(~F.indexOf("\n ")){s-=F.length;F=!this.options.pedantic?F.replace(new RegExp("^ {1,"+s+"}","gm"),""):F.replace(/^ {1,4}/gm,"")}if(this.options.smartLists&&y!==v-1){D=h.bullet.exec(E[y+1])[0];if(B!==D&&!(B.length>1&&D.length>1)){t=E.slice(y+1).join("\n")+t;y=v-1}}x=z||/\n\n(?!\s*$)/.test(F);if(y!==v-1){z=F.charAt(F.length-1)==="\n";if(!x){x=z}}w=/^\[[ xX]\] /.test(F);A=undefined;if(w){A=F[1]!==" ";F=F.replace(/^\[[ xX]\] +/,"")}this.tokens.push({type:x?"loose_item_start":"list_item_start",task:w,checked:A});this.token(F,false);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(E=this.rules.html.exec(t)){t=t.substring(E[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(E[1]==="pre"||E[1]==="script"||E[1]==="style"),text:E[0]});continue}if(C&&(E=this.rules.def.exec(t))){t=t.substring(E[0].length);if(E[3]){E[3]=E[3].substring(1,E[3].length-1)}G=E[1].toLowerCase().replace(/\s+/g," ");if(!this.tokens.links[G]){this.tokens.links[G]={href:E[2],title:E[3]}}continue}if(C&&(E=this.rules.table.exec(t))){F={type:"table",header:q(E[1].replace(/^ *| *\| *$/g,"")),align:E[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:E[3]?E[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]};if(F.header.length===F.align.length){t=t.substring(E[0].length);for(y=0;y<F.align.length;y++){if(/^ *-+: *$/.test(F.align[y])){F.align[y]="right"}else{if(/^ *:-+: *$/.test(F.align[y])){F.align[y]="center"}else{if(/^ *:-+ *$/.test(F.align[y])){F.align[y]="left"}else{F.align[y]=null}}}}for(y=0;y<F.cells.length;y++){F.cells[y]=q(F.cells[y].replace(/^ *\| *| *\| *$/g,""),F.header.length)}this.tokens.push(F);continue}}if(E=this.rules.lheading.exec(t)){t=t.substring(E[0].length);this.tokens.push({type:"heading",depth:E[2]==="="?1:2,text:E[1]});continue}if(C&&(E=this.rules.paragraph.exec(t))){t=t.substring(E[0].length);this.tokens.push({type:"paragraph",text:E[1].charAt(E[1].length-1)==="\n"?E[1].slice(0,-1):E[1]});continue}if(E=this.rules.text.exec(t)){t=t.substring(E[0].length);this.tokens.push({type:"text",text:E[0]});continue}if(t){throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}}return this.tokens};var e={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:d,text:/^[\s\S]+?(?=[\\<!\[`*]|\b_| {2,}\n|$)/};e._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;e._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;e._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;e.autolink=l(e.autolink).replace("scheme",e._scheme).replace("email",e._email).getRegex();e._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;e.tag=l(e.tag).replace("comment",h._comment).replace("attribute",e._attribute).getRegex();e._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/;e._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/;e._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;e.link=l(e.link).replace("label",e._label).replace("href",e._href).replace("title",e._title).getRegex();e.reflink=l(e.reflink).replace("label",e._label).getRegex();e.normal=f({},e);e.pedantic=f({},e.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:l(/^!?\[(label)\]\((.*?)\)/).replace("label",e._label).getRegex(),reflink:l(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",e._label).getRegex()});e.gfm=f({},e.normal,{escape:l(e.escape).replace("])","~|])").getRegex(),url:l(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",e._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(e.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()});e.breaks=f({},e.gfm,{br:l(e.br).replace("{2,}","*").getRegex(),text:l(e.gfm.text).replace("{2,}","*").getRegex()});function p(s,t){this.options=t||k.defaults;this.links=s;this.rules=e.normal;this.renderer=this.options.renderer||new o();this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.pedantic){this.rules=e.pedantic}else{if(this.options.gfm){if(this.options.breaks){this.rules=e.breaks}else{this.rules=e.gfm}}}}p.rules=e;p.output=function(v,s,t){var u=new p(s,t);return u.output(v)};p.prototype.output=function(y){var t="",v,x,s,w,u;while(y){if(u=this.rules.escape.exec(y)){y=y.substring(u[0].length);t+=u[1];continue}if(u=this.rules.autolink.exec(y)){y=y.substring(u[0].length);if(u[2]==="@"){x=m(this.mangle(u[1]));s="mailto:"+x}else{x=m(u[1]);s=x}t+=this.renderer.link(s,null,x);continue}if(!this.inLink&&(u=this.rules.url.exec(y))){u[0]=this.rules._backpedal.exec(u[0])[0];y=y.substring(u[0].length);if(u[2]==="@"){x=m(u[0]);s="mailto:"+x}else{x=m(u[0]);if(u[1]==="www."){s="http://"+x}else{s=x}}t+=this.renderer.link(s,null,x);continue}if(u=this.rules.tag.exec(y)){if(!this.inLink&&/^<a /i.test(u[0])){this.inLink=true}else{if(this.inLink&&/^<\/a>/i.test(u[0])){this.inLink=false}}y=y.substring(u[0].length);t+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(u[0]):m(u[0]):u[0];continue}if(u=this.rules.link.exec(y)){y=y.substring(u[0].length);this.inLink=true;s=u[2];if(this.options.pedantic){v=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);if(v){s=v[1];w=v[3]}else{w=""}}else{w=u[3]?u[3].slice(1,-1):""}s=s.trim().replace(/^<([\s\S]*)>$/,"$1");t+=this.outputLink(u,{href:p.escapes(s),title:p.escapes(w)});this.inLink=false;continue}if((u=this.rules.reflink.exec(y))||(u=this.rules.nolink.exec(y))){y=y.substring(u[0].length);v=(u[2]||u[1]).replace(/\s+/g," ");v=this.links[v.toLowerCase()];if(!v||!v.href){t+=u[0].charAt(0);y=u[0].substring(1)+y;continue}this.inLink=true;t+=this.outputLink(u,v);this.inLink=false;continue}if(u=this.rules.strong.exec(y)){y=y.substring(u[0].length);t+=this.renderer.strong(this.output(u[4]||u[3]||u[2]||u[1]));continue}if(u=this.rules.em.exec(y)){y=y.substring(u[0].length);t+=this.renderer.em(this.output(u[6]||u[5]||u[4]||u[3]||u[2]||u[1]));continue}if(u=this.rules.code.exec(y)){y=y.substring(u[0].length);t+=this.renderer.codespan(m(u[2].trim(),true));continue}if(u=this.rules.br.exec(y)){y=y.substring(u[0].length);t+=this.renderer.br();continue}if(u=this.rules.del.exec(y)){y=y.substring(u[0].length);t+=this.renderer.del(this.output(u[1]));continue}if(u=this.rules.text.exec(y)){y=y.substring(u[0].length);t+=this.renderer.text(m(this.smartypants(u[0])));continue}if(y){throw new Error("Infinite loop on byte: "+y.charCodeAt(0))}}return t};p.escapes=function(s){return s?s.replace(p.rules._escapes,"$1"):s};p.prototype.outputLink=function(t,u){var s=u.href,v=u.title?m(u.title):null;return t[0].charAt(0)!=="!"?this.renderer.link(s,v,this.output(t[1])):this.renderer.image(s,v,m(t[1]))};p.prototype.smartypants=function(s){if(!this.options.smartypants){return s}return s.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201c").replace(/"/g,"\u201d").replace(/\.{3}/g,"\u2026")};p.prototype.mangle=function(w){if(!this.options.mangle){return w}var t="",s=w.length,u=0,v;for(;u<s;u++){v=w.charCodeAt(u);if(Math.random()>0.5){v="x"+v.toString(16)}t+="&#"+v+";"}return t};function o(s){this.options=s||k.defaults}o.prototype.code=function(t,v,u){if(this.options.highlight){var s=this.options.highlight(t,v);if(s!=null&&s!==t){u=true;t=s}}if(!v){return"<pre><code>"+(u?t:m(t,true))+"</code></pre>"}return'<pre><code class="'+this.options.langPrefix+m(v,true)+'">'+(u?t:m(t,true))+"</code></pre>\n"};o.prototype.blockquote=function(s){return"<blockquote>\n"+s+"</blockquote>\n"};o.prototype.html=function(s){return s};o.prototype.heading=function(t,u,s){if(this.options.headerIds){return"<h"+u+' id="'+this.options.headerPrefix+s.toLowerCase().replace(/[^\w]+/g,"-")+'">'+t+"</h"+u+">\n"}return"<h"+u+">"+t+"</h"+u+">\n"};o.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"};o.prototype.list=function(s,t,w){var u=t?"ol":"ul",v=(t&&w!==1)?(' start="'+w+'"'):"";return"<"+u+v+">\n"+s+"</"+u+">\n"};o.prototype.listitem=function(s){return"<li>"+s+"</li>\n"};o.prototype.checkbox=function(s){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "};o.prototype.paragraph=function(s){return"<p>"+s+"</p>\n"};o.prototype.table=function(t,s){if(s){s="<tbody>"+s+"</tbody>"}return"<table>\n<thead>\n"+t+"</thead>\n"+s+"</table>\n"};o.prototype.tablerow=function(s){return"<tr>\n"+s+"</tr>\n"};o.prototype.tablecell=function(v,t){var u=t.header?"th":"td";var s=t.align?"<"+u+' align="'+t.align+'">':"<"+u+">";return s+v+"</"+u+">\n"};o.prototype.strong=function(s){return"<strong>"+s+"</strong>"};o.prototype.em=function(s){return"<em>"+s+"</em>"};o.prototype.codespan=function(s){return"<code>"+s+"</code>"};o.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"};o.prototype.del=function(s){return"<del>"+s+"</del>"};o.prototype.link=function(s,x,w){if(this.options.sanitize){try{var u=decodeURIComponent(i(s)).replace(/[^\w:]/g,"").toLowerCase()}catch(v){return w}if(u.indexOf("javascript:")===0||u.indexOf("vbscript:")===0||u.indexOf("data:")===0){return w}}if(this.options.baseUrl&&!r.test(s)){s=b(this.options.baseUrl,s)}try{s=encodeURI(s).replace(/%25/g,"%")}catch(v){return w}var t='<a href="'+m(s)+'"';if(x){t+=' title="'+x+'"'}t+=">"+w+"</a>";return t};o.prototype.image=function(s,v,u){if(this.options.baseUrl&&!r.test(s)){s=b(this.options.baseUrl,s)}var t='<img src="'+s+'" alt="'+u+'"';if(v){t+=' title="'+v+'"'}t+=this.options.xhtml?"/>":">";return t};o.prototype.text=function(s){return s};function j(){}j.prototype.strong=j.prototype.em=j.prototype.codespan=j.prototype.del=j.prototype.text=function(s){return s};j.prototype.link=j.prototype.image=function(s,u,t){return""+t};j.prototype.br=function(){return""};function a(s){this.tokens=[];this.token=null;this.options=s||k.defaults;this.options.renderer=this.options.renderer||new o();this.renderer=this.options.renderer;this.renderer.options=this.options}a.parse=function(t,s){var u=new a(s);return u.parse(t)};a.prototype.parse=function(t){this.inline=new p(t.links,this.options);this.inlineText=new p(t.links,f({},this.options,{renderer:new j()}));this.tokens=t.reverse();var s="";while(this.next()){s+=this.tok()}return s};a.prototype.next=function(){return this.token=this.tokens.pop()};a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};a.prototype.parseText=function(){var s=this.token.text;while(this.peek().type==="text"){s+="\n"+this.next().text}return this.inline.output(s)};a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,i(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var z="",t="",w,x,s,v;s="";for(w=0;w<this.token.header.length;w++){s+=this.renderer.tablecell(this.inline.output(this.token.header[w]),{header:true,align:this.token.align[w]})}z+=this.renderer.tablerow(s);for(w=0;w<this.token.cells.length;w++){x=this.token.cells[w];s="";for(v=0;v<x.length;v++){s+=this.renderer.tablecell(this.inline.output(x[v]),{header:false,align:this.token.align[v]})}t+=this.renderer.tablerow(s)}return this.renderer.table(z,t);case"blockquote_start":t="";while(this.next().type!=="blockquote_end"){t+=this.tok()}return this.renderer.blockquote(t);case"list_start":t="";var u=this.token.ordered,y=this.token.start;while(this.next().type!=="list_end"){t+=this.tok()}return this.renderer.list(t,u,y);case"list_item_start":t="";if(this.token.task){t+=this.renderer.checkbox(this.token.checked)}while(this.next().type!=="list_item_end"){t+=this.token.type==="text"?this.parseText():this.tok()}return this.renderer.listitem(t);case"loose_item_start":t="";while(this.next().type!=="list_item_end"){t+=this.tok()}return this.renderer.listitem(t);case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}};function m(s,t){return s.replace(!t?/&(?!#?\w+;)/g:/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(s){return s.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,function(t,u){u=u.toLowerCase();if(u==="colon"){return":"}if(u.charAt(0)==="#"){return u.charAt(1)==="x"?String.fromCharCode(parseInt(u.substring(2),16)):String.fromCharCode(+u.substring(1))}return""})}function l(t,s){t=t.source||t;s=s||"";return{replace:function(u,v){v=v.source||v;v=v.replace(/(^|[^\[])\^/g,"$1");t=t.replace(u,v);return this},getRegex:function(){return new RegExp(t,s)}}}function b(t,s){if(!c[" "+t]){if(/^[^:]+:\/*[^/]*$/.test(t)){c[" "+t]=t+"/"}else{c[" "+t]=t.replace(/[^/]*$/,"")}}t=c[" "+t];if(s.slice(0,2)==="//"){return t.replace(/:[\s\S]*/,":")+s}else{if(s.charAt(0)==="/"){return t.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+s}else{return t+s}}}var c={};var r=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(){}d.exec=d;function f(v){var t=1,u,s;for(;t<arguments.length;t++){u=arguments[t];for(s in u){if(Object.prototype.hasOwnProperty.call(u,s)){v[s]=u[s]}}}return v}function q(s,v){var t=s.replace(/([^\\])\|/g,"$1 |").split(/ +\| */),u=0;if(t.length>v){t.splice(v)}else{while(t.length<v){t.push("")}}for(;u<t.length;u++){t[u]=t[u].replace(/\\\|/g,"|")}return t}function k(s,u,A){if(typeof s==="undefined"||s===null){throw new Error("marked(): input parameter is undefined or null")}if(typeof s!=="string"){throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(s)+", string expected")}if(A||typeof u==="function"){if(!A){A=u;u=null}u=f({},k.defaults,u||{});var v=u.highlight,z,t,x=0;try{z=g.lex(s,u)}catch(y){return A(y)}t=z.length;var w=function(C){if(C){u.highlight=v;return A(C)}var B;try{B=a.parse(z,u)}catch(D){C=D}u.highlight=v;return C?A(C):A(null,B)};if(!v||v.length<3){return w()}delete u.highlight;if(!t){return w()}for(;x<z.length;x++){(function(B){if(B.type!=="code"){return --t||w()}return v(B.text,B.lang,function(D,C){if(D){return w(D)}if(C==null||C===B.text){return --t||w()}B.text=C;B.escaped=true;--t||w()})})(z[x])}return}try{if(u){u=f({},k.defaults,u)}return a.parse(g.lex(s,u),u)}catch(y){y.message+="\nPlease report this to https://github.com/markedjs/marked.";if((u||k.defaults).silent){return"<p>An error occurred:</p><pre>"+m(y.message+"",true)+"</pre>"}throw y}}k.options=k.setOptions=function(s){f(k.defaults,s);return k};k.getDefaults=function(){return{baseUrl:null,breaks:false,gfm:true,headerIds:true,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:true,pedantic:false,renderer:new o(),sanitize:false,sanitizer:null,silent:false,smartLists:false,smartypants:false,tables:true,xhtml:false}};k.defaults=k.getDefaults();k.Parser=a;k.parser=a.parse;k.Renderer=o;k.TextRenderer=j;k.Lexer=g;k.lexer=g.lex;k.InlineLexer=p;k.inlineLexer=p.output;k.parse=k;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=k}else{if(typeof define==="function"&&define.amd){define(function(){return k})}else{n.marked=k}}})(this||(typeof window!=="undefined"?window:global));</script>
<script>var Id2Web={version:"0.8α",defaultParams:{id:"",autoplay:(window.self===window.top),layout:"auto",direct:false,file:"",ws:""},extensions:{markdown:["md","md.txt"],bbcode:["bbc","bbcode","bbc.txt","bbcode.txt"],image:["png","jpg","jpeg","gif","svg"],pre:["ascii","txt","js","css","vtt","srt","csv"],video:["mp4","webm","ogv","mkv"],subtitles:["vtt","srt"],audio:["ogg","mp3","wav"],iframe:["pdf"],html:["html","htm"],primary:["htm","html","mp4","webm","ogv","pdf"],order:["png","jpg","jpeg","gif","svg","mp4","webm","ogv","mkv","ogg","mp3","wav","vtt"]},instanceId:parseInt(Math.random()*10000),lang:{},client:null,params:null,library:null,graph:null,speedDownLast:0,speedDownTime:0,speedUpLast:0,speedUpTime:0,playTime:0,poolTime:0,fetchMethods:{},animationSpeed:500,pendingDomTrack:[],domTooltip:null,start:function(){console.log("search-id ("+Id2Web.instanceId+"): Version "+Id2Web.version);this.params=this.getParamsFromUrl(Id2Web.defaultParams);console.log("search-id ("+Id2Web.instanceId+"): Options",this.params);Id2Web.library=JSON.parse(localStorage.getItem("library"));if(!Id2Web.library){Id2Web.library={}}Id2Web.client=new WebTorrent();if(this.params.id==""){this.params.id=this.home}this.params.id=this.params.id;$("#main-open").fadeIn();$("#main-area").hide();$("#nav .home").attr("data-tooltip",Id2Web.getLang("tooltip.home"));$("#nav .home").click(function(){Id2Web.params.id=Id2Web.home;Id2Web.updateUI();Id2Web.play()});$("#nav .add").attr("data-tooltip",Id2Web.getLang("tooltip.add"));$("#nav .add").click(function(){$("#files-upload").click()});$("#nav .search").attr("data-tooltip",Id2Web.getLang("tooltip.search"));$("#nav .search").click(function(){var a=$("#nav input").val();Id2Web.params.id=a;Id2Web.updateUI();Id2Web.play()});$("#nav input").keypress(function(a){if(a.which==13){a.preventDefault();$("#nav .search").trigger("click")}});$("#nav input").attr("placeholder",Id2Web.home);$("#download").attr("data-tooltip",Id2Web.getLang("tooltip.download"));$("#upload").attr("data-tooltip",Id2Web.getLang("tooltip.upload"));$("#peers").hide();$("#peers-button").attr("data-tooltip",Id2Web.getLang("tooltip.peers"));$("#peers-button").click(function(b){var a=Id2Web.torrentGetCurrent();if((a===null)||($("#peers").is(":visible"))){Id2Web.peersGraphHide()}else{Id2Web.peersGraphShow()}});$("#library").hide();$("#library-button").attr("data-tooltip",Id2Web.getLang("tooltip.library"));$("#library-button").text(Id2Web.getLang("tooltip.library"));$("#library-welcome").text(Id2Web.getLang("library.welcome"));$("#library-button").click(function(d){if($("#library-items").children().length>0){$("#library").slideUp(Id2Web.animationSpeed,function(){$("#library-items").empty()})}else{for(var a in Id2Web.library){var b=$("<div>");b.addClass("library-item");var c=$("<iframe>");c.css("width","768px");c.css("height","432px");c.attr("src",window.location.href.split("?")[0]+"?id="+a+"&autoplay=true");b.append(c);var f=$("<div>");f.text(Id2Web.getLang("library.remove"));f.addClass("library-remove");f.click(function(){$(this).parent().slideUp(Id2Web.animationSpeed,function(){$(this).remove();delete Id2Web.library[a];Id2Web.librarySave()})});b.append(f);$("#library-items").append(b)}$("#library").slideDown(Id2Web.animationSpeed)}});$("#layout-auto").attr("data-tooltip",Id2Web.getLang("tooltip.layout.auto"));$("#layout-auto").click(function(a){if($(this).hasClass("disabled")){return}Id2Web.params.layout="auto";Id2Web.updateUI();Id2Web.changeView()});$("#layout-list").attr("data-tooltip",Id2Web.getLang("tooltip.layout.list"));$("#layout-list").click(function(a){if($(this).hasClass("disabled")){return}Id2Web.params.layout="list";Id2Web.updateUI();Id2Web.changeView()});$("#layout-binary").attr("data-tooltip",Id2Web.getLang("tooltip.layout.binary"));$("#layout-binary").click(function(a){if($(this).hasClass("disabled")){return}Id2Web.params.layout="binary";Id2Web.updateUI();Id2Web.changeView()});$("#layout-none").attr("data-tooltip",Id2Web.getLang("tooltip.layout.none"));$("#layout-none").click(function(a){if($(this).hasClass("disabled")){return}Id2Web.params.layout="none";Id2Web.updateUI();Id2Web.changeView()});$("#share-www").attr("data-tooltip",Id2Web.getLang("tooltip.share.www"));$("#share-www").addClass("copy-to-clipboard");$("#share-html").attr("data-tooltip",Id2Web.getLang("tooltip.share.html"));$("#share-html").addClass("copy-to-clipboard");$("#share-magnet").attr("data-tooltip",Id2Web.getLang("tooltip.share.magnet"));$("#share-magnet").addClass("copy-to-clipboard");$("#share-torrent").attr("data-tooltip",Id2Web.getLang("tooltip.share.torrent"));$(".copy-to-clipboard").click(function(b){if($(this).hasClass("disabled")){return}var a=$(this).data("copy-text");prompt("Copy to clipboard",a)});$("#files-upload").hide();$("#files-upload").change(function(c){c.preventDefault();var a=document.getElementById("files-upload");if(a.files.length==0){return}for(var b=0;b<a.files.length;b++){if(a.files[b].size>Id2Web.fileSizeLimit){alert(Id2Web.getLang("file.too-big",a.files[b].name,Id2Web.bytesToStr(Id2Web.fileSizeLimit,true)));return}}Id2Web.play(a.files)});$("#menu").click(function(){$("#main-area").fadeToggle();Id2Web.peersGraphHide()});$("#play").click(function(){Id2Web.play()});$("#version").text(Id2Web.version);if(Id2Web.isFrameMode()){$("#nav").hide();$("#library-button").hide()}Id2Web.initDom($("#main-area"));$("body").css("padding",0);$("body").css("margin",0);$("body").css("font-family","Helvetica");Id2Web.resetUI();setInterval(function(){Id2Web.updateUI2()},1000);Id2Web.updateUI();if(Id2Web.params.autoplay){Id2Web.play()}else{$("#play").fadeIn()}},resetUI:function(){Id2Web.playTime=0;Id2Web.poolTime=0;$("#download").text("Download: -");$("#download").css("opacity",0.2);$("#download").css("background-size","1.6em 1.6em, 0% 100%");$("#upload").text("Upload: -");$("#upload").css("opacity",0.2);$("#peers-button").text(Id2Web.getLang("stats.peers","?"));$("#peers-button").css("opacity",0.2);$("#files").empty();$("#share-magnet").addClass("disabled");$("#share-torrent").addClass("disabled");$("#share-torrent").attr("href","#");$("#layout-auto").addClass("disabled");$("#layout-list").addClass("disabled");$("#layout-binary").addClass("disabled");$("#layout-none").addClass("disabled")},updateUI:function(){if(Id2Web.params.id==Id2Web.home){$("#nav input").val("")}else{$("#nav input").val(Id2Web.params.id)}var a=Id2Web.buildUrl();window.history.pushState(null,null,a);$("#share-www").data("copy-text",a);var b='<iframe src="'+Id2Web.buildUrl({autoplay:false})+'"></iframe>';$("#share-html").data("copy-text",b);this.updateUI2()},updateUI2:function(){var l=Id2Web.torrentGetCurrent();if(Id2Web.playTime==0){Id2Web.changeStatus(Id2Web.getLang("status.waiting"));Id2Web.statusColor("white")}if(l==null){}else{var b=(new Date()).getTime();$("#peers-button").text(Id2Web.getLang("stats.peers",l.numPeers));$("#peers-button").css("opacity","");if(l.uploaded!=0){var j=0;if(Id2Web.speedUpTime!=0){j=(l.uploaded-Id2Web.speedUpLast)/(b-Id2Web.speedUpTime)*1000}Id2Web.speedUpTime=b;Id2Web.speedUpLast=l.uploaded;$("#upload").text(Id2Web.getLang("stats.upload",Id2Web.bytesToStr(l.uploaded,true),Id2Web.bytesToStr(j,false)+"/s"));$("#upload").css("opacity","")}if(l.downloaded==0){if((Id2Web.playTime!=0)&&(Id2Web.poolTime==0)){var a=(new Date()).getTime()-Id2Web.playTime;if(a>20000){Id2Web.poolNotification()}}}else{if(l.done==false){var i=0;if(Id2Web.speedDownTime!=0){i=(l.downloaded-Id2Web.speedDownLast)/(b-Id2Web.speedDownTime)*1000}Id2Web.speedDownTime=b;Id2Web.speedDownLast=l.downloaded;$("#download").text(Id2Web.getLang("stats.download",Id2Web.bytesToStr(l.downloaded,true),Id2Web.bytesToStr(l.length,true),Id2Web.bytesToStr(i,false)+"/s"));$("#download").css("opacity","");var d=(100*l.progress).toFixed(1)+"%";Id2Web.changeStatus(Id2Web.getLang("status.download",d,Id2Web.millisecondsToStr(l.timeRemaining)));Id2Web.statusColor("yellow");$("#download").css("background-size","1.6em 1.6em, "+d+" 100%")}else{$("#download-progress").css("width",$("#download").width());$("#download").text("Downloaded:"+Id2Web.bytesToStr(l.downloaded,true));$("#download").css("opacity","");$("#download").css("background-size","1.6em 1.6em, 100% 100%");Id2Web.changeStatus(Id2Web.getLang("status.seeding",l.numPeers));Id2Web.statusColor("green")}}if(l.files!=null){for(var g=0;g<l.files.length;g++){var c=l.files[g];var e=$(".file[data-name='"+Id2Web.hashString(c.name)+"']");e.data("file",c);e.each(function(n){var f=$(this);var m=f.data("file");if(m.done){if(f.hasClass("file-done")==false){f.removeClass("file-pending");f.addClass("file-done");domFileOpen=f.find(".file-open");domFileOpen.removeClass("disabled");domFileOpen.data("file",m);domFileOpen.click(function(){Id2Web.fileOpenInNewTab($(this).data("file"))});domFileSave=f.find(".file-save");domFileSave.removeClass("disabled");domFileSave.data("file",m);domFileSave.click(function(){Id2Web.fileDownload($(this).data("file"))})}}else{if(f.hasClass("file-pending")==false){f.addClass("file-pending")}}})}}if(Id2Web.pendingDomTrack.length>0){var h=$("#viewer .item>video");if(h.length>0){h.attr("crossorigin","anonymous");for(var k=0;k<Id2Web.pendingDomTrack.length;k++){h.append(Id2Web.pendingDomTrack[k])}Id2Web.pendingDomTrack=[]}}}},librarySave:function(){localStorage.setItem("library",JSON.stringify(Id2Web.library))},resizeIframe:function(){},updateUiMagnetLink:function(a){$("#share-magnet").removeClass("disabled");$("#share-magnet").data("copy-text",a)},updateUiTorrentLink:function(a){if(a.files.length==0){return}Id2Web.updateUI2();$("#share-torrent").removeClass("disabled");$("#share-torrent").attr("href",a.torrentFileBlobURL);$("#share-torrent").attr("download",a.name+".torrent");Id2Web.poolNotification()},poolNotification:function(){if(Id2Web.pools.length==0){return}var c=Id2Web.torrentGetCurrent();if(c==null){return}Id2Web.poolTime=(new Date()).getTime();for(var d=0;d<Id2Web.pools.length;d++){var a=Id2Web.pools[d].url;var b={act:"request",key:Id2Web.pools[d].key,hash:c.infoHash};Id2Web.log(Id2Web.getLang("steps.notify.title"),Id2Web.getLang("steps.notify.subtitle",a));$.ajax({dataType:"json",url:a,data:b,success:function(g){if(g.result=="blacklist"){Id2Web.log(Id2Web.getLang("pool.blacklisted",a))}else{if((g.result=="miss-id")||(g.result=="miss-torrent")){if((g.result=="miss-torrent")&&(c.files.length==0)){return}if(c.files.length!=0){Id2Web.log(Id2Web.getLang("pool.uploading.torrent",a))}else{Id2Web.log(Id2Web.getLang("pool.uploading.magnet",a))}var f=new FormData();f.append("act","set-torrent");f.append("key",b.key);f.append("magnet",c.magnetURI);if(c.files.length!=0){var e=new Blob([c.torrentFile],{type:"application/octet-stream"});f.append("torrent",e)}f.append("hash",b.hash);$.ajax({type:"POST",url:a,data:f,contentType:false,processData:false,cache:false,success:function(h){if(h.result=="ok"){Id2Web.log(Id2Web.getLang("pool.uploaded",a))}},error:function(h,j,i){Id2Web.log("Request failed: "+j)}})}}}})}},buildUrl:function(g){var d={};var c=0;var f=$.extend({},Id2Web.params);if(g!=null){f=$.extend(f,g)}for(var b in f){if((b=="id")&&(f.id==Id2Web.home)){continue}if(f[b]!=Id2Web.defaultParams[b]){c++;d[b]=f[b]}}var e=window.location.href.split("?")[0];if(c>0){e+="?";var a=0;for(var b in d){if(a>0){e+="&"}if((b=="id")&&(c==1)){e+=encodeURIComponent(f.id)}else{e+=encodeURIComponent(b)+"="+encodeURIComponent(d[b])}a++}}return e},statusColor:function(b){var a=b;if(a=="yellow"){a="#d2d252"}else{if(a=="white"){a="#888888"}}shadow=a;$("#main-area").css("border-left","1em solid "+a);$("#main-area").css("box-shadow","0 6px 26px 0 "+shadow);if((b=="green")||(b=="white")){$("body").css("border-top","0px solid "+a)}else{$("body").css("border-top","10px solid "+a)}var c=document.querySelector("meta[name=theme-color]");c.setAttribute("content",b)},changeStatus:function(a){$("#status").text(a);Id2Web.setDocumentTitle(a)},message:function(c,b){$(".message").each(function(e){if(("dismiss" in $(this).data())==false){$(this).data("dismiss",true);$(this).animate({opacity:0,top:"-=1em"},1000,function(){$(this).remove()})}});if(c!=""){var d="UI Message:"+c;if(b!=""){d+=", subtitle:"+b}Id2Web.log(d);var a=$("<div></div>");a.hide();a.addClass("message");$("body").append(a);a.html(c+"<div class='subtitle'>"+b+"</div>");a.fadeIn();Id2Web.setDocumentTitle(c)}},setDocumentTitle:function(a){document.title=a+" - search-id"},torrentsClear:function(){Id2Web.client.torrents.forEach(function(a){Id2Web.client.remove(a.infoHash)})},play:function(a){$("#play").fadeOut();$("#viewer").empty();Id2Web.torrentsClear();Id2Web.resetUI();Id2Web.playTime=(new Date()).getTime();Id2Web.updateUI2(null);if(a==null){Id2Web.changeStatus(Id2Web.getLang("status.searching"));Id2Web.statusColor("yellow");Id2Web.playData(this.params.id)}else{if((a.length==1)&&(Id2Web.matchExtension(a[0].name,["torrent"]))){Id2Web.changeStatus(Id2Web.getLang("status.searching"));Id2Web.statusColor("yellow");Id2Web.playTorrentFile(a[0])}else{Id2Web.changeStatus(Id2Web.getLang("status.upload"));Id2Web.statusColor("yellow");Id2Web.playFiles(a)}}},playData:function(b){Id2Web.log("Looking: "+b+" ("+b.length+" chars length)");if(/^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/.test(b)){this.fetchBitcoinCashInsightAddressData(b,"BCH blockchain","(via bitcoincash.blockexplorer.com)","https://bitcoincash.blockexplorer.com/api")}else{if(/^[a-z0-9]{64}$/.test(b.toLowerCase())){this.fetchBitcoinCashInsightTransactionData(b,"BCH blockchain","(via bitcoincash.blockexplorer.com)","https://bitcoincash.blockexplorer.com/api")}else{if(/^[a-fA-F0-9]{40}$/.test(b)){this.playInfoHash(b)}else{if(/(magnet\:\?[^\s]+)\b/.test(b)){var a=b.match(/(magnet\:\?[^\s]+)\b/i)[1];this.playMagnet(a)}else{Id2Web.message("Unknown address","<pre>"+b+"</pre>");Id2Web.changeStatus(Id2Web.getLang("status.404"));Id2Web.statusColor("red")}}}}},torrentGetCurrent:function(){if(Id2Web.client.torrents.length==0){return null}else{return Id2Web.client.torrents[0]}},playInfoHash:function(b){var a=Id2Web.buildMagnetLink(b);Id2Web.playMagnet(a)},playMagnet:function(b){Id2Web.updateUiMagnetLink(b);var a=Id2Web.adaptMagnet(b);var c=b.match(/btih\:([0-9a-f]+)/i)[1];console.log(b);Id2Web.message(Id2Web.getLang("steps.searching.title"),Id2Web.getLang("steps.searching.subtitle.id",c));Id2Web.client.add(a,Id2Web.processTorrent)},playTorrentFile:function(a){var b={announce:Id2Web.trackers.always};Id2Web.message(Id2Web.getLang("steps.searching.title"),Id2Web.getLang("steps.searching.subtitle"));Id2Web.client.add(a,b,function(c){Id2Web.params.id=c.infoHash;Id2Web.updateUI();var d=Id2Web.buildMagnetLink(c.infoHash);Id2Web.updateUiMagnetLink(d);Id2Web.processTorrent(c)})},playFiles:function(a){Id2Web.seed(a)},playFetchHttpTest:function(){Id2Web.playFetchHttp("https://search-id.org/testhtml.html","test.html")},playFetchHttp:function(b,a){var c=new XMLHttpRequest();c.open("GET",b,true);c.responseType="blob";c.onload=function(e){var g=c.response;if(g){var d=new Uint8Array(g);var h=new File(d,"x.html");Id2Web.seed(h)}};c.send(null)},seed:function(b){Id2Web.torrentsClear();var a={announce:Id2Web.trackers.always};Id2Web.message(Id2Web.getLang("status.upload"),Id2Web.getLang("stats.upload.subtitle"));Id2Web.client.seed(b,a,function(c){Id2Web.params.id=c.infoHash;Id2Web.updateUI();var d=Id2Web.buildMagnetLink(c.infoHash);Id2Web.updateUiMagnetLink(d);Id2Web.processTorrent(c);Id2Web.updateUiTorrentLink(c);Id2Web.onComplete()})},buildMagnetLink:function(b){var a="magnet:?xt=urn:btih:"+b;return Id2Web.adaptMagnet(a)},adaptMagnet:function(o){var h=o.match(/btih\:([0-9a-f]+)/i)[1];if(h==""){return""}var g=[];var j=o.substring(o.indexOf("?")+1);var q=j.split("&");for(var b=0;b<q.length;b++){var l=q[b];if(l.indexOf("=")==-1){continue}var e={};var f=l.substring(0,l.indexOf("="));var n=decodeURIComponent(l.substring(l.indexOf("=")+1));if(f=="xt"){continue}if(f=="dn"){continue}if((f=="tr")&&(Id2Web.trackers.blacklist.includes(n))){continue}e.name=f;e.value=n;g.push(e)}var d="magnet:?xt=urn:btih:"+h;for(var r=0;r<Id2Web.trackers.always.length;r++){d+="&tr="+encodeURIComponent(Id2Web.trackers.always[r])}for(var b=0;b<g.length;b++){d+="&"+g[b].name+"="+encodeURIComponent(g[b].value)}for(var b=0;b<Id2Web.pools.length;b++){var a=Id2Web.pools[b].url;var c=a+"/files/"+h+"/"+h+".torrent";d+="&xs="+encodeURIComponent(c);var i=a+"/files/"+h+"/"}return d},processTorrent:function(a){a.on("warning",function(b){Id2Web.log("WebTorrent Warning: "+b)});a.on("error",function(b){Id2Web.log("WebTorrent Error: "+b)});a.on("done",function(){Id2Web.downloadDone(a)});a.on("wire",Id2Web.onWire);Id2Web.processView()},processView:function(){var j=Id2Web.torrentGetCurrent();Id2Web.updateUI2();$("#files").empty();for(var h=0;h<j.files.length;h++){var d=j.files[h];if(j.files.length==1){for(var b=0;b<Id2Web.pools.length;b++){var a=Id2Web.pools[b].url;var i=a+"/files/"+j.infoHash+"/"+d.name;j.addWebSeed(i)}}var e=$("<div class='file'>");e.attr("data-name",Id2Web.hashString(d.name));e.text(Id2Web.getLang("file.stats",d.name,Id2Web.bytesToStr(d.length)));$("#files").append(e);var c=$("<a href='#' class='file-open hover-effect disabled tooltip-bottom'></a>");c.attr("data-tooltip",Id2Web.getLang("tooltip.file-open"));e.append(c);var g=$("<a href='#' class='file-save hover-effect disabled tooltip-bottom'></a>");g.attr("data-tooltip",Id2Web.getLang("tooltip.file-save"));e.append(g);Id2Web.initDom(e)}Id2Web.changeView()},changeView:function(){$("#viewer").empty();$("#viewer").removeClass("viewer-primary");for(var o=0;o<Id2Web.pendingDomTrack.length;o++){Id2Web.pendingDomTrack[o].remove()}Id2Web.pendingDomTrack=[];var p=Id2Web.torrentGetCurrent();var k=Id2Web.params.layout;var b=[];var c=0;var d="";var g=false;var m=null;for(var l=0;l<p.files.length;l++){var e=p.files[l];b.push(e);if(p.files.length==1){isPrimary=true}if(Id2Web.matchExtension(e.name,Id2Web.extensions.primary)!=""){if(d==""){d=e.name}c++}}if(c>1){d=""}if(p.files.length==1){d=p.files[0].name}b.sort(function(s,q){var u=s.name.substr(0,s.name.lastIndexOf(".")).toLowerCase();var t=q.name.substr(0,q.name.lastIndexOf(".")).toLowerCase();var w=s.name.substr(s.name.lastIndexOf(".")+1).toLowerCase();var v=q.name.substr(q.name.lastIndexOf(".")+1).toLowerCase();var r=Id2Web.extensions.order.indexOf(w);var f=Id2Web.extensions.order.indexOf(v);if((u=="readme")||(u=="index")){r=0}if((t=="readme")||(t=="index")){f=0}if(r==-1){r=99999}if(f==-1){f=99999}if(r==f){return(s.name==q.name?0:(s.name>q.name?1:-1))}else{return r>f?1:-1}});if(d!=""){$("#layout-auto").removeClass("disabled")}if((k=="auto")&&(d=="")){k="list"}if(Id2Web.params.layout=="list"){d=""}if(Id2Web.params.layout=="binary"){d=""}$("#layout-list").removeClass("disabled");$("#layout-binary").removeClass("disabled");$("#layout-none").removeClass("disabled");$("#layout-auto").removeClass("current");$("#layout-list").removeClass("current");$("#layout-binary").removeClass("current");$("#layout-none").removeClass("current");$("#layout-"+k).addClass("current");$("#viewer").attr("data-layout",k);if(d!=""){Id2Web.setDocumentTitle(d)}else{Id2Web.setDocumentTitle(Id2Web.getLang("files.multiple"))}if(k!="none"){Id2Web.message(Id2Web.getLang("steps.render.title"),Id2Web.getLang("steps.render.subtitle"));if(k=="auto"){$("#viewer").addClass("viewer-primary")}for(var l=0;l<b.length;l++){var e=b[l];var j=Id2Web.matchExtension(e.name,Id2Web.extensions.subtitles);if(j!=""){var n=function(s,q){if(s){Id2Web.log(s)}else{var f=$("<track>");f.attr("label",arguments.callee.file.name);f.attr("kind","subtitles");var r=q.toString();if(arguments.callee.ext=="srt"){r=Id2Web.srt2webvtt(r)}f.attr("src","data:text/vtt,"+encodeURIComponent(r));Id2Web.pendingDomTrack.push(f)}};n.ext=j;n.file=e;e.getBuffer(n)}if((d!="")&&(e.name!=d)){continue}if(k=="binary"){$("#viewer").append(Id2Web.buildFileContentBinary(b[l]))}else{if(k=="auto"){var a=Id2Web.buildFileContent(b[l]);$("#viewer").append(a);if(a.data("show-wait")){$("#viewer").append("<div class='wait'></div>")}}else{var i=$("<div class='itemrow'></div>");var h=$("<div class='title'></div>");h.text(e.name);i.append(h);$("#viewer").append(i);var a=Id2Web.buildFileContent(b[l]);i.append(a);if(a.data("show-wait")){i.append("<div class='wait'></div>")}}}}}Id2Web.message("","")},buildFileContent:function(a){var d=a.name.toLowerCase();var c=a.name.substr(a.name.lastIndexOf(".")+1).toLowerCase();if(Id2Web.matchExtension(a.name,Id2Web.extensions.markdown)!=""){var b=$("<div class='item'>");b.data("show-wait",true);a.getBuffer(function(g,f){if(g){Id2Web.log(g)}else{var e=$("<div class='markdown'></div>");var h=f.toString();e.html(marked(h));b.empty();b.append(e);b.parent().children(".wait").remove()}});return b}else{if(Id2Web.matchExtension(a.name,Id2Web.extensions.bbcode)!=""){var b=$("<div class='item'>");b.data("show-wait",true);a.getBuffer(function(g,e){if(g){Id2Web.log(g)}else{var f=$("<div class='bbcode'></div>");var h=e.toString();f.html(Id2Web.bbToHtml(h));b.empty();b.append(f);b.parent().children(".wait").remove()}});return b}else{if(Id2Web.matchExtension(a.name,Id2Web.extensions.image)!=""){var b=$("<div class='item'>");b.data("show-wait",true);a.getBlobURL(function(f,e){if(f){Id2Web.log(f)}else{var g=$("<img>");g.attr("title",a.name);g.attr("alt",a.name);g.attr("src",e);b.empty();b.append(g);b.parent().children(".wait").remove()}});return b}else{if(Id2Web.matchExtension(a.name,Id2Web.extensions.pre)!=""){var b=$("<div class='item'>");b.data("show-wait",true);a.getBuffer(function(g,e){if(g){Id2Web.log(g)}else{var f=$("<pre></pre>");f.text(e);b.empty();b.append(f);b.parent().children(".wait").remove()}});return b}else{if((Id2Web.matchExtension(a.name,Id2Web.extensions.video)!="")||(Id2Web.matchExtension(a.name,Id2Web.extensions.audio)!="")||(Id2Web.matchExtension(a.name,Id2Web.extensions.iframe)!="")){var b=$("<div class='item'>");a.appendTo(b.get(0),{maxBlobLength:2*1000*1000*1000},function(f,e){if(f){Id2Web.log(f)}});return b}else{if(Id2Web.matchExtension(a.name,Id2Web.extensions.html)!=""){var b=$("<div class='item'>");b.data("show-wait",true);a.getBuffer(function(f,i){if(f){Id2Web.log(f)}else{var j=i.toString();var g=document.createElement("iframe");b.empty();b.append($(g));b.parent().children(".wait").remove();g.contentWindow.document.open();g.contentWindow.document.write(j);g.contentWindow.document.close();var m=(g.contentDocument)?g.contentDocument:g.contentWindow.document;var k=m.getElementsByTagName("iframe");for(var l=0;l<k.length;l++){var h=k[l];var e=h.getAttribute("data-id");if(e!=null){h.src=window.location.href.split("?")[0]+"?id="+e+"&autoplay=false"}}Id2Web.renderNormalize($(m))}});return b}else{return Id2Web.buildFileContentBinary(a)}}}}}}},buildFileContentBinary:function(c){var b=$("<div class='file'>");b.attr("data-name",Id2Web.hashString(c.name));b.text(Id2Web.getLang("file.stats",c.name,Id2Web.bytesToStr(c.length)));$("#viewer").append(b);var d=$("<a href='#' class='file-open hover-effect disabled tooltip-bottom'></a>");d.attr("data-tooltip",Id2Web.getLang("tooltip.file-open"));b.append(d);d.data("file",c);d.click(function(){Id2Web.fileOpenInNewTab($(this).data("file"))});var a=$("<a href='#' class='file-save hover-effect disabled tooltip-bottom'></a>");a.attr("data-tooltip",Id2Web.getLang("tooltip.file-save"));b.append(a);a.data("file",c);a.click(function(){Id2Web.fileDownload($(this).data("file"))});return b},renderWait:function(b,a){b.append("<div class='wait'>"+a.name+"</div>")},renderNormalize:function(a){a.find("a").each(function(){var b=$(this).attr("href");var c=$(this).attr("target");if((c==null)&&(b!=null)&&(b!="#")){$(this).attr("target","_parent")}})},downloadDone:function(a){Id2Web.updateUiTorrentLink(a);Id2Web.updateUI2();Id2Web.onComplete()},onComplete:function(){var a=Id2Web.params.id;if(!Id2Web.library[a]){Id2Web.library[a]={ts:Math.floor(Date.now()/1000)};Id2Web.librarySave()}},onWire:function(a){if(Id2Web.graph!=null){var b=a.peerId.toString();Id2Web.graph.add({id:b,name:a.remoteAddress||"Unknown"});Id2Web.graph.connect("You",b);a.once("close",function(){if(Id2Web.graph!=null){Id2Web.graph.disconnect("You",b);Id2Web.graph.remove(b)}})}},peersGraphShow:function(){var c=Id2Web.torrentGetCurrent();if(c==null){return}var b=$("#peers");if(b.children().length==0){b.show();Id2Web.graph=new window.P2PGraph(b.get(0));Id2Web.graph.add({id:"You",name:"You",me:true});for(var a=0;a<c.wires.length;a++){Id2Web.onWire(c.wires[a])}}b.hide();b.slideDown(Id2Web.animationSpeed,function(){})},peersGraphHide:function(){$("#peers").slideUp(Id2Web.animationSpeed,function(){})},fileDownload:function(a){var b=function(e,d){if(e){Id2Web.log(e)}else{var c=$("<a style='display: none;'/>");c.attr("href",d);c.attr("download",arguments.callee.file.name);$("body").append(c);c[0].click();c.remove()}};b.file=a;a.getBlobURL(b)},fileOpenInNewTab:function(a){var b=function(e,d){if(e){Id2Web.log(e)}else{var c=$("<a style='display: none;'/>");c.attr("href",d);c.attr("target","_blank");$("body").append(c);c[0].click();c.remove()}};b.file=a;a.getBlobURL(b)},fetchBitcoinInsightTransactionData:function(a,d,c,e){Id2Web.message(Id2Web.getLang("steps.blockchain.title",d),Id2Web.getLang("steps.blockchain.subtitle",c,a));var b=e+"/tx/"+a;var f=new XMLHttpRequest();f.open("GET",b);f.onload=function(){if(f.status===200){var i=JSON.parse(f.responseText);if(i.vout!=null){for(var g=0;g<i.vout.length;g++){var h=i.vin[0].addr;var k=i.vout[g].scriptPubKey.asm;if(k.indexOf("OP_RETURN")!==-1){var i=k.split(" ").slice(-1)[0];i=Id2Web.hex2ascii(i);Id2Web.playData(i);return}}}}else{Id2Web.log("Request failed. Returned status of "+f.status)}};f.send()},fetchBitcoinInsightAddressData:function(a,d,c,e){Id2Web.message(Id2Web.getLang("steps.blockchain.title",d),Id2Web.getLang("steps.blockchain.subtitle",c,a));var b=e+"/txs/?address="+a;var f=new XMLHttpRequest();f.open("GET",b);f.onload=function(){if(f.status===200){var l=JSON.parse(f.responseText);for(var h=0;h<l.txs.length;h++){if(l.txs[h].vin.length>0&&l.txs[h].vin[0].addr===a){for(var g=0;g<l.txs[h].vout.length;g++){var k=l.txs[h].vin[0].addr;var m=l.txs[h].vout[g].scriptPubKey.asm;if(m.indexOf("OP_RETURN")!==-1){var l=m.split(" ").slice(-1)[0];Id2Web.playData(l);return}}}}}else{Id2Web.log("Request failed. Returned status of "+f.status)}};f.send()},fetchBitcoinCashInsightTransactionData:function(a,d,c,e){Id2Web.message(Id2Web.getLang("steps.blockchain.title",d),Id2Web.getLang("steps.blockchain.subtitle",c,a));var b=e+"/tx/"+a;var f=new XMLHttpRequest();f.open("GET",b);f.onload=function(){if(f.status===200){var i=JSON.parse(f.responseText);if(i.vout!=null){for(var g=0;g<i.vout.length;g++){var h=i.vin[0].addr;var k=i.vout[g].scriptPubKey.asm;if(k.indexOf("OP_RETURN")!==-1){var i=k.split(" ").slice(-1)[0];i=Id2Web.hex2ascii(i);Id2Web.playData(i);return}}}}else{Id2Web.log("Request failed. Returned status of "+f.status)}};f.send()},fetchBitcoinCashInsightAddressData:function(a,d,c,e){Id2Web.message(Id2Web.getLang("steps.blockchain.title",d),Id2Web.getLang("steps.blockchain.subtitle",c,a));var b=e+"/txs/?address="+a;var f=new XMLHttpRequest();f.open("GET",b);f.onload=function(){if(f.status===200){var l=JSON.parse(f.responseText);for(var h=0;h<l.txs.length;h++){if(l.txs[h].vin.length>0&&l.txs[h].vin[0].addr===bchaddr.toCashAddress(a)){for(var g=0;g<l.txs[h].vout.length;g++){var k=l.txs[h].vin[0].addr;var m=l.txs[h].vout[g].scriptPubKey.asm;if(m.indexOf("OP_RETURN")!==-1){var l=m.split(" ").slice(-1)[0];l=Id2Web.hex2ascii(l);Id2Web.playData(l);return}}}}}else{Id2Web.log("Request failed. Returned status of "+f.status)}};f.send()},isFrameMode:function(){var a=false;try{a=window.self!==window.top}catch(b){a=true}return a},initDom:function(a){a.find("*[data-tooltip]").each(function(){if(Id2Web.isFrameMode()===false){Id2Web.tooltipInit($(this))}})},tooltipInit:function(a){a.on("mouseenter focus",function(){var b="top";if(a.hasClass("tooltip-top")){b="top"}if(a.hasClass("tooltip-bottom")){b="bottom"}if(a.hasClass("tooltip-left")){b="left"}if(a.hasClass("tooltip-right")){b="right"}if(Id2Web.domTooltip===null){Id2Web.domTooltip=$("<div></div>");Id2Web.domTooltip.addClass("id2web_tooltip");Id2Web.domTooltip.attr("role","tooltip");Id2Web.domTooltip.append("<div class='id2web_tooltip_body'></div>");Id2Web.domTooltip.append("<div class='id2web_tooltip_arrow' data-popper-arrow></div>");$("body").append(Id2Web.domTooltip)}Id2Web.domTooltip.find(".id2web_tooltip_body").text($(this).attr("data-tooltip"));Id2Web.domTooltip.attr("data-show","");Id2Web.domTooltip.attr("data-popper-placement",b);Id2Web.domTooltipPopper=Popper.createPopper($(this).get(0),Id2Web.domTooltip.get(0),{placement:b,modifiers:[{name:"offset",options:{offset:[0,8]}}]})});a.on("mouseleave blur",function(){Id2Web.domTooltip.removeAttr("data-show");if(Id2Web.domTooltipPopper!==null){Id2Web.domTooltipPopper.destroy();Id2Web.domTooltipPopper=null}})},log:function(a){console.log("search-id ("+Id2Web.instanceId+"): "+a)},matchExtension:function(a,b){for(var c=0;c<b.length;c++){if(a.toLowerCase().endsWith("."+b[c].toLowerCase())){return b[c].toLowerCase()}}return""},getLang:function(f){var b="{"+f+"}";var d=[];for(var a=0;a<navigator.languages.length;a++){d.push(navigator.languages[a])}d.push("en");for(var a=0;a<d.length;a++){var c=d[a];if(c in Id2Web.lang){if(f in Id2Web.lang[c]){b=Id2Web.lang[c][f];break}}}for(var e=1;e<arguments.length;e++){b=b.replace("{"+e+"}",arguments[e])}return b},getParamsFromUrl:function(d){var a={};var c=location.search.substr(1);if(c.indexOf("=")==-1){a.id=decodeURIComponent(c)}else{if(c.startsWith("magnet")){a.id=c}else{c.split("&").forEach(function(e){var g=e.split("=");var f=g[0];var h=decodeURIComponent(g[1]);if(f=="autoplay"){h=(h=="true")}a[f]=h})}}for(var b in d){if(a.hasOwnProperty(b)==false){a[b]=d[b]}}return a},millisecondsToStr:function(c){if(isFinite(c)==false){return Id2Web.getLang("time.unknown")}var b=Math.floor(c/1000);var e=Math.floor(b/31536000);if(e){return e+" "+Id2Web.getLang("time.year")+" "+Id2Web.getLang("time.remain")}var g=Math.floor((b%=31536000)/86400);if(g){return g+" "+Id2Web.getLang("time.day")+" "+Id2Web.getLang("time.remain")}var a=Math.floor((b%=86400)/3600);if(a){return a+" "+Id2Web.getLang("time.hour")+" "+Id2Web.getLang("time.remain")}var d=Math.floor((b%=3600)/60);if(d){return d+" "+Id2Web.getLang("time.minute")+" "+Id2Web.getLang("time.remain")}var f=b%60;if(f){return f+" "+Id2Web.getLang("time.second")+" "+Id2Web.getLang("time.remain")}return""},bytesToStr:function(a,d){var e=d?1000:1024;if(Math.abs(a)<e){return a+" B"}var b=d?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];var c=-1;do{a/=e;++c}while(Math.abs(a)>=e&&c<b.length-1);return a.toFixed(1)+" "+b[c]},hex2ascii:function(b){var a=b.toString();var b="";for(var c=0;c<a.length;c+=2){b+=String.fromCharCode(parseInt(a.substr(c,2),16))}return b},htmlEncode:function(a){return $("<div/>").text(a).html()},htmlDecode:function(a){return $("<div/>").html(a).text()},hashString:function(a){return btoa(unescape(encodeURIComponent(a)))},bencodeDecode:function(a){},bbToHtml:function(b){var a=Id2Web.htmlEncode(b);a=a.replaceAll("\\[","[");a=a.replaceAll("\\]","]");a=a.replace(/\[code\]([\s\S]+?)\[\/code\]/g,function(c,e,f,d){return'<pre class="bbc_code">'+c.substring(6,c.length-7).replaceAll("[","[").replaceAll("]","]")+"</pre>"});a=a.replace(/\[nobr\]([\s\S]+?)\[\/nobr\]/g,function(c,e,f,d){return c.substring(6,c.length-7).replaceAll("\r"," ").replaceAll("\n"," ")});a=a.replace(/\[br\]/g,"<br>");a=a.replace(/\[hr\]/g,"<hr>");a=a.replace(/\[b\]/g,"<b>");a=a.replace(/\[\/b\]/g,"</b>");a=a.replace(/\[i\]/g,"<i>");a=a.replace(/\[\/i\]/g,"</i>");a=a.replace(/\[s\]/g,"<del>");a=a.replace(/\[\/s\]/g,"</del>");a=a.replace(/\[del\]/g,"<del>");a=a.replace(/\[\/del\]/g,"</del>");a=a.replace(/\[u\]/g,'<span class="bbc_underline">');a=a.replace(/\[\/u\]/g,"</span>");a=a.replace(/\[sub\]/g,"<sub>");a=a.replace(/\[\/sub\]/g,"</sub>");a=a.replace(/\[sup\]/g,"<sup>");a=a.replace(/\[\/sup\]/g,"</sup>");a=a.replace(/\[highlight\]/g,'<span class="bbc_highlight">');a=a.replace(/\[\/highlight\]/g,"</span>");a=a.replace(/\[left\]/g,'<div class="bbc_left">');a=a.replace(/\[\/left\]/g,"</div>");a=a.replace(/\[right\]/g,'<div class="bbc_right">');a=a.replace(/\[\/right\]/g,"</div>");a=a.replace(/\[center\]/g,'<div class="bbc_center">');a=a.replace(/\[\/center\]/g,"</div>");a=a.replace(/\[justify\]/g,'<div class="bbc_justify">');a=a.replace(/\[\/justify\]/g,"</div>");a=a.replace(/\[h([1-6])\]/g,"<h$1>");a=a.replace(/\[\/h([1-6])\]/g,"</h$1>");a=a.replace(/\[table=(.*?)\]/g,"<table style='width:$1' class=\"bbc_table\">");a=a.replace(/\[table\]/g,'<table class="bbc_table">');a=a.replace(/\[tr\]/g,"<tr>");a=a.replace(/\[\/tr\]/g,"</tr>");a=a.replace(/\[td\]/g,"<td>");a=a.replace(/\[\/td\]/g,"</td>");a=a.replace(/\[th\]/g,"<th>");a=a.replace(/\[\/th\]/g,"</th>");a=a.replace(/\[thead\]/g,"<thead>");a=a.replace(/\[\/thead\]/g,"</thead>");a=a.replace(/\[tbody\]/g,"<tbody>");a=a.replace(/\[\/tbody\]/g,"</tbody>");a=a.replace(/\[\/table\]/g,"</table>");a=a.replace(/\[color=(.*?)\](.*?)\[\/color\]/g,"<span style='color:$1'>$2</span>");a=a.replace(/\[size=([1-9])\](.*?)\[\/size\]/g,"<span style='font-size:$1em'>$2</span>");a=a.replace(/\[size=(.*?)\](.*?)\[\/size\]/g,"<span style='font-size:$1'>$2</span>");a=a.replace(/\[img=(.*?)\]/g,"<img src='$1'>");a=a.replace(/\[img\](.*?)\[\/img\]/g,"<img src='$1'>");a=a.replace(/\[url\](.*?)\[\/url\]/g,"<a target='_parent' href='$1'>$1</a>");a=a.replace(/\[url=(.*?)\](.*?)\[\/url\]/g,"<a target='_parent' href='$1'>$2</a>");a=a.replace(/\[ol\]/g,"<ol>");a=a.replace(/\[\/ol\]/g,"</ol>");a=a.replace(/\[ul\]/g,"<ul>");a=a.replace(/\[\/ul\]/g,"</ul>");a=a.replace(/\[li\]/g,"<li>");a=a.replace(/\[\/li\]/g,"</li>");a=a.replace(/\<ul\>\s+\<li\>/g,"<ul><li>");a=a.replace(/\<ol\>\s+\<li\>/g,"<ol><li>");a=a.replace(/\<\/li\>\s+\<li\>/g,"</li><li>");a=a.replace(/\<\/li\>\s+\<\/ul\>/g,"</li></ul>");a=a.replace(/\<\/li\>\s+\<\/ol\>/g,"</li></ol>");a=a.replace(/\>\s+\<tr\>/g,"><tr>");a=a.replace(/\<\/tr\>\s+\<tr\>/g,"</tr><tr>");a=a.replace(/\<\/tr\>\s+\<\/table\>/g,"</tr></table>");a=a.replace(/\<\/td\>\s+\<td\>/g,"</td><td>");a=a.replace(/\<\/th\>\s+\<td\>/g,"</th><td>");a=a.replace(/\<\/th\>\s+\<th\>/g,"</th><th>");a=a.replace(/\<\/td\>\s+\<\/tr\>/g,"</td></tr>");a=a.replace(/\<\/th\>\s+\<\/tr\>/g,"</th></tr>");a=a.replace(/\<tr\>\s+\<td\>/g,"<tr><td>");a=a.replace(/\n/g,"<br>");return a},srt2webvtt:function(d){var b=d.replace(/\r+/g,"");b=b.replace(/^\s+|\s+$/g,"");var e=b.split("\n\n");var a="";if(e.length>0){a+="WEBVTT\n\n";for(var c=0;c<e.length;c=c+1){a+=Id2Web.convertSrtCue(e[c])}}return a},convertSrtCue:function(d){var b="";var f=d.split(/\n/);while(f.length>3){for(var e=3;e<f.length;e++){f[2]+="\n"+f[e]}f.splice(3,f.length-3)}var c=0;if(!f[0].match(/\d+:\d+:\d+/)&&f[1].match(/\d+:\d+:\d+/)){b+=f[0].match(/\w+/)+"\n";c+=1}if(f[c].match(/\d+:\d+:\d+/)){var a=f[1].match(/(\d+):(\d+):(\d+)(?:,(\d+))?\s*--?>\s*(\d+):(\d+):(\d+)(?:,(\d+))?/);if(a){b+=a[1]+":"+a[2]+":"+a[3]+"."+a[4]+" --> "+a[5]+":"+a[6]+":"+a[7]+"."+a[8]+"\n";c+=1}else{return""}}else{return""}if(f[c]){b+=f[c]+"\n\n"}return b}};if(!String.prototype.replaceAll){String.prototype.replaceAll=function(a,b){var c=this;return c.split(a).join(b)}}if(!String.prototype.endsWith){String.prototype.endsWith=function(b,a){if(a===undefined||a>this.length){a=this.length}return this.substring(a-b.length,a)===b}};</script>
<script>Id2Web.lang.en={"status.waiting":"Waiting for start confirmation.","status.download":"Download: {1}, {2}","status.seeding":"Seeding, {1} nodes.","status.searching":"Searching in P2P network (might take several minutes) ...","status.upload":"Processing upload...","status.404":"Unknown ID, sorry.","steps.blockchain.title":"Looking in '{1}'","steps.blockchain.subtitle":"{1} about address {2}","steps.searching.title":"Searching in P2P network","steps.searching.subtitle.id":"this might take several minutes<br>infohash {1}","steps.searching.subtitle":"this might take several minutes","steps.render.title":"Building view","steps.render.subtitle":"","steps.notify.title":"Notification to pool","steps.notify.subtitle":"{1}","stats.download":"Download: {1} / {2} ({3})","stats.upload":"Upload: {1} ({2})","stats.upload.subtitle":"please wait, this might take several seconds","stats.peers":"Peers: {1}","files.multiple":"Multiple files","file.stats":"{1} ({2})","file.too-big":"The file {1} exceed the current limit of {2}, sorry.","library.remove":"Remove","library.welcome":"Keep open to share your library in this page. Currently, every content viewed is automatically added to the library. Archivied in browser storage.","pool.blacklisted":"Pool {1} won't help, content blacklisted.","pool.uploading.torrent":"Torrent uploading to pool {1} for help.","pool.uploading.magnet":"Magnet uploading to pool {1} for help.","pool.uploaded":"Upload to pool {1} complete.","tooltip.home":"Home page","tooltip.add":"Add contents or load a .torrent file","tooltip.search":"Search","tooltip.file-save":"Save on disk","tooltip.file-open":"Open in a new tab","tooltip.copy-clipboard":"Copy to clipboard","tooltip.download":"Bytes received from other users","tooltip.upload":"Bytes sended to other users","tooltip.peers":"Nodes / users. Click to view.","tooltip.library":"Library and Sharing","tooltip.layout.auto":"Auto detect the main file","tooltip.layout.list":"List mode, all files","tooltip.layout.binary":"Download mode","tooltip.layout.none":"No preview","tooltip.share.www":"Url to this domain","tooltip.share.html":"HTML code for embedding","tooltip.share.magnet":"Magnet link","tooltip.share.torrent":"Save .torrent file","time.unknown":"-","time.remain":"remain","time.year":"year","time.day":"day","time.hour":"hour","time.minute":"minute","time.second":"second"};</script>
<script>Id2Web.lang.it={"status.waiting":"In attesa di conferma avvio.","status.download":"Download: {1}, {2}","status.seeding":"In condivisione, {1} nodi.","status.searching":"Ricerca nel network P2P (potrebbe richiedere alcuni minuti) ...","status.upload":"Analisi upload...","status.404":"ID sconosciuto, spiacente.","steps.blockchain.title":"Ricerca in '{1}'","steps.blockchain.subtitle":"{1} sull'indirizzo {2}","steps.searching.title":"Ricerca nel network P2P","steps.searching.subtitle.id":"potrebbe richiedere alcuni minuti<br>infohash {1}","steps.searching.subtitle":"potrebbe richiedere alcuni minuti","steps.render.title":"Costruzione vista","steps.render.subtitle":"","steps.notify.title":"Notifica al pool","steps.notify.subtitle":"{1}","stats.download":"Download: {1} / {2} ({3})","stats.upload":"Upload: {1} ({2})","stats.upload.subtitle":"attendere, potrebbe richiedere diversi secondi","stats.peers":"Nodi: {1}","files.multiple":"Files multipli","file.stats":"{1} ({2})","file.too-big":"The file {1} exceed the current limit of {2}, sorry.","library.remove":"Rimuovi","library.welcome":"Lascia aperto per condividere la libreria da questa pagina. Attualmente, ogni contenuto visitato viene automaticamente aggiunto alla libreria. Archiviata nel browser.","pool.blacklisted":"Pool {1} won't help, content blacklisted.","pool.uploading.torrent":"Torrent uploading to pool {1} for help.","pool.uploading.magnet":"Magnet uploading to pool {1} for help.","pool.uploaded":"Upload to pool {1} complete.","tooltip.home":"Home page","tooltip.add":"Aggiungi contenuti o carica file .torrent","tooltip.search":"Ricerca","tooltip.file-save":"Salva su disco","tooltip.file-open":"Apri in un nuovo tab","tooltip.copy-clipboard":"Copia negli appunti","tooltip.download":"Bytes ricevuti da altri utenti","tooltip.upload":"Bytes inviati ad altri utenti","tooltip.peers":"Nodi / utenti. Clicca per il grafico.","tooltip.library":"Libreria e condivisione","tooltip.layout.auto":"Rilevazione automatica file principale","tooltip.layout.list":"Modalità lista, tutti i files","tooltip.layout.binary":"Modalità files","tooltip.layout.none":"Nessuna preview","tooltip.share.www":"Url per questo dominio","tooltip.share.html":"Codice HTML per incorporare","tooltip.share.magnet":"Link Magnet","tooltip.share.torrent":"Salva file .torrent","time.unknown":"-","time.remain":"rimanente","time.year":"anni","time.day":"giorni","time.hour":"ore","time.minute":"minuti","time.second":"secondi"};</script>
<script>
Id2Web.home = '8943ba2dd103f7249452cbd3e1fecf41796d1ca3';
Id2Web.fileSizeLimit = 2 * 1000 * 1000 * 1000; // 2GB
Id2Web.trackers = {
always: [
'wss://search-id.org/wss',
'wss://tracker.btorrent.xyz',
'wss://tracker.openwebtorrent.com',
'udp://search-id.org:8000',
'udp://explodie.org:6969',
'udp://tracker.coppersurfer.tk:6969',
'udp://tracker.empire-js.us:1337',
'udp://tracker.leechers-paradise.org:6969',
'udp://tracker.opentrackr.org:1337'
],
blacklist: [
'udp://tracker.mg64.net:2710/announce',
'udp://tracker.openbittorrent.com:80/announce',
'udp://explodie.org:6969'
]
}
Id2Web.pools = [
{
url:'https://search-id.org/pool',
key:''
}
]
</script>
</head>
<body onload="Id2Web.start();">
<noscript>
<div class='fatal'>JavaScript required.</div>
</noscript>
<div style="display:none" id="main-area">
<form method="post" action="?act=upload" id='uploadForm' enctype="multipart/form-data">
<input id="files-upload" name="file[]" type="file" multiple/>
</form>
<div id='nav'>
<a class='home hover-effect tooltip-right'></a>
<a class='add hover-effect tooltip-bottom'></a>
<input type='text'>
<a class='search hover-effect tooltip-left'></a>
</div>
<div id='status'></div>
<div id='stats'>
<div id='download' class='tooltip-bottom'>
<div id='download-progress'></div>
<div id='download-text'></div>
</div>
<div id='upload' class='tooltip-bottom'>
</div>
<div id='peers-button' class='hover-effect tooltip-bottom'></div>
<div id='peers'></div>
<div id='tools'>
<div id='share'>
<span id='share-title'>Share:</span>
<a id='share-www' class='hover-effect tooltip-bottom'></a>
<a id='share-html' class='hover-effect tooltip-bottom'></a>
<a id='share-magnet' class='hover-effect tooltip-bottom'></a>
<a id='share-torrent' class='hover-effect tooltip-bottom'></a>
</div>
<div id='layout'>
<span id='layout-title'>Layout:</span>
<a id='layout-auto' class='hover-effect tooltip-bottom'></a>
<a id='layout-list' class='hover-effect tooltip-bottom'></a>
<a id='layout-binary' class='hover-effect tooltip-bottom'></a>
<!--<a id='layout-none' class='hover-effect tooltip-bottom'></a>-->
</div>
</div>
</div>
<div id='files'></div>
<div id='library-button' class='hover-effect tooltip-bottom'></div>
<div id='library'>
<div id='library-welcome'></div>
<div id='library-items'></div>
</div>
<div id='credits'>
search-id <span id='version'></span> by <a class='hover-effect' target='_blank' href='https://twitter.com/Clodo76'>Clodo</a>.
-
<a target='_blank' href='https://github.com/Clodo76/search-id' class='hover-effect tooltip-left social github' data-tooltip='GitHub'></a>
<a target='_blank' href='https://twitter.com/SearchID2' class='hover-effect tooltip-left social twitter' data-tooltip='Twitter'></a>
<a target='_blank' href='https://t.me/joinchat/CANCWhA7RdXTISGhvyWKcg' class='hover-effect tooltip-left social telegram' data-tooltip='Telegram'></a>
-
<a target='_blank' href='https://www.gnu.org/licenses/agpl-3.0.html' class='hover-effect tooltip-left' data-tooltip='Open Source License'>AGPLv3</a>
<br>
Powered by
<a id='webtorrent' class='hover-effect tooltip-left' data-tooltip='It rocks!' target='_blank' href='https://webtorrent.io'></a>
</div>
</div>
<div id='menu'></div>
<div id='play'></div>
<div id='viewer'></div>
</body>
</html>