@local-logic/sdks-app 1.7.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{index-legacy.935e7346.js → index-legacy.5b5c89be.js} +1 -1
- package/dist/assets/{index-legacy.3a8c6aa8.js → index-legacy.6f7be327.js} +1 -1
- package/dist/assets/index-legacy.873d2f5f.js +1 -0
- package/dist/assets/{index-legacy.93d69255.js → index-legacy.8b48df8f.js} +1 -1
- package/dist/assets/index-legacy.a2e5122a.js +23 -0
- package/dist/assets/{index-legacy.46f64d17.js → index-legacy.b4a1ea09.js} +1 -1
- package/dist/assets/index-legacy.e333988e.js +106 -0
- package/dist/assets/index.1b34a15d.js +35 -0
- package/dist/assets/{index.71eb35ea.js → index.24661964.js} +17 -17
- package/dist/assets/index.3039bacf.js +161 -0
- package/dist/assets/index.3eec99ca.js +1318 -0
- package/dist/assets/index.77b51154.js +1 -0
- package/dist/assets/index.aae000f4.js +1 -0
- package/dist/assets/{index.10935833.js → index.d89a7cee.js} +1 -1
- package/dist/assets/polyfills-legacy.db2bc606.js +1 -0
- package/dist/assets/{useIsMobile-legacy.a1dad04e.js → useIsMobile-legacy.7fb572d8.js} +1 -1
- package/dist/assets/{useIsMobile.5dc7840d.js → useIsMobile.b5e8d9ad.js} +1 -1
- package/dist/assets/{useQuery-legacy.6ce02414.js → useQuery-legacy.7e93cb2c.js} +1 -1
- package/dist/assets/useQuery.19a6ca1c.js +9 -0
- package/dist/index.html +3 -3
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js +2 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.d.ts.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js +2 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/types.d.ts +2 -2
- package/dist/types/context/languageProvider/data-explorer/types.d.ts.map +1 -1
- package/dist/types/context/languageProvider/index.d.ts +2 -2
- package/dist/types/context/languageProvider/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.js +65 -0
- package/dist/types/sdks/DataExplorer/components/Table/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.js +27 -0
- package/dist/types/sdks/DataExplorer/components/Table/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/context.d.ts +3 -0
- package/dist/types/sdks/DataExplorer/context.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/context.js +3 -0
- package/dist/types/sdks/DataExplorer/context.js.map +1 -1
- package/dist/types/sdks/DataExplorer/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/index.js +8 -0
- package/dist/types/sdks/DataExplorer/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.js +2 -1
- package/dist/types/sdks/Demographics/components/Content/Household/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Household/styles.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.js +19 -0
- package/dist/types/sdks/Demographics/components/Content/Household/styles.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Housing/index.js +10 -7
- package/dist/types/sdks/Demographics/components/Content/Housing/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.js +12 -0
- package/dist/types/sdks/Demographics/components/Content/Housing/styles.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.d.ts +3 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.d.ts.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.js +14 -0
- package/dist/types/sdks/Demographics/components/Content/Languages/index.js.map +1 -0
- package/dist/types/sdks/Demographics/components/Content/index.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/index.js +3 -0
- package/dist/types/sdks/Demographics/components/Content/index.js.map +1 -1
- package/dist/types/sdks/Demographics/components/Content/styles.js +1 -1
- package/dist/types/sdks/Demographics/components/Content/styles.js.map +1 -1
- package/dist/types/sdks/Demographics/context.d.ts +3 -0
- package/dist/types/sdks/Demographics/context.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/context.js.map +1 -1
- package/dist/types/sdks/Demographics/styles.d.ts.map +1 -1
- package/dist/types/sdks/Demographics/styles.js +0 -1
- package/dist/types/sdks/Demographics/styles.js.map +1 -1
- package/package.json +4 -3
- package/dist/assets/index-legacy.128bbb90.js +0 -106
- package/dist/assets/index-legacy.60df4146.js +0 -1
- package/dist/assets/index-legacy.7c9f6b15.js +0 -1
- package/dist/assets/index.1df47f40.js +0 -28
- package/dist/assets/index.97d3a920.js +0 -1374
- package/dist/assets/index.d464e7cf.js +0 -1
- package/dist/assets/index.e63e2d64.js +0 -1
- package/dist/assets/index.ed99fd65.js +0 -120
- package/dist/assets/polyfills-legacy.147ba02d.js +0 -1
- package/dist/assets/useQuery.7c643982.js +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){var t,e,n,r,i,o,s,a,u,c,l,f,h,p,d,g;function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */v=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(A){a=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new R(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return x()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=S(s,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=c(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(A){return{type:"throw",arg:A}}}t.wrap=u;var l={};function f(){}function h(){}function p(){}var d={};a(d,i,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(O([])));y&&y!==e&&n.call(y,i)&&(d=y);var m=p.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,s,a){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==w(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,a)}),(function(t){r("throw",t,s,a)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return h.prototype=p,a(m,"constructor",p),a(p,"constructor",h),h.displayName=a(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(_.prototype),a(_.prototype,o,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new _(u(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(m),a(m,s,"Generator"),a(m,i,(function(){return this})),a(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function m(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(c){return void n(c)}a.done?e(u):Promise.resolve(u).then(r,i)}function b(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){m(o,r,i,s,a,"next",t)}function a(t){m(o,r,i,s,a,"throw",t)}s(void 0)}))}}function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function _(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function R(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}System.register(["./index-legacy.935e7346.js","./index-legacy.128bbb90.js","./useQuery-legacy.6ce02414.js","./keyFactory-legacy.782b8549.js"],(function(m,S){"use strict";var O,x,A,T,L,j,C,P,M,B,I,N,U,D,F,q,Y,z,V,W,G,J,H,$,X,Q,K,Z,tt,et,nt,rt,it,ot,st,at,ut,ct,lt,ft;return{setters:[function(t){O=t.g,x=t.c,A=t.l,T=t.f,L=t.S,j=t.b,C=t.s,P=t.p,M=t.i,B=t.j,I=t.m,N=t.N,U=t.P},function(t){D=t.R,F=t.u,q=t.r,Y=t.j,z=t.s,V=t._,W=t.k,G=t.e,J=t.o,H=t.a5,$=t.G,X=t.y,Q=t.n,K=t.d,Z=t.l,tt=t.U,et=t.V,nt=t.a6,rt=t.q,it=t.a7,ot=t.F,st=t.f,at=t.a8,ut=t.a9,ct=t.aa},function(t){lt=t.u},function(t){ft=t.d}],execute:function(){var S=D.createContext({}),ht=function(){return q.exports.useContext(S)},pt=function(t){var e,n,r=t.children,i=F().sdkState,o=R(q.exports.useReducer((function(t,e){return E(E({},t),e)}),{location:{lat:(null===(e=i.options)||void 0===e?void 0:e.lat)||43.661337,lng:(null===(n=i.options)||void 0===n?void 0:n.lng)||-79.401903},scores:{checked:!1,include:[]},pois:{checked:!1,include:[],radius:5e3,limit:15},schools:{checked:!1,radius:5e3,limit:15},demographics:{checked:!1,radius:2500},profiles:{checked:!1}}),2),s=o[0],a=o[1],u=q.exports.useMemo((function(){return{dataExplorerState:s,setDataExplorerState:a}}),[s,a]);return Y(S.Provider,{value:u,children:r})},dt=z.div(t||(t=_(["\n height: 100vh;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),V["--ll-color-background"]),gt=z(O)(e||(e=_(["\n overflow-y: auto;\n padding: ",";\n"])),V["--ll-spacing-medium"]),yt=W({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),vt=W({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),mt=z.div(n||(n=_(["\n display: flex;\n flex-direction: column;\n"]))),bt=z.div(r||(r=_(["\n height: 20px;\n width: 20px;\n border: 2px solid ",";\n color: ",";\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: ",";\n font-size: ",";\n"])),V["--ll-color-primary"],V["--ll-color-primary"],V["--ll-spacing-small"],V["--ll-font-size-p"]),wt=z(x)(i||(i=_(["\n all: unset;\n flex: 1;\n display: flex;\n align-items: center;\n font-family: ",";\n"])),V["--ll-font-family"]),_t=z.div(o||(o=_(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: "," 0;\n"])),V["--ll-spacing-x-small"]),St=z(A)(s||(s=_(["\n background-color: ",";\n position: relative;\n z-index: 1;\n overflow: hidden;\n margin-left: calc(-1 * ",");\n margin-right: calc(-1 * ",');\n\n [data-state="open"] & {\n /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: visible;\n }\n\n [data-state="closed"] & {\n /* TODO: Re-implement this once StyledComponents is fixed. https://locallogic.atlassian.net/browse/LL22-1107 */\n /* animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1); */\n visibility: hidden;\n }\n"])),V["--ll-color-surface"],V["--ll-spacing-medium"],V["--ll-spacing-medium"],yt,vt),Et=z.div(a||(a=_(["\n padding: ",";\n"])),V["--ll-spacing-medium"]),kt=z.span(u||(u=_(["\n margin-left: ",";\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),V["--ll-spacing-x-small"],wt),Rt=z.div(c||(c=_(["\n display: flex;\n"]))),Ot=function(t){var e=t.title,n=t.description,r=t.children,i=t.value,o=t.number,s=ht(),a=s.dataExplorerState,u=s.setDataExplorerState;return Y(T,{value:i,children:G(mt,{children:[G(_t,{children:[G(wt,{children:[Y(bt,{children:o}),Y(J,{variant:"h6",noMargin:!0,weight:"--ll-font-weight-medium",children:e})]}),G(Rt,{children:["checked"in a[i]&&Y(H,{checked:a[i].checked,onCheckedChange:function(t){return u(k({},i,E(E({},a[i]),{},{checked:t})))}}),Y(wt,{children:Y(kt,{children:Y($,{SVGElement:L,fill:V["--ll-color-on-background-variant1"]})})})]})]}),Y(St,{children:G(Et,{children:[Y(J,{color:"--ll-color-on-background-variant1",children:n}),r]})})]})})},xt={exports:{}};!function(t,e){!function(t){var e;function n(){}function r(){r.init.call(this)}function i(t){return void 0===t._maxListeners?r.defaultMaxListeners:t._maxListeners}function o(t,e,n){if(e)t.call(n);else for(var r=t.length,i=g(t,r),o=0;o<r;++o)i[o].call(n)}function s(t,e,n,r){if(e)t.call(n,r);else for(var i=t.length,o=g(t,i),s=0;s<i;++s)o[s].call(n,r)}function a(t,e,n,r,i){if(e)t.call(n,r,i);else for(var o=t.length,s=g(t,o),a=0;a<o;++a)s[a].call(n,r,i)}function u(t,e,n,r,i,o){if(e)t.call(n,r,i,o);else for(var s=t.length,a=g(t,s),u=0;u<s;++u)a[u].call(n,r,i,o)}function c(t,e,n,r){if(e)t.apply(n,r);else for(var i=t.length,o=g(t,i),s=0;s<i;++s)o[s].apply(n,r)}function l(t,e,r,o){var s,a,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=t._events)?(a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),u=a[e]):(a=t._events=new n,t._eventsCount=0),u){if("function"==typeof u?u=a[e]=o?[r,u]:[u,r]:o?u.unshift(r):u.push(r),!u.warned&&(s=i(t))&&s>0&&u.length>s){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=u.length,f(c)}}else u=a[e]=r,++t._eventsCount;return t}function f(t){"function"==typeof console.warn?console.warn(t):console.log(t)}function h(t,e,n){var r=!1;function i(){t.removeListener(e,i),r||(r=!0,n.apply(t,arguments))}return i.listener=n,i}function p(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function d(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}function g(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}function y(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}n.prototype=Object.create(null),r.EventEmitter=r,r.usingDomains=!1,r.prototype.domain=void 0,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.init=function(){this.domain=null,r.usingDomains&&e.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new n,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(t){var e,n,r,i,l,f,h,p="error"===t;if(f=this._events)p=p&&null==f.error;else if(!p)return!1;if(h=this.domain,p){if(e=arguments[1],!h){if(e instanceof Error)throw e;var d=new Error('Uncaught, unspecified "error" event. ('+e+")");throw d.context=e,d}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=h,e.domainThrown=!1,h.emit("error",e),!1}if(!(n=f[t]))return!1;var g="function"==typeof n;switch(r=arguments.length){case 1:o(n,g,this);break;case 2:s(n,g,this,arguments[1]);break;case 3:a(n,g,this,arguments[1],arguments[2]);break;case 4:u(n,g,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),l=1;l<r;l++)i[l-1]=arguments[l];c(n,g,this,i)}return!0},r.prototype.addListener=function(t,e){return l(this,t,e,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(t,e){return l(this,t,e,!0)},r.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,h(this,t,e)),this},r.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,h(this,t,e)),this},r.prototype.removeListener=function(t,e){var r,i,o,s,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener&&r.listener===e)0==--this._eventsCount?this._events=new n:(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,s=r.length;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){a=r[s].listener,o=s;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new n,this;delete i[t]}else d(r,o);i.removeListener&&this.emit("removeListener",t,a||e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new n,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new n:delete r[t]),this;if(0===arguments.length){for(var i,o=Object.keys(r),s=0;s<o.length;++s)"removeListener"!==(i=o[s])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=new n,this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},r.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:y(e):[]},r.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},r.prototype.listenerCount=p,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var v=void 0!==X?X:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m=[],b=[],_="undefined"!=typeof Uint8Array?Uint8Array:Array,S=!1;function E(){S=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=t.length;e<n;++e)m[e]=t[e],b[t.charCodeAt(e)]=e;b["-".charCodeAt(0)]=62,b["_".charCodeAt(0)]=63}function k(t){var e,n,r,i,o,s;S||E();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new _(3*a/4-o),r=o>0?a-4:a;var u=0;for(e=0,n=0;e<r;e+=4,n+=3)i=b[t.charCodeAt(e)]<<18|b[t.charCodeAt(e+1)]<<12|b[t.charCodeAt(e+2)]<<6|b[t.charCodeAt(e+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=b[t.charCodeAt(e)]<<2|b[t.charCodeAt(e+1)]>>4,s[u++]=255&i):1===o&&(i=b[t.charCodeAt(e)]<<10|b[t.charCodeAt(e+1)]<<4|b[t.charCodeAt(e+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}function R(t){return m[t>>18&63]+m[t>>12&63]+m[t>>6&63]+m[63&t]}function O(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(R(r));return i.join("")}function x(t){var e;S||E();for(var n=t.length,r=n%3,i="",o=[],s=16383,a=0,u=n-r;a<u;a+=s)o.push(O(t,a,a+s>u?u:a+s));return 1===r?(e=t[n-1],i+=m[e>>2],i+=m[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=m[e>>10],i+=m[e>>4&63],i+=m[e<<2&63],i+="="),o.push(i),o.join("")}function A(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)}function T(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}var L={}.toString,j=Array.isArray||function(t){return"[object Array]"==L.call(t)},C=50;function P(){return B.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function M(t,e){if(P()<e)throw new RangeError("Invalid typed array length");return B.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=B.prototype:(null===t&&(t=new B(e)),t.length=e),t}function B(t,e,n){if(!(B.TYPED_ARRAY_SUPPORT||this instanceof B))return new B(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 D(this,t)}return I(this,t,e,n)}function I(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?Y(t,e,n,r):"string"==typeof e?F(t,e,n):z(t,e)}function N(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 N(e),e<=0?M(t,e):void 0!==n?"string"==typeof r?M(t,e).fill(n,r):M(t,e).fill(n):M(t,e)}function D(t,e){if(N(e),t=M(t,e<0?0:0|W(e)),!B.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function F(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!B.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|J(e,n),i=(t=M(t,r)).write(e,n);return i!==r&&(t=t.slice(0,i)),t}function q(t,e){var n=e.length<0?0:0|W(e.length);t=M(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function Y(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),B.TYPED_ARRAY_SUPPORT?(t=e).__proto__=B.prototype:t=q(t,e),t}function z(t,e){if(G(e)){var n=0|W(e.length);return 0===(t=M(t,n)).length||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||Tt(e.length)?M(t,0):q(t,e);if("Buffer"===e.type&&j(e.data))return q(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function W(t){if(t>=P())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P().toString(16)+" bytes");return 0|t}function G(t){return!(null==t||!t._isBuffer)}function J(t,e){if(G(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 kt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return xt(t).length;default:if(r)return kt(t).length;e=(""+e).toLowerCase(),r=!0}}function H(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))return"";for(t||(t="utf8");;)switch(t){case"hex":return ft(this,e,n);case"utf8":case"utf-8":return st(this,e,n);case"ascii":return ct(this,e,n);case"latin1":case"binary":return lt(this,e,n);case"base64":return ot(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function $(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Q(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=B.from(e,r)),G(e))return 0===e.length?-1:K(t,e,n,r,i);if("number"==typeof e)return e&=255,B.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):K(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function K(t,e,n,r,i){var o,s=1,a=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;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return-1}function Z(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 s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function tt(t,e,n,r){return At(kt(e,t.length-n),t,n,r)}function et(t,e,n,r){return At(Rt(e),t,n,r)}function nt(t,e,n,r){return et(t,e,n,r)}function rt(t,e,n,r){return At(xt(e),t,n,r)}function it(t,e,n,r){return At(Ot(e,t.length-n),t,n,r)}function ot(t,e,n){return 0===e&&n===t.length?x(t):x(t.slice(e,n))}function st(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return ut(r)}B.TYPED_ARRAY_SUPPORT=void 0===v.TYPED_ARRAY_SUPPORT||v.TYPED_ARRAY_SUPPORT,B.poolSize=8192,B._augment=function(t){return t.__proto__=B.prototype,t},B.from=function(t,e,n){return I(null,t,e,n)},B.TYPED_ARRAY_SUPPORT&&(B.prototype.__proto__=Uint8Array.prototype,B.__proto__=Uint8Array),B.alloc=function(t,e,n){return U(null,t,e,n)},B.allocUnsafe=function(t){return D(null,t)},B.allocUnsafeSlow=function(t){return D(null,t)},B.isBuffer=Lt,B.compare=function(t,e){if(!G(t)||!G(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},B.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}},B.concat=function(t,e){if(!j(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return B.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=B.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!G(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},B.byteLength=J,B.prototype._isBuffer=!0,B.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)$(this,e,e+1);return this},B.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)$(this,e,e+3),$(this,e+1,e+2);return this},B.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)$(this,e,e+7),$(this,e+1,e+6),$(this,e+2,e+5),$(this,e+3,e+4);return this},B.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?st(this,0,t):H.apply(this,arguments)},B.prototype.equals=function(t){if(!G(t))throw new TypeError("Argument must be a Buffer");return this===t||0===B.compare(this,t)},B.prototype.inspect=function(){var t="",e=C;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},B.prototype.compare=function(t,e,n,r,i){if(!G(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(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),u=this.slice(r,i),c=t.slice(e,n),l=0;l<a;++l)if(u[l]!==c[l]){o=u[l],s=c[l];break}return o<s?-1:s<o?1:0},B.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},B.prototype.indexOf=function(t,e,n){return Q(this,t,e,n,!0)},B.prototype.lastIndexOf=function(t,e,n){return Q(this,t,e,n,!1)},B.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 Z(this,t,e,n);case"utf8":case"utf-8":return tt(this,t,e,n);case"ascii":return et(this,t,e,n);case"latin1":case"binary":return nt(this,t,e,n);case"base64":return rt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return it(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},B.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var at=4096;function ut(t){var e=t.length;if(e<=at)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=at));return n}function ct(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 lt(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 ft(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+=Et(t[o]);return i}function ht(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 pt(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 dt(t,e,n,r,i,o){if(!G(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function gt(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 yt(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 vt(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 mt(t,e,n,r,i){return i||vt(t,e,n,4),T(t,e,n,r,23,4),n+4}function bt(t,e,n,r,i){return i||vt(t,e,n,8),T(t,e,n,r,52,8),n+8}B.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),B.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=B.prototype;else{var i=e-t;n=new B(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},B.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},B.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},B.prototype.readUInt8=function(t,e){return e||pt(t,1,this.length),this[t]},B.prototype.readUInt16LE=function(t,e){return e||pt(t,2,this.length),this[t]|this[t+1]<<8},B.prototype.readUInt16BE=function(t,e){return e||pt(t,2,this.length),this[t]<<8|this[t+1]},B.prototype.readUInt32LE=function(t,e){return e||pt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},B.prototype.readUInt32BE=function(t,e){return e||pt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},B.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},B.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||pt(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},B.prototype.readInt8=function(t,e){return e||pt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},B.prototype.readInt16LE=function(t,e){e||pt(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},B.prototype.readInt16BE=function(t,e){e||pt(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},B.prototype.readInt32LE=function(t,e){return e||pt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},B.prototype.readInt32BE=function(t,e){return e||pt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},B.prototype.readFloatLE=function(t,e){return e||pt(t,4,this.length),A(this,t,!0,23,4)},B.prototype.readFloatBE=function(t,e){return e||pt(t,4,this.length),A(this,t,!1,23,4)},B.prototype.readDoubleLE=function(t,e){return e||pt(t,8,this.length),A(this,t,!0,52,8)},B.prototype.readDoubleBE=function(t,e){return e||pt(t,8,this.length),A(this,t,!1,52,8)},B.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||dt(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},B.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||dt(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},B.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,1,255,0),B.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},B.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):gt(this,t,e,!0),e+2},B.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):gt(this,t,e,!1),e+2},B.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,4294967295,0),B.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):yt(this,t,e,!0),e+4},B.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,4294967295,0),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yt(this,t,e,!1),e+4},B.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);dt(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},B.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);dt(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},B.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,1,127,-128),B.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},B.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):gt(this,t,e,!0),e+2},B.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):gt(this,t,e,!1),e+2},B.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,2147483647,-2147483648),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):yt(this,t,e,!0),e+4},B.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||dt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):yt(this,t,e,!1),e+4},B.prototype.writeFloatLE=function(t,e,n){return mt(this,t,e,!0,n)},B.prototype.writeFloatBE=function(t,e,n){return mt(this,t,e,!1,n)},B.prototype.writeDoubleLE=function(t,e,n){return bt(this,t,e,!0,n)},B.prototype.writeDoubleBE=function(t,e,n){return bt(this,t,e,!1,n)},B.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!B.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},B.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!B.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=G(t)?t:kt(new B(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var wt=/[^+\/0-9A-Za-z-_]/g;function _t(t){if((t=St(t).replace(wt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function St(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Et(t){return t<16?"0"+t.toString(16):t.toString(16)}function kt(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+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 Rt(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function Ot(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}function xt(t){return k(_t(t))}function At(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 Tt(t){return t!=t}function Lt(t){return null!=t&&(!!t._isBuffer||jt(t)||Ct(t))}function jt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function Ct(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&jt(t.slice(0,0))}function Pt(){throw new Error("setTimeout has not been defined")}function Mt(){throw new Error("clearTimeout has not been defined")}var Bt=Pt,It=Mt;function Nt(t){if(Bt===setTimeout)return setTimeout(t,0);if((Bt===Pt||!Bt)&&setTimeout)return Bt=setTimeout,setTimeout(t,0);try{return Bt(t,0)}catch(e){try{return Bt.call(null,t,0)}catch(e){return Bt.call(this,t,0)}}}function Ut(t){if(It===clearTimeout)return clearTimeout(t);if((It===Mt||!It)&&clearTimeout)return It=clearTimeout,clearTimeout(t);try{return It(t)}catch(e){try{return It.call(null,t)}catch(e){return It.call(this,t)}}}"function"==typeof v.setTimeout&&(Bt=setTimeout),"function"==typeof v.clearTimeout&&(It=clearTimeout);var Dt,Ft=[],qt=!1,Yt=-1;function zt(){qt&&Dt&&(qt=!1,Dt.length?Ft=Dt.concat(Ft):Yt=-1,Ft.length&&Vt())}function Vt(){if(!qt){var t=Nt(zt);qt=!0;for(var e=Ft.length;e;){for(Dt=Ft,Ft=[];++Yt<e;)Dt&&Dt[Yt].run();Yt=-1,e=Ft.length}Dt=null,qt=!1,Ut(t)}}function Wt(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];Ft.push(new Gt(t,e)),1!==Ft.length||qt||Nt(Vt)}function Gt(t,e){this.fun=t,this.array=e}Gt.prototype.run=function(){this.fun.apply(null,this.array)};var Jt=v.performance||{};Jt.now||Jt.mozNow||Jt.msNow||Jt.oNow||Jt.webkitNow;var Ht="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},$t=/%[sdj%]/g;function Xt(t){if(!ge(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(ee(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(t).replace($t,(function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(V){return"[Circular]"}default:return t}})),s=r[n];n<i;s=r[++n])pe(s)||!me(s)?o+=" "+s:o+=" "+ee(s);return o}function Qt(t,e){if(ye(v.process))return function(){return Qt(t,e).apply(this,arguments)};var n=!1;function r(){return n||(console.error(e),n=!0),t.apply(this,arguments)}return r}var Kt,Zt={};function te(t){if(ye(Kt)&&(Kt=""),t=t.toUpperCase(),!Zt[t])if(new RegExp("\\b"+t+"\\b","i").test(Kt)){var e=0;Zt[t]=function(){var n=Xt.apply(null,arguments);console.error("%s %d: %s",t,e,n)}}else Zt[t]=function(){};return Zt[t]}function ee(t,e){var n={seen:[],stylize:re};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),he(e)?n.showHidden=e:e&&Ee(n,e),ye(n.showHidden)&&(n.showHidden=!1),ye(n.depth)&&(n.depth=2),ye(n.colors)&&(n.colors=!1),ye(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ne),oe(n,t,n.depth)}function ne(t,e){var n=ee.styles[e];return n?"["+ee.colors[n][0]+"m"+t+"["+ee.colors[n][1]+"m":t}function re(t,e){return t}function ie(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}function oe(t,e,n){if(t.customInspect&&e&&_e(e.inspect)&&e.inspect!==ee&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return ge(r)||(r=oe(t,r,n)),r}var i=se(t,e);if(i)return i;var o=Object.keys(e),s=ie(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),we(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ae(e);if(0===o.length){if(_e(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(ve(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(be(e))return t.stylize(Date.prototype.toString.call(e),"date");if(we(e))return ae(e)}var u,c="",l=!1,f=["{","}"];return fe(e)&&(l=!0,f=["[","]"]),_e(e)&&(c=" [Function"+(e.name?": "+e.name:"")+"]"),ve(e)&&(c=" "+RegExp.prototype.toString.call(e)),be(e)&&(c=" "+Date.prototype.toUTCString.call(e)),we(e)&&(c=" "+ae(e)),0!==o.length||l&&0!=e.length?n<0?ve(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),u=l?ue(t,e,n,s,o):o.map((function(r){return ce(t,e,n,s,r,l)})),t.seen.pop(),le(u,c,f)):f[0]+c+f[1]}function se(t,e){if(ye(e))return t.stylize("undefined","undefined");if(ge(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return de(e)?t.stylize(""+e,"number"):he(e)?t.stylize(""+e,"boolean"):pe(e)?t.stylize("null","null"):void 0}function ae(t){return"["+Error.prototype.toString.call(t)+"]"}function ue(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)ke(e,String(s))?o.push(ce(t,e,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(ce(t,e,n,r,i,!0))})),o}function ce(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),ke(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=pe(n)?oe(t,u.value,null):oe(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),ye(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function le(t,e,n){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function fe(t){return Array.isArray(t)}function he(t){return"boolean"==typeof t}function pe(t){return null===t}function de(t){return"number"==typeof t}function ge(t){return"string"==typeof t}function ye(t){return void 0===t}function ve(t){return me(t)&&"[object RegExp]"===Se(t)}function me(t){return"object"===w(t)&&null!==t}function be(t){return me(t)&&"[object Date]"===Se(t)}function we(t){return me(t)&&("[object Error]"===Se(t)||t instanceof Error)}function _e(t){return"function"==typeof t}function Se(t){return Object.prototype.toString.call(t)}function Ee(t,e){if(!e||!me(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}function ke(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Re(){this.head=null,this.tail=null,this.length=0}ee.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ee.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Re.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},Re.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},Re.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},Re.prototype.clear=function(){this.head=this.tail=null,this.length=0},Re.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},Re.prototype.concat=function(t){if(0===this.length)return B.alloc(0);if(1===this.length)return this.head.data;for(var e=B.allocUnsafe(t>>>0),n=this.head,r=0;n;)n.data.copy(e,r),r+=n.data.length,n=n.next;return e};var Oe=B.isEncoding||function(t){switch(t&&t.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 xe(t){if(t&&!Oe(t))throw new Error("Unknown encoding: "+t)}function Ae(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),xe(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Le;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=je;break;default:return void(this.write=Te)}this.charBuffer=new B(6),this.charReceived=0,this.charLength=0}function Te(t){return t.toString(this.encoding)}function Le(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function je(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}Ae.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(t=t.slice(n,t.length),!((r=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r,i=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),i=(e+=t.toString(this.encoding,0,i)).length-1,(r=e.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},Ae.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},Ae.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e},Ie.ReadableState=Be;var Ce=te("stream");function Pe(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}function Me(t,e){return t.listeners(e).length}function Be(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof Cn&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Re,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.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Ae(t.encoding),this.encoding=t.encoding)}function Ie(t){if(!(this instanceof Ie))return new Ie(t);this._readableState=new Be(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),r.call(this)}function Ne(t,e,n,r,i){var o=Ye(e,n);if(o)t.emit("error",o);else if(null===n)e.reading=!1,ze(t,e);else if(e.objectMode||n&&n.length>0)if(e.ended&&!i){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else{var u;!e.decoder||i||r||(n=e.decoder.write(n),u=!e.objectMode&&0===n.length),i||(e.reading=!1),u||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&Ve(t))),Ge(t,e)}else i||(e.reading=!1);return Ue(e)}function Ue(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}Ht(Ie,r),Ie.prototype.push=function(t,e){var n=this._readableState;return n.objectMode||"string"!=typeof t||(e=e||n.defaultEncoding)!==n.encoding&&(t=B.from(t,e),e=""),Ne(this,n,t,e,!1)},Ie.prototype.unshift=function(t){return Ne(this,this._readableState,t,"",!0)},Ie.prototype.isPaused=function(){return!1===this._readableState.flowing},Ie.prototype.setEncoding=function(t){return this._readableState.decoder=new Ae(t),this._readableState.encoding=t,this};var De=8388608;function Fe(t){return t>=De?t=De:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qe(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Fe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Ye(t,e){var n=null;return Lt(e)||"string"==typeof e||null==e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function ze(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,Ve(t)}}function Ve(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ce("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Wt(We,t):We(t))}function We(t){Ce("emit readable"),t.emit("readable"),Ke(t)}function Ge(t,e){e.readingMore||(e.readingMore=!0,Wt(Je,t,e))}function Je(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ce("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function He(t){return function(){var e=t._readableState;Ce("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Ke(t))}}function $e(t){Ce("readable nexttick read 0"),t.read(0)}function Xe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Wt(Qe,t,e))}function Qe(t,e){e.reading||(Ce("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Ke(t),e.flowing&&!e.reading&&t.read(0)}function Ke(t){var e=t._readableState;for(Ce("flow",e.flowing);e.flowing&&null!==t.read(););}function Ze(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=tn(t,e.buffer,e.decoder),n);var n}function tn(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?en(t,e):nn(t,e),r}function en(t,e){var n=e.head,r=1,i=n.data;for(t-=i.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0==(t-=s)){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}function nn(t,e){var n=B.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0==(t-=s)){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}function rn(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Wt(on,e,t))}function on(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function sn(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}function an(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function un(){}function cn(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function ln(t,e){Object.defineProperty(this,"buffer",{get:Qt((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof Cn&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===t.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){bn(e,t)},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 xn(this)}function fn(t){if(!(this instanceof fn||this instanceof Cn))return new fn(t);this._writableState=new ln(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev)),r.call(this)}function hn(t,e){var n=new Error("write after end");t.emit("error",n),Wt(e,n)}function pn(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):B.isBuffer(n)||"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),Wt(r,o),i=!1),i}function dn(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=B.from(e,n)),e}function gn(t,e,n,r,i){n=dn(e,n,r),B.isBuffer(n)&&(r="buffer");var o=e.objectMode?1:n.length;e.length+=o;var s=e.length<e.highWaterMark;if(s||(e.needDrain=!0),e.writing||e.corked){var a=e.lastBufferedRequest;e.lastBufferedRequest=new cn(n,r,i),a?a.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else yn(t,e,!1,o,n,r,i);return s}function yn(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function vn(t,e,n,r,i){--e.pendingcb,n?Wt(i,r):i(r),t._writableState.errorEmitted=!0,t.emit("error",r)}function mn(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function bn(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(mn(n),e)vn(t,n,r,e,i);else{var o=En(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||Sn(t,n),r?Wt(wn,t,n,o,i):wn(t,n,o,i)}}function wn(t,e,n,r){n||_n(t,e),e.pendingcb--,r(),Rn(t,e)}function _n(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Sn(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0;n;)i[s]=n,n=n.next,s+=1;yn(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new xn(e)}else{for(;n;){var a=n.chunk,u=n.encoding,c=n.callback;if(yn(t,e,!1,e.objectMode?1:a.length,a,u,c),n=n.next,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=n,e.bufferProcessing=!1}function En(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function kn(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function Rn(t,e){var n=En(e);return n&&(0===e.pendingcb?(kn(t,e),e.finished=!0,t.emit("finish")):kn(t,e)),n}function On(t,e,n){e.ending=!0,Rn(t,e),n&&(e.finished?Wt(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function xn(t){var e=this;this.next=null,this.entry=null,this.finish=function(n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}Ie.prototype.read=function(t){Ce("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ce("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?rn(this):Ve(this),null;if(0===(t=qe(t,e))&&e.ended)return 0===e.length&&rn(this),null;var r,i=e.needReadable;return Ce("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&Ce("length less than watermark",i=!0),e.ended||e.reading?Ce("reading or ended",i=!1):i&&(Ce("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=qe(n,e))),null===(r=t>0?Ze(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&rn(this)),null!==r&&this.emit("data",r),r},Ie.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Ie.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,Ce("pipe count=%d opts=%j",r.pipesCount,e);var i=e&&!1===e.end?c:s;function o(t){Ce("onunpipe"),t===n&&c()}function s(){Ce("onend"),t.end()}r.endEmitted?Wt(i):n.once("end",i),t.on("unpipe",o);var a=He(n);t.on("drain",a);var u=!1;function c(){Ce("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",a),t.removeListener("error",h),t.removeListener("unpipe",o),n.removeListener("end",s),n.removeListener("end",c),n.removeListener("data",f),u=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||a()}var l=!1;function f(e){Ce("ondata"),l=!1,!1!==t.write(e)||l||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==an(r.pipes,t))&&!u&&(Ce("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function h(e){Ce("onerror",e),g(),t.removeListener("error",h),0===Me(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",d),g()}function d(){Ce("onfinish"),t.removeListener("close",p),g()}function g(){Ce("unpipe"),n.unpipe(t)}return n.on("data",f),Pe(t,"error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",n),r.flowing||(Ce("pipe resume"),n.resume()),t},Ie.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=an(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},Ie.prototype.on=function(t,e){var n=r.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Ve(this):Wt($e,this))}return n},Ie.prototype.addListener=Ie.prototype.on,Ie.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ce("resume"),t.flowing=!0,Xe(this,t)),this},Ie.prototype.pause=function(){return Ce("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(Ce("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Ie.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var i in t.on("end",(function(){if(Ce("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)})),t.on("data",(function(i){Ce("wrapped data"),e.decoder&&(i=e.decoder.write(i)),e.objectMode&&null==i||(e.objectMode||i&&i.length)&&(r.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));return sn(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){Ce("wrapped _read",e),n&&(n=!1,t.resume())},r},Ie._fromList=Ze,fn.WritableState=ln,Ht(fn,r),ln.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},fn.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},fn.prototype.write=function(t,e,n){var r=this._writableState,i=!1;return"function"==typeof e&&(n=e,e=null),B.isBuffer(t)?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof n&&(n=un),r.ended?hn(this,n):pn(this,r,t,n)&&(r.pendingcb++,i=gn(this,r,t,e,n)),i},fn.prototype.cork=function(){this._writableState.corked++},fn.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||Sn(this,t))},fn.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},fn.prototype._write=function(t,e,n){n(new Error("not implemented"))},fn.prototype._writev=null,fn.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||On(this,r,n)},Ht(Cn,Ie);for(var An,Tn=Object.keys(fn.prototype),Ln=0;Ln<Tn.length;Ln++){var jn=Tn[Ln];Cn.prototype[jn]||(Cn.prototype[jn]=fn.prototype[jn])}function Cn(t){if(!(this instanceof Cn))return new Cn(t);Ie.call(this,t),fn.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Pn)}function Pn(){this.allowHalfOpen||this._writableState.ended||Wt(Mn,this)}function Mn(t){t.end()}function Bn(t){this.afterTransform=function(e,n){return In(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function In(t,e,n){var r=t._transformState;r.transforming=!1;var i=r.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!=n&&t.push(n),i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function Nn(t){if(!(this instanceof Nn))return new Nn(t);Cn.call(this,t),this._transformState=new Bn(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(t){Un(e,t)})):Un(e)}))}function Un(t,e){if(e)return t.emit("error",e);var n=t._writableState,r=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function Dn(t){if(!(this instanceof Dn))return new Dn(t);Nn.call(this,t)}function Fn(){r.call(this)}function qn(t){return qn="function"==typeof Symbol&&"symbol"===w(Symbol.iterator)?function(t){return w(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":w(t)},qn(t)}function Yn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vn(t,e,n){return e&&zn(t.prototype,e),n&&zn(t,n),t}function Wn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Wn(t,e,n[e])}))}return t}function Jn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$n(t,e)}function Hn(t){return Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hn(t)}function $n(t,e){return $n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$n(t,e)}function Xn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qn(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?Xn(t):e}function Kn(t){return er(t)||nr(t)||ir()}function Zn(t){return tr(t)||nr(t)||rr()}function tr(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function er(t){if(Array.isArray(t))return t}function nr(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function rr(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function ir(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function or(){if(void 0===An){var t=new ArrayBuffer(2),e=new Uint8Array(t),n=new Uint16Array(t);if(e[0]=1,e[1]=2,258===n[0])An="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");An="LE"}}return An}function sr(){return void 0!==v.location?v.location.hostname:""}function ar(){return[]}function ur(){return 0}function cr(){return Number.MAX_VALUE}function lr(){return Number.MAX_VALUE}function fr(){return[]}function hr(){return"Browser"}function pr(){return void 0!==v.navigator?v.navigator.appVersion:""}function dr(){}function gr(){}function yr(){return"/tmp"}Ht(Nn,Cn),Nn.prototype.push=function(t,e){return this._transformState.needTransform=!1,Cn.prototype.push.call(this,t,e)},Nn.prototype._transform=function(t,e,n){throw new Error("Not implemented")},Nn.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Nn.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Ht(Dn,Nn),Dn.prototype._transform=function(t,e,n){n(null,t)},Ht(Fn,r),Fn.Readable=Ie,Fn.Writable=fn,Fn.Duplex=Cn,Fn.Transform=Nn,Fn.PassThrough=Dn,Fn.Stream=Fn,Fn.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===r.listenerCount(this,"error"))throw t}function l(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),t.removeListener("close",l)}return n.on("error",c),t.on("error",c),n.on("end",l),n.on("close",l),t.on("close",l),t.emit("pipe",n),t};var vr={EOL:"\n",tmpdir:yr,tmpDir:yr,networkInterfaces:dr,getNetworkInterfaces:gr,release:pr,type:hr,cpus:fr,totalmem:lr,freemem:cr,uptime:ur,loadavg:ar,hostname:sr,endianness:or},mr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==X?X:"undefined"!=typeof self?self:{},br="Expected a function",wr="__lodash_hash_undefined__",_r=1/0,Sr="[object Function]",Er="[object GeneratorFunction]",kr="[object Symbol]",Rr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Or=/^\w*$/,xr=/^\./,Ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tr=/[\\^$.*+?()[\]{}|]/g,Lr=/\\(\\)?/g,jr=/^\[object .+?Constructor\]$/,Cr="object"==w(mr)&&mr&&mr.Object===Object&&mr,Pr="object"==("undefined"==typeof self?"undefined":w(self))&&self&&self.Object===Object&&self,Mr=Cr||Pr||Function("return this")();function Br(t,e){return null==t?void 0:t[e]}function Ir(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}var Nr,Ur=Array.prototype,Dr=Function.prototype,Fr=Object.prototype,qr=Mr["__core-js_shared__"],Yr=(Nr=/[^.]+$/.exec(qr&&qr.keys&&qr.keys.IE_PROTO||""))?"Symbol(src)_1."+Nr:"",zr=Dr.toString,Vr=Fr.hasOwnProperty,Wr=Fr.toString,Gr=RegExp("^"+zr.call(Vr).replace(Tr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jr=Mr.Symbol,Hr=Ur.splice,$r=Ei(Mr,"Map"),Xr=Ei(Object,"create"),Qr=Jr?Jr.prototype:void 0,Kr=Qr?Qr.toString:void 0;function Zr(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ti(){this.__data__=Xr?Xr(null):{}}function ei(t){return this.has(t)&&delete this.__data__[t]}function ni(t){var e=this.__data__;if(Xr){var n=e[t];return n===wr?void 0:n}return Vr.call(e,t)?e[t]:void 0}function ri(t){var e=this.__data__;return Xr?void 0!==e[t]:Vr.call(e,t)}function ii(t,e){return this.__data__[t]=Xr&&void 0===e?wr:e,this}function oi(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function si(){this.__data__=[]}function ai(t){var e=this.__data__,n=vi(e,t);return!(n<0||(n==e.length-1?e.pop():Hr.call(e,n,1),0))}function ui(t){var e=this.__data__,n=vi(e,t);return n<0?void 0:e[n][1]}function ci(t){return vi(this.__data__,t)>-1}function li(t,e){var n=this.__data__,r=vi(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function fi(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function hi(){this.__data__={hash:new Zr,map:new($r||oi),string:new Zr}}function pi(t){return Si(this,t).delete(t)}function di(t){return Si(this,t).get(t)}function gi(t){return Si(this,t).has(t)}function yi(t,e){return Si(this,t).set(t,e),this}function vi(t,e){for(var n=t.length;n--;)if(ji(t[n][0],e))return n;return-1}function mi(t,e){for(var n=0,r=(e=ki(e,t)?[e]:_i(e)).length;null!=t&&n<r;)t=t[Ai(e[n++])];return n&&n==r?t:void 0}function bi(t){return!(!Mi(t)||Oi(t))&&(Pi(t)||Ir(t)?Gr:jr).test(Ti(t))}function wi(t){if("string"==typeof t)return t;if(Ii(t))return Kr?Kr.call(t):"";var e=t+"";return"0"==e&&1/t==-_r?"-0":e}function _i(t){return Ci(t)?t:xi(t)}function Si(t,e){var n=t.__data__;return Ri(e)?n["string"==typeof e?"string":"hash"]:n.map}function Ei(t,e){var n=Br(t,e);return bi(n)?n:void 0}function ki(t,e){if(Ci(t))return!1;var n=w(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ii(t))||Or.test(t)||!Rr.test(t)||null!=e&&t in Object(e)}function Ri(t){var e=w(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Oi(t){return!!Yr&&Yr in t}Zr.prototype.clear=ti,Zr.prototype.delete=ei,Zr.prototype.get=ni,Zr.prototype.has=ri,Zr.prototype.set=ii,oi.prototype.clear=si,oi.prototype.delete=ai,oi.prototype.get=ui,oi.prototype.has=ci,oi.prototype.set=li,fi.prototype.clear=hi,fi.prototype.delete=pi,fi.prototype.get=di,fi.prototype.has=gi,fi.prototype.set=yi;var xi=Li((function(t){t=Ni(t);var e=[];return xr.test(t)&&e.push(""),t.replace(Ar,(function(t,n,r,i){e.push(r?i.replace(Lr,"$1"):n||t)})),e}));function Ai(t){if("string"==typeof t||Ii(t))return t;var e=t+"";return"0"==e&&1/t==-_r?"-0":e}function Ti(t){if(null!=t){try{return zr.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Li(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(br);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(Li.Cache||fi),n}function ji(t,e){return t===e||t!=t&&e!=e}Li.Cache=fi;var Ci=Array.isArray;function Pi(t){var e=Mi(t)?Wr.call(t):"";return e==Sr||e==Er}function Mi(t){var e=w(t);return!!t&&("object"==e||"function"==e)}function Bi(t){return!!t&&"object"==w(t)}function Ii(t){return"symbol"==w(t)||Bi(t)&&Wr.call(t)==kr}function Ni(t){return null==t?"":wi(t)}function Ui(t,e,n){var r=null==t?void 0:mi(t,e);return void 0===r?n:r}var Di=Ui;function Fi(t,e,n){return void 0===t[e]?n:t[e]}function qi(t,e,n){var r=Array.isArray(e)?e:e.split("."),i=Kn(r),o=i[0],s=i.slice(1);return Gn({},t,Wn({},o,r.length>1?qi(t[o]||{},s,n):n))}function Yi(t,e){var n=Array.isArray(e)?e:e.split("."),r=Kn(n),i=r[0],o=r.slice(1);return"object"!==qn(t[i])?t:1===n.length?Object.keys(t).filter((function(t){return t!==i})).reduce((function(e,n){return Object.assign(e,Wn({},n,t[n]))}),{}):Object.keys(t).reduce((function(e,n){return Gn({},e,Wn({},n,n!==i?t[n]:Yi(t[i],o)))}),{})}function zi(t,e){try{return t.push.apply(t,Zn(e)),t}catch(n){return t.concat(e)}}function Vi(t,e){var n=!0;return t.reduce((function(t,r){return null==r&&(r=""),n?(n=!1,"".concat(r)):"".concat(t).concat(e).concat(r)}),"")}var Wi={getProp:Fi,setProp:qi,unsetProp:Yi,fastJoin:Vi,flattenReducer:zi},Gi=Wi.getProp,Ji=Wi.fastJoin,Hi=Wi.flattenReducer,$i=function(){function t(e){Yn(this,t),this.opts=this.preprocessOpts(e)}return Vn(t,[{key:"preprocessOpts",value:function(t){var e=Object.assign({},t);return e.transforms=Array.isArray(e.transforms)?e.transforms:e.transforms?[e.transforms]:[],e.delimiter=e.delimiter||",",e.eol=e.eol||vr.EOL,e.quote="string"==typeof e.quote?e.quote:'"',e.escapedQuote="string"==typeof e.escapedQuote?e.escapedQuote:"".concat(e.quote).concat(e.quote),e.header=!1!==e.header,e.includeEmptyRows=e.includeEmptyRows||!1,e.withBOM=e.withBOM||!1,e}},{key:"preprocessFieldsInfo",value:function(t){var e=this;return t.map((function(t){if("string"==typeof t)return{label:t,value:t.includes(".")||t.includes("[")?function(n){return Di(n,t,e.opts.defaultValue)}:function(n){return Gi(n,t,e.opts.defaultValue)}};if("object"===qn(t)){var n="default"in t?t.default:e.opts.defaultValue;if("string"==typeof t.value)return{label:t.label||t.value,value:t.value.includes(".")||t.value.includes("[")?function(e){return Di(e,t.value,n)}:function(e){return Gi(e,t.value,n)}};if("function"==typeof t.value){var r=t.label||t.value.name||"",i={label:r,default:n};return{label:r,value:function(e){var r=t.value(e,i);return null==r?n:r}}}}throw new Error("Invalid field info option. "+JSON.stringify(t))}))}},{key:"getHeader",value:function(){var t=this;return Ji(this.opts.fields.map((function(e){return t.processValue(e.label)})),this.opts.delimiter)}},{key:"preprocessRow",value:function(t){return this.opts.transforms.reduce((function(t,e){return t.map((function(t){return e(t)})).reduce(Hi,[])}),[t])}},{key:"processRow",value:function(t){var e=this;if(t){var n=this.opts.fields.map((function(n){return e.processCell(t,n)}));if(this.opts.includeEmptyRows||!n.every((function(t){return void 0===t})))return Ji(n,this.opts.delimiter)}}},{key:"processCell",value:function(t,e){return this.processValue(e.value(t))}},{key:"processValue",value:function(t){if(null!=t){var e=qn(t);if("boolean"!==e&&"number"!==e&&"string"!==e){if(void 0===(t=JSON.stringify(t)))return;'"'===t[0]&&(t=t.replace(/^"(.+)"$/,"$1"))}return"string"==typeof t&&(this.opts.excelStrings?(t.includes(this.opts.quote)&&(t=t.replace(new RegExp(this.opts.quote,"g"),"".concat(this.opts.escapedQuote).concat(this.opts.escapedQuote))),t='"=""'.concat(t,'"""')):(t.includes(this.opts.quote)&&(t=t.replace(new RegExp(this.opts.quote,"g"),this.opts.escapedQuote)),t="".concat(this.opts.quote).concat(t).concat(this.opts.quote))),t}}}]),t}(),Xi=Wi.fastJoin,Qi=Wi.flattenReducer,Ki=function(t){function e(t){var n;return Yn(this,e),(n=Qn(this,Hn(e).call(this,t))).opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields)),n}return Jn(e,t),Vn(e,[{key:"parse",value:function(t){var e=this.preprocessData(t);this.opts.fields||(this.opts.fields=e.reduce((function(t,e){return Object.keys(e).forEach((function(e){t.includes(e)||t.push(e)})),t}),[]),this.opts.fields=this.preprocessFieldsInfo(this.opts.fields));var n=this.opts.header?this.getHeader():"",r=this.processData(e);return(this.opts.withBOM?"\ufeff":"")+n+(n&&r?this.opts.eol:"")+r}},{key:"preprocessData",value:function(t){var e=this,n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(0===n.length||"object"!==qn(n[0])))throw new Error('Data should not be empty or the "fields" option should be included');return 0===this.opts.transforms.length?n:n.map((function(t){return e.preprocessRow(t)})).reduce(Qi,[])}},{key:"processData",value:function(t){var e=this;return Xi(t.map((function(t){return e.processRow(t)})).filter((function(t){return t})),this.opts.eol)}}]),e}($i),Zi={},to=Zi.LEFT_BRACE=1,eo=Zi.RIGHT_BRACE=2,no=Zi.LEFT_BRACKET=3,ro=Zi.RIGHT_BRACKET=4,io=Zi.COLON=5,oo=Zi.COMMA=6,so=Zi.TRUE=7,ao=Zi.FALSE=8,uo=Zi.NULL=9,co=Zi.STRING=10,lo=Zi.NUMBER=11,fo=Zi.START=17,ho=Zi.STOP=18,po=Zi.TRUE1=33,go=Zi.TRUE2=34,yo=Zi.TRUE3=35,vo=Zi.FALSE1=49,mo=Zi.FALSE2=50,bo=Zi.FALSE3=51,wo=Zi.FALSE4=52,_o=Zi.NULL1=65,So=Zi.NULL2=66,Eo=Zi.NULL3=67,ko=Zi.NUMBER1=81,Ro=Zi.NUMBER3=83,Oo=Zi.STRING1=97,xo=Zi.STRING2=98,Ao=Zi.STRING3=99,To=Zi.STRING4=100,Lo=Zi.STRING5=101,jo=Zi.STRING6=102,Co=Zi.VALUE=113,Po=Zi.KEY=114,Mo=Zi.OBJECT=129,Bo=Zi.ARRAY=130,Io="\\".charCodeAt(0),No="/".charCodeAt(0),Uo="\b".charCodeAt(0),Do="\f".charCodeAt(0),Fo="\n".charCodeAt(0),qo="\r".charCodeAt(0),Yo="\t".charCodeAt(0),zo=65536;function Vo(){this.tState=fo,this.value=void 0,this.string=void 0,this.stringBuffer=B.alloc?B.alloc(zo):new B(zo),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=Co,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new B(2),3:new B(3),4:new B(4)},this.offset=-1}Vo.toknam=function(t){for(var e=Object.keys(Zi),n=0,r=e.length;n<r;n++){var i=e[n];if(Zi[i]===t)return i}return t&&"0x"+t.toString(16)};var Wo=Vo.prototype;Wo.onError=function(t){throw t},Wo.charError=function(t,e){this.tState=ho,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(t[e]))+" at position "+e+" in state "+Vo.toknam(this.tState)))},Wo.appendStringChar=function(t){this.stringBufferOffset>=zo&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t},Wo.appendStringBuf=function(t,e,n){var r=t.length;"number"==typeof e&&(r="number"==typeof n?n<0?t.length-e+n:n-e:t.length-e),r<0&&(r=0),this.stringBufferOffset+r>zo&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,n),this.stringBufferOffset+=r},Wo.write=function(t){var e;"string"==typeof t&&(t=new B(t));for(var n=0,r=t.length;n<r;n++)if(this.tState===fo){if(e=t[n],this.offset++,123===e)this.onToken(to,"{");else if(125===e)this.onToken(eo,"}");else if(91===e)this.onToken(no,"[");else if(93===e)this.onToken(ro,"]");else if(58===e)this.onToken(io,":");else if(44===e)this.onToken(oo,",");else if(116===e)this.tState=po;else if(102===e)this.tState=vo;else if(110===e)this.tState=_o;else if(34===e)this.string="",this.stringBufferOffset=0,this.tState=Oo;else if(45===e)this.string="-",this.tState=ko;else if(e>=48&&e<64)this.string=String.fromCharCode(e),this.tState=Ro;else if(32!==e&&9!==e&&10!==e&&13!==e)return this.charError(t,n)}else if(this.tState===Oo)if(e=t[n],this.bytes_remaining>0){for(var i=0;i<this.bytes_remaining;i++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+i]=t[i];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,n=n+i-1}else if(0===this.bytes_remaining&&e>=128){if(e<=193||e>244)return this.onError(new Error("Invalid UTF-8 character at position "+n+" in state "+Vo.toknam(this.tState)));if(e>=194&&e<=223&&(this.bytes_in_sequence=2),e>=224&&e<=239&&(this.bytes_in_sequence=3),e>=240&&e<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+n>t.length){for(var o=0;o<=t.length-1-n;o++)this.temp_buffs[this.bytes_in_sequence][o]=t[n+o];this.bytes_remaining=n+this.bytes_in_sequence-t.length,n=t.length-1}else this.appendStringBuf(t,n,n+this.bytes_in_sequence),n=n+this.bytes_in_sequence-1}else if(34===e)this.tState=fo,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(co,this.string),this.offset+=B.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===e)this.tState=xo;else{if(!(e>=32))return this.charError(t,n);this.appendStringChar(e)}else if(this.tState===xo)if(34===(e=t[n]))this.appendStringChar(e),this.tState=Oo;else if(92===e)this.appendStringChar(Io),this.tState=Oo;else if(47===e)this.appendStringChar(No),this.tState=Oo;else if(98===e)this.appendStringChar(Uo),this.tState=Oo;else if(102===e)this.appendStringChar(Do),this.tState=Oo;else if(110===e)this.appendStringChar(Fo),this.tState=Oo;else if(114===e)this.appendStringChar(qo),this.tState=Oo;else if(116===e)this.appendStringChar(Yo),this.tState=Oo;else{if(117!==e)return this.charError(t,n);this.unicode="",this.tState=Ao}else if(this.tState===Ao||this.tState===To||this.tState===Lo||this.tState===jo){if(!((e=t[n])>=48&&e<64||e>64&&e<=70||e>96&&e<=102))return this.charError(t,n);if(this.unicode+=String.fromCharCode(e),this.tState++===jo){var s=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&s>=56320&&s<57344?(this.appendStringBuf(new B(String.fromCharCode(this.highSurrogate,s))),this.highSurrogate=void 0):void 0===this.highSurrogate&&s>=55296&&s<56320?this.highSurrogate=s:(void 0!==this.highSurrogate&&(this.appendStringBuf(new B(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new B(String.fromCharCode(s)))),this.tState=Oo}}else if(this.tState===ko||this.tState===Ro)switch(e=t[n]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(e),this.tState=Ro;break;default:this.tState=fo;var a=Number(this.string);if(isNaN(a))return this.charError(t,n);this.string.match(/[0-9]+/)==this.string&&a.toString()!=this.string?this.onToken(co,this.string):this.onToken(lo,a),this.offset+=this.string.length-1,this.string=void 0,n--}else if(this.tState===po){if(114!==t[n])return this.charError(t,n);this.tState=go}else if(this.tState===go){if(117!==t[n])return this.charError(t,n);this.tState=yo}else if(this.tState===yo){if(101!==t[n])return this.charError(t,n);this.tState=fo,this.onToken(so,!0),this.offset+=3}else if(this.tState===vo){if(97!==t[n])return this.charError(t,n);this.tState=mo}else if(this.tState===mo){if(108!==t[n])return this.charError(t,n);this.tState=bo}else if(this.tState===bo){if(115!==t[n])return this.charError(t,n);this.tState=wo}else if(this.tState===wo){if(101!==t[n])return this.charError(t,n);this.tState=fo,this.onToken(ao,!1),this.offset+=4}else if(this.tState===_o){if(117!==t[n])return this.charError(t,n);this.tState=So}else if(this.tState===So){if(108!==t[n])return this.charError(t,n);this.tState=Eo}else if(this.tState===Eo){if(108!==t[n])return this.charError(t,n);this.tState=fo,this.onToken(uo,null),this.offset+=3}},Wo.onToken=function(t,e){},Wo.parseError=function(t,e){this.tState=ho,this.onError(new Error("Unexpected "+Vo.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+Vo.toknam(this.state)))},Wo.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Wo.pop=function(){var t=this.value,e=this.stack.pop();this.value=e.value,this.key=e.key,this.mode=e.mode,this.emit(t),this.mode||(this.state=Co)},Wo.emit=function(t){this.mode&&(this.state=oo),this.onValue(t)},Wo.onValue=function(t){},Wo.onToken=function(t,e){if(this.state===Co)if(t===co||t===lo||t===so||t===ao||t===uo)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===to)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Po,this.mode=Mo;else if(t===no)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Bo,this.state=Co;else if(t===eo){if(this.mode!==Mo)return this.parseError(t,e);this.pop()}else{if(t!==ro)return this.parseError(t,e);if(this.mode!==Bo)return this.parseError(t,e);this.pop()}else if(this.state===Po)if(t===co)this.key=e,this.state=io;else{if(t!==eo)return this.parseError(t,e);this.pop()}else if(this.state===io){if(t!==io)return this.parseError(t,e);this.state=Co}else{if(this.state!==oo)return this.parseError(t,e);if(t===oo)this.mode===Bo?(this.key++,this.state=Co):this.mode===Mo&&(this.state=Po);else{if(!(t===ro&&this.mode===Bo||t===eo&&this.mode===Mo))return this.parseError(t,e);this.pop()}}},Vo.C=Zi;var Go=Vo,Jo=function(t){function e(t,n){var r;return Yn(this,e),r=Qn(this,Hn(e).call(this,n)),Object.getOwnPropertyNames($i.prototype).forEach((function(t){return r[t]=$i.prototype[t]})),r.opts=r.preprocessOpts(t),r._data="",r._hasWritten=!1,r._readableState.objectMode?r.initObjectModeParse():r.opts.ndjson?r.initNDJSONParse():r.initJSONParser(),r.opts.withBOM&&r.push("\ufeff"),r.opts.fields&&(r.opts.fields=r.preprocessFieldsInfo(r.opts.fields),r.pushHeader()),r}return Jn(e,t),Vn(e,[{key:"initObjectModeParse",value:function(){var t=this;this.parser={write:function(e){t.pushLine(e)},getPendingData:function(){}}}},{key:"initNDJSONParse",value:function(){var t=this;this.parser={_data:"",write:function(e){this._data+=e.toString();var n=this._data.split("\n").map((function(t){return t.trim()})).filter((function(t){return""!==t})),r=!1;n.forEach((function(e,i){try{t.pushLine(JSON.parse(e))}catch(o){i===n.length-1?r=!0:(o.message="Invalid JSON (".concat(e,")"),t.emit("error",o))}})),this._data=r?this._data.slice(this._data.lastIndexOf("\n")):""},getPendingData:function(){return this._data}}}},{key:"initJSONParser",value:function(){var t=this;this.parser=new Go,this.parser.onValue=function(e){this.stack.length===this.depthToEmit&&t.pushLine(e)},this.parser._onToken=this.parser.onToken,this.parser.onToken=function(e,n){t.parser._onToken(e,n),0!==this.stack.length||t.opts.fields||this.mode===Go.C.ARRAY||this.mode===Go.C.OBJECT||this.onError(new Error('Data should not be empty or the "fields" option should be included')),1===this.stack.length&&(void 0===this.depthToEmit&&(this.depthToEmit=this.mode===Go.C.ARRAY?1:0),0!==this.depthToEmit&&1===this.stack.length&&(this.value=void 0))},this.parser.getPendingData=function(){return this.value},this.parser.onError=function(e){e.message.includes("Unexpected")&&(e.message="Invalid JSON (".concat(e.message,")")),t.emit("error",e)}}},{key:"_transform",value:function(t,e,n){this.parser.write(t),n()}},{key:"_flush",value:function(t){this.parser.getPendingData()&&t(new Error("Invalid data received from stdin",this.parser.getPendingData())),t()}},{key:"pushHeader",value:function(){if(this.opts.header){var t=this.getHeader();this.emit("header",t),this.push(t),this._hasWritten=!0}}},{key:"pushLine",value:function(t){var e=this,n=this.preprocessRow(t);this._hasWritten||(this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(Object.keys(n[0])),this.pushHeader()),n.forEach((function(t){var n=e.processRow(t,e.opts);void 0!==n&&(e.emit("line",n),e.push(e._hasWritten?e.opts.eol+n:n),e._hasWritten=!0)}))}}]),e}(Fn.Transform),Ho=Jo,$o=Fn.Transform,Xo=Wi.fastJoin,Qo=function(){function t(e,n){Yn(this,t),this.input=new $o(n),this.input._read=function(){},this.transform=new Ho(e,n),this.processor=this.input.pipe(this.transform)}return Vn(t,[{key:"fromInput",value:function(t){if(this._input)throw new Error("Async parser already has an input.");return this._input=t,this.input=this._input.pipe(this.processor),this}},{key:"throughTransform",value:function(t){if(this._output)throw new Error("Can't add transforms once an output has been added.");return this.processor=this.processor.pipe(t),this}},{key:"toOutput",value:function(t){if(this._output)throw new Error("Async parser already has an output.");return this._output=t,this.processor=this.processor.pipe(t),this}},{key:"promise",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise((function(n,r){if(e){var i=[];t.processor.on("data",(function(t){return i.push(t.toString())})).on("finish",(function(){return n(Xo(i,""))})).on("error",(function(t){return r(t)}))}else t.processor.on("finish",(function(){return n()})).on("error",(function(t){return r(t)}))}))}}]),t}(),Ko=Qo;function Zo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.objects,n=void 0===e||e,r=t.arrays,i=void 0!==r&&r,o=t.separator,s=void 0===o?".":o;function a(t,e,r){return Object.keys(t).forEach((function(o){var u=r?"".concat(r).concat(s).concat(o):o,c=t[o];n&&"object"===qn(c)&&null!==c&&!Array.isArray(c)&&"[object Function]"!==Object.prototype.toString.call(c.toJSON)&&Object.keys(c).length||i&&Array.isArray(c)?a(c,e,u):e[u]=c})),e}return function(t){return a(t,{})}}var ts=Zo,es=Wi.setProp,ns=Wi.unsetProp,rs=Wi.flattenReducer;function is(t,e){return Object.keys(t).reduce((function(n,r){var i=e?"".concat(e,".").concat(r):r,o=t[r];return"object"===qn(o)&&null!==o&&!Array.isArray(o)&&"[object Function]"!==Object.prototype.toString.call(o.toJSON)&&Object.keys(o).length?n=n.concat(is(o,i)):Array.isArray(o)&&(n.push(i),n=n.concat(o.map((function(t){return is(t,i)})).reduce(rs,[]).filter((function(t,e,n){return n.indexOf(t)!==e})))),n}),[])}function os(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.paths,n=void 0===e?void 0:e,r=t.blankOut,i=void 0!==r&&r;function o(t,e){return t.map((function(t){var n=Di(t,e);return Array.isArray(n)?n.length?n.map((function(n,r){return es(i&&r>0?{}:t,e,n)})):ns(t,e):t})).reduce(rs,[])}return n=Array.isArray(n)?n:n?[n]:void 0,function(t){return(n||is(t)).reduce(o,[t])}}var ss=os,as=Fn.Readable,us=Ki,cs=Ko,ls=Ho,fs=function(t,e){return new Ki(e).parse(t)},hs=function(t,e,n){try{t instanceof as||(n=Object.assign({},n,{objectMode:!0}));var r=new Ko(e,n),i=r.promise();return Array.isArray(t)?(t.forEach((function(t){return r.input.push(t)})),r.input.push(null)):t instanceof as?r.fromInput(t):(r.input.push(t),r.input.push(null)),i}catch(o){return Promise.reject(o)}},ps={flatten:ts,unwind:ss},ds={Parser:us,AsyncParser:cs,Transform:ls,parse:fs,parseAsync:hs,transforms:ps};t.AsyncParser=cs,t.Parser=us,t.Transform=ls,t.default=ds,t.parse=fs,t.parseAsync=hs,t.transforms=ps,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,xt.exports);var At=z.div(l||(l=_(["\n padding: ",";\n display: flex;\n background-color: ",";\n box-shadow: ",";\n justify-content: flex-end;\n border-top: 1px solid ",";\n"])),V["--ll-spacing-medium"],V["--ll-color-surface"],V["--ll-shadow-medium"],V["--ll-color-border"]),Tt=z.div(f||(f=_(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),V["--ll-spacing-medium"]),Lt={all:function(){return["profiles"]},list:function(t){return[].concat(y(Lt.all()),[t])}};var jt=function(){var t,e,n,r,i,o,s,a=ht().dataExplorerState,u=K().translations,c=(t={lat:a.location.lat,lng:a.location.lng,enabled:a.scores.checked,include:a.scores.include},e=t.lat,n=t.lng,r=t.include,i=t.enabled,o=Q().client,s={lat:e,lng:n,geographyLevels:["10","30"],locationScoresRounding:!1,include:r},lt(j.list(s),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getScores(s));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!s&&i})),l=c.data,f=c.isFetching,h=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.include,o=t.limit,s=t.radius,a=Q().client,u={lat:e,lng:n,limit:o,radius:s,include:i};return lt(P.list(u),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",a.getPois(u));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!u&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.pois.checked,include:a.pois.include,limit:a.pois.limit,radius:a.pois.radius}),p=h.data,d=h.isFetching,g=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.limit,o=t.radius,s=Q().client,a={lat:e,lng:n,limit:i,radius:o};return lt(C.list(a),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",s.getSchools(a));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!a&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.schools.checked,limit:a.pois.limit,radius:a.pois.radius}),y=g.data,m=g.isFetching,w=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.radius,o=Q().client,s={lat:e,lng:n,radius:i};return lt(ft.list(s),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getDemographics(s));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!s&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.demographics.checked,radius:a.demographics.radius}),_=w.data,S=w.isFetching,k=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=Q().client,o={lat:e,lng:n};return lt(Lt.list(o),b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.getProfiles(o));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!o&&r})}({lat:a.location.lat,lng:a.location.lng,enabled:a.profiles.checked}),O=k.data,x=k.isFetching,A=q.exports.useMemo((function(){return E(E(E(E(E({},l&&a.scores.checked&&{scores:l}),p&&a.pois.checked&&{pois:p}),y&&a.schools.checked&&{schools:y}),_&&a.demographics.checked&&{demographics:_}),O&&a.profiles.checked&&{profiles:O})}),[p,l,y,O,_,a]),T=f||d||m||S||x,L=Object.keys(A).length;return G(At,{children:[T&&Y(Tt,{children:Y(Z,{})}),G(tt,{variant:"contained",onClick:function(t){t.preventDefault(),nt.downloadFile({data:JSON.stringify(A),fileName:"local-logic-data",fileType:"json"})},disabled:!Object.keys(A).length||T,children:[u.EXPORT," JSON"]}),Y(et,{spacing:"--ll-spacing-xx-small"}),G(tt,{variant:"contained",onClick:function(t){var e,n,r,i;t.preventDefault(),l&&(e=l.location,n="scores",r=Object.entries(e).map((function(t){var e=R(t,2);return E({score:e[0]},e[1])})),(i=xt.exports.parse(r))&&nt.downloadFile({data:i,fileName:n,fileType:"csv"})),function(){if(p){var t=Object.entries(p).map((function(t){var e=R(t,2),n=e[0];return e[1].map((function(t){return E({poi:n},t)}))})).flat(),e=xt.exports.parse(t);e&&nt.downloadFile({data:e,fileName:"pois",fileType:"csv"})}}(),function(){if(y){var t=Object.entries(y).map((function(t){var e=R(t,2),n=e[0];return e[1].map((function(t){return E({school:n},t)}))})).flat(),e=xt.exports.parse(t);e&&nt.downloadFile({data:e,fileName:"schools",fileType:"csv"})}}(),function(){if(_){var t=Object.entries(_).map((function(t){var e=R(t,2);return E({demographic:e[0]},e[1])})),e=xt.exports.parse(t);e&&nt.downloadFile({data:e,fileName:"demographics",fileType:"csv"})}}(),function(){if(O){var t=[O],e=xt.exports.parse(t,{fields:["id","intro","name","profiles.character","profiles.housing","profiles.services","profiles.transport"]});e&&nt.downloadFile({data:e,fileName:"profiles",fileType:"csv"})}}()},disabled:!L||T,children:[u.EXPORT," CSV (",L,")"]})]})},Ct=z.div(h||(h=_(["\n height: 400px;\n display: flex;\n border: 2px solid ",";\n position: relative;\n border-radius: ",";\n overflow: hidden;\n"])),V["--ll-color-on-background"],V["--ll-border-radius-small"]),Pt=z.div(p||(p=_(["\n position: absolute;\n color: ",";\n z-index: 1;\n padding: "," ",";\n font-family: ",';\n\n &:after {\n content: "";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n background-color: ',";\n opacity: 0.8;\n z-index: -1;\n }\n"])),V["--ll-color-on-background"],V["--ll-spacing-xx-small"],V["--ll-spacing-x-small"],V["--ll-font-family-mono"],V["--ll-color-background"]),Mt=function(){var t,e,n,r,i=q.exports.useRef(),o=R(q.exports.useState(!0),2),s=o[0],a=o[1],u=ht(),c=u.dataExplorerState,l=u.setDataExplorerState,f=F().sdkState,h=R(q.exports.useState(!1),2),p=h[0],d=h[1],g=q.exports.useRef(),y=q.exports.useRef(!1),v=K().translations,m="night"===(null==f||null===(t=f.globalOptions)||void 0===t||null===(e=t.appearance)||void 0===e?void 0:e.theme)?"basic-v2-dark":"600d69cb-288d-445e-9839-3dfe4d76b31a",b={position:"absolute",top:"0",left:"0",height:"100%",width:"100%"};return G("div",{children:[Y(M,{placeholder:v.SEARCH_MAP,renderListAbove:!1,onSearch:function(t){var e;l({location:{lat:t.latitude,lng:t.longitude}}),null==i||null===(e=i.current)||void 0===e||e.flyTo({center:[t.longitude,t.latitude],duration:2e3,essential:!0})}}),Y(et,{vertical:!0,spacing:"--ll-spacing-small"}),G(Ct,{children:[s&&Y(rt,{height:"400px",width:"100%"}),G(B,{ref:i,style:s?E({visibility:"hidden"},b):b,onLoad:function(){return a(!1)},mapLib:I,mapStyle:"https://api.maptiler.com/maps/".concat(m,"/style.json?key=","9jNGatuzs05Q1oNlctEs"),initialViewState:{longitude:null===(n=f.options)||void 0===n?void 0:n.lng,latitude:null===(r=f.options)||void 0===r?void 0:r.lat,zoom:10},onMouseDown:function(t){g.current=setTimeout((function(){y.current||d(!0)}),1e3)},onMouseUp:function(t){p&&l({location:{lat:t.lngLat.lat,lng:t.lngLat.lng}}),clearTimeout(g.current),d(!1)},onDragStart:function(){y.current=!0},onDragEnd:function(){y.current=!1},children:[Y(Pt,{children:G(J,{noMargin:!0,family:"mono",children:["Lat:"," ",Math.round(1e5*c.location.lat)/1e5,", Lng:"," ",Math.round(1e5*c.location.lng)/1e5]})}),Y(N,{showCompass:!0,style:{marginTop:16,marginRight:16}}),Y(U,{marker:E({icon:"pin"},c.location)})]})]})]})},Bt=z.div(d||(d=_(["\n margin: 2px;\n display: inline-block;\n"]))),It=function(){var t=ht(),e=t.dataExplorerState,n=t.setDataExplorerState,r=Object.keys(it).filter((function(t){return Number.isNaN(Number(t))}));return Y(ot,{children:r.map((function(t){var r=e.scores.include.includes(t);return Y(Bt,{children:Y(st.Root,{options:{score:t,scoresData:void 0},children:Y(tt,{size:"small",variant:r?"contained":"outlined",onClick:function(){n(r?{scores:E(E({},e.scores),{},{include:e.scores.include.filter((function(e){return e!==t}))})}:{scores:E(E({},e.scores),{},{include:[].concat(y(e.scores.include),[t])})})},children:Y(st.Title,{options:{isRawText:!0}})})})},t)}))})},Nt=z.div(g||(g=_(["\n margin: 2px;\n display: inline-block;\n"]))),Ut=function(){var t=K().translations,e=ht(),n=e.dataExplorerState,r=e.setDataExplorerState,i=Object.keys(at).filter((function(t){return Number.isNaN(Number(t))}));return G(ot,{children:[i.map((function(t){var e=n.pois.include.includes(t);return Y(Nt,{children:Y(ut.Root,{options:{poi:t},children:Y(tt,{size:"small",variant:e?"contained":"outlined",onClick:function(){r(e?{pois:E(E({},n.pois),{},{include:n.pois.include.filter((function(e){return e!==t}))})}:{pois:E(E({},n.pois),{},{include:[].concat(y(n.pois.include),[t])})})},children:Y(ut.Title,{options:{isRawText:!0}})})})},t)})),Y(ct,{showValue:!0,label:"".concat(t.RADIUS," (m)"),min:100,max:25e3,step:100,value:[n.pois.radius],onValueChange:function(t){r({pois:E(E({},n.pois),{},{radius:t[0]})})}}),Y(ct,{showValue:!0,label:t.LIMIT,min:1,max:30,step:1,value:[n.pois.limit],onValueChange:function(t){r({pois:E(E({},n.pois),{},{limit:t[0]})})}})]})},Dt=function(){var t=K().translations,e=ht(),n=e.dataExplorerState,r=e.setDataExplorerState;return G(ot,{children:[Y(ct,{showValue:!0,label:"".concat(t.RADIUS," (m)"),min:100,max:25e3,step:100,value:[n.schools.radius],onValueChange:function(t){r({schools:E(E({},n.schools),{},{radius:t[0]})})}}),Y(ct,{showValue:!0,label:t.LIMIT,min:1,max:30,step:1,value:[n.schools.limit],onValueChange:function(t){r({schools:E(E({},n.schools),{},{limit:t[0]})})}})]})},Ft=function(){var t=K().translations,e=ht(),n=e.dataExplorerState,r=e.setDataExplorerState;return Y(ct,{showValue:!0,label:"".concat(t.RADIUS," (m)"),min:500,max:5e3,step:100,value:[n.demographics.radius],onValueChange:function(t){r({demographics:E(E({},n.demographics),{},{radius:t[0]})})}})};m("default",(function(){var t=K().translations,e=[{title:t.LOCATION,description:t.LOCATION_TEXT,value:"location",number:1,children:Y(Mt,{})},{title:t.SCORES,description:t.SCORES_TEXT,value:"scores",number:2,children:Y(It,{})},{title:t.POIS,description:t.POIS_TEXT,value:"pois",number:3,children:Y(Ut,{})},{title:t.SCHOOLS,description:t.SCHOOLS_TEXT,value:"schools",number:4,children:Y(Dt,{})},{title:t.DEMOGRAPHICS,description:t.DEMOGRAPHICS_TEXT,value:"demographics",number:5,children:Y(Ft,{})},{title:t.PROFILES,description:t.PROFILES_TEXT,value:"profiles",number:6}];return Y(pt,{children:G(dt,{children:[Y(gt,{type:"single",defaultValue:"location",collapsible:!0,children:e.map((function(t){return Y(Ot,{title:t.title,description:t.description,value:t.value,number:t.number,children:t.children},t.value)}))}),Y(et,{vertical:!0}),Y(jt,{})]})})}))}}}))}();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}var e,r,n,o,i,a;function u(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(P){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new L(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return _()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=O(a,r);if(u){if(u===h)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}e.wrap=s;var h={};function d(){}function p(){}function v(){}var y={};l(y,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(E([])));m&&m!==r&&n.call(m,i)&&(y=m);var b=v.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(e,r){function o(i,a,u,c){var l=f(e[i],e,a);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==t(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){o("next",t,u,c)}),(function(t){o("throw",t,u,c)})):r.resolve(h).then((function(t){s.value=t,u(s)}),(function(t){return o("throw",t,u,c)}))}c(l.arg)}var i;this._invoke=function(t,e){function n(){return new r((function(r,n){o(t,e,r,n)}))}return i=i?i.then(n,n):n()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:_}}function _(){return{value:void 0,done:!0}}return p.prototype=v,l(b,"constructor",v),l(v,"constructor",p),p.displayName=l(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,a,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,c,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=E,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}function c(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))}}function s(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(c){u=!0,o=c}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}System.register(["./index-legacy.128bbb90.js","./useIsMobile-legacy.a1dad04e.js","./keyFactory-legacy.782b8549.js","./useQuery-legacy.6ce02414.js"],(function(t,c){"use strict";var f,d,v,y,g,m,b,w,x,O,j,S,L,E,_,P,C,k;return{setters:[function(t){f=t.R,d=t.r,v=t.ab,y=t.u,g=t.j,m=t.e,b=t.ac,w=t.s,x=t._,O=t.d,j=t.o,S=t.n,L=t.ad,E=t.l,_=t.p},function(t){P=t.u},function(t){C=t.d},function(t){k=t.u}],execute:function(){var c=f.createContext({}),A=function(){return d.exports.useContext(c)},M=function(t){var e,r,n=t.children,o=P(),i=p(d.exports.useState(v[0].value),2),a=i[0],u=i[1],l=y().sdkState,s=p(d.exports.useReducer((function(t,e){return h(h({},t),e)}),{location:{lat:(null===(e=l.options)||void 0===e?void 0:e.lat)||43.661337,lng:(null===(r=l.options)||void 0===r?void 0:r.lng)||-79.401903},demographics:{radius:2500}}),2),f=s[0],w=s[1],x=d.exports.useMemo((function(){return{demographicsState:f,setDemographicsState:w,activeCategory:a,setActiveCategory:u}}),[a,u,f,w]);return g(c.Provider,{value:x,children:m(b.Root,{options:{activeTab:a},onChange:function(t){u(t.data)},children:[g(o?b.Select:b.Tabs,{}),n]})})},T=w.div(e||(e=s(["\n height: 100vh;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),x["--ll-color-background"]),I=w.div(r||(r=s(["\n overflow-y: auto;\n padding: ",";\n"])),x["--ll-spacing-medium"]),G=function(){var t=O().translations;return g(j,{variant:"h3",weight:"--ll-font-weight-bold",children:t.DEMOGRAPHICS_TITLE})},D=w.div(n||(n=s(["\n margin: "," 0;\n"])),x["--ll-spacing-large"]);w.div(o||(o=s(["\n display: flex;\n padding: "," ","\n "," ",";\n"])),x["--ll-spacing-x-small"],x["--ll-spacing-medium"],x["--ll-spacing-xx-small"],x["--ll-spacing-medium"]);var N=w.div(i||(i=s(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),x["--ll-spacing-medium"]);var F=function(){var t=A().demographicsState.income;return g(L.AvgIncomeCard,{options:{incomeTypes:(null==t?void 0:t.variables)||[]}})},R=function(){var t=A().demographicsState.population_age;return g(L.PopulationByAgeChart,{options:{labels:(null==t?void 0:t.variables.map((function(t){return t.label})))||[],data:(null==t?void 0:t.variables.map((function(t){return Math.round(100*t.value)})))||[]}})},z=function(){var t=A().demographicsState.housing_tenancy;return g(L.OwnersRentersCard,{options:{datasets:(null==t?void 0:t.variables.map((function(t){return{label:t.label,data:Math.round(100*t.value)}})))||[]}})},H=function(){var t=A().demographicsState.household_composition,e=null==t?void 0:t.variables.map((function(t){return h(h({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0}));return g(L.HouseholdCompositionCard,{options:{labels:(null==e?void 0:e.map((function(t){return"".concat(t.value,"% ").concat(t.label)})))||[],data:(null==e?void 0:e.map((function(t){return t.value})))||[]}})},Y=function(){var t=A().demographicsState.commute_mode,e=null==t?void 0:t.variables.map((function(t){return h(h({},t),{},{value:Math.round(100*t.value)})})).filter((function(t){return Math.round(100*t.value)>0}));return g(L.CommuteModeCard,{options:{labels:(null==e?void 0:e.map((function(t){return"".concat(t.value,"% ").concat(t.label)})))||[],data:(null==e?void 0:e.map((function(t){return t.value})))||[]}})},B=function(){var t=A().demographicsState.education_level;return g(L.EducationLevelChart,{options:{labels:(null==t?void 0:t.variables.map((function(t){return t.label})))||[],data:(null==t?void 0:t.variables.map((function(t){return Math.round(100*t.value)})))||[]}})},Q=function(){var t,e,r,n,o,i,a=A(),c=a.demographicsState,s=a.activeCategory,f=a.setDemographicsState,p=(t={lat:c.location.lat,lng:c.location.lng,radius:c.demographics.radius},e=t.lat,r=t.lng,n=t.radius,o=S().client,i={lat:e,lng:r,radius:n},k(C.list(i),l(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.getDemographics(i));case 1:case"end":return t.stop()}}),t)}))),{enabled:!!i})),v=p.data,y=p.isFetching;d.exports.useEffect((function(){!y&&v&&f(h({},v))}),[y]);return g(D,{children:g(b.Content,{options:{value:s},children:function(){if(y)return g(N,{children:g(E,{})});switch(s){case"income":return g(F,{});case"population":return g(R,{});case"housing":return g(z,{});case"household":return g(H,{});case"commute":return g(Y,{});case"education":return g(B,{});default:return m("div",{children:[s," tab"]})}}()})})},U=w.div(a||(a=s(["\n padding: ",";\n\n a {\n justify-content: end;\n }\n"])),x["--ll-spacing-small"]),$=function(){return g(U,{children:g(_.Root,{})})};t("default",(function(){return g(M,{children:g(T,{children:m(I,{children:[g(G,{}),g(Q,{}),g($,{})]})})})}))}}}))}();
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{R as y,r as d,ab as $,u as M,j as s,e as h,ac as p,s as c,_ as o,d as D,o as j,n as w,ad as l,l as R,p as T}from"./index.97d3a920.js";import{u as _}from"./useIsMobile.5dc7840d.js";import{d as E}from"./keyFactory.e1cd5707.js";import{u as H}from"./useQuery.7c643982.js";const C=y.createContext({}),i=()=>d.exports.useContext(C),I=({children:a})=>{var v,b;const e=_(),[t,r]=d.exports.useState($[0].value),{sdkState:n}=M(),[u,m]=d.exports.useReducer((g,S)=>({...g,...S}),{location:{lat:((v=n.options)==null?void 0:v.lat)||43.661337,lng:((b=n.options)==null?void 0:b.lng)||-79.401903},demographics:{radius:2500}}),x=d.exports.useMemo(()=>({demographicsState:u,setDemographicsState:m,activeCategory:t,setActiveCategory:r}),[t,r,u,m]),f=g=>{r(g.data)};return s(C.Provider,{value:x,children:h(p.Root,{options:{activeTab:t},onChange:f,children:[e?s(p.Select,{}):s(p.Tabs,{}),a]})})},P=c.div`
|
|
2
|
-
height: 100vh;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
background-color: ${o["--ll-color-background"]};
|
|
7
|
-
`,k=c.div`
|
|
8
|
-
overflow-y: auto;
|
|
9
|
-
padding: ${o["--ll-spacing-medium"]};
|
|
10
|
-
`,G=()=>{const{translations:a}=D();return s(j,{variant:"h3",weight:"--ll-font-weight-bold",children:a.DEMOGRAPHICS_TITLE})},A=c.div`
|
|
11
|
-
margin: ${o["--ll-spacing-large"]} 0;
|
|
12
|
-
`;c.div`
|
|
13
|
-
display: flex;
|
|
14
|
-
padding: ${o["--ll-spacing-x-small"]} ${o["--ll-spacing-medium"]}
|
|
15
|
-
${o["--ll-spacing-xx-small"]} ${o["--ll-spacing-medium"]};
|
|
16
|
-
`;const O=c.div`
|
|
17
|
-
height: 40px;
|
|
18
|
-
display: flex;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
align-items: center;
|
|
21
|
-
margin-right: ${o["--ll-spacing-medium"]};
|
|
22
|
-
`;function q({lat:a,lng:e,radius:t}){const{client:r}=w(),n={lat:a,lng:e,radius:t};return H(E.list(n),async()=>r.getDemographics(n),{enabled:!!n})}const z=()=>{const{demographicsState:{income:a}}=i();return s(l.AvgIncomeCard,{options:{incomeTypes:(a==null?void 0:a.variables)||[]}})},B=()=>{const{demographicsState:{population_age:a}}=i();return s(l.PopulationByAgeChart,{options:{labels:(a==null?void 0:a.variables.map(e=>e.label))||[],data:(a==null?void 0:a.variables.map(e=>Math.round(e.value*100)))||[]}})},K=()=>{const{demographicsState:{housing_tenancy:a}}=i();return s(l.OwnersRentersCard,{options:{datasets:(a==null?void 0:a.variables.map(e=>({label:e.label,data:Math.round(e.value*100)})))||[]}})},Q=()=>{const{demographicsState:{household_composition:a}}=i(),e=a==null?void 0:a.variables.map(t=>({...t,value:Math.round(t.value*100)})).filter(t=>Math.round(t.value*100)>0);return s(l.HouseholdCompositionCard,{options:{labels:(e==null?void 0:e.map(t=>`${t.value}% ${t.label}`))||[],data:(e==null?void 0:e.map(t=>t.value))||[]}})},V=()=>{const{demographicsState:{commute_mode:a}}=i(),e=a==null?void 0:a.variables.map(t=>({...t,value:Math.round(t.value*100)})).filter(t=>Math.round(t.value*100)>0);return s(l.CommuteModeCard,{options:{labels:(e==null?void 0:e.map(t=>`${t.value}% ${t.label}`))||[],data:(e==null?void 0:e.map(t=>t.value))||[]}})},J=()=>{const{demographicsState:{education_level:a}}=i();return s(l.EducationLevelChart,{options:{labels:(a==null?void 0:a.variables.map(e=>e.label))||[],data:(a==null?void 0:a.variables.map(e=>Math.round(e.value*100)))||[]}})},L=()=>{const{demographicsState:a,activeCategory:e,setDemographicsState:t}=i(),{data:r,isFetching:n}=q({lat:a.location.lat,lng:a.location.lng,radius:a.demographics.radius});d.exports.useEffect(()=>{!n&&r&&t({...r})},[n]);const u=()=>{if(n)return s(O,{children:s(R,{})});switch(e){case"income":return s(z,{});case"population":return s(B,{});case"housing":return s(K,{});case"household":return s(Q,{});case"commute":return s(V,{});case"education":return s(J,{});default:return h("div",{children:[e," tab"]})}};return s(A,{children:s(p.Content,{options:{value:e},children:u()})})},N=c.div`
|
|
23
|
-
padding: ${o["--ll-spacing-small"]};
|
|
24
|
-
|
|
25
|
-
a {
|
|
26
|
-
justify-content: end;
|
|
27
|
-
}
|
|
28
|
-
`,U=()=>s(N,{children:s(T.Root,{})}),F=()=>s(I,{children:s(P,{children:h(k,{children:[s(G,{}),s(L,{}),s(U,{})]})})});export{F as default};
|