UNPKG

smartdown

Version:

A library for translating, rendering and interacting with Smartdown documents. Smartdown is an extension of Markdown that provides richer media support and reactive programming capability.

1 lines 3.32 MB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("fs")):"function"==typeof define&&define.amd?define("smartdown",["fs"],e):"object"==typeof exports?exports.smartdown=e(require("fs")):t.smartdown=e(t.fs)}("undefined"!=typeof self?self:this,function(__WEBPACK_EXTERNAL_MODULE_229__){return function(t){function e(t){delete L[t]}function n(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.src=p.p+""+t+"."+x+".hot-update.js",e.appendChild(n)}function r(t){return t=t||1e4,new Promise(function(e,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=p.p+""+x+".hot-update.json";r.open("GET",i,!0),r.timeout=t,r.send(null)}catch(t){return n(t)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)e();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var t=JSON.parse(r.responseText)}catch(t){return void n(t)}e(t)}}})}function i(t){var e=R[t];if(!e)return p;var n=function(n){return e.hot.active?(R[n]?R[n].parents.indexOf(t)<0&&R[n].parents.push(t):(T=[t],v=n),e.children.indexOf(n)<0&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),T=[]),p(n)};for(var r in p)Object.prototype.hasOwnProperty.call(p,r)&&"e"!==r&&Object.defineProperty(n,r,function(t){return{configurable:!0,enumerable:!0,get:function(){return p[t]},set:function(e){p[t]=e}}}(r));return n.e=function(t){function e(){P--,"prepare"===A&&(O[t]||l(t),0===P&&0===N&&f())}return"ready"===A&&a("prepare"),P++,p.e(t).then(e,function(t){throw e(),t})},n}function o(t){var e={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],_main:v!==t,active:!0,accept:function(t,n){if(void 0===t)e._selfAccepted=!0;else if("function"==typeof t)e._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)e._acceptedDependencies[t[r]]=n||function(){};else e._acceptedDependencies[t]=n||function(){}},decline:function(t){if(void 0===t)e._selfDeclined=!0;else if("object"==typeof t)for(var n=0;n<t.length;n++)e._declinedDependencies[t[n]]=!0;else e._declinedDependencies[t]=!0},dispose:function(t){e._disposeHandlers.push(t)},addDisposeHandler:function(t){e._disposeHandlers.push(t)},removeDisposeHandler:function(t){var n=e._disposeHandlers.indexOf(t);n>=0&&e._disposeHandlers.splice(n,1)},check:u,apply:h,status:function(t){if(!t)return A;S.push(t)},addStatusHandler:function(t){S.push(t)},removeStatusHandler:function(t){var e=S.indexOf(t);e>=0&&S.splice(e,1)},data:E[t]};return v=void 0,e}function a(t){A=t;for(var e=0;e<S.length;e++)S[e].call(null,t)}function s(t){return+t+""===t?+t:t}function u(t){if("idle"!==A)throw new Error("check() is only allowed in idle status");return _=t,a("check"),r(w).then(function(t){if(!t)return a("idle"),null;k={},O={},C=t.c,b=t.h,a("prepare");var e=new Promise(function(t,e){g={resolve:t,reject:e}});y={};for(var n in L)l(n);return"prepare"===A&&0===P&&0===N&&f(),e})}function c(t,e){if(C[t]&&k[t]){k[t]=!1;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(y[n]=e[n]);0==--N&&0===P&&f()}}function l(t){C[t]?(k[t]=!0,N++,n(t)):O[t]=!0}function f(){a("ready");var t=g;if(g=null,t)if(_)Promise.resolve().then(function(){return h(_)}).then(function(e){t.resolve(e)},function(e){t.reject(e)});else{var e=[];for(var n in y)Object.prototype.hasOwnProperty.call(y,n)&&e.push(s(n));t.resolve(e)}}function h(n){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];t.indexOf(r)<0&&t.push(r)}}if("ready"!==A)throw new Error("apply() is only allowed in ready status");n=n||{};var i,o,u,c,l,f={},h=[],d={},m=function(){console.warn("[HMR] unexpected require("+g.moduleId+") to disposed module")};for(var v in y)if(Object.prototype.hasOwnProperty.call(y,v)){l=s(v);var g;g=y[v]?function(t){for(var e=[t],n={},i=e.slice().map(function(t){return{chain:[t],id:t}});i.length>0;){var o=i.pop(),a=o.id,s=o.chain;if((c=R[a])&&!c.hot._selfAccepted){if(c.hot._selfDeclined)return{type:"self-declined",chain:s,moduleId:a};if(c.hot._main)return{type:"unaccepted",chain:s,moduleId:a};for(var u=0;u<c.parents.length;u++){var l=c.parents[u],f=R[l];if(f){if(f.hot._declinedDependencies[a])return{type:"declined",chain:s.concat([l]),moduleId:a,parentId:l};e.indexOf(l)>=0||(f.hot._acceptedDependencies[a]?(n[l]||(n[l]=[]),r(n[l],[a])):(delete n[l],e.push(l),i.push({chain:s.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}(l):{type:"disposed",moduleId:v};var _=!1,w=!1,M=!1,S="";switch(g.chain&&(S="\nUpdate propagation: "+g.chain.join(" -> ")),g.type){case"self-declined":n.onDeclined&&n.onDeclined(g),n.ignoreDeclined||(_=new Error("Aborted because of self decline: "+g.moduleId+S));break;case"declined":n.onDeclined&&n.onDeclined(g),n.ignoreDeclined||(_=new Error("Aborted because of declined dependency: "+g.moduleId+" in "+g.parentId+S));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(g),n.ignoreUnaccepted||(_=new Error("Aborted because "+l+" is not accepted"+S));break;case"accepted":n.onAccepted&&n.onAccepted(g),w=!0;break;case"disposed":n.onDisposed&&n.onDisposed(g),M=!0;break;default:throw new Error("Unexception type "+g.type)}if(_)return a("abort"),Promise.reject(_);if(w){d[l]=y[l],r(h,g.outdatedModules);for(l in g.outdatedDependencies)Object.prototype.hasOwnProperty.call(g.outdatedDependencies,l)&&(f[l]||(f[l]=[]),r(f[l],g.outdatedDependencies[l]))}M&&(r(h,[g.moduleId]),d[l]=m)}var N=[];for(o=0;o<h.length;o++)l=h[o],R[l]&&R[l].hot._selfAccepted&&N.push({module:l,errorHandler:R[l].hot._selfAccepted});a("dispose"),Object.keys(C).forEach(function(t){!1===C[t]&&e(t)});for(var P,O=h.slice();O.length>0;)if(l=O.pop(),c=R[l]){var k={},L=c.hot._disposeHandlers;for(u=0;u<L.length;u++)(i=L[u])(k);for(E[l]=k,c.hot.active=!1,delete R[l],delete f[l],u=0;u<c.children.length;u++){var I=R[c.children[u]];I&&(P=I.parents.indexOf(l))>=0&&I.parents.splice(P,1)}}var D,F;for(l in f)if(Object.prototype.hasOwnProperty.call(f,l)&&(c=R[l]))for(F=f[l],u=0;u<F.length;u++)D=F[u],(P=c.children.indexOf(D))>=0&&c.children.splice(P,1);a("apply"),x=b;for(l in d)Object.prototype.hasOwnProperty.call(d,l)&&(t[l]=d[l]);var B=null;for(l in f)if(Object.prototype.hasOwnProperty.call(f,l)&&(c=R[l])){F=f[l];var j=[];for(o=0;o<F.length;o++)if(D=F[o],i=c.hot._acceptedDependencies[D]){if(j.indexOf(i)>=0)continue;j.push(i)}for(o=0;o<j.length;o++){i=j[o];try{i(F)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:l,dependencyId:F[o],error:t}),n.ignoreErrored||B||(B=t)}}}for(o=0;o<N.length;o++){var U=N[o];l=U.module,T=[l];try{p(l)}catch(t){if("function"==typeof U.errorHandler)try{U.errorHandler(t)}catch(i){n.onErrored&&n.onErrored({type:"self-accept-error-handler-errored",moduleId:l,error:i,orginalError:t,originalError:t}),n.ignoreErrored||B||(B=i),B||(B=t)}else n.onErrored&&n.onErrored({type:"self-accept-errored",moduleId:l,error:t}),n.ignoreErrored||B||(B=t)}}return B?(a("fail"),Promise.reject(B)):(a("idle"),new Promise(function(t){t(h)}))}function p(e){if(R[e])return R[e].exports;var n=R[e]={i:e,l:!1,exports:{},hot:o(e),parents:(M=T,T=[],M),children:[]};return t[e].call(n.exports,n,n.exports,i(e)),n.l=!0,n.exports}var d=window.webpackJsonpsmartdown;window.webpackJsonpsmartdown=function(e,n,r){for(var i,o,a=0,s=[];a<e.length;a++)o=e[a],L[o]&&s.push(L[o][0]),L[o]=0;for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);for(d&&d(e,n,r);s.length;)s.shift()()};var m=window.webpackHotUpdatesmartdown;window.webpackHotUpdatesmartdown=function(t,e){c(t,e),m&&m(t,e)};var v,g,y,b,_=!0,x="188b72dcd5c51ff158b3",w=1e4,E={},T=[],M=[],S=[],A="idle",N=0,P=0,O={},k={},C={},R={},L={1:0};return p.e=function(t){function e(){o.onerror=o.onload=null,clearTimeout(a);var e=L[t];0!==e&&(e&&e[1](new Error("Loading chunk "+t+" failed.")),L[t]=void 0)}var n=L[t];if(0===n)return new Promise(function(t){t()});if(n)return n[2];var r=new Promise(function(e,r){n=L[t]=[e,r]});n[2]=r;var i=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,p.nc&&o.setAttribute("nonce",p.nc),o.src=p.p+""+({0:"stdlib-sotu"}[t]||t)+".js";var a=setTimeout(e,12e4);return o.onerror=o.onload=e,i.appendChild(o),r},p.m=t,p.c=R,p.d=function(t,e,n){p.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},p.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return p.d(e,"a",e),e},p.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},p.p="",p.oe=function(t){throw console.error(t),t},p.h=function(){return x},i(1037)(p.s=1037)}([function(t,e,n){"use strict";var r=n(1520);t.exports=r},function(t,e,n){"use strict";var r=n(1355);t.exports=r},function(t,e,n){"use strict";var r=n(1831);t.exports=r},function(t,e,n){"use strict";var r=n(1715);t.exports=r},function(t,e,n){"use strict";var r=Number.POSITIVE_INFINITY;t.exports=r},function(t,e,n){(function(r){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"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+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,r)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==r&&"env"in r&&(t=r.env.DEBUG),t}e=t.exports=n(2010),e.log=a,e.formatArgs=o,e.save=s,e.load=u,e.useColors=i,e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}).call(e,n(57))},function(t,e,n){"use strict";var r=n(1737);t.exports=r},function(t,e,n){"use strict";var r=n(1687);t.exports=r},function(t,e,n){"use strict";var r=Math.sqrt;t.exports=r},function(t,e,n){"use strict";var r=Number.NEGATIVE_INFINITY;t.exports=r},function(t,e,n){"use strict";var r=n(1502);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(1489),o=n(453),a=n(454);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1439);t.exports=r},function(t,e,n){"use strict";var r=n(1533);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(1512),o=n(460),a=n(461);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(1741),o=n(506),a=n(507);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1763);t.exports=r},function(t,e,n){"use strict";var r=n(1886);t.exports=r},function(t,e,n){"use strict";t.exports=3.141592653589793},function(t,e,n){"use strict";var r=n(1365);t.exports=r},function(t,e,n){"use strict";var r=n(1438);t.exports=r},function(t,e,n){"use strict";var r=n(1692);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(1510),o=n(458),a=n(464);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(1519),o=n(466),a=n(467);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1470);t.exports=r},function(t,e,n){"use strict";var r=n(1888);t.exports=r},function(t,e,n){"use strict";var r=n(1509);t.exports=r},function(t,e,n){"use strict";var r=n(1708);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(1712),o=n(500),a=n(501);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(1535),o=n(470),a=n(471);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1),i=n(3013);r(i,"factory",n(905)),t.exports=i},function(t,e,n){"use strict";var r=n(1893);t.exports=r},function(t,e,n){"use strict";var r=n(1873);t.exports=r},function(t,e,n){"use strict";var r=n(3206);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(1511),o=n(459),a=n(463);r(i,"isPrimitive",o),r(i,"isObject",a),t.exports=i},function(t,e,n){"use strict";var r=n(1699);t.exports=r},function(t,e,n){"use strict";var r,i=n(144),o=n(1363),a=n(1364);r=i()?a:o,t.exports=r},function(t,e,n){"use strict";var r=n(1794);t.exports=r},function(t,e,n){"use strict";var r=n(1905);t.exports=r},function(t,e,n){var r=n(3295);t.exports=r},function(t,e,n){"use strict";var r=n(1689);t.exports=r},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Array.prototype.slice,a=n(1474),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},h={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),d=function(t){if("undefined"==typeof window||!p)return f(t);try{return f(t)}catch(t){return!1}},m=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===i.call(t),o=a(t),s=e&&"[object String]"===i.call(t),f=[];if(!e&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var h=c&&n;if(s&&t.length>0&&!r.call(t,0))for(var p=0;p<t.length;++p)f.push(String(p));if(o&&t.length>0)for(var m=0;m<t.length;++m)f.push(String(m));else for(var v in t)h&&"prototype"===v||!r.call(t,v)||f.push(String(v));if(u)for(var g=d(t),y=0;y<l.length;++y)g&&"constructor"===l[y]||!r.call(t,l[y])||f.push(l[y]);return f};m.shim=function(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var t=Object.keys;Object.keys=function(e){return t(a(e)?o.call(e):e)}}}else Object.keys=m;return Object.keys||m},t.exports=m},function(t,e,n){"use strict";t.exports=.6931471805599453},function(t,e,n){"use strict";function r(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function i(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===a.indexOf(e))throw new o('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=r(e.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var o=n(174),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=i},function(t,e,n){"use strict";t.exports=2.220446049250313e-16},function(t,e,n){"use strict";t.exports=1.4142135623730951},function(t,e,n){"use strict";var r,i=n(1367),o=n(1372),a=n(1373);r=i()?o:a,t.exports=r},function(t,e,n){"use strict";t.exports=709.782712893384},function(t,e,n){"use strict";var r=n(1853);t.exports=r},function(t,e,n){"use strict";var r=n(1902);t.exports=r},function(t,e,n){"use strict";function r(t,e,n,a){function s(e){return t(e=new Date(+e)),e}return s.floor=s,s.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},s.round=function(t){var e=s(t),n=s.ceil(t);return t-e<n-t?e:n},s.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},s.range=function(n,r,i){var o=[];if(n=s.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return o;do{o.push(new Date(+n))}while(e(n,i),t(n),n<r);return o},s.filter=function(n){return r(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(s.count=function(e,r){return i.setTime(+e),o.setTime(+r),t(i),t(o),Math.floor(n(i,o))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(a?function(e){return a(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}e.a=r;var i=new Date,o=new Date},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(281);n.d(e,"creator",function(){return r.a});var i=n(1250);n.d(e,"local",function(){return i.a});var o=n(412);n.d(e,"matcher",function(){return o.a});var a=n(1251);n.d(e,"mouse",function(){return a.a});var s=n(282);n.d(e,"namespace",function(){return s.a});var u=n(283);n.d(e,"namespaces",function(){return u.a});var c=n(1252);n.d(e,"select",function(){return c.a});var l=n(1280);n.d(e,"selectAll",function(){return l.a});var f=n(72);n.d(e,"selection",function(){return f.b});var h=n(287);n.d(e,"selector",function(){return h.a});var p=n(413);n.d(e,"selectorAll",function(){return p.a});var d=n(416);n.d(e,"style",function(){return d.b});var m=n(1281);n.d(e,"touch",function(){return m.a});var v=n(1282);n.d(e,"touches",function(){return v.a});var g=n(288);n.d(e,"window",function(){return g.a});var y=n(285);n.d(e,"event",function(){return y.c}),n.d(e,"customEvent",function(){return y.a})},function(t,e,n){"use strict";var r,i=n(1414),o=n(1419),a=n(1420);r=i()?o:a,t.exports=r},function(t,e,n){"use strict";t.exports=1.7976931348623157e308},function(t,e,n){"use strict";var r=n(1972);t.exports=r},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,s,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(n=this._events[t],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,s);return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,a,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){m&&p&&(m=!1,p.length?d=p.concat(d):v=-1,d.length&&s())}function s(){if(!m){var t=i(a);m=!0;for(var e=d.length;e;){for(p=d,d=[];++v<e;)p&&p[v].run();v=-1,e=d.length}p=null,m=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,h=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(t){f=r}}();var p,d=[],m=!1,v=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new u(t,e)),1!==d.length||m||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(1447);t.exports=r},function(t,e,n){"use strict";t.exports=2.718281828459045},function(t,e,n){"use strict";var r=n(1875);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(530);r(i,"factory",n(1901)),t.exports=i},function(t,e,n){"use strict";var r=n(3761);t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(378);n.d(e,"bisect",function(){return r.c}),n.d(e,"bisectRight",function(){return r.b}),n.d(e,"bisectLeft",function(){return r.a});var i=n(141);n.d(e,"ascending",function(){return i.a});var o=n(379);n.d(e,"bisector",function(){return o.a});var a=n(1160);n.d(e,"cross",function(){return a.a});var s=n(1161);n.d(e,"descending",function(){return s.a});var u=n(381);n.d(e,"deviation",function(){return u.a});var c=n(383);n.d(e,"extent",function(){return c.a});var l=n(1162);n.d(e,"histogram",function(){return l.a});var f=n(1165);n.d(e,"thresholdFreedmanDiaconis",function(){return f.a});var h=n(1166);n.d(e,"thresholdScott",function(){return h.a});var p=n(387);n.d(e,"thresholdSturges",function(){return p.a});var d=n(1167);n.d(e,"max",function(){return d.a});var m=n(1168);n.d(e,"mean",function(){return m.a});var v=n(1169);n.d(e,"median",function(){return v.a});var g=n(1170);n.d(e,"merge",function(){return g.a});var y=n(388);n.d(e,"min",function(){return y.a});var b=n(380);n.d(e,"pairs",function(){return b.a});var _=n(1171);n.d(e,"permute",function(){return _.a});var x=n(269);n.d(e,"quantile",function(){return x.a});var w=n(385);n.d(e,"range",function(){return w.a});var E=n(1172);n.d(e,"scan",function(){return E.a});var T=n(1173);n.d(e,"shuffle",function(){return T.a});var M=n(1174);n.d(e,"sum",function(){return M.a});var S=n(386);n.d(e,"ticks",function(){return S.a}),n.d(e,"tickIncrement",function(){return S.b}),n.d(e,"tickStep",function(){return S.c});var A=n(389);n.d(e,"transpose",function(){return A.a});var N=n(382);n.d(e,"variance",function(){return N.a});var P=n(1175);n.d(e,"zip",function(){return P.a})},function(t,e,n){"use strict";var r,i=n(1379),o=n(1384),a=n(1385);r=i()?o:a,t.exports=r},function(t,e,n){"use strict";var r=n(1518);t.exports=r},function(t,e,n){"use strict";t.exports=1.5707963267948966},function(t,e,n){"use strict";t.exports=9007199254740991},function(t,e,n){"use strict";t.exports=-708.3964185322641},function(t,e,n){"use strict";var r=n(1688);t.exports=r},function(t,e,n){"use strict";var r=n(1907);t.exports=r},function(t,e,n){"use strict";var r=n(1993);t.exports=r},function(t,e,n){"use strict";function r(t,e){this._groups=t,this._parents=e}function i(){return new r([[document.documentElement]],L)}n.d(e,"c",function(){return L}),e.a=r;var o=n(1253),a=n(1254),s=n(1255),u=n(1256),c=n(414),l=n(1258),f=n(1259),h=n(1260),p=n(1261),d=n(1262),m=n(1263),v=n(1264),g=n(1265),y=n(1266),b=n(1267),_=n(1268),x=n(416),w=n(1269),E=n(1270),T=n(1271),M=n(1272),S=n(1273),A=n(1274),N=n(1275),P=n(1276),O=n(1277),k=n(1278),C=n(285),R=n(1279),L=[null];r.prototype=i.prototype={constructor:r,select:o.a,selectAll:a.a,filter:s.a,data:u.a,enter:c.b,exit:l.a,merge:f.a,order:h.a,sort:p.a,call:d.a,nodes:m.a,node:v.a,size:g.a,empty:y.a,each:b.a,attr:_.a,style:x.a,property:w.a,classed:E.a,text:T.a,html:M.a,raise:S.a,lower:A.a,append:N.a,insert:P.a,remove:O.a,datum:k.a,on:C.b,dispatch:R.a},e.b=i},function(t,e,n){"use strict";function r(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>f)throw new Error("too late");return n}function i(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>p)throw new Error("too late");return n}function o(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("too late");return n}function a(t,e,n){function r(t){n.state=h,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}function i(r){var l,f,v,y;if(n.state!==h)return a();for(l in c)if(y=c[l],y.name===n.name){if(y.state===d)return Object(u.b)(i);y.state===m?(y.state=g,y.timer.stop(),y.on.call("interrupt",t,t.__data__,y.index,y.group),delete c[l]):+l<e&&(y.state=g,y.timer.stop(),delete c[l])}if(Object(u.b)(function(){n.state===d&&(n.state=m,n.timer.restart(o,n.delay,n.time),o(r))}),n.state=p,n.on.call("start",t,t.__data__,n.index,n.group),n.state===p){for(n.state=d,s=new Array(v=n.tween.length),l=0,f=-1;l<v;++l)(y=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(s[++f]=y);s.length=f+1}}function o(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=v,1),i=-1,o=s.length;++i<o;)s[i].call(null,r);n.state===v&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){n.state=g,n.timer.stop(),delete c[e];for(var r in c)return;delete t.__transition}var s,c=t.__transition;c[e]=n,n.timer=Object(u.c)(r,0,n.time)}n.d(e,"c",function(){return h}),n.d(e,"d",function(){return p}),n.d(e,"b",function(){return v}),n.d(e,"a",function(){return g}),e.g=r,e.h=i,e.f=o;var s=n(181),u=n(434),c=Object(s.dispatch)("start","end","interrupt"),l=[],f=0,h=1,p=2,d=3,m=4,v=5,g=6;e.e=function(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};a(t,n,{name:e,index:r,group:i,on:c,tween:l,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:f})}},function(t,e,n){"use strict";var r,i=n(1421),o=n(1426),a=n(1427);r=i()?o:a,t.exports=r},function(t,e,n){"use strict";t.exports=1023},function(t,e,n){"use strict";t.exports=10.900511},function(t,e,n){"use strict";t.exports=2.2250738585072014e-308},function(t,e,n){"use strict";t.exports=6.283185307179586},function(t,e,n){"use strict";var r=n(1691);t.exports=r},function(t,e,n){"use strict";var r=n(1842);t.exports=r},function(t,e,n){"use strict";var r=n(1872);t.exports=r},function(t,e,n){"use strict";var r=n(2378);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(248),o=n(14),a=i(o);r(a,"primitives",i(o.isPrimitive)),r(a,"objects",i(o.isObject)),t.exports=a},function(t,e,n){"use strict";function r(t){return i[t]}var i=n(3393);t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";var r=n(1521);t.exports=r},function(t,e,n){"use strict";t.exports=9.869604401089358},function(t,e,n){"use strict";var r=n(1766);t.exports=r},function(t,e,n){"use strict";var r=n(1786);t.exports=r},function(t,e,n){"use strict";var r=n(1863);t.exports=r},function(t,e,n){"use strict";var r=n(1874);t.exports=r},function(t,e,n){"use strict";var r=n(1946);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(2500);r(i,"factory",n(2501)),t.exports=i},function(t,e,n){"use strict";var r=n(3766);t.exports=r},function(t,e,n){var r=n(359),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1176);n.d(e,"scaleBand",function(){return r.a}),n.d(e,"scalePoint",function(){return r.b});var i=n(1182);n.d(e,"scaleIdentity",function(){return i.a});var o=n(177);n.d(e,"scaleLinear",function(){return o.a});var a=n(1205);n.d(e,"scaleLog",function(){return a.a});var s=n(390);n.d(e,"scaleOrdinal",function(){return s.a}),n.d(e,"scaleImplicit",function(){return s.b});var u=n(1206);n.d(e,"scalePow",function(){return u.a}),n.d(e,"scaleSqrt",function(){return u.b});var c=n(1207);n.d(e,"scaleQuantile",function(){return c.a});var l=n(1208);n.d(e,"scaleQuantize",function(){return l.a});var f=n(1209);n.d(e,"scaleThreshold",function(){return f.a});var h=n(405);n.d(e,"scaleTime",function(){return h.b});var p=n(1225);n.d(e,"scaleUtc",function(){return p.a});var d=n(1226);n.d(e,"schemeCategory10",function(){return d.a});var m=n(1227);n.d(e,"schemeCategory20b",function(){return m.a});var v=n(1228);n.d(e,"schemeCategory20c",function(){return v.a});var g=n(1229);n.d(e,"schemeCategory20",function(){return g.a});var y=n(1230);n.d(e,"interpolateCubehelixDefault",function(){return y.a});var b=n(1231);n.d(e,"interpolateRainbow",function(){return b.b}),n.d(e,"interpolateWarm",function(){return b.c}),n.d(e,"interpolateCool",function(){return b.a});var _=n(1232);n.d(e,"interpolateViridis",function(){return _.a}),n.d(e,"interpolateMagma",function(){return _.c}),n.d(e,"interpolateInferno",function(){return _.b}),n.d(e,"interpolatePlasma",function(){return _.d});var x=n(1233);n.d(e,"scaleSequential",function(){return x.a})},function(t,e,n){"use strict";var r=n(272);n.d(e,"a",function(){return r.a});var i=(n(395),n(275),n(393),n(396),n(217));n.d(e,"c",function(){return i.a});var o=(n(397),n(1185));n.d(e,"e",function(){return o.a});var a=n(398);n.d(e,"f",function(){return a.a});var s=n(1186);n.d(e,"g",function(){return s.a}),n.d(e,"h",function(){return s.b});var u=(n(1189),n(392));n.d(e,"d",function(){return u.a});var c=(n(1190),n(1191),n(1192),n(1193));n.d(e,"b",function(){return c.a}),n(1194)},function(t,e,n){"use strict";var r=n(273);n.d(e,"a",function(){return r.e}),n.d(e,"f",function(){return r.g}),n.d(e,"d",function(){return r.f});var i=n(1183);n.d(e,"e",function(){return i.a}),n.d(e,"c",function(){return i.b});var o=n(1184);n.d(e,"b",function(){return o.a})},function(t,e,n){"use strict";n.d(e,"d",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return o}),n.d(e,"a",function(){return a}),n.d(e,"e",function(){return s});var r=1e3,i=6e4,o=36e5,a=864e5,s=6048e5},function(t,e,n){"use strict";var r,i=n(1393),o=n(1398),a=n(1399);r=i()?o:a,t.exports=r},function(t,e,n){"use strict";t.exports=.5772156649015329},function(t,e,n){"use strict";t.exports=-.6931471805599453},function(t,e,n){"use strict";t.exports=308},function(t,e,n){"use strict";var r=n(1718);t.exports=r},function(t,e,n){"use strict";var r=n(1911);t.exports=r},function(t,e,n){"use strict";var r=n(1916);t.exports=r},function(t,e,n){"use strict";var r=n(1919);t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(2117);r(i,"factory",n(2118)),t.exports=i},function(t,e,n){"use strict";var r=n(2785);t.exports=r},function(t,e,n){"use strict";var r=n(2932);t.exports=r},function(t,e,n){"use strict";(function(t){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(r()<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=o.prototype):(null===t&&(t=new o(e)),t.length=e),t}function o(t,e,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return a(this,t,e,n)}function a(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?h(t,e,n,r):"string"==typeof e?l(t,e,n):p(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e,n,r){return s(e),e<=0?i(t,e):void 0!==n?"string"==typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function c(t,e){if(s(e),t=i(t,e<0?0:0|d(e)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function l(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(e,n);t=i(t,r);var a=t.write(e,n);return a!==r&&(t=t.slice(0,a)),t}function f(t,e){var n=e.length<0?0:0|d(e.length);t=i(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function h(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),o.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=o.prototype):t=f(t,e),t}function p(t,e){if(o.isBuffer(e)){var n=0|d(e.length);return t=i(t,n),0===t.length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||Z(e.length)?i(t,0):f(t,e);if("Buffer"===e.type&&K(e.data))return f(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function m(t){return+t!=t&&(t=0),o.alloc(+t)}function v(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return H(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return N(this,e,n);case"ascii":return O(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=o.from(e,r)),o.isBuffer(e))return 0===e.length?-1:_(t,e,n,r,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):_(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,n,r,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;c<s;c++)if(o(t,c)===o(e,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*a}else-1!==l&&(c-=c-l),l=-1}else for(n+u>s&&(n=s-u),c=n;c>=0;c--){for(var f=!0,h=0;h<u;h++)if(o(t,c+h)!==o(e,h)){f=!1;break}if(f)return c}return-1}function x(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function w(t,e,n,r){return X(H(e,t.length-n),t,n,r)}function E(t,e,n,r){return X(q(e),t,n,r)}function T(t,e,n,r){return E(t,e,n,r)}function M(t,e,n,r){return X(Y(e),t,n,r)}function S(t,e,n,r){return X(W(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?$.fromByteArray(t):$.fromByteArray(t.slice(e,n))}function N(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=t[i+1]))&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=t[i+1],c=t[i+2],128==(192&u)&&128==(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return P(r)}function P(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function O(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function C(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=G(t[o]);return i}function R(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,r,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function D(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function F(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function B(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,r,i){return i||B(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return i||B(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(t,e,n,r,52,8),n+8}function z(t){if(t=V(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function W(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}function Y(t){return $.toByteArray(z(t))}function X(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Z(t){return t!==t}var $=n(1143),J=n(1144),K=n(377);e.Buffer=o,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=r(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,n){return a(null,t,e,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,n){return u(null,t,e,n)},o.allocUnsafe=function(t){return c(null,t)},o.allocUnsafeSlow=function(t){return c(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(t){switch(String(t).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}},o.concat=function(t,e){if(!K(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=o.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},o.byteLength=v,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?N(this,0,t):g.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,e,n,r,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var a=i-r,s=n-e,u=Math.min(a,s),c=this.slice(r,i),l=t.slice(e,n),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},o.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},o.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return x(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return E(this,t,e,n);case"latin1":case"binary":return T(this,t,e,n);case"base64":return M(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},o.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),J.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),J.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),J.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),J.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||I(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=fun