@local-logic/sdks-app 1.2.2 → 1.2.4
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.6a65fd45.js → index-legacy.8274fd62.js} +1 -1
- package/dist/assets/index-legacy.ab2806f1.js +40 -0
- package/dist/assets/index-legacy.b0c3b101.js +1 -0
- package/dist/assets/index-legacy.ee970dd3.js +1 -0
- package/dist/assets/{index.b4452687.js → index.1798f035.js} +1 -1
- package/dist/assets/index.299746d3.js +221 -0
- package/dist/assets/{index.cacb58c3.js → index.5e5913ac.js} +1 -1
- package/dist/assets/{index.2bd5a799.js → index.603e3d3b.js} +52 -52
- package/dist/assets/{polyfills-legacy.d3683099.js → polyfills-legacy.bf9b122f.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js +12 -9
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js +1 -3
- package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.js +0 -6
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/Score/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js +4 -3
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/index.js +3 -5
- package/dist/types/sdks/LocalContent/Map/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/context.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/context.js +17 -19
- package/dist/types/sdks/LocalContent/context.js.map +1 -1
- package/dist/types/sdks/LocalContent/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/index.js +5 -2
- package/dist/types/sdks/LocalContent/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/auto-track-legacy.6aa10448.js +0 -1
- package/dist/assets/auto-track.f33f04b5.js +0 -1
- package/dist/assets/index-legacy.07471b15.js +0 -40
- package/dist/assets/index-legacy.0a77da26.js +0 -672
- package/dist/assets/index-legacy.22574a5d.js +0 -1
- package/dist/assets/index-legacy.2620f6c6.js +0 -1
- package/dist/assets/index-legacy.2bf11579.js +0 -1
- package/dist/assets/index-legacy.434c3349.js +0 -1
- package/dist/assets/index-legacy.611d12a7.js +0 -1
- package/dist/assets/index-legacy.7fadf23a.js +0 -1
- package/dist/assets/index-legacy.b5297f20.js +0 -1
- package/dist/assets/index.216b928c.js +0 -1
- package/dist/assets/index.2beed455.js +0 -1
- package/dist/assets/index.55728dfd.js +0 -1
- package/dist/assets/index.5a76e25b.js +0 -1
- package/dist/assets/index.71faf343.js +0 -1345
- package/dist/assets/index.a43cb468.js +0 -1
- package/dist/assets/index.e7c967fd.js +0 -221
- package/dist/assets/index.umd-legacy.e43e344a.js +0 -1
- package/dist/assets/index.umd.6ed884fc.js +0 -1
- package/dist/assets/is-plan-event-enabled-legacy.0a339854.js +0 -1
- package/dist/assets/is-plan-event-enabled.681b46ca.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){var t,e,n,r,i,o,s,a,u,c,l,f,h,p,d,g;function v(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 y(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */y=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,v=g&&g(g(O([])));v&&v!==e&&n.call(v,i)&&(d=v);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.b5297f20.js","./index-legacy.07471b15.js"],(function(m,S){"use strict";var O,x,A,T,L,j,C,P,M,B,I,N,U,D,q,F,Y,z,V,W,J,G,H,$,X,Q,K,Z,tt,et,nt,rt,it,ot,st,at,ut,ct;return{setters:[function(t){O=t.g,x=t.c,A=t.n,T=t.f,L=t.S,j=t.u,C=t.b,P=t.s,M=t.p,B=t.i,I=t.k,N=t.m,U=t.N,D=t.P},function(t){q=t.R,F=t.u,Y=t.r,z=t.j,V=t.s,W=t.y,J=t.U,G=t.i,H=t.v,$=t.a6,X=t.O,Q=t.d,K=t.L,Z=t.q,tt=t.t,et=t.T,nt=t.o,rt=t.M,it=t.a7,ot=t.F,st=t.m,at=t.a8,ut=t.a9,ct=t.aa}],execute:function(){var S=q.createContext({}),lt=function(){return Y.exports.useContext(S)},ft=function(t){var e,n,r=t.children,i=F().sdkState,o=R(Y.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=Y.exports.useMemo((function(){return{dataExplorerState:s,setDataExplorerState:a}}),[s,a]);return z(S.Provider,{value:u,children:r})},ht=V.div(t||(t=_(["\n height: 100vh;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),W["--ll-color-background"]),pt=V(O)(e||(e=_(["\n overflow-y: auto;\n padding: ",";\n"])),W["--ll-spacing-medium"]),dt=J({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),gt=J({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),vt=V.div(n||(n=_(["\n display: flex;\n flex-direction: column;\n"]))),yt=V.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"])),W["--ll-color-primary"],W["--ll-color-primary"],W["--ll-spacing-small"],W["--ll-font-size-p"]),mt=V(x)(i||(i=_(["\n all: unset;\n flex: 1;\n display: flex;\n align-items: center;\n font-family: ",";\n"])),W["--ll-font-family"]),bt=V.div(o||(o=_(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: "," 0;\n"])),W["--ll-spacing-x-small"]),wt=V(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 animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n [data-state="closed"] & {\n animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n"])),W["--ll-color-surface"],W["--ll-spacing-medium"],W["--ll-spacing-medium"],dt,gt),_t=V.div(a||(a=_(["\n padding: ",";\n"])),W["--ll-spacing-medium"]),St=V.span(u||(u=_(["\n margin-left: ",";\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),W["--ll-spacing-x-small"],mt),Et=V.div(c||(c=_(["\n display: flex;\n"]))),kt=function(t){var e=t.title,n=t.description,r=t.children,i=t.value,o=t.number,s=lt(),a=s.dataExplorerState,u=s.setDataExplorerState;return z(T,{value:i,children:G(vt,{children:[G(bt,{children:[G(mt,{children:[z(yt,{children:o}),z(H,{variant:"h6",noMargin:!0,weight:"--ll-font-weight-medium",children:e})]}),G(Et,{children:["checked"in a[i]&&z($,{checked:a[i].checked,onCheckedChange:function(t){return u(k({},i,E(E({},a[i]),{},{checked:t})))}}),z(mt,{children:z(St,{children:z(X,{SVGElement:L,fill:W["--ll-color-on-background-variant1"]})})})]})]}),z(wt,{children:G(_t,{children:[z(H,{color:"--ll-color-on-background-variant1",children:n}),r]})})]})})},Rt={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 v(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]:v(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 y=void 0!==Q?Q:"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?q(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|V(e)),!B.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function q(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 F(t,e){var n=e.length<0?0:0|V(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=F(t,e),t}function z(t,e){if(W(e)){var n=0|V(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||At(e.length)?M(t,0):F(t,e);if("Buffer"===e.type&&j(e.data))return F(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function V(t){if(t>=P())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P().toString(16)+" bytes");return 0|t}function W(t){return!(null==t||!t._isBuffer)}function J(t,e){if(W(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 Et(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ot(t).length;default:if(r)return Et(t).length;e=(""+e).toLowerCase(),r=!0}}function G(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return lt(this,e,n);case"utf8":case"utf-8":return ot(this,e,n);case"ascii":return ut(this,e,n);case"latin1":case"binary":return ct(this,e,n);case"base64":return it(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function H(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function $(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)),W(e))return 0===e.length?-1:X(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):X(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function X(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 K(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 Z(t,e,n,r){return xt(Et(e,t.length-n),t,n,r)}function tt(t,e,n,r){return xt(kt(e),t,n,r)}function et(t,e,n,r){return tt(t,e,n,r)}function nt(t,e,n,r){return xt(Ot(e),t,n,r)}function rt(t,e,n,r){return xt(Rt(e,t.length-n),t,n,r)}function it(t,e,n){return 0===e&&n===t.length?x(t):x(t.slice(e,n))}function ot(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 at(r)}B.TYPED_ARRAY_SUPPORT=void 0===y.TYPED_ARRAY_SUPPORT||y.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=Tt,B.compare=function(t,e){if(!W(t)||!W(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(!W(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)H(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)H(this,e,e+3),H(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)H(this,e,e+7),H(this,e+1,e+6),H(this,e+2,e+5),H(this,e+3,e+4);return this},B.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?ot(this,0,t):G.apply(this,arguments)},B.prototype.equals=function(t){if(!W(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(!W(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 $(this,t,e,n,!0)},B.prototype.lastIndexOf=function(t,e,n){return $(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 K(this,t,e,n);case"utf8":case"utf-8":return Z(this,t,e,n);case"ascii":return tt(this,t,e,n);case"latin1":case"binary":return et(this,t,e,n);case"base64":return nt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(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 st=4096;function at(t){var e=t.length;if(e<=st)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=st));return n}function ut(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 ct(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 lt(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+=St(t[o]);return i}function ft(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 ht(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 pt(t,e,n,r,i,o){if(!W(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 dt(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 gt(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 yt(t,e,n,r,i){return i||vt(t,e,n,4),T(t,e,n,r,23,4),n+4}function mt(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||ht(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||ht(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||ht(t,1,this.length),this[t]},B.prototype.readUInt16LE=function(t,e){return e||ht(t,2,this.length),this[t]|this[t+1]<<8},B.prototype.readUInt16BE=function(t,e){return e||ht(t,2,this.length),this[t]<<8|this[t+1]},B.prototype.readUInt32LE=function(t,e){return e||ht(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||ht(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||ht(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||ht(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||ht(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},B.prototype.readInt16LE=function(t,e){e||ht(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||ht(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||ht(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||ht(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||ht(t,4,this.length),A(this,t,!0,23,4)},B.prototype.readFloatBE=function(t,e){return e||ht(t,4,this.length),A(this,t,!1,23,4)},B.prototype.readDoubleLE=function(t,e){return e||ht(t,8,this.length),A(this,t,!0,52,8)},B.prototype.readDoubleBE=function(t,e){return e||ht(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||pt(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||pt(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||pt(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||pt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):dt(this,t,e,!0),e+2},B.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||pt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):dt(this,t,e,!1),e+2},B.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(this,t,e,!0),e+4},B.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(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);pt(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);pt(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||pt(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||pt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):dt(this,t,e,!0),e+2},B.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||pt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):dt(this,t,e,!1),e+2},B.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(this,t,e,!0),e+4},B.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(this,t,e,!1),e+4},B.prototype.writeFloatLE=function(t,e,n){return yt(this,t,e,!0,n)},B.prototype.writeFloatBE=function(t,e,n){return yt(this,t,e,!1,n)},B.prototype.writeDoubleLE=function(t,e,n){return mt(this,t,e,!0,n)},B.prototype.writeDoubleBE=function(t,e,n){return mt(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=W(t)?t:Et(new B(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var bt=/[^+\/0-9A-Za-z-_]/g;function wt(t){if((t=_t(t).replace(bt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function _t(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function St(t){return t<16?"0"+t.toString(16):t.toString(16)}function Et(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 kt(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function Rt(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 Ot(t){return k(wt(t))}function xt(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 At(t){return t!=t}function Tt(t){return null!=t&&(!!t._isBuffer||Lt(t)||jt(t))}function Lt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function jt(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Lt(t.slice(0,0))}function Ct(){throw new Error("setTimeout has not been defined")}function Pt(){throw new Error("clearTimeout has not been defined")}var Mt=Ct,Bt=Pt;function It(t){if(Mt===setTimeout)return setTimeout(t,0);if((Mt===Ct||!Mt)&&setTimeout)return Mt=setTimeout,setTimeout(t,0);try{return Mt(t,0)}catch(e){try{return Mt.call(null,t,0)}catch(e){return Mt.call(this,t,0)}}}function Nt(t){if(Bt===clearTimeout)return clearTimeout(t);if((Bt===Pt||!Bt)&&clearTimeout)return Bt=clearTimeout,clearTimeout(t);try{return Bt(t)}catch(e){try{return Bt.call(null,t)}catch(e){return Bt.call(this,t)}}}"function"==typeof y.setTimeout&&(Mt=setTimeout),"function"==typeof y.clearTimeout&&(Bt=clearTimeout);var Ut,Dt=[],qt=!1,Ft=-1;function Yt(){qt&&Ut&&(qt=!1,Ut.length?Dt=Ut.concat(Dt):Ft=-1,Dt.length&&zt())}function zt(){if(!qt){var t=It(Yt);qt=!0;for(var e=Dt.length;e;){for(Ut=Dt,Dt=[];++Ft<e;)Ut&&Ut[Ft].run();Ft=-1,e=Dt.length}Ut=null,qt=!1,Nt(t)}}function Vt(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];Dt.push(new Wt(t,e)),1!==Dt.length||qt||It(zt)}function Wt(t,e){this.fun=t,this.array=e}Wt.prototype.run=function(){this.fun.apply(null,this.array)};var Jt=y.performance||{};Jt.now||Jt.mozNow||Jt.msNow||Jt.oNow||Jt.webkitNow;var Gt="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},Ht=/%[sdj%]/g;function $t(t){if(!de(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(te(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(t).replace(Ht,(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(e){return"[Circular]"}default:return t}})),s=r[n];n<i;s=r[++n])he(s)||!ye(s)?o+=" "+s:o+=" "+te(s);return o}function Xt(t,e){if(ge(y.process))return function(){return Xt(t,e).apply(this,arguments)};var n=!1;function r(){return n||(console.error(e),n=!0),t.apply(this,arguments)}return r}var Qt,Kt={};function Zt(t){if(ge(Qt)&&(Qt=""),t=t.toUpperCase(),!Kt[t])if(new RegExp("\\b"+t+"\\b","i").test(Qt)){var e=0;Kt[t]=function(){var n=$t.apply(null,arguments);console.error("%s %d: %s",t,e,n)}}else Kt[t]=function(){};return Kt[t]}function te(t,e){var n={seen:[],stylize:ne};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),fe(e)?n.showHidden=e:e&&Se(n,e),ge(n.showHidden)&&(n.showHidden=!1),ge(n.depth)&&(n.depth=2),ge(n.colors)&&(n.colors=!1),ge(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ee),ie(n,t,n.depth)}function ee(t,e){var n=te.styles[e];return n?"["+te.colors[n][0]+"m"+t+"["+te.colors[n][1]+"m":t}function ne(t,e){return t}function re(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}function ie(t,e,n){if(t.customInspect&&e&&we(e.inspect)&&e.inspect!==te&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return de(r)||(r=ie(t,r,n)),r}var i=oe(t,e);if(i)return i;var o=Object.keys(e),s=re(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),be(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return se(e);if(0===o.length){if(we(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(me(e))return t.stylize(Date.prototype.toString.call(e),"date");if(be(e))return se(e)}var u,c="",l=!1,f=["{","}"];return le(e)&&(l=!0,f=["[","]"]),we(e)&&(c=" [Function"+(e.name?": "+e.name:"")+"]"),ve(e)&&(c=" "+RegExp.prototype.toString.call(e)),me(e)&&(c=" "+Date.prototype.toUTCString.call(e)),be(e)&&(c=" "+se(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?ae(t,e,n,s,o):o.map((function(r){return ue(t,e,n,s,r,l)})),t.seen.pop(),ce(u,c,f)):f[0]+c+f[1]}function oe(t,e){if(ge(e))return t.stylize("undefined","undefined");if(de(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return pe(e)?t.stylize(""+e,"number"):fe(e)?t.stylize(""+e,"boolean"):he(e)?t.stylize("null","null"):void 0}function se(t){return"["+Error.prototype.toString.call(t)+"]"}function ae(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)Ee(e,String(s))?o.push(ue(t,e,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(ue(t,e,n,r,i,!0))})),o}function ue(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")),Ee(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=he(n)?ie(t,u.value,null):ie(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")),ge(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 ce(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 le(t){return Array.isArray(t)}function fe(t){return"boolean"==typeof t}function he(t){return null===t}function pe(t){return"number"==typeof t}function de(t){return"string"==typeof t}function ge(t){return void 0===t}function ve(t){return ye(t)&&"[object RegExp]"===_e(t)}function ye(t){return"object"===w(t)&&null!==t}function me(t){return ye(t)&&"[object Date]"===_e(t)}function be(t){return ye(t)&&("[object Error]"===_e(t)||t instanceof Error)}function we(t){return"function"==typeof t}function _e(t){return Object.prototype.toString.call(t)}function Se(t,e){if(!e||!ye(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}function Ee(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ke(){this.head=null,this.tail=null,this.length=0}te.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]},te.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ke.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},ke.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},ke.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}},ke.prototype.clear=function(){this.head=this.tail=null,this.length=0},ke.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},ke.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 Re=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 Oe(t){if(t&&!Re(t))throw new Error("Unknown encoding: "+t)}function xe(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),Oe(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Te;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Le;break;default:return void(this.write=Ae)}this.charBuffer=new B(6),this.charReceived=0,this.charLength=0}function Ae(t){return t.toString(this.encoding)}function Te(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Le(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}xe.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},xe.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},xe.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},Be.ReadableState=Me;var je=Zt("stream");function Ce(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 Pe(t,e){return t.listeners(e).length}function Me(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof jn&&(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 ke,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 xe(t.encoding),this.encoding=t.encoding)}function Be(t){if(!(this instanceof Be))return new Be(t);this._readableState=new Me(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),r.call(this)}function Ie(t,e,n,r,i){var o=Fe(e,n);if(o)t.emit("error",o);else if(null===n)e.reading=!1,Ye(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&&ze(t))),We(t,e)}else i||(e.reading=!1);return Ne(e)}function Ne(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}Gt(Be,r),Be.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=""),Ie(this,n,t,e,!1)},Be.prototype.unshift=function(t){return Ie(this,this._readableState,t,"",!0)},Be.prototype.isPaused=function(){return!1===this._readableState.flowing},Be.prototype.setEncoding=function(t){return this._readableState.decoder=new xe(t),this._readableState.encoding=t,this};var Ue=8388608;function De(t){return t>=Ue?t=Ue:(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=De(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Fe(t,e){var n=null;return Tt(e)||"string"==typeof e||null==e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function Ye(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,ze(t)}}function ze(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(je("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Vt(Ve,t):Ve(t))}function Ve(t){je("emit readable"),t.emit("readable"),Qe(t)}function We(t,e){e.readingMore||(e.readingMore=!0,Vt(Je,t,e))}function Je(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(je("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function Ge(t){return function(){var e=t._readableState;je("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Qe(t))}}function He(t){je("readable nexttick read 0"),t.read(0)}function $e(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Vt(Xe,t,e))}function Xe(t,e){e.reading||(je("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Qe(t),e.flowing&&!e.reading&&t.read(0)}function Qe(t){var e=t._readableState;for(je("flow",e.flowing);e.flowing&&null!==t.read(););}function Ke(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=Ze(t,e.buffer,e.decoder),n);var n}function Ze(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?tn(t,e):en(t,e),r}function tn(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 en(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 nn(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Vt(rn,e,t))}function rn(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function on(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}function sn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function an(){}function un(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function cn(t,e){Object.defineProperty(this,"buffer",{get:Xt((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof jn&&(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){mn(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 On(this)}function ln(t){if(!(this instanceof ln||this instanceof jn))return new ln(t);this._writableState=new cn(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 fn(t,e){var n=new Error("write after end");t.emit("error",n),Vt(e,n)}function hn(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),Vt(r,o),i=!1),i}function pn(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=B.from(e,n)),e}function dn(t,e,n,r,i){n=pn(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 un(n,r,i),a?a.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else gn(t,e,!1,o,n,r,i);return s}function gn(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?Vt(i,r):i(r),t._writableState.errorEmitted=!0,t.emit("error",r)}function yn(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function mn(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(yn(n),e)vn(t,n,r,e,i);else{var o=Sn(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||_n(t,n),r?Vt(bn,t,n,o,i):bn(t,n,o,i)}}function bn(t,e,n,r){n||wn(t,e),e.pendingcb--,r(),kn(t,e)}function wn(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _n(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;gn(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 On(e)}else{for(;n;){var a=n.chunk,u=n.encoding,c=n.callback;if(gn(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 Sn(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function En(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function kn(t,e){var n=Sn(e);return n&&(0===e.pendingcb?(En(t,e),e.finished=!0,t.emit("finish")):En(t,e)),n}function Rn(t,e,n){e.ending=!0,kn(t,e),n&&(e.finished?Vt(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function On(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}}Be.prototype.read=function(t){je("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 je("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?nn(this):ze(this),null;if(0===(t=qe(t,e))&&e.ended)return 0===e.length&&nn(this),null;var r,i=e.needReadable;return je("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&je("length less than watermark",i=!0),e.ended||e.reading?je("reading or ended",i=!1):i&&(je("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?Ke(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&nn(this)),null!==r&&this.emit("data",r),r},Be.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Be.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,je("pipe count=%d opts=%j",r.pipesCount,e);var i=e&&!1===e.end?c:s;function o(t){je("onunpipe"),t===n&&c()}function s(){je("onend"),t.end()}r.endEmitted?Vt(i):n.once("end",i),t.on("unpipe",o);var a=Ge(n);t.on("drain",a);var u=!1;function c(){je("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){je("ondata"),l=!1,!1!==t.write(e)||l||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==sn(r.pipes,t))&&!u&&(je("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function h(e){je("onerror",e),g(),t.removeListener("error",h),0===Pe(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",d),g()}function d(){je("onfinish"),t.removeListener("close",p),g()}function g(){je("unpipe"),n.unpipe(t)}return n.on("data",f),Ce(t,"error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",n),r.flowing||(je("pipe resume"),n.resume()),t},Be.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=sn(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},Be.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&&ze(this):Vt(He,this))}return n},Be.prototype.addListener=Be.prototype.on,Be.prototype.resume=function(){var t=this._readableState;return t.flowing||(je("resume"),t.flowing=!0,$e(this,t)),this},Be.prototype.pause=function(){return je("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(je("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Be.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var i in t.on("end",(function(){if(je("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){je("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 on(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){je("wrapped _read",e),n&&(n=!1,t.resume())},r},Be._fromList=Ke,ln.WritableState=cn,Gt(ln,r),cn.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},ln.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},ln.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=an),r.ended?fn(this,n):hn(this,r,t,n)&&(r.pendingcb++,i=dn(this,r,t,e,n)),i},ln.prototype.cork=function(){this._writableState.corked++},ln.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_n(this,t))},ln.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},ln.prototype._write=function(t,e,n){n(new Error("not implemented"))},ln.prototype._writev=null,ln.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||Rn(this,r,n)},Gt(jn,Be);for(var xn,An=Object.keys(ln.prototype),Tn=0;Tn<An.length;Tn++){var Ln=An[Tn];jn.prototype[Ln]||(jn.prototype[Ln]=ln.prototype[Ln])}function jn(t){if(!(this instanceof jn))return new jn(t);Be.call(this,t),ln.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",Cn)}function Cn(){this.allowHalfOpen||this._writableState.ended||Vt(Pn,this)}function Pn(t){t.end()}function Mn(t){this.afterTransform=function(e,n){return Bn(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Bn(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 In(t){if(!(this instanceof In))return new In(t);jn.call(this,t),this._transformState=new Mn(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){Nn(e,t)})):Nn(e)}))}function Nn(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 Un(t){if(!(this instanceof Un))return new Un(t);In.call(this,t)}function Dn(){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 Fn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yn(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 zn(t,e,n){return e&&Yn(t.prototype,e),n&&Yn(t,n),t}function Vn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(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){Vn(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&&Hn(t,e)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Hn(t,e){return Hn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Hn(t,e)}function $n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xn(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?$n(t):e}function Qn(t){return tr(t)||er(t)||rr()}function Kn(t){return Zn(t)||er(t)||nr()}function Zn(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 tr(t){if(Array.isArray(t))return t}function er(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function nr(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function rr(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ir(){if(void 0===xn){var t=new ArrayBuffer(2),e=new Uint8Array(t),n=new Uint16Array(t);if(e[0]=1,e[1]=2,258===n[0])xn="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");xn="LE"}}return xn}function or(){return void 0!==y.location?y.location.hostname:""}function sr(){return[]}function ar(){return 0}function ur(){return Number.MAX_VALUE}function cr(){return Number.MAX_VALUE}function lr(){return[]}function fr(){return"Browser"}function hr(){return void 0!==y.navigator?y.navigator.appVersion:""}function pr(){}function dr(){}function gr(){return"/tmp"}Gt(In,jn),In.prototype.push=function(t,e){return this._transformState.needTransform=!1,jn.prototype.push.call(this,t,e)},In.prototype._transform=function(t,e,n){throw new Error("Not implemented")},In.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)}},In.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},Gt(Un,In),Un.prototype._transform=function(t,e,n){n(null,t)},Gt(Dn,r),Dn.Readable=Be,Dn.Writable=ln,Dn.Duplex=jn,Dn.Transform=In,Dn.PassThrough=Un,Dn.Stream=Dn,Dn.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:gr,tmpDir:gr,networkInterfaces:pr,getNetworkInterfaces:dr,release:hr,type:fr,cpus:lr,totalmem:cr,freemem:ur,uptime:ar,loadavg:sr,hostname:or,endianness:ir},yr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Q?Q:"undefined"!=typeof self?self:{},mr="Expected a function",br="__lodash_hash_undefined__",wr=1/0,_r="[object Function]",Sr="[object GeneratorFunction]",Er="[object Symbol]",kr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rr=/^\w*$/,Or=/^\./,xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ar=/[\\^$.*+?()[\]{}|]/g,Tr=/\\(\\)?/g,Lr=/^\[object .+?Constructor\]$/,jr="object"==w(yr)&&yr&&yr.Object===Object&&yr,Cr="object"==("undefined"==typeof self?"undefined":w(self))&&self&&self.Object===Object&&self,Pr=jr||Cr||Function("return this")();function Mr(t,e){return null==t?void 0:t[e]}function Br(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}var Ir,Nr=Array.prototype,Ur=Function.prototype,Dr=Object.prototype,qr=Pr["__core-js_shared__"],Fr=(Ir=/[^.]+$/.exec(qr&&qr.keys&&qr.keys.IE_PROTO||""))?"Symbol(src)_1."+Ir:"",Yr=Ur.toString,zr=Dr.hasOwnProperty,Vr=Dr.toString,Wr=RegExp("^"+Yr.call(zr).replace(Ar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jr=Pr.Symbol,Gr=Nr.splice,Hr=Si(Pr,"Map"),$r=Si(Object,"create"),Xr=Jr?Jr.prototype:void 0,Qr=Xr?Xr.toString:void 0;function Kr(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 Zr(){this.__data__=$r?$r(null):{}}function ti(t){return this.has(t)&&delete this.__data__[t]}function ei(t){var e=this.__data__;if($r){var n=e[t];return n===br?void 0:n}return zr.call(e,t)?e[t]:void 0}function ni(t){var e=this.__data__;return $r?void 0!==e[t]:zr.call(e,t)}function ri(t,e){return this.__data__[t]=$r&&void 0===e?br:e,this}function ii(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 oi(){this.__data__=[]}function si(t){var e=this.__data__,n=vi(e,t);return!(n<0||(n==e.length-1?e.pop():Gr.call(e,n,1),0))}function ai(t){var e=this.__data__,n=vi(e,t);return n<0?void 0:e[n][1]}function ui(t){return vi(this.__data__,t)>-1}function ci(t,e){var n=this.__data__,r=vi(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function li(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 fi(){this.__data__={hash:new Kr,map:new(Hr||ii),string:new Kr}}function hi(t){return _i(this,t).delete(t)}function pi(t){return _i(this,t).get(t)}function di(t){return _i(this,t).has(t)}function gi(t,e){return _i(this,t).set(t,e),this}function vi(t,e){for(var n=t.length;n--;)if(Li(t[n][0],e))return n;return-1}function yi(t,e){for(var n=0,r=(e=Ei(e,t)?[e]:wi(e)).length;null!=t&&n<r;)t=t[xi(e[n++])];return n&&n==r?t:void 0}function mi(t){return!(!Pi(t)||Ri(t))&&(Ci(t)||Br(t)?Wr:Lr).test(Ai(t))}function bi(t){if("string"==typeof t)return t;if(Bi(t))return Qr?Qr.call(t):"";var e=t+"";return"0"==e&&1/t==-wr?"-0":e}function wi(t){return ji(t)?t:Oi(t)}function _i(t,e){var n=t.__data__;return ki(e)?n["string"==typeof e?"string":"hash"]:n.map}function Si(t,e){var n=Mr(t,e);return mi(n)?n:void 0}function Ei(t,e){if(ji(t))return!1;var n=w(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Bi(t))||Rr.test(t)||!kr.test(t)||null!=e&&t in Object(e)}function ki(t){var e=w(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Ri(t){return!!Fr&&Fr in t}Kr.prototype.clear=Zr,Kr.prototype.delete=ti,Kr.prototype.get=ei,Kr.prototype.has=ni,Kr.prototype.set=ri,ii.prototype.clear=oi,ii.prototype.delete=si,ii.prototype.get=ai,ii.prototype.has=ui,ii.prototype.set=ci,li.prototype.clear=fi,li.prototype.delete=hi,li.prototype.get=pi,li.prototype.has=di,li.prototype.set=gi;var Oi=Ti((function(t){t=Ii(t);var e=[];return Or.test(t)&&e.push(""),t.replace(xr,(function(t,n,r,i){e.push(r?i.replace(Tr,"$1"):n||t)})),e}));function xi(t){if("string"==typeof t||Bi(t))return t;var e=t+"";return"0"==e&&1/t==-wr?"-0":e}function Ai(t){if(null!=t){try{return Yr.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ti(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(mr);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(Ti.Cache||li),n}function Li(t,e){return t===e||t!=t&&e!=e}Ti.Cache=li;var ji=Array.isArray;function Ci(t){var e=Pi(t)?Vr.call(t):"";return e==_r||e==Sr}function Pi(t){var e=w(t);return!!t&&("object"==e||"function"==e)}function Mi(t){return!!t&&"object"==w(t)}function Bi(t){return"symbol"==w(t)||Mi(t)&&Vr.call(t)==Er}function Ii(t){return null==t?"":bi(t)}function Ni(t,e,n){var r=null==t?void 0:yi(t,e);return void 0===r?n:r}var Ui=Ni;function Di(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=Qn(r),o=i[0],s=i.slice(1);return Wn({},t,Vn({},o,r.length>1?qi(t[o]||{},s,n):n))}function Fi(t,e){var n=Array.isArray(e)?e:e.split("."),r=Qn(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,Vn({},n,t[n]))}),{}):Object.keys(t).reduce((function(e,n){return Wn({},e,Vn({},n,n!==i?t[n]:Fi(t[i],o)))}),{})}function Yi(t,e){try{return t.push.apply(t,Kn(e)),t}catch(n){return t.concat(e)}}function zi(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 Vi={getProp:Di,setProp:qi,unsetProp:Fi,fastJoin:zi,flattenReducer:Yi},Wi=Vi.getProp,Ji=Vi.fastJoin,Gi=Vi.flattenReducer,Hi=function(){function t(e){Fn(this,t),this.opts=this.preprocessOpts(e)}return zn(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 Ui(n,t,e.opts.defaultValue)}:function(n){return Wi(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 Ui(e,t.value,n)}:function(e){return Wi(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(Gi,[])}),[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}(),$i=Vi.fastJoin,Xi=Vi.flattenReducer,Qi=function(t){function e(t){var n;return Fn(this,e),(n=Xn(this,Gn(e).call(this,t))).opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields)),n}return Jn(e,t),zn(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(Xi,[])}},{key:"processData",value:function(t){var e=this;return $i(t.map((function(t){return e.processRow(t)})).filter((function(t){return t})),this.opts.eol)}}]),e}(Hi),Ki={},Zi=Ki.LEFT_BRACE=1,to=Ki.RIGHT_BRACE=2,eo=Ki.LEFT_BRACKET=3,no=Ki.RIGHT_BRACKET=4,ro=Ki.COLON=5,io=Ki.COMMA=6,oo=Ki.TRUE=7,so=Ki.FALSE=8,ao=Ki.NULL=9,uo=Ki.STRING=10,co=Ki.NUMBER=11,lo=Ki.START=17,fo=Ki.STOP=18,ho=Ki.TRUE1=33,po=Ki.TRUE2=34,go=Ki.TRUE3=35,vo=Ki.FALSE1=49,yo=Ki.FALSE2=50,mo=Ki.FALSE3=51,bo=Ki.FALSE4=52,wo=Ki.NULL1=65,_o=Ki.NULL2=66,So=Ki.NULL3=67,Eo=Ki.NUMBER1=81,ko=Ki.NUMBER3=83,Ro=Ki.STRING1=97,Oo=Ki.STRING2=98,xo=Ki.STRING3=99,Ao=Ki.STRING4=100,To=Ki.STRING5=101,Lo=Ki.STRING6=102,jo=Ki.VALUE=113,Co=Ki.KEY=114,Po=Ki.OBJECT=129,Mo=Ki.ARRAY=130,Bo="\\".charCodeAt(0),Io="/".charCodeAt(0),No="\b".charCodeAt(0),Uo="\f".charCodeAt(0),Do="\n".charCodeAt(0),qo="\r".charCodeAt(0),Fo="\t".charCodeAt(0),Yo=65536;function zo(){this.tState=lo,this.value=void 0,this.string=void 0,this.stringBuffer=B.alloc?B.alloc(Yo):new B(Yo),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=jo,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}zo.toknam=function(t){for(var e=Object.keys(Ki),n=0,r=e.length;n<r;n++){var i=e[n];if(Ki[i]===t)return i}return t&&"0x"+t.toString(16)};var Vo=zo.prototype;Vo.onError=function(t){throw t},Vo.charError=function(t,e){this.tState=fo,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(t[e]))+" at position "+e+" in state "+zo.toknam(this.tState)))},Vo.appendStringChar=function(t){this.stringBufferOffset>=Yo&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t},Vo.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>Yo&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,n),this.stringBufferOffset+=r},Vo.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===lo){if(e=t[n],this.offset++,123===e)this.onToken(Zi,"{");else if(125===e)this.onToken(to,"}");else if(91===e)this.onToken(eo,"[");else if(93===e)this.onToken(no,"]");else if(58===e)this.onToken(ro,":");else if(44===e)this.onToken(io,",");else if(116===e)this.tState=ho;else if(102===e)this.tState=vo;else if(110===e)this.tState=wo;else if(34===e)this.string="",this.stringBufferOffset=0,this.tState=Ro;else if(45===e)this.string="-",this.tState=Eo;else if(e>=48&&e<64)this.string=String.fromCharCode(e),this.tState=ko;else if(32!==e&&9!==e&&10!==e&&13!==e)return this.charError(t,n)}else if(this.tState===Ro)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 "+zo.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=lo,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(uo,this.string),this.offset+=B.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===e)this.tState=Oo;else{if(!(e>=32))return this.charError(t,n);this.appendStringChar(e)}else if(this.tState===Oo)if(34===(e=t[n]))this.appendStringChar(e),this.tState=Ro;else if(92===e)this.appendStringChar(Bo),this.tState=Ro;else if(47===e)this.appendStringChar(Io),this.tState=Ro;else if(98===e)this.appendStringChar(No),this.tState=Ro;else if(102===e)this.appendStringChar(Uo),this.tState=Ro;else if(110===e)this.appendStringChar(Do),this.tState=Ro;else if(114===e)this.appendStringChar(qo),this.tState=Ro;else if(116===e)this.appendStringChar(Fo),this.tState=Ro;else{if(117!==e)return this.charError(t,n);this.unicode="",this.tState=xo}else if(this.tState===xo||this.tState===Ao||this.tState===To||this.tState===Lo){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++===Lo){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=Ro}}else if(this.tState===Eo||this.tState===ko)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=ko;break;default:this.tState=lo;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(uo,this.string):this.onToken(co,a),this.offset+=this.string.length-1,this.string=void 0,n--}else if(this.tState===ho){if(114!==t[n])return this.charError(t,n);this.tState=po}else if(this.tState===po){if(117!==t[n])return this.charError(t,n);this.tState=go}else if(this.tState===go){if(101!==t[n])return this.charError(t,n);this.tState=lo,this.onToken(oo,!0),this.offset+=3}else if(this.tState===vo){if(97!==t[n])return this.charError(t,n);this.tState=yo}else if(this.tState===yo){if(108!==t[n])return this.charError(t,n);this.tState=mo}else if(this.tState===mo){if(115!==t[n])return this.charError(t,n);this.tState=bo}else if(this.tState===bo){if(101!==t[n])return this.charError(t,n);this.tState=lo,this.onToken(so,!1),this.offset+=4}else if(this.tState===wo){if(117!==t[n])return this.charError(t,n);this.tState=_o}else if(this.tState===_o){if(108!==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=lo,this.onToken(ao,null),this.offset+=3}},Vo.onToken=function(t,e){},Vo.parseError=function(t,e){this.tState=fo,this.onError(new Error("Unexpected "+zo.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+zo.toknam(this.state)))},Vo.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Vo.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=jo)},Vo.emit=function(t){this.mode&&(this.state=io),this.onValue(t)},Vo.onValue=function(t){},Vo.onToken=function(t,e){if(this.state===jo)if(t===uo||t===co||t===oo||t===so||t===ao)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===Zi)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Co,this.mode=Po;else if(t===eo)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Mo,this.state=jo;else if(t===to){if(this.mode!==Po)return this.parseError(t,e);this.pop()}else{if(t!==no)return this.parseError(t,e);if(this.mode!==Mo)return this.parseError(t,e);this.pop()}else if(this.state===Co)if(t===uo)this.key=e,this.state=ro;else{if(t!==to)return this.parseError(t,e);this.pop()}else if(this.state===ro){if(t!==ro)return this.parseError(t,e);this.state=jo}else{if(this.state!==io)return this.parseError(t,e);if(t===io)this.mode===Mo?(this.key++,this.state=jo):this.mode===Po&&(this.state=Co);else{if(!(t===no&&this.mode===Mo||t===to&&this.mode===Po))return this.parseError(t,e);this.pop()}}},zo.C=Ki;var Wo=zo,Jo=function(t){function e(t,n){var r;return Fn(this,e),r=Xn(this,Gn(e).call(this,n)),Object.getOwnPropertyNames(Hi.prototype).forEach((function(t){return r[t]=Hi.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),zn(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 Wo,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===Wo.C.ARRAY||this.mode===Wo.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===Wo.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}(Dn.Transform),Go=Jo,Ho=Dn.Transform,$o=Vi.fastJoin,Xo=function(){function t(e,n){Fn(this,t),this.input=new Ho(n),this.input._read=function(){},this.transform=new Go(e,n),this.processor=this.input.pipe(this.transform)}return zn(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($o(i,""))})).on("error",(function(t){return r(t)}))}else t.processor.on("finish",(function(){return n()})).on("error",(function(t){return r(t)}))}))}}]),t}(),Qo=Xo;function Ko(){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 Zo=Ko,ts=Vi.setProp,es=Vi.unsetProp,ns=Vi.flattenReducer;function rs(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(rs(o,i)):Array.isArray(o)&&(n.push(i),n=n.concat(o.map((function(t){return rs(t,i)})).reduce(ns,[]).filter((function(t,e,n){return n.indexOf(t)!==e})))),n}),[])}function is(){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=Ui(t,e);return Array.isArray(n)?n.length?n.map((function(n,r){return ts(i&&r>0?{}:t,e,n)})):es(t,e):t})).reduce(ns,[])}return n=Array.isArray(n)?n:n?[n]:void 0,function(t){return(n||rs(t)).reduce(o,[t])}}var os=is,ss=Dn.Readable,as=Qi,us=Qo,cs=Go,ls=function(t,e){return new Qi(e).parse(t)},fs=function(t,e,n){try{t instanceof ss||(n=Object.assign({},n,{objectMode:!0}));var r=new Qo(e,n),i=r.promise();return Array.isArray(t)?(t.forEach((function(t){return r.input.push(t)})),r.input.push(null)):t instanceof ss?r.fromInput(t):(r.input.push(t),r.input.push(null)),i}catch(o){return Promise.reject(o)}},hs={flatten:Zo,unwind:os},ps={Parser:as,AsyncParser:us,Transform:cs,parse:ls,parseAsync:fs,transforms:hs};t.AsyncParser=us,t.Parser=as,t.Transform=cs,t.default=ps,t.parse=ls,t.parseAsync=fs,t.transforms=hs,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,Rt.exports);var Ot=function(t){var e=t.data,n=t.fileName,r=t.fileType,i="text/".concat(r),o=new Blob([e],{type:i}),s=document.createElement("a");s.download="".concat(n,".").concat(r),s.href=window.URL.createObjectURL(o);var a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});s.dispatchEvent(a),s.remove()};var xt={all:function(){return["demographics"]},list:function(t){return[].concat(v(xt.all()),[t])}};var At=V.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"])),W["--ll-spacing-medium"],W["--ll-color-surface"],W["--ll-shadow-medium"],W["--ll-color-border"]),Tt=V.div(f||(f=_(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),W["--ll-spacing-medium"]),Lt={all:function(){return["profiles"]},list:function(t){return[].concat(v(Lt.all()),[t])}};var jt=function(){var t,e,n,r,i,o,s,a=lt().dataExplorerState,u=Z().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=K().client,s={lat:e,lng:n,geographyLevels:["10","30"],locationScoresRounding:!1,include:r},j(C.list(s),b(y().mark((function t(){return y().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=K().client,u={lat:e,lng:n,limit:o,radius:s,include:i};return j(M.list(u),b(y().mark((function t(){return y().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=K().client,a={lat:e,lng:n,limit:i,radius:o};return j(P.list(a),b(y().mark((function t(){return y().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}),v=g.data,m=g.isFetching,w=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.radius,o=K().client,s={lat:e,lng:n,radius:i};return j(xt.list(s),b(y().mark((function t(){return y().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=K().client,o={lat:e,lng:n};return j(Lt.list(o),b(y().mark((function t(){return y().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=Y.exports.useMemo((function(){return E(E(E(E(E({},l&&a.scores.checked&&{scores:l}),p&&a.pois.checked&&{pois:p}),v&&a.schools.checked&&{schools:v}),_&&a.demographics.checked&&{demographics:_}),O&&a.profiles.checked&&{profiles:O})}),[p,l,v,O,_,a]),T=f||d||m||S||x,L=Object.keys(A).length;return G(At,{children:[T&&z(Tt,{children:z(tt,{})}),G(et,{variant:"contained",onClick:function(t){t.preventDefault(),Ot({data:JSON.stringify(A),fileName:"local-logic-data",fileType:"json"})},disabled:!Object.keys(A).length||T,children:[u.EXPORT," JSON"]}),z(nt,{spacing:"--ll-spacing-xx-small"}),G(et,{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=Rt.exports.parse(r))&&Ot({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=Rt.exports.parse(t);e&&Ot({data:e,fileName:"pois",fileType:"csv"})}}(),function(){if(v){var t=Object.entries(v).map((function(t){var e=R(t,2),n=e[0];return e[1].map((function(t){return E({school:n},t)}))})).flat(),e=Rt.exports.parse(t);e&&Ot({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=Rt.exports.parse(t);e&&Ot({data:e,fileName:"demographics",fileType:"csv"})}}(),function(){if(O){var t=[O],e=Rt.exports.parse(t,{fields:["id","intro","name","profiles.character","profiles.housing","profiles.services","profiles.transport"]});e&&Ot({data:e,fileName:"profiles",fileType:"csv"})}}()},disabled:!L||T,children:[u.EXPORT," CSV (",L,")"]})]})},Ct=V.div(h||(h=_(["\n height: 400px;\n display: flex;\n border: 2px solid ",";\n position: relative;\n border-radius: ",";\n overflow: hidden;\n"])),W["--ll-color-on-background"],W["--ll-border-radius-small"]),Pt=V.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"])),W["--ll-color-on-background"],W["--ll-spacing-xx-small"],W["--ll-spacing-x-small"],W["--ll-font-family-mono"],W["--ll-color-background"]),Mt=function(){var t,e,n,r,i=Y.exports.useRef(),o=R(Y.exports.useState(!0),2),s=o[0],a=o[1],u=lt(),c=u.dataExplorerState,l=u.setDataExplorerState,f=F().sdkState,h=R(Y.exports.useState(!1),2),p=h[0],d=h[1],g=Y.exports.useRef(),v=Y.exports.useRef(!1),y=Z().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:[z(B,{placeholder:y.SEARCH_MAP,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})}}),z(nt,{vertical:!0,spacing:"--ll-spacing-small"}),G(Ct,{children:[s&&z(rt,{height:"400px",width:"100%"}),G(I,{ref:i,style:s?E({visibility:"hidden"},b):b,onLoad:function(){return a(!1)},mapLib:N,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(){v.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(){v.current=!0},onDragEnd:function(){v.current=!1},children:[z(Pt,{children:G(H,{noMargin:!0,family:"mono",children:["Lat:"," ",Math.round(1e5*c.location.lat)/1e5,", Lng:"," ",Math.round(1e5*c.location.lng)/1e5]})}),z(U,{showCompass:!0,style:{marginTop:16,marginRight:16}}),z(D,{marker:E({icon:"pin"},c.location)})]})]})]})},Bt=V.div(d||(d=_(["\n margin: 2px;\n display: inline-block;\n"]))),It=function(){var t=lt(),e=t.dataExplorerState,n=t.setDataExplorerState,r=Object.keys(it).filter((function(t){return Number.isNaN(Number(t))}));return z(ot,{children:r.map((function(t){var r=e.scores.include.includes(t);return z(Bt,{children:z(st.Root,{options:{score:t,scoresData:void 0},children:z(et,{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(v(e.scores.include),[t])})})},children:z(st.Title,{options:{isRawText:!0}})})})},t)}))})},Nt=V.div(g||(g=_(["\n margin: 2px;\n display: inline-block;\n"]))),Ut=function(){var t=Z().translations,e=lt(),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 z(Nt,{children:z(ut.Root,{options:{poi:t},children:z(et,{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(v(n.pois.include),[t])})})},children:z(ut.Title,{options:{isRawText:!0}})})})},t)})),z(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]})})}}),z(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=Z().translations,e=lt(),n=e.dataExplorerState,r=e.setDataExplorerState;return G(ot,{children:[z(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]})})}}),z(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]})})}})]})},qt=function(){var t=Z().translations,e=lt(),n=e.dataExplorerState,r=e.setDataExplorerState;return z(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=Z().translations,e=[{title:t.LOCATION,description:t.LOCATION_TEXT,value:"location",number:1,children:z(Mt,{})},{title:t.SCORES,description:t.SCORES_TEXT,value:"scores",number:2,children:z(It,{})},{title:t.POIS,description:t.POIS_TEXT,value:"pois",number:3,children:z(Ut,{})},{title:t.SCHOOLS,description:t.SCHOOLS_TEXT,value:"schools",number:4,children:z(Dt,{})},{title:t.DEMOGRAPHICS,description:t.DEMOGRAPHICS_TEXT,value:"demographics",number:5,children:z(qt,{})},{title:t.PROFILES,description:t.PROFILES_TEXT,value:"profiles",number:6}];return z(ft,{children:G(ht,{children:[z(pt,{type:"single",defaultValue:"location",collapsible:!0,children:e.map((function(t){return z(kt,{title:t.title,description:t.description,value:t.value,number:t.number,children:t.children},t.value)}))}),z(nt,{vertical:!0}),z(jt,{})]})})}))}}}))}();
|
|
1
|
+
!function(){var t,e,n,r,i,o,s,a,u,c,l,f,h,p,d,g;function v(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 y(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */y=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,v=g&&g(g(O([])));v&&v!==e&&n.call(v,i)&&(d=v);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.b0c3b101.js","./index-legacy.ab2806f1.js"],(function(m,S){"use strict";var O,x,A,T,L,j,C,P,M,B,I,N,U,D,q,F,Y,z,V,W,J,G,H,$,X,Q,K,Z,tt,et,nt,rt,it,ot,st,at,ut,ct;return{setters:[function(t){O=t.g,x=t.c,A=t.n,T=t.f,L=t.S,j=t.u,C=t.b,P=t.s,M=t.p,B=t.i,I=t.k,N=t.m,U=t.N,D=t.P},function(t){q=t.R,F=t.u,Y=t.r,z=t.j,V=t.s,W=t.y,J=t.U,G=t.b,H=t.l,$=t.a0,X=t.O,Q=t.c,K=t.L,Z=t.i,tt=t.k,et=t.T,nt=t.g,rt=t.M,it=t.a1,ot=t.F,st=t.h,at=t.a2,ut=t.a3,ct=t.a4}],execute:function(){var S=q.createContext({}),lt=function(){return Y.exports.useContext(S)},ft=function(t){var e,n,r=t.children,i=F().sdkState,o=R(Y.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=Y.exports.useMemo((function(){return{dataExplorerState:s,setDataExplorerState:a}}),[s,a]);return z(S.Provider,{value:u,children:r})},ht=V.div(t||(t=_(["\n height: 100vh;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n background-color: ",";\n"])),W["--ll-color-background"]),pt=V(O)(e||(e=_(["\n overflow-y: auto;\n padding: ",";\n"])),W["--ll-spacing-medium"]),dt=J({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),gt=J({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),vt=V.div(n||(n=_(["\n display: flex;\n flex-direction: column;\n"]))),yt=V.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"])),W["--ll-color-primary"],W["--ll-color-primary"],W["--ll-spacing-small"],W["--ll-font-size-p"]),mt=V(x)(i||(i=_(["\n all: unset;\n flex: 1;\n display: flex;\n align-items: center;\n font-family: ",";\n"])),W["--ll-font-family"]),bt=V.div(o||(o=_(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: "," 0;\n"])),W["--ll-spacing-x-small"]),wt=V(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 animation: ',' 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n\n [data-state="closed"] & {\n animation: '," 300ms cubic-bezier(0.87, 0, 0.13, 1);\n }\n"])),W["--ll-color-surface"],W["--ll-spacing-medium"],W["--ll-spacing-medium"],dt,gt),_t=V.div(a||(a=_(["\n padding: ",";\n"])),W["--ll-spacing-medium"]),St=V.span(u||(u=_(["\n margin-left: ",";\n ","[data-state=open] & {\n transform: rotate(90deg);\n } ;\n"])),W["--ll-spacing-x-small"],mt),Et=V.div(c||(c=_(["\n display: flex;\n"]))),kt=function(t){var e=t.title,n=t.description,r=t.children,i=t.value,o=t.number,s=lt(),a=s.dataExplorerState,u=s.setDataExplorerState;return z(T,{value:i,children:G(vt,{children:[G(bt,{children:[G(mt,{children:[z(yt,{children:o}),z(H,{variant:"h6",noMargin:!0,weight:"--ll-font-weight-medium",children:e})]}),G(Et,{children:["checked"in a[i]&&z($,{checked:a[i].checked,onCheckedChange:function(t){return u(k({},i,E(E({},a[i]),{},{checked:t})))}}),z(mt,{children:z(St,{children:z(X,{SVGElement:L,fill:W["--ll-color-on-background-variant1"]})})})]})]}),z(wt,{children:G(_t,{children:[z(H,{color:"--ll-color-on-background-variant1",children:n}),r]})})]})})},Rt={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 v(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]:v(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 y=void 0!==Q?Q:"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?q(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|V(e)),!B.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function q(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 F(t,e){var n=e.length<0?0:0|V(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=F(t,e),t}function z(t,e){if(W(e)){var n=0|V(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||At(e.length)?M(t,0):F(t,e);if("Buffer"===e.type&&j(e.data))return F(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function V(t){if(t>=P())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+P().toString(16)+" bytes");return 0|t}function W(t){return!(null==t||!t._isBuffer)}function J(t,e){if(W(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 Et(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ot(t).length;default:if(r)return Et(t).length;e=(""+e).toLowerCase(),r=!0}}function G(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return lt(this,e,n);case"utf8":case"utf-8":return ot(this,e,n);case"ascii":return ut(this,e,n);case"latin1":case"binary":return ct(this,e,n);case"base64":return it(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function H(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function $(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)),W(e))return 0===e.length?-1:X(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):X(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function X(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 K(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 Z(t,e,n,r){return xt(Et(e,t.length-n),t,n,r)}function tt(t,e,n,r){return xt(kt(e),t,n,r)}function et(t,e,n,r){return tt(t,e,n,r)}function nt(t,e,n,r){return xt(Ot(e),t,n,r)}function rt(t,e,n,r){return xt(Rt(e,t.length-n),t,n,r)}function it(t,e,n){return 0===e&&n===t.length?x(t):x(t.slice(e,n))}function ot(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 at(r)}B.TYPED_ARRAY_SUPPORT=void 0===y.TYPED_ARRAY_SUPPORT||y.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=Tt,B.compare=function(t,e){if(!W(t)||!W(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(!W(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)H(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)H(this,e,e+3),H(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)H(this,e,e+7),H(this,e+1,e+6),H(this,e+2,e+5),H(this,e+3,e+4);return this},B.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?ot(this,0,t):G.apply(this,arguments)},B.prototype.equals=function(t){if(!W(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(!W(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 $(this,t,e,n,!0)},B.prototype.lastIndexOf=function(t,e,n){return $(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 K(this,t,e,n);case"utf8":case"utf-8":return Z(this,t,e,n);case"ascii":return tt(this,t,e,n);case"latin1":case"binary":return et(this,t,e,n);case"base64":return nt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(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 st=4096;function at(t){var e=t.length;if(e<=st)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=st));return n}function ut(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 ct(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 lt(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+=St(t[o]);return i}function ft(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 ht(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 pt(t,e,n,r,i,o){if(!W(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 dt(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 gt(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 yt(t,e,n,r,i){return i||vt(t,e,n,4),T(t,e,n,r,23,4),n+4}function mt(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||ht(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||ht(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||ht(t,1,this.length),this[t]},B.prototype.readUInt16LE=function(t,e){return e||ht(t,2,this.length),this[t]|this[t+1]<<8},B.prototype.readUInt16BE=function(t,e){return e||ht(t,2,this.length),this[t]<<8|this[t+1]},B.prototype.readUInt32LE=function(t,e){return e||ht(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||ht(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||ht(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||ht(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||ht(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},B.prototype.readInt16LE=function(t,e){e||ht(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||ht(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||ht(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||ht(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||ht(t,4,this.length),A(this,t,!0,23,4)},B.prototype.readFloatBE=function(t,e){return e||ht(t,4,this.length),A(this,t,!1,23,4)},B.prototype.readDoubleLE=function(t,e){return e||ht(t,8,this.length),A(this,t,!0,52,8)},B.prototype.readDoubleBE=function(t,e){return e||ht(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||pt(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||pt(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||pt(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||pt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):dt(this,t,e,!0),e+2},B.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||pt(this,t,e,2,65535,0),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):dt(this,t,e,!1),e+2},B.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(this,t,e,!0),e+4},B.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(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);pt(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);pt(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||pt(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||pt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):dt(this,t,e,!0),e+2},B.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||pt(this,t,e,2,32767,-32768),B.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):dt(this,t,e,!1),e+2},B.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(this,t,e,!0),e+4},B.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||pt(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):gt(this,t,e,!1),e+4},B.prototype.writeFloatLE=function(t,e,n){return yt(this,t,e,!0,n)},B.prototype.writeFloatBE=function(t,e,n){return yt(this,t,e,!1,n)},B.prototype.writeDoubleLE=function(t,e,n){return mt(this,t,e,!0,n)},B.prototype.writeDoubleBE=function(t,e,n){return mt(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=W(t)?t:Et(new B(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var bt=/[^+\/0-9A-Za-z-_]/g;function wt(t){if((t=_t(t).replace(bt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function _t(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function St(t){return t<16?"0"+t.toString(16):t.toString(16)}function Et(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 kt(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function Rt(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 Ot(t){return k(wt(t))}function xt(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 At(t){return t!=t}function Tt(t){return null!=t&&(!!t._isBuffer||Lt(t)||jt(t))}function Lt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function jt(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Lt(t.slice(0,0))}function Ct(){throw new Error("setTimeout has not been defined")}function Pt(){throw new Error("clearTimeout has not been defined")}var Mt=Ct,Bt=Pt;function It(t){if(Mt===setTimeout)return setTimeout(t,0);if((Mt===Ct||!Mt)&&setTimeout)return Mt=setTimeout,setTimeout(t,0);try{return Mt(t,0)}catch(e){try{return Mt.call(null,t,0)}catch(e){return Mt.call(this,t,0)}}}function Nt(t){if(Bt===clearTimeout)return clearTimeout(t);if((Bt===Pt||!Bt)&&clearTimeout)return Bt=clearTimeout,clearTimeout(t);try{return Bt(t)}catch(e){try{return Bt.call(null,t)}catch(e){return Bt.call(this,t)}}}"function"==typeof y.setTimeout&&(Mt=setTimeout),"function"==typeof y.clearTimeout&&(Bt=clearTimeout);var Ut,Dt=[],qt=!1,Ft=-1;function Yt(){qt&&Ut&&(qt=!1,Ut.length?Dt=Ut.concat(Dt):Ft=-1,Dt.length&&zt())}function zt(){if(!qt){var t=It(Yt);qt=!0;for(var e=Dt.length;e;){for(Ut=Dt,Dt=[];++Ft<e;)Ut&&Ut[Ft].run();Ft=-1,e=Dt.length}Ut=null,qt=!1,Nt(t)}}function Vt(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];Dt.push(new Wt(t,e)),1!==Dt.length||qt||It(zt)}function Wt(t,e){this.fun=t,this.array=e}Wt.prototype.run=function(){this.fun.apply(null,this.array)};var Jt=y.performance||{};Jt.now||Jt.mozNow||Jt.msNow||Jt.oNow||Jt.webkitNow;var Gt="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},Ht=/%[sdj%]/g;function $t(t){if(!de(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(te(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(t).replace(Ht,(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(e){return"[Circular]"}default:return t}})),s=r[n];n<i;s=r[++n])he(s)||!ye(s)?o+=" "+s:o+=" "+te(s);return o}function Xt(t,e){if(ge(y.process))return function(){return Xt(t,e).apply(this,arguments)};var n=!1;function r(){return n||(console.error(e),n=!0),t.apply(this,arguments)}return r}var Qt,Kt={};function Zt(t){if(ge(Qt)&&(Qt=""),t=t.toUpperCase(),!Kt[t])if(new RegExp("\\b"+t+"\\b","i").test(Qt)){var e=0;Kt[t]=function(){var n=$t.apply(null,arguments);console.error("%s %d: %s",t,e,n)}}else Kt[t]=function(){};return Kt[t]}function te(t,e){var n={seen:[],stylize:ne};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),fe(e)?n.showHidden=e:e&&Se(n,e),ge(n.showHidden)&&(n.showHidden=!1),ge(n.depth)&&(n.depth=2),ge(n.colors)&&(n.colors=!1),ge(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=ee),ie(n,t,n.depth)}function ee(t,e){var n=te.styles[e];return n?"["+te.colors[n][0]+"m"+t+"["+te.colors[n][1]+"m":t}function ne(t,e){return t}function re(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}function ie(t,e,n){if(t.customInspect&&e&&we(e.inspect)&&e.inspect!==te&&(!e.constructor||e.constructor.prototype!==e)){var r=e.inspect(n,t);return de(r)||(r=ie(t,r,n)),r}var i=oe(t,e);if(i)return i;var o=Object.keys(e),s=re(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),be(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return se(e);if(0===o.length){if(we(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(me(e))return t.stylize(Date.prototype.toString.call(e),"date");if(be(e))return se(e)}var u,c="",l=!1,f=["{","}"];return le(e)&&(l=!0,f=["[","]"]),we(e)&&(c=" [Function"+(e.name?": "+e.name:"")+"]"),ve(e)&&(c=" "+RegExp.prototype.toString.call(e)),me(e)&&(c=" "+Date.prototype.toUTCString.call(e)),be(e)&&(c=" "+se(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?ae(t,e,n,s,o):o.map((function(r){return ue(t,e,n,s,r,l)})),t.seen.pop(),ce(u,c,f)):f[0]+c+f[1]}function oe(t,e){if(ge(e))return t.stylize("undefined","undefined");if(de(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return pe(e)?t.stylize(""+e,"number"):fe(e)?t.stylize(""+e,"boolean"):he(e)?t.stylize("null","null"):void 0}function se(t){return"["+Error.prototype.toString.call(t)+"]"}function ae(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)Ee(e,String(s))?o.push(ue(t,e,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(ue(t,e,n,r,i,!0))})),o}function ue(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")),Ee(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=he(n)?ie(t,u.value,null):ie(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")),ge(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 ce(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 le(t){return Array.isArray(t)}function fe(t){return"boolean"==typeof t}function he(t){return null===t}function pe(t){return"number"==typeof t}function de(t){return"string"==typeof t}function ge(t){return void 0===t}function ve(t){return ye(t)&&"[object RegExp]"===_e(t)}function ye(t){return"object"===w(t)&&null!==t}function me(t){return ye(t)&&"[object Date]"===_e(t)}function be(t){return ye(t)&&("[object Error]"===_e(t)||t instanceof Error)}function we(t){return"function"==typeof t}function _e(t){return Object.prototype.toString.call(t)}function Se(t,e){if(!e||!ye(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}function Ee(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ke(){this.head=null,this.tail=null,this.length=0}te.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]},te.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ke.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},ke.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},ke.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}},ke.prototype.clear=function(){this.head=this.tail=null,this.length=0},ke.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},ke.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 Re=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 Oe(t){if(t&&!Re(t))throw new Error("Unknown encoding: "+t)}function xe(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),Oe(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Te;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Le;break;default:return void(this.write=Ae)}this.charBuffer=new B(6),this.charReceived=0,this.charLength=0}function Ae(t){return t.toString(this.encoding)}function Te(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Le(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}xe.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},xe.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},xe.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},Be.ReadableState=Me;var je=Zt("stream");function Ce(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 Pe(t,e){return t.listeners(e).length}function Me(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof jn&&(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 ke,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 xe(t.encoding),this.encoding=t.encoding)}function Be(t){if(!(this instanceof Be))return new Be(t);this._readableState=new Me(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),r.call(this)}function Ie(t,e,n,r,i){var o=Fe(e,n);if(o)t.emit("error",o);else if(null===n)e.reading=!1,Ye(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&&ze(t))),We(t,e)}else i||(e.reading=!1);return Ne(e)}function Ne(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}Gt(Be,r),Be.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=""),Ie(this,n,t,e,!1)},Be.prototype.unshift=function(t){return Ie(this,this._readableState,t,"",!0)},Be.prototype.isPaused=function(){return!1===this._readableState.flowing},Be.prototype.setEncoding=function(t){return this._readableState.decoder=new xe(t),this._readableState.encoding=t,this};var Ue=8388608;function De(t){return t>=Ue?t=Ue:(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=De(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Fe(t,e){var n=null;return Tt(e)||"string"==typeof e||null==e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function Ye(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,ze(t)}}function ze(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(je("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Vt(Ve,t):Ve(t))}function Ve(t){je("emit readable"),t.emit("readable"),Qe(t)}function We(t,e){e.readingMore||(e.readingMore=!0,Vt(Je,t,e))}function Je(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(je("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function Ge(t){return function(){var e=t._readableState;je("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,Qe(t))}}function He(t){je("readable nexttick read 0"),t.read(0)}function $e(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Vt(Xe,t,e))}function Xe(t,e){e.reading||(je("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),Qe(t),e.flowing&&!e.reading&&t.read(0)}function Qe(t){var e=t._readableState;for(je("flow",e.flowing);e.flowing&&null!==t.read(););}function Ke(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=Ze(t,e.buffer,e.decoder),n);var n}function Ze(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?tn(t,e):en(t,e),r}function tn(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 en(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 nn(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Vt(rn,e,t))}function rn(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function on(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}function sn(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function an(){}function un(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function cn(t,e){Object.defineProperty(this,"buffer",{get:Xt((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof jn&&(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){mn(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 On(this)}function ln(t){if(!(this instanceof ln||this instanceof jn))return new ln(t);this._writableState=new cn(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 fn(t,e){var n=new Error("write after end");t.emit("error",n),Vt(e,n)}function hn(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),Vt(r,o),i=!1),i}function pn(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=B.from(e,n)),e}function dn(t,e,n,r,i){n=pn(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 un(n,r,i),a?a.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else gn(t,e,!1,o,n,r,i);return s}function gn(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?Vt(i,r):i(r),t._writableState.errorEmitted=!0,t.emit("error",r)}function yn(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function mn(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(yn(n),e)vn(t,n,r,e,i);else{var o=Sn(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||_n(t,n),r?Vt(bn,t,n,o,i):bn(t,n,o,i)}}function bn(t,e,n,r){n||wn(t,e),e.pendingcb--,r(),kn(t,e)}function wn(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _n(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;gn(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 On(e)}else{for(;n;){var a=n.chunk,u=n.encoding,c=n.callback;if(gn(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 Sn(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function En(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function kn(t,e){var n=Sn(e);return n&&(0===e.pendingcb?(En(t,e),e.finished=!0,t.emit("finish")):En(t,e)),n}function Rn(t,e,n){e.ending=!0,kn(t,e),n&&(e.finished?Vt(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function On(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}}Be.prototype.read=function(t){je("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 je("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?nn(this):ze(this),null;if(0===(t=qe(t,e))&&e.ended)return 0===e.length&&nn(this),null;var r,i=e.needReadable;return je("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&je("length less than watermark",i=!0),e.ended||e.reading?je("reading or ended",i=!1):i&&(je("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?Ke(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&nn(this)),null!==r&&this.emit("data",r),r},Be.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Be.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,je("pipe count=%d opts=%j",r.pipesCount,e);var i=e&&!1===e.end?c:s;function o(t){je("onunpipe"),t===n&&c()}function s(){je("onend"),t.end()}r.endEmitted?Vt(i):n.once("end",i),t.on("unpipe",o);var a=Ge(n);t.on("drain",a);var u=!1;function c(){je("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){je("ondata"),l=!1,!1!==t.write(e)||l||((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==sn(r.pipes,t))&&!u&&(je("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,l=!0),n.pause())}function h(e){je("onerror",e),g(),t.removeListener("error",h),0===Pe(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",d),g()}function d(){je("onfinish"),t.removeListener("close",p),g()}function g(){je("unpipe"),n.unpipe(t)}return n.on("data",f),Ce(t,"error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",n),r.flowing||(je("pipe resume"),n.resume()),t},Be.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=sn(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},Be.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&&ze(this):Vt(He,this))}return n},Be.prototype.addListener=Be.prototype.on,Be.prototype.resume=function(){var t=this._readableState;return t.flowing||(je("resume"),t.flowing=!0,$e(this,t)),this},Be.prototype.pause=function(){return je("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(je("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Be.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var i in t.on("end",(function(){if(je("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){je("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 on(["error","close","destroy","pause","resume"],(function(e){t.on(e,r.emit.bind(r,e))})),r._read=function(e){je("wrapped _read",e),n&&(n=!1,t.resume())},r},Be._fromList=Ke,ln.WritableState=cn,Gt(ln,r),cn.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},ln.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},ln.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=an),r.ended?fn(this,n):hn(this,r,t,n)&&(r.pendingcb++,i=dn(this,r,t,e,n)),i},ln.prototype.cork=function(){this._writableState.corked++},ln.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_n(this,t))},ln.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},ln.prototype._write=function(t,e,n){n(new Error("not implemented"))},ln.prototype._writev=null,ln.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||Rn(this,r,n)},Gt(jn,Be);for(var xn,An=Object.keys(ln.prototype),Tn=0;Tn<An.length;Tn++){var Ln=An[Tn];jn.prototype[Ln]||(jn.prototype[Ln]=ln.prototype[Ln])}function jn(t){if(!(this instanceof jn))return new jn(t);Be.call(this,t),ln.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",Cn)}function Cn(){this.allowHalfOpen||this._writableState.ended||Vt(Pn,this)}function Pn(t){t.end()}function Mn(t){this.afterTransform=function(e,n){return Bn(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Bn(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 In(t){if(!(this instanceof In))return new In(t);jn.call(this,t),this._transformState=new Mn(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){Nn(e,t)})):Nn(e)}))}function Nn(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 Un(t){if(!(this instanceof Un))return new Un(t);In.call(this,t)}function Dn(){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 Fn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yn(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 zn(t,e,n){return e&&Yn(t.prototype,e),n&&Yn(t,n),t}function Vn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(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){Vn(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&&Hn(t,e)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gn(t)}function Hn(t,e){return Hn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Hn(t,e)}function $n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xn(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?$n(t):e}function Qn(t){return tr(t)||er(t)||rr()}function Kn(t){return Zn(t)||er(t)||nr()}function Zn(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 tr(t){if(Array.isArray(t))return t}function er(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function nr(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function rr(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ir(){if(void 0===xn){var t=new ArrayBuffer(2),e=new Uint8Array(t),n=new Uint16Array(t);if(e[0]=1,e[1]=2,258===n[0])xn="BE";else{if(513!==n[0])throw new Error("unable to figure out endianess");xn="LE"}}return xn}function or(){return void 0!==y.location?y.location.hostname:""}function sr(){return[]}function ar(){return 0}function ur(){return Number.MAX_VALUE}function cr(){return Number.MAX_VALUE}function lr(){return[]}function fr(){return"Browser"}function hr(){return void 0!==y.navigator?y.navigator.appVersion:""}function pr(){}function dr(){}function gr(){return"/tmp"}Gt(In,jn),In.prototype.push=function(t,e){return this._transformState.needTransform=!1,jn.prototype.push.call(this,t,e)},In.prototype._transform=function(t,e,n){throw new Error("Not implemented")},In.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)}},In.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},Gt(Un,In),Un.prototype._transform=function(t,e,n){n(null,t)},Gt(Dn,r),Dn.Readable=Be,Dn.Writable=ln,Dn.Duplex=jn,Dn.Transform=In,Dn.PassThrough=Un,Dn.Stream=Dn,Dn.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:gr,tmpDir:gr,networkInterfaces:pr,getNetworkInterfaces:dr,release:hr,type:fr,cpus:lr,totalmem:cr,freemem:ur,uptime:ar,loadavg:sr,hostname:or,endianness:ir},yr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Q?Q:"undefined"!=typeof self?self:{},mr="Expected a function",br="__lodash_hash_undefined__",wr=1/0,_r="[object Function]",Sr="[object GeneratorFunction]",Er="[object Symbol]",kr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rr=/^\w*$/,Or=/^\./,xr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ar=/[\\^$.*+?()[\]{}|]/g,Tr=/\\(\\)?/g,Lr=/^\[object .+?Constructor\]$/,jr="object"==w(yr)&&yr&&yr.Object===Object&&yr,Cr="object"==("undefined"==typeof self?"undefined":w(self))&&self&&self.Object===Object&&self,Pr=jr||Cr||Function("return this")();function Mr(t,e){return null==t?void 0:t[e]}function Br(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}var Ir,Nr=Array.prototype,Ur=Function.prototype,Dr=Object.prototype,qr=Pr["__core-js_shared__"],Fr=(Ir=/[^.]+$/.exec(qr&&qr.keys&&qr.keys.IE_PROTO||""))?"Symbol(src)_1."+Ir:"",Yr=Ur.toString,zr=Dr.hasOwnProperty,Vr=Dr.toString,Wr=RegExp("^"+Yr.call(zr).replace(Ar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jr=Pr.Symbol,Gr=Nr.splice,Hr=Si(Pr,"Map"),$r=Si(Object,"create"),Xr=Jr?Jr.prototype:void 0,Qr=Xr?Xr.toString:void 0;function Kr(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 Zr(){this.__data__=$r?$r(null):{}}function ti(t){return this.has(t)&&delete this.__data__[t]}function ei(t){var e=this.__data__;if($r){var n=e[t];return n===br?void 0:n}return zr.call(e,t)?e[t]:void 0}function ni(t){var e=this.__data__;return $r?void 0!==e[t]:zr.call(e,t)}function ri(t,e){return this.__data__[t]=$r&&void 0===e?br:e,this}function ii(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 oi(){this.__data__=[]}function si(t){var e=this.__data__,n=vi(e,t);return!(n<0||(n==e.length-1?e.pop():Gr.call(e,n,1),0))}function ai(t){var e=this.__data__,n=vi(e,t);return n<0?void 0:e[n][1]}function ui(t){return vi(this.__data__,t)>-1}function ci(t,e){var n=this.__data__,r=vi(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function li(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 fi(){this.__data__={hash:new Kr,map:new(Hr||ii),string:new Kr}}function hi(t){return _i(this,t).delete(t)}function pi(t){return _i(this,t).get(t)}function di(t){return _i(this,t).has(t)}function gi(t,e){return _i(this,t).set(t,e),this}function vi(t,e){for(var n=t.length;n--;)if(Li(t[n][0],e))return n;return-1}function yi(t,e){for(var n=0,r=(e=Ei(e,t)?[e]:wi(e)).length;null!=t&&n<r;)t=t[xi(e[n++])];return n&&n==r?t:void 0}function mi(t){return!(!Pi(t)||Ri(t))&&(Ci(t)||Br(t)?Wr:Lr).test(Ai(t))}function bi(t){if("string"==typeof t)return t;if(Bi(t))return Qr?Qr.call(t):"";var e=t+"";return"0"==e&&1/t==-wr?"-0":e}function wi(t){return ji(t)?t:Oi(t)}function _i(t,e){var n=t.__data__;return ki(e)?n["string"==typeof e?"string":"hash"]:n.map}function Si(t,e){var n=Mr(t,e);return mi(n)?n:void 0}function Ei(t,e){if(ji(t))return!1;var n=w(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Bi(t))||Rr.test(t)||!kr.test(t)||null!=e&&t in Object(e)}function ki(t){var e=w(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Ri(t){return!!Fr&&Fr in t}Kr.prototype.clear=Zr,Kr.prototype.delete=ti,Kr.prototype.get=ei,Kr.prototype.has=ni,Kr.prototype.set=ri,ii.prototype.clear=oi,ii.prototype.delete=si,ii.prototype.get=ai,ii.prototype.has=ui,ii.prototype.set=ci,li.prototype.clear=fi,li.prototype.delete=hi,li.prototype.get=pi,li.prototype.has=di,li.prototype.set=gi;var Oi=Ti((function(t){t=Ii(t);var e=[];return Or.test(t)&&e.push(""),t.replace(xr,(function(t,n,r,i){e.push(r?i.replace(Tr,"$1"):n||t)})),e}));function xi(t){if("string"==typeof t||Bi(t))return t;var e=t+"";return"0"==e&&1/t==-wr?"-0":e}function Ai(t){if(null!=t){try{return Yr.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Ti(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(mr);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(Ti.Cache||li),n}function Li(t,e){return t===e||t!=t&&e!=e}Ti.Cache=li;var ji=Array.isArray;function Ci(t){var e=Pi(t)?Vr.call(t):"";return e==_r||e==Sr}function Pi(t){var e=w(t);return!!t&&("object"==e||"function"==e)}function Mi(t){return!!t&&"object"==w(t)}function Bi(t){return"symbol"==w(t)||Mi(t)&&Vr.call(t)==Er}function Ii(t){return null==t?"":bi(t)}function Ni(t,e,n){var r=null==t?void 0:yi(t,e);return void 0===r?n:r}var Ui=Ni;function Di(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=Qn(r),o=i[0],s=i.slice(1);return Wn({},t,Vn({},o,r.length>1?qi(t[o]||{},s,n):n))}function Fi(t,e){var n=Array.isArray(e)?e:e.split("."),r=Qn(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,Vn({},n,t[n]))}),{}):Object.keys(t).reduce((function(e,n){return Wn({},e,Vn({},n,n!==i?t[n]:Fi(t[i],o)))}),{})}function Yi(t,e){try{return t.push.apply(t,Kn(e)),t}catch(n){return t.concat(e)}}function zi(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 Vi={getProp:Di,setProp:qi,unsetProp:Fi,fastJoin:zi,flattenReducer:Yi},Wi=Vi.getProp,Ji=Vi.fastJoin,Gi=Vi.flattenReducer,Hi=function(){function t(e){Fn(this,t),this.opts=this.preprocessOpts(e)}return zn(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 Ui(n,t,e.opts.defaultValue)}:function(n){return Wi(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 Ui(e,t.value,n)}:function(e){return Wi(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(Gi,[])}),[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}(),$i=Vi.fastJoin,Xi=Vi.flattenReducer,Qi=function(t){function e(t){var n;return Fn(this,e),(n=Xn(this,Gn(e).call(this,t))).opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields)),n}return Jn(e,t),zn(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(Xi,[])}},{key:"processData",value:function(t){var e=this;return $i(t.map((function(t){return e.processRow(t)})).filter((function(t){return t})),this.opts.eol)}}]),e}(Hi),Ki={},Zi=Ki.LEFT_BRACE=1,to=Ki.RIGHT_BRACE=2,eo=Ki.LEFT_BRACKET=3,no=Ki.RIGHT_BRACKET=4,ro=Ki.COLON=5,io=Ki.COMMA=6,oo=Ki.TRUE=7,so=Ki.FALSE=8,ao=Ki.NULL=9,uo=Ki.STRING=10,co=Ki.NUMBER=11,lo=Ki.START=17,fo=Ki.STOP=18,ho=Ki.TRUE1=33,po=Ki.TRUE2=34,go=Ki.TRUE3=35,vo=Ki.FALSE1=49,yo=Ki.FALSE2=50,mo=Ki.FALSE3=51,bo=Ki.FALSE4=52,wo=Ki.NULL1=65,_o=Ki.NULL2=66,So=Ki.NULL3=67,Eo=Ki.NUMBER1=81,ko=Ki.NUMBER3=83,Ro=Ki.STRING1=97,Oo=Ki.STRING2=98,xo=Ki.STRING3=99,Ao=Ki.STRING4=100,To=Ki.STRING5=101,Lo=Ki.STRING6=102,jo=Ki.VALUE=113,Co=Ki.KEY=114,Po=Ki.OBJECT=129,Mo=Ki.ARRAY=130,Bo="\\".charCodeAt(0),Io="/".charCodeAt(0),No="\b".charCodeAt(0),Uo="\f".charCodeAt(0),Do="\n".charCodeAt(0),qo="\r".charCodeAt(0),Fo="\t".charCodeAt(0),Yo=65536;function zo(){this.tState=lo,this.value=void 0,this.string=void 0,this.stringBuffer=B.alloc?B.alloc(Yo):new B(Yo),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=jo,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}zo.toknam=function(t){for(var e=Object.keys(Ki),n=0,r=e.length;n<r;n++){var i=e[n];if(Ki[i]===t)return i}return t&&"0x"+t.toString(16)};var Vo=zo.prototype;Vo.onError=function(t){throw t},Vo.charError=function(t,e){this.tState=fo,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(t[e]))+" at position "+e+" in state "+zo.toknam(this.tState)))},Vo.appendStringChar=function(t){this.stringBufferOffset>=Yo&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t},Vo.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>Yo&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,n),this.stringBufferOffset+=r},Vo.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===lo){if(e=t[n],this.offset++,123===e)this.onToken(Zi,"{");else if(125===e)this.onToken(to,"}");else if(91===e)this.onToken(eo,"[");else if(93===e)this.onToken(no,"]");else if(58===e)this.onToken(ro,":");else if(44===e)this.onToken(io,",");else if(116===e)this.tState=ho;else if(102===e)this.tState=vo;else if(110===e)this.tState=wo;else if(34===e)this.string="",this.stringBufferOffset=0,this.tState=Ro;else if(45===e)this.string="-",this.tState=Eo;else if(e>=48&&e<64)this.string=String.fromCharCode(e),this.tState=ko;else if(32!==e&&9!==e&&10!==e&&13!==e)return this.charError(t,n)}else if(this.tState===Ro)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 "+zo.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=lo,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(uo,this.string),this.offset+=B.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===e)this.tState=Oo;else{if(!(e>=32))return this.charError(t,n);this.appendStringChar(e)}else if(this.tState===Oo)if(34===(e=t[n]))this.appendStringChar(e),this.tState=Ro;else if(92===e)this.appendStringChar(Bo),this.tState=Ro;else if(47===e)this.appendStringChar(Io),this.tState=Ro;else if(98===e)this.appendStringChar(No),this.tState=Ro;else if(102===e)this.appendStringChar(Uo),this.tState=Ro;else if(110===e)this.appendStringChar(Do),this.tState=Ro;else if(114===e)this.appendStringChar(qo),this.tState=Ro;else if(116===e)this.appendStringChar(Fo),this.tState=Ro;else{if(117!==e)return this.charError(t,n);this.unicode="",this.tState=xo}else if(this.tState===xo||this.tState===Ao||this.tState===To||this.tState===Lo){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++===Lo){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=Ro}}else if(this.tState===Eo||this.tState===ko)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=ko;break;default:this.tState=lo;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(uo,this.string):this.onToken(co,a),this.offset+=this.string.length-1,this.string=void 0,n--}else if(this.tState===ho){if(114!==t[n])return this.charError(t,n);this.tState=po}else if(this.tState===po){if(117!==t[n])return this.charError(t,n);this.tState=go}else if(this.tState===go){if(101!==t[n])return this.charError(t,n);this.tState=lo,this.onToken(oo,!0),this.offset+=3}else if(this.tState===vo){if(97!==t[n])return this.charError(t,n);this.tState=yo}else if(this.tState===yo){if(108!==t[n])return this.charError(t,n);this.tState=mo}else if(this.tState===mo){if(115!==t[n])return this.charError(t,n);this.tState=bo}else if(this.tState===bo){if(101!==t[n])return this.charError(t,n);this.tState=lo,this.onToken(so,!1),this.offset+=4}else if(this.tState===wo){if(117!==t[n])return this.charError(t,n);this.tState=_o}else if(this.tState===_o){if(108!==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=lo,this.onToken(ao,null),this.offset+=3}},Vo.onToken=function(t,e){},Vo.parseError=function(t,e){this.tState=fo,this.onError(new Error("Unexpected "+zo.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+zo.toknam(this.state)))},Vo.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Vo.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=jo)},Vo.emit=function(t){this.mode&&(this.state=io),this.onValue(t)},Vo.onValue=function(t){},Vo.onToken=function(t,e){if(this.state===jo)if(t===uo||t===co||t===oo||t===so||t===ao)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===Zi)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Co,this.mode=Po;else if(t===eo)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Mo,this.state=jo;else if(t===to){if(this.mode!==Po)return this.parseError(t,e);this.pop()}else{if(t!==no)return this.parseError(t,e);if(this.mode!==Mo)return this.parseError(t,e);this.pop()}else if(this.state===Co)if(t===uo)this.key=e,this.state=ro;else{if(t!==to)return this.parseError(t,e);this.pop()}else if(this.state===ro){if(t!==ro)return this.parseError(t,e);this.state=jo}else{if(this.state!==io)return this.parseError(t,e);if(t===io)this.mode===Mo?(this.key++,this.state=jo):this.mode===Po&&(this.state=Co);else{if(!(t===no&&this.mode===Mo||t===to&&this.mode===Po))return this.parseError(t,e);this.pop()}}},zo.C=Ki;var Wo=zo,Jo=function(t){function e(t,n){var r;return Fn(this,e),r=Xn(this,Gn(e).call(this,n)),Object.getOwnPropertyNames(Hi.prototype).forEach((function(t){return r[t]=Hi.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),zn(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 Wo,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===Wo.C.ARRAY||this.mode===Wo.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===Wo.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}(Dn.Transform),Go=Jo,Ho=Dn.Transform,$o=Vi.fastJoin,Xo=function(){function t(e,n){Fn(this,t),this.input=new Ho(n),this.input._read=function(){},this.transform=new Go(e,n),this.processor=this.input.pipe(this.transform)}return zn(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($o(i,""))})).on("error",(function(t){return r(t)}))}else t.processor.on("finish",(function(){return n()})).on("error",(function(t){return r(t)}))}))}}]),t}(),Qo=Xo;function Ko(){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 Zo=Ko,ts=Vi.setProp,es=Vi.unsetProp,ns=Vi.flattenReducer;function rs(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(rs(o,i)):Array.isArray(o)&&(n.push(i),n=n.concat(o.map((function(t){return rs(t,i)})).reduce(ns,[]).filter((function(t,e,n){return n.indexOf(t)!==e})))),n}),[])}function is(){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=Ui(t,e);return Array.isArray(n)?n.length?n.map((function(n,r){return ts(i&&r>0?{}:t,e,n)})):es(t,e):t})).reduce(ns,[])}return n=Array.isArray(n)?n:n?[n]:void 0,function(t){return(n||rs(t)).reduce(o,[t])}}var os=is,ss=Dn.Readable,as=Qi,us=Qo,cs=Go,ls=function(t,e){return new Qi(e).parse(t)},fs=function(t,e,n){try{t instanceof ss||(n=Object.assign({},n,{objectMode:!0}));var r=new Qo(e,n),i=r.promise();return Array.isArray(t)?(t.forEach((function(t){return r.input.push(t)})),r.input.push(null)):t instanceof ss?r.fromInput(t):(r.input.push(t),r.input.push(null)),i}catch(o){return Promise.reject(o)}},hs={flatten:Zo,unwind:os},ps={Parser:as,AsyncParser:us,Transform:cs,parse:ls,parseAsync:fs,transforms:hs};t.AsyncParser=us,t.Parser=as,t.Transform=cs,t.default=ps,t.parse=ls,t.parseAsync=fs,t.transforms=hs,Object.defineProperty(t,"__esModule",{value:!0})}(e)}(0,Rt.exports);var Ot=function(t){var e=t.data,n=t.fileName,r=t.fileType,i="text/".concat(r),o=new Blob([e],{type:i}),s=document.createElement("a");s.download="".concat(n,".").concat(r),s.href=window.URL.createObjectURL(o);var a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});s.dispatchEvent(a),s.remove()};var xt={all:function(){return["demographics"]},list:function(t){return[].concat(v(xt.all()),[t])}};var At=V.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"])),W["--ll-spacing-medium"],W["--ll-color-surface"],W["--ll-shadow-medium"],W["--ll-color-border"]),Tt=V.div(f||(f=_(["\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ",";\n"])),W["--ll-spacing-medium"]),Lt={all:function(){return["profiles"]},list:function(t){return[].concat(v(Lt.all()),[t])}};var jt=function(){var t,e,n,r,i,o,s,a=lt().dataExplorerState,u=Z().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=K().client,s={lat:e,lng:n,geographyLevels:["10","30"],locationScoresRounding:!1,include:r},j(C.list(s),b(y().mark((function t(){return y().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=K().client,u={lat:e,lng:n,limit:o,radius:s,include:i};return j(M.list(u),b(y().mark((function t(){return y().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=K().client,a={lat:e,lng:n,limit:i,radius:o};return j(P.list(a),b(y().mark((function t(){return y().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}),v=g.data,m=g.isFetching,w=function(t){var e=t.lat,n=t.lng,r=t.enabled,i=t.radius,o=K().client,s={lat:e,lng:n,radius:i};return j(xt.list(s),b(y().mark((function t(){return y().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=K().client,o={lat:e,lng:n};return j(Lt.list(o),b(y().mark((function t(){return y().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=Y.exports.useMemo((function(){return E(E(E(E(E({},l&&a.scores.checked&&{scores:l}),p&&a.pois.checked&&{pois:p}),v&&a.schools.checked&&{schools:v}),_&&a.demographics.checked&&{demographics:_}),O&&a.profiles.checked&&{profiles:O})}),[p,l,v,O,_,a]),T=f||d||m||S||x,L=Object.keys(A).length;return G(At,{children:[T&&z(Tt,{children:z(tt,{})}),G(et,{variant:"contained",onClick:function(t){t.preventDefault(),Ot({data:JSON.stringify(A),fileName:"local-logic-data",fileType:"json"})},disabled:!Object.keys(A).length||T,children:[u.EXPORT," JSON"]}),z(nt,{spacing:"--ll-spacing-xx-small"}),G(et,{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=Rt.exports.parse(r))&&Ot({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=Rt.exports.parse(t);e&&Ot({data:e,fileName:"pois",fileType:"csv"})}}(),function(){if(v){var t=Object.entries(v).map((function(t){var e=R(t,2),n=e[0];return e[1].map((function(t){return E({school:n},t)}))})).flat(),e=Rt.exports.parse(t);e&&Ot({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=Rt.exports.parse(t);e&&Ot({data:e,fileName:"demographics",fileType:"csv"})}}(),function(){if(O){var t=[O],e=Rt.exports.parse(t,{fields:["id","intro","name","profiles.character","profiles.housing","profiles.services","profiles.transport"]});e&&Ot({data:e,fileName:"profiles",fileType:"csv"})}}()},disabled:!L||T,children:[u.EXPORT," CSV (",L,")"]})]})},Ct=V.div(h||(h=_(["\n height: 400px;\n display: flex;\n border: 2px solid ",";\n position: relative;\n border-radius: ",";\n overflow: hidden;\n"])),W["--ll-color-on-background"],W["--ll-border-radius-small"]),Pt=V.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"])),W["--ll-color-on-background"],W["--ll-spacing-xx-small"],W["--ll-spacing-x-small"],W["--ll-font-family-mono"],W["--ll-color-background"]),Mt=function(){var t,e,n,r,i=Y.exports.useRef(),o=R(Y.exports.useState(!0),2),s=o[0],a=o[1],u=lt(),c=u.dataExplorerState,l=u.setDataExplorerState,f=F().sdkState,h=R(Y.exports.useState(!1),2),p=h[0],d=h[1],g=Y.exports.useRef(),v=Y.exports.useRef(!1),y=Z().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:[z(B,{placeholder:y.SEARCH_MAP,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})}}),z(nt,{vertical:!0,spacing:"--ll-spacing-small"}),G(Ct,{children:[s&&z(rt,{height:"400px",width:"100%"}),G(I,{ref:i,style:s?E({visibility:"hidden"},b):b,onLoad:function(){return a(!1)},mapLib:N,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(){v.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(){v.current=!0},onDragEnd:function(){v.current=!1},children:[z(Pt,{children:G(H,{noMargin:!0,family:"mono",children:["Lat:"," ",Math.round(1e5*c.location.lat)/1e5,", Lng:"," ",Math.round(1e5*c.location.lng)/1e5]})}),z(U,{showCompass:!0,style:{marginTop:16,marginRight:16}}),z(D,{marker:E({icon:"pin"},c.location)})]})]})]})},Bt=V.div(d||(d=_(["\n margin: 2px;\n display: inline-block;\n"]))),It=function(){var t=lt(),e=t.dataExplorerState,n=t.setDataExplorerState,r=Object.keys(it).filter((function(t){return Number.isNaN(Number(t))}));return z(ot,{children:r.map((function(t){var r=e.scores.include.includes(t);return z(Bt,{children:z(st.Root,{options:{score:t,scoresData:void 0},children:z(et,{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(v(e.scores.include),[t])})})},children:z(st.Title,{options:{isRawText:!0}})})})},t)}))})},Nt=V.div(g||(g=_(["\n margin: 2px;\n display: inline-block;\n"]))),Ut=function(){var t=Z().translations,e=lt(),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 z(Nt,{children:z(ut.Root,{options:{poi:t},children:z(et,{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(v(n.pois.include),[t])})})},children:z(ut.Title,{options:{isRawText:!0}})})})},t)})),z(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]})})}}),z(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=Z().translations,e=lt(),n=e.dataExplorerState,r=e.setDataExplorerState;return G(ot,{children:[z(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]})})}}),z(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]})})}})]})},qt=function(){var t=Z().translations,e=lt(),n=e.dataExplorerState,r=e.setDataExplorerState;return z(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=Z().translations,e=[{title:t.LOCATION,description:t.LOCATION_TEXT,value:"location",number:1,children:z(Mt,{})},{title:t.SCORES,description:t.SCORES_TEXT,value:"scores",number:2,children:z(It,{})},{title:t.POIS,description:t.POIS_TEXT,value:"pois",number:3,children:z(Ut,{})},{title:t.SCHOOLS,description:t.SCHOOLS_TEXT,value:"schools",number:4,children:z(Dt,{})},{title:t.DEMOGRAPHICS,description:t.DEMOGRAPHICS_TEXT,value:"demographics",number:5,children:z(qt,{})},{title:t.PROFILES,description:t.PROFILES_TEXT,value:"profiles",number:6}];return z(ft,{children:G(ht,{children:[z(pt,{type:"single",defaultValue:"location",collapsible:!0,children:e.map((function(t){return z(kt,{title:t.title,description:t.description,value:t.value,number:t.number,children:t.children},t.value)}))}),z(nt,{vertical:!0}),z(jt,{})]})})}))}}}))}();
|