@local-logic/sdks-app 1.7.2 → 2.0.0

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