@local-logic/sdks-app 1.0.0-beta.49 → 1.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{index.d3f78cf1.css → chevron_right.2aa1109f.css} +0 -0
- package/dist/assets/chevron_right.4d3152f8.js +587 -0
- package/dist/assets/index.5b4e1a6e.js +183 -0
- package/dist/assets/index.9276bc44.js +1 -0
- package/dist/assets/index.993161da.js +1 -0
- package/dist/assets/index.cc7e4871.js +94 -0
- package/dist/assets/index.e82abb8d.js +1 -0
- package/dist/assets/index.fb8ba143.js +1029 -0
- package/dist/assets/index.fe0fe532.js +1 -0
- package/dist/index.html +1 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/types/App.js +3 -1
- package/dist/types/App.js.map +1 -1
- package/dist/types/RouteTemplates/index.d.ts.map +1 -1
- package/dist/types/RouteTemplates/index.js +9 -1
- package/dist/types/RouteTemplates/index.js.map +1 -1
- package/dist/types/{sdks/LocalContent/Map → components}/Pin/index.d.ts +0 -0
- package/dist/types/components/Pin/index.d.ts.map +1 -0
- package/dist/types/{sdks/LocalContent/Map → components}/Pin/index.js +0 -0
- package/dist/types/components/Pin/index.js.map +1 -0
- package/dist/types/constants/routes.d.ts +2 -1
- package/dist/types/constants/routes.d.ts.map +1 -1
- package/dist/types/constants/routes.js +1 -0
- package/dist/types/constants/routes.js.map +1 -1
- package/dist/types/context/languageProvider/data-explorer/index.d.ts +6 -0
- package/dist/types/context/languageProvider/data-explorer/index.d.ts.map +1 -0
- package/dist/types/context/languageProvider/data-explorer/index.js +6 -0
- package/dist/types/context/languageProvider/data-explorer/index.js.map +1 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.d.ts +5 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.d.ts.map +1 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js +23 -0
- package/dist/types/context/languageProvider/data-explorer/locales/en/index.js.map +1 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.d.ts +5 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.d.ts.map +1 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js +23 -0
- package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js.map +1 -0
- package/dist/types/context/languageProvider/data-explorer/types.d.ts +5 -0
- package/dist/types/context/languageProvider/data-explorer/types.d.ts.map +1 -0
- package/dist/types/context/languageProvider/data-explorer/types.js +2 -0
- package/dist/types/context/languageProvider/data-explorer/types.js.map +1 -0
- package/dist/types/context/languageProvider/index.d.ts +15 -0
- package/dist/types/context/languageProvider/index.d.ts.map +1 -0
- package/dist/types/context/languageProvider/index.js +48 -0
- package/dist/types/context/languageProvider/index.js.map +1 -0
- package/dist/types/context/languageProvider/local-content/index.d.ts +6 -0
- package/dist/types/context/languageProvider/local-content/index.d.ts.map +1 -0
- package/dist/types/context/languageProvider/local-content/index.js +6 -0
- package/dist/types/context/languageProvider/local-content/index.js.map +1 -0
- package/dist/types/context/languageProvider/local-content/locales/en/index.d.ts +5 -0
- package/dist/types/context/languageProvider/local-content/locales/en/index.d.ts.map +1 -0
- package/dist/types/context/languageProvider/local-content/locales/en/index.js +4 -0
- package/dist/types/context/languageProvider/local-content/locales/en/index.js.map +1 -0
- package/dist/types/context/languageProvider/local-content/locales/fr/index.d.ts +5 -0
- package/dist/types/context/languageProvider/local-content/locales/fr/index.d.ts.map +1 -0
- package/dist/types/context/languageProvider/local-content/locales/fr/index.js +4 -0
- package/dist/types/context/languageProvider/local-content/locales/fr/index.js.map +1 -0
- package/dist/types/context/languageProvider/local-content/types.d.ts +2 -0
- package/dist/types/context/languageProvider/local-content/types.d.ts.map +1 -0
- package/dist/types/context/languageProvider/local-content/types.js +2 -0
- package/dist/types/context/languageProvider/local-content/types.js.map +1 -0
- package/dist/types/context/languageProvider/sdkLocales.d.ts +9 -0
- package/dist/types/context/languageProvider/sdkLocales.d.ts.map +1 -0
- package/dist/types/context/languageProvider/sdkLocales.js +7 -0
- package/dist/types/context/languageProvider/sdkLocales.js.map +1 -0
- package/dist/types/context/languageProvider/types.d.ts +5 -0
- package/dist/types/context/languageProvider/types.d.ts.map +1 -0
- package/dist/types/context/languageProvider/types.js +2 -0
- package/dist/types/context/languageProvider/types.js.map +1 -0
- package/dist/types/context/stateManager/defaultState.d.ts.map +1 -1
- package/dist/types/context/stateManager/defaultState.js +5 -0
- package/dist/types/context/stateManager/defaultState.js.map +1 -1
- package/dist/types/context/stateManager/index.d.ts +3 -3
- package/dist/types/context/stateManager/index.d.ts.map +1 -1
- package/dist/types/features/demographics/index.d.ts +3 -0
- package/dist/types/features/demographics/index.d.ts.map +1 -0
- package/dist/types/features/demographics/index.js +3 -0
- package/dist/types/features/demographics/index.js.map +1 -0
- package/dist/types/features/demographics/keyFactory.d.ts +10 -0
- package/dist/types/features/demographics/keyFactory.d.ts.map +1 -0
- package/dist/types/features/demographics/keyFactory.js +5 -0
- package/dist/types/features/demographics/keyFactory.js.map +1 -0
- package/dist/types/features/demographics/types.d.ts +4 -0
- package/dist/types/features/demographics/types.d.ts.map +1 -0
- package/dist/types/features/demographics/types.js +2 -0
- package/dist/types/features/demographics/types.js.map +1 -0
- package/dist/types/features/profiles/index.d.ts +3 -0
- package/dist/types/features/profiles/index.d.ts.map +1 -0
- package/dist/types/features/profiles/index.js +3 -0
- package/dist/types/features/profiles/index.js.map +1 -0
- package/dist/types/features/profiles/keyFactory.d.ts +10 -0
- package/dist/types/features/profiles/keyFactory.d.ts.map +1 -0
- package/dist/types/features/profiles/keyFactory.js +5 -0
- package/dist/types/features/profiles/keyFactory.js.map +1 -0
- package/dist/types/features/profiles/types.d.ts +4 -0
- package/dist/types/features/profiles/types.d.ts.map +1 -0
- package/dist/types/features/profiles/types.js +2 -0
- package/dist/types/features/profiles/types.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/index.js +15 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/styles.d.ts +2 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/styles.js +6 -0
- package/dist/types/sdks/DataExplorer/components/Demographics/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Export/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Export/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Export/index.js +239 -0
- package/dist/types/sdks/DataExplorer/components/Export/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Export/styles.d.ts +3 -0
- package/dist/types/sdks/DataExplorer/components/Export/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Export/styles.js +18 -0
- package/dist/types/sdks/DataExplorer/components/Export/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Map/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/index.js +49 -0
- package/dist/types/sdks/DataExplorer/components/Map/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/styles.d.ts +2 -0
- package/dist/types/sdks/DataExplorer/components/Map/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/styles.js +8 -0
- package/dist/types/sdks/DataExplorer/components/Map/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/POIs/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/POIs/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/POIs/index.js +42 -0
- package/dist/types/sdks/DataExplorer/components/POIs/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/POIs/styles.d.ts +2 -0
- package/dist/types/sdks/DataExplorer/components/POIs/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/POIs/styles.js +6 -0
- package/dist/types/sdks/DataExplorer/components/POIs/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Schools/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Schools/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Schools/index.js +21 -0
- package/dist/types/sdks/DataExplorer/components/Schools/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Schools/styles.d.ts +2 -0
- package/dist/types/sdks/DataExplorer/components/Schools/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Schools/styles.js +6 -0
- package/dist/types/sdks/DataExplorer/components/Schools/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Scores/index.d.ts +4 -0
- package/dist/types/sdks/DataExplorer/components/Scores/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Scores/index.js +29 -0
- package/dist/types/sdks/DataExplorer/components/Scores/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Scores/styles.d.ts +2 -0
- package/dist/types/sdks/DataExplorer/components/Scores/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Scores/styles.js +6 -0
- package/dist/types/sdks/DataExplorer/components/Scores/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Section/index.d.ts +12 -0
- package/dist/types/sdks/DataExplorer/components/Section/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Section/index.js +34 -0
- package/dist/types/sdks/DataExplorer/components/Section/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Section/styles.d.ts +11 -0
- package/dist/types/sdks/DataExplorer/components/Section/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Section/styles.js +69 -0
- package/dist/types/sdks/DataExplorer/components/Section/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/context.d.ts +41 -0
- package/dist/types/sdks/DataExplorer/context.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/context.js +45 -0
- package/dist/types/sdks/DataExplorer/context.js.map +1 -0
- package/dist/types/sdks/DataExplorer/defaultState.d.ts +7 -0
- package/dist/types/sdks/DataExplorer/defaultState.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/defaultState.js +3 -0
- package/dist/types/sdks/DataExplorer/defaultState.js.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useDemographics.d.ts +7 -0
- package/dist/types/sdks/DataExplorer/features/useDemographics.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useDemographics.js +24 -0
- package/dist/types/sdks/DataExplorer/features/useDemographics.js.map +1 -0
- package/dist/types/sdks/DataExplorer/features/usePois.d.ts +10 -0
- package/dist/types/sdks/DataExplorer/features/usePois.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/usePois.js +29 -0
- package/dist/types/sdks/DataExplorer/features/usePois.js.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useProfiles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/features/useProfiles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useProfiles.js +23 -0
- package/dist/types/sdks/DataExplorer/features/useProfiles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useSchools.d.ts +8 -0
- package/dist/types/sdks/DataExplorer/features/useSchools.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useSchools.js +25 -0
- package/dist/types/sdks/DataExplorer/features/useSchools.js.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useScores.d.ts +8 -0
- package/dist/types/sdks/DataExplorer/features/useScores.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useScores.js +26 -0
- package/dist/types/sdks/DataExplorer/features/useScores.js.map +1 -0
- package/dist/types/sdks/DataExplorer/index.d.ts +5 -0
- package/dist/types/sdks/DataExplorer/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/index.js +66 -0
- package/dist/types/sdks/DataExplorer/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/styles.d.ts +5 -0
- package/dist/types/sdks/DataExplorer/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/styles.js +14 -0
- package/dist/types/sdks/DataExplorer/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/types.d.ts +11 -0
- package/dist/types/sdks/DataExplorer/types.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/types.js +2 -0
- package/dist/types/sdks/DataExplorer/types.js.map +1 -0
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.d.ts +1 -2
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.js +5 -9
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/ScoreCategory/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js +1 -1
- package/dist/types/sdks/LocalContent/Map/DesktopScores/ScoreCategoryAccordion/index.js.map +1 -1
- package/dist/types/sdks/LocalContent/Map/index.d.ts.map +1 -1
- package/dist/types/sdks/LocalContent/Map/index.js +2 -10
- package/dist/types/sdks/LocalContent/Map/index.js.map +1 -1
- package/dist/types/services/downloadFile/index.d.ts +6 -0
- package/dist/types/services/downloadFile/index.d.ts.map +1 -0
- package/dist/types/services/downloadFile/index.js +17 -0
- package/dist/types/services/downloadFile/index.js.map +1 -0
- package/dist/types/types/sdks.d.ts +2 -0
- package/dist/types/types/sdks.d.ts.map +1 -1
- package/package.json +8 -5
- package/dist/assets/index.177feb04.js +0 -895
- package/dist/assets/index.e216285c.js +0 -769
- package/dist/types/sdks/LocalContent/Map/Pin/index.d.ts.map +0 -1
- package/dist/types/sdks/LocalContent/Map/Pin/index.js.map +0 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import{c as W,u as dt,p as te,s as ee,M as xt,a as ne,$ as oe,b as ie,d as re,e as se,S as ae,f as ce,g as le,m as ue,N as de,P as pe}from"./chevron_right.4d3152f8.js";import{R as O,r as y,h as Ot,j as a,s as F,i as Z,u as q,a as tt,b as pt,c as w,x as g,F as et,d as L,e as it,k as V,U as Et,f as Tt,E as nt,g as I,_ as U,S as K,O as fe,t as D,l as he,m as Q,n as ge,o as me,p as ve,q as ye}from"./index.fb8ba143.js";const zt=O.createContext({}),E=()=>y.exports.useContext(zt),xe=(t,e)=>{switch(e.type){case"CATEGORY":return{...t,activeCategory:e.value};case"SCORE":{const n=F.find(o=>e.value===""?o.value===t.activeCategory:o.scores.includes(e.value)).value;return{activeCategory:n,activeScoreByCategory:{...t.activeScoreByCategory,[n]:e.value}}}}},be=({children:t})=>{const[e,n]=y.exports.useState(!1),o=window.innerWidth<Ot.screenSizes.mobileL?{activeCategory:"commute",activeScoreByCategory:{commute:"pedestrian_friendly",amenities:"groceries",character:"vibrant",nature:"parks",education:"high_schools"}}:{activeCategory:"commute",activeScoreByCategory:{commute:"",amenities:"",character:"",nature:"",education:""}},[i,s]=y.exports.useReducer(xe,o),[c,l]=y.exports.useState(),[r,u]=y.exports.useState(),{activeCategory:d}=i,p=i.activeScoreByCategory[d],h=x=>{s({type:"SCORE",value:x})},f=x=>{s({type:"CATEGORY",value:x})},m=y.exports.useMemo(()=>({activeScore:p,setActiveScore:h,activeCategory:d,setActiveCategory:f,activePOI:c,setActivePOI:l,hoveredPOI:r,setHoveredPOI:u,showMobileList:e,setShowMobileList:n}),[p,h,d,f,c,l,r,u,e,n]);return a(zt.Provider,{value:m,children:t})};function Rt(t,e,n){n===void 0&&(n={});var o={type:"Feature"};return(n.id===0||n.id)&&(o.id=n.id),n.bbox&&(o.bbox=n.bbox),o.properties=e||{},o.geometry=t,o}function bt(t,e,n){if(n===void 0&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!wt(t[0])||!wt(t[1]))throw new Error("coordinates must contain numbers");var o={type:"Point",coordinates:t};return Rt(o,e,n)}function we(t,e,n){n===void 0&&(n={});var o={type:"MultiPoint",coordinates:t};return Rt(o,e,n)}function wt(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function Ht(t,e,n){if(t!==null)for(var o,i,s,c,l,r,u,d=0,p=0,h,f=t.type,m=f==="FeatureCollection",x=f==="Feature",b=m?t.features.length:1,v=0;v<b;v++){u=m?t.features[v].geometry:x?t.geometry:t,h=u?u.type==="GeometryCollection":!1,l=h?u.geometries.length:1;for(var k=0;k<l;k++){var C=0,S=0;if(c=h?u.geometries[k]:u,c!==null){r=c.coordinates;var $=c.type;switch(d=n&&($==="Polygon"||$==="MultiPolygon")?1:0,$){case null:break;case"Point":if(e(r,p,v,C,S)===!1)return!1;p++,C++;break;case"LineString":case"MultiPoint":for(o=0;o<r.length;o++){if(e(r[o],p,v,C,S)===!1)return!1;p++,$==="MultiPoint"&&C++}$==="LineString"&&C++;break;case"Polygon":case"MultiLineString":for(o=0;o<r.length;o++){for(i=0;i<r[o].length-d;i++){if(e(r[o][i],p,v,C,S)===!1)return!1;p++}$==="MultiLineString"&&C++,$==="Polygon"&&S++}$==="Polygon"&&C++;break;case"MultiPolygon":for(o=0;o<r.length;o++){for(S=0,i=0;i<r[o].length;i++){for(s=0;s<r[o][i].length-d;s++){if(e(r[o][i][s],p,v,C,S)===!1)return!1;p++}S++}C++}break;case"GeometryCollection":for(o=0;o<c.geometries.length;o++)if(Ht(c.geometries[o],e,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function ct(t){var e=[1/0,1/0,-1/0,-1/0];return Ht(t,function(n){e[0]>n[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]<n[0]&&(e[2]=n[0]),e[3]<n[1]&&(e[3]=n[1])}),e}ct.default=ct;const Me={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0},Ce=()=>{const[t,e]=y.exports.useState(null),[n,o]=y.exports.useState(Me),i=y.exports.useMemo(()=>new window.ResizeObserver(s=>{if(s[0]){const{x:c,y:l,width:r,height:u,top:d,left:p,bottom:h,right:f}=s[0].contentRect;o({x:c,y:l,width:r,height:u,top:d,left:p,bottom:h,right:f})}}),[]);return y.exports.useLayoutEffect(()=>{if(!!t)return i.observe(t),()=>{i.disconnect()}},[t]),[e,n,t]};var $e="Expected a function",Mt=0/0,Se="[object Symbol]",Pe=/^\s+|\s+$/g,Le=/^[-+]0x[0-9a-f]+$/i,ke=/^0b[01]+$/i,Ie=/^0o[0-7]+$/i,_e=parseInt,Ae=typeof W=="object"&&W&&W.Object===Object&&W,Oe=typeof self=="object"&&self&&self.Object===Object&&self,Ee=Ae||Oe||Function("return this")(),Te=Object.prototype,ze=Te.toString,Re=Math.max,He=Math.min,rt=function(){return Ee.Date.now()};function Ze(t,e,n){var o,i,s,c,l,r,u=0,d=!1,p=!1,h=!0;if(typeof t!="function")throw new TypeError($e);e=Ct(e)||0,lt(n)&&(d=!!n.leading,p="maxWait"in n,s=p?Re(Ct(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h);function f(M){var _=o,T=i;return o=i=void 0,u=M,c=t.apply(T,_),c}function m(M){return u=M,l=setTimeout(v,e),d?f(M):c}function x(M){var _=M-r,T=M-u,j=e-_;return p?He(j,s-T):j}function b(M){var _=M-r,T=M-u;return r===void 0||_>=e||_<0||p&&T>=s}function v(){var M=rt();if(b(M))return k(M);l=setTimeout(v,x(M))}function k(M){return l=void 0,h&&o?f(M):(o=i=void 0,c)}function C(){l!==void 0&&clearTimeout(l),u=0,o=r=i=l=void 0}function S(){return l===void 0?c:k(rt())}function $(){var M=rt(),_=b(M);if(o=arguments,i=this,r=M,_){if(l===void 0)return m(r);if(p)return l=setTimeout(v,e),f(r)}return l===void 0&&(l=setTimeout(v,e)),c}return $.cancel=C,$.flush=S,$}function lt(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Ve(t){return!!t&&typeof t=="object"}function je(t){return typeof t=="symbol"||Ve(t)&&ze.call(t)==Se}function Ct(t){if(typeof t=="number")return t;if(je(t))return Mt;if(lt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=lt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Pe,"");var n=ke.test(t);return n||Ie.test(t)?_e(t.slice(2),n?2:8):Le.test(t)?Mt:+t}var Ne=Ze;const Be=()=>{const[t,e]=y.exports.useState(!1);return y.exports.useLayoutEffect(()=>{const n=()=>{e(window.innerWidth<Ot.screenSizes.mobileL)};return window.addEventListener("resize",Ne(n,250)),n(),()=>window.removeEventListener("resize",n)},[]),t},De=t=>y.exports.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},y.exports.createElement("g",{clipPath:"url(#clip0_6_16062)"},y.exports.createElement("path",{d:"M3 13H5V11H3V13ZM3 17H5V15H3V17ZM3 9H5V7H3V9ZM7 13H21V11H7V13ZM7 17H21V15H7V17ZM7 7V9H21V7H7ZM3 13H5V11H3V13ZM3 17H5V15H3V17ZM3 9H5V7H3V9ZM7 13H21V11H7V13ZM7 17H21V15H7V17ZM7 7V9H21V7H7Z"}))),{scorePois:Ge}=Z.Constants;function Zt(){var l;const{client:t}=q(),{sdkState:e}=tt(),n=pt(e.options,250),{activeScore:o}=E(),i=o?Ge[o]:void 0,c={...y.exports.useMemo(()=>n!=null&&n.marker?n.marker:{lat:n==null?void 0:n.lat,lng:n==null?void 0:n.lng},[n]),limit:10,radius:2e3,include:i};return dt(te.list(c),async()=>t.getPois(c),{enabled:!!c&&!!((l=c.include)!=null&&l.length)&&!!c.lat&&!!c.lng})}function Vt(){const{client:t}=q(),{sdkState:e}=tt(),n=pt(e.options,250),i={...y.exports.useMemo(()=>n!=null&&n.marker?n.marker:{lat:n==null?void 0:n.lat,lng:n==null?void 0:n.lng},[n]),limit:10,radius:2e3};return dt(ee.list(i),async()=>t.getSchools(i),{enabled:!!i&&!!i.lat&&!!i.lng})}const jt=O.createContext({}),Nt=()=>y.exports.useContext(jt),Fe=({children:t,mapRef:e,mapPadding:n})=>a(jt.Provider,{value:{mapRef:e,mapPadding:n},children:t});function ut(t,e,n,o,i,s){if(i-o<=n)return;const c=o+i>>1;Bt(t,e,c,o,i,s%2),ut(t,e,n,o,c-1,s+1),ut(t,e,n,c+1,i,s+1)}function Bt(t,e,n,o,i,s){for(;i>o;){if(i-o>600){const u=i-o+1,d=n-o+1,p=Math.log(u),h=.5*Math.exp(2*p/3),f=.5*Math.sqrt(p*h*(u-h)/u)*(d-u/2<0?-1:1),m=Math.max(o,Math.floor(n-d*h/u+f)),x=Math.min(i,Math.floor(n+(u-d)*h/u+f));Bt(t,e,n,m,x,s)}const c=e[2*n+s];let l=o,r=i;for(B(t,e,o,n),e[2*i+s]>c&&B(t,e,o,i);l<r;){for(B(t,e,l,r),l++,r--;e[2*l+s]<c;)l++;for(;e[2*r+s]>c;)r--}e[2*o+s]===c?B(t,e,o,r):(r++,B(t,e,r,i)),r<=n&&(o=r+1),n<=r&&(i=r-1)}}function B(t,e,n,o){st(t,n,o),st(e,2*n,2*o),st(e,2*n+1,2*o+1)}function st(t,e,n){const o=t[e];t[e]=t[n],t[n]=o}function We(t,e,n,o,i,s,c){const l=[0,t.length-1,0],r=[];let u,d;for(;l.length;){const p=l.pop(),h=l.pop(),f=l.pop();if(h-f<=c){for(let b=f;b<=h;b++)u=e[2*b],d=e[2*b+1],u>=n&&u<=i&&d>=o&&d<=s&&r.push(t[b]);continue}const m=Math.floor((f+h)/2);u=e[2*m],d=e[2*m+1],u>=n&&u<=i&&d>=o&&d<=s&&r.push(t[m]);const x=(p+1)%2;(p===0?n<=u:o<=d)&&(l.push(f),l.push(m-1),l.push(x)),(p===0?i>=u:s>=d)&&(l.push(m+1),l.push(h),l.push(x))}return r}function Ue(t,e,n,o,i,s){const c=[0,t.length-1,0],l=[],r=i*i;for(;c.length;){const u=c.pop(),d=c.pop(),p=c.pop();if(d-p<=s){for(let b=p;b<=d;b++)$t(e[2*b],e[2*b+1],n,o)<=r&&l.push(t[b]);continue}const h=Math.floor((p+d)/2),f=e[2*h],m=e[2*h+1];$t(f,m,n,o)<=r&&l.push(t[h]);const x=(u+1)%2;(u===0?n-i<=f:o-i<=m)&&(c.push(p),c.push(h-1),c.push(x)),(u===0?n+i>=f:o+i>=m)&&(c.push(h+1),c.push(d),c.push(x))}return l}function $t(t,e,n,o){const i=t-n,s=e-o;return i*i+s*s}const Ke=t=>t[0],Qe=t=>t[1];class St{constructor(e,n=Ke,o=Qe,i=64,s=Float64Array){this.nodeSize=i,this.points=e;const c=e.length<65536?Uint16Array:Uint32Array,l=this.ids=new c(e.length),r=this.coords=new s(e.length*2);for(let u=0;u<e.length;u++)l[u]=u,r[2*u]=n(e[u]),r[2*u+1]=o(e[u]);ut(l,r,i,0,l.length-1,0)}range(e,n,o,i){return We(this.ids,this.coords,e,n,o,i,this.nodeSize)}within(e,n,o){return Ue(this.ids,this.coords,e,n,o,this.nodeSize)}}const Ye={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},X=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1));class Je{constructor(e){this.options=G(Object.create(Ye),e),this.trees=new Array(this.options.maxZoom+1)}load(e){const{log:n,minZoom:o,maxZoom:i,nodeSize:s}=this.options;n&&console.time("total time");const c=`prepare ${e.length} points`;n&&console.time(c),this.points=e;let l=[];for(let r=0;r<e.length;r++)!e[r].geometry||l.push(qe(e[r],r));this.trees[i+1]=new St(l,Lt,kt,s,Float32Array),n&&console.timeEnd(c);for(let r=i;r>=o;r--){const u=+Date.now();l=this._cluster(l,r),this.trees[r]=new St(l,Lt,kt,s,Float32Array),n&&console.log("z%d: %d clusters in %dms",r,l.length,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(e,n){let o=((e[0]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const c=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)o=-180,s=180;else if(o>s){const d=this.getClusters([o,i,180,c],n),p=this.getClusters([-180,i,s,c],n);return d.concat(p)}const l=this.trees[this._limitZoom(n)],r=l.range(Y(o),J(c),Y(s),J(i)),u=[];for(const d of r){const p=l.points[d];u.push(p.numPoints?Pt(p):this.points[p.index])}return u}getChildren(e){const n=this._getOriginId(e),o=this._getOriginZoom(e),i="No cluster with the specified id.",s=this.trees[o];if(!s)throw new Error(i);const c=s.points[n];if(!c)throw new Error(i);const l=this.options.radius/(this.options.extent*Math.pow(2,o-1)),r=s.within(c.x,c.y,l),u=[];for(const d of r){const p=s.points[d];p.parentId===e&&u.push(p.numPoints?Pt(p):this.points[p.index])}if(u.length===0)throw new Error(i);return u}getLeaves(e,n,o){n=n||10,o=o||0;const i=[];return this._appendLeaves(i,e,n,o,0),i}getTile(e,n,o){const i=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:c,radius:l}=this.options,r=l/c,u=(o-r)/s,d=(o+1+r)/s,p={features:[]};return this._addTileFeatures(i.range((n-r)/s,u,(n+1+r)/s,d),i.points,n,o,s,p),n===0&&this._addTileFeatures(i.range(1-r/s,u,1,d),i.points,s,o,s,p),n===s-1&&this._addTileFeatures(i.range(0,u,r/s,d),i.points,-1,o,s,p),p.features.length?p:null}getClusterExpansionZoom(e){let n=this._getOriginZoom(e)-1;for(;n<=this.options.maxZoom;){const o=this.getChildren(e);if(n++,o.length!==1)break;e=o[0].properties.cluster_id}return n}_appendLeaves(e,n,o,i,s){const c=this.getChildren(n);for(const l of c){const r=l.properties;if(r&&r.cluster?s+r.point_count<=i?s+=r.point_count:s=this._appendLeaves(e,r.cluster_id,o,i,s):s<i?s++:e.push(l),e.length===o)break}return s}_addTileFeatures(e,n,o,i,s,c){for(const l of e){const r=n[l],u=r.numPoints;let d,p,h;if(u)d=Dt(r),p=r.x,h=r.y;else{const x=this.points[r.index];d=x.properties,p=Y(x.geometry.coordinates[0]),h=J(x.geometry.coordinates[1])}const f={type:1,geometry:[[Math.round(this.options.extent*(p*s-o)),Math.round(this.options.extent*(h*s-i))]],tags:d};let m;u?m=r.id:this.options.generateId?m=r.index:this.points[r.index].id&&(m=this.points[r.index].id),m!==void 0&&(f.id=m),c.features.push(f)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,n){const o=[],{radius:i,extent:s,reduce:c,minPoints:l}=this.options,r=i/(s*Math.pow(2,n));for(let u=0;u<e.length;u++){const d=e[u];if(d.zoom<=n)continue;d.zoom=n;const p=this.trees[n+1],h=p.within(d.x,d.y,r),f=d.numPoints||1;let m=f;for(const x of h){const b=p.points[x];b.zoom>n&&(m+=b.numPoints||1)}if(m>f&&m>=l){let x=d.x*f,b=d.y*f,v=c&&f>1?this._map(d,!0):null;const k=(u<<5)+(n+1)+this.points.length;for(const C of h){const S=p.points[C];if(S.zoom<=n)continue;S.zoom=n;const $=S.numPoints||1;x+=S.x*$,b+=S.y*$,S.parentId=k,c&&(v||(v=this._map(d,!0)),c(v,this._map(S)))}d.parentId=k,o.push(Xe(x/m,b/m,k,m,v))}else if(o.push(d),m>1)for(const x of h){const b=p.points[x];b.zoom<=n||(b.zoom=n,o.push(b))}}return o}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,n){if(e.numPoints)return n?G({},e.properties):e.properties;const o=this.points[e.index].properties,i=this.options.map(o);return n&&i===o?G({},i):i}}function Xe(t,e,n,o,i){return{x:X(t),y:X(e),zoom:1/0,id:n,parentId:-1,numPoints:o,properties:i}}function qe(t,e){const[n,o]=t.geometry.coordinates;return{x:X(Y(n)),y:X(J(o)),zoom:1/0,index:e,parentId:-1}}function Pt(t){return{type:"Feature",id:t.id,properties:Dt(t),geometry:{type:"Point",coordinates:[tn(t.x),en(t.y)]}}}function Dt(t){const e=t.numPoints,n=e>=1e4?`${Math.round(e/1e3)}k`:e>=1e3?`${Math.round(e/100)/10}k`:e;return G(G({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:n})}function Y(t){return t/360+.5}function J(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function tn(t){return(t-.5)*360}function en(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function G(t,e){for(const n in e)t[n]=e[n];return t}function Lt(t){return t.x}function kt(t){return t.y}var It=Object.prototype.hasOwnProperty;function _t(t,e,n){for(n of t.keys())if(H(n,e))return n}function H(t,e){var n,o,i;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((o=t.length)===e.length)for(;o--&&H(t[o],e[o]););return o===-1}if(n===Set){if(t.size!==e.size)return!1;for(o of t)if(i=o,i&&typeof i=="object"&&(i=_t(e,i),!i)||!e.has(i))return!1;return!0}if(n===Map){if(t.size!==e.size)return!1;for(o of t)if(i=o[0],i&&typeof i=="object"&&(i=_t(e,i),!i)||!H(o[1],e.get(i)))return!1;return!0}if(n===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(n===DataView){if((o=t.byteLength)===e.byteLength)for(;o--&&t.getInt8(o)===e.getInt8(o););return o===-1}if(ArrayBuffer.isView(t)){if((o=t.byteLength)===e.byteLength)for(;o--&&t[o]===e[o];);return o===-1}if(!n||typeof t=="object"){o=0;for(n in t)if(It.call(t,n)&&++o&&!It.call(e,n)||!(n in e)||!H(t[n],e[n]))return!1;return Object.keys(e).length===o}}return t!==t&&e!==e}function nn(t){var e=y.exports.useRef(t),n=y.exports.useRef(0);return H(t,e.current)||(e.current=t,n.current+=1),y.exports.useMemo(function(){return e.current},[n.current])}function on(t,e){return y.exports.useEffect(t,nn(e))}var rn=function(e){var n=e.points,o=e.bounds,i=e.zoom,s=e.options,c=y.exports.useRef(),l=y.exports.useRef(),r=y.exports.useState([]),u=r[0],d=r[1],p=Math.round(i);return on(function(){(!c.current||!H(l.current,n)||!H(c.current.options,s))&&(c.current=new Je(s),c.current.load(n)),o&&d(c.current.getClusters(o,p)),l.current=n},[n,o,p,s]),{clusters:u,supercluster:c.current}};const sn=w.div`
|
|
2
|
+
border-radius: 50%;
|
|
3
|
+
background: linear-gradient(
|
|
4
|
+
to top,
|
|
5
|
+
${g["--ll-color-primary-variant1"]},
|
|
6
|
+
${g["--ll-color-primary"]}
|
|
7
|
+
);
|
|
8
|
+
color: ${g["--ll-color-on-primary"]};
|
|
9
|
+
height: ${({diameter:t})=>t}px;
|
|
10
|
+
width: ${({diameter:t})=>t}px;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
line-height: 1;
|
|
15
|
+
font-family: ${g["--ll-font-family"]};
|
|
16
|
+
font-size: ${({diameter:t})=>t/2.5}px;
|
|
17
|
+
border: 2px solid #fff;
|
|
18
|
+
box-shadow: ${g["--ll-shadow-small"]};
|
|
19
|
+
cursor: default;
|
|
20
|
+
`,an=({cluster:t,pointsCount:e,onClick:n})=>{const o=t.properties.point_count,i=20+o/e*25;return a(sn,{diameter:i,onClick:()=>n&&n(t),children:t.properties.point_count})};function cn(t){return t.properties.cluster!==void 0}const Gt=O.memo(({rect:t,zoom:e,mapRef:n,points:o,isMobile:i,activePOI:s,hoveredPOI:c,isMapMoving:l,setActivePOI:r})=>{var h;const u=(h=n==null?void 0:n.current)==null?void 0:h.getMap().getBounds().toArray().flat(),{clusters:d,supercluster:p}=rn({points:o,bounds:u,zoom:e,options:{radius:50,maxZoom:18}});return a(et,{children:d.map((f,m)=>{const[x,b]=f.geometry.coordinates;if(cn(f))return a(xt,{latitude:b,longitude:x,children:a(an,{cluster:f,pointsCount:o.length,onClick:()=>{var M;const $=Math.min(p.getClusterExpansionZoom(f.id),20);(M=n.current)==null||M.flyTo({zoom:$,center:[x,b],duration:1e3})}})},`cluster-${f.id}`);const{poi:v,type:k}=f.properties,C=s===v,S=c===v;return a(xt,{latitude:v.lat,longitude:v.lng,style:{zIndex:C?1:0},children:L(it.Root,{options:{type:k,poi:v,isOpen:l?!1:C,isHovered:S,side:"top",collisionPadding:i?{top:t.height+32,bottom:V*2,left:V*2,right:V*2}:{left:t.width+32,right:V*2,top:V*2,bottom:V*2}},onChange:$=>{$.type==="open-change"&&($.data?setTimeout(()=>{r(v)},0):C&&r(void 0))},children:[a(it.Marker,{}),a(it.Content,{})]})},`${v.name}-${v.lat}-${v.lng}-${m}`)})})});Gt.displayName="Markers";function ft(t){const{client:e}=q(),{sdkState:n}=tt(),o=pt(n.options,250),s={...y.exports.useMemo(()=>o!=null&&o.marker?o.marker:{lat:o==null?void 0:o.lat,lng:o==null?void 0:o.lng},[o]),geographyLevels:["10","30"],locationScoresRounding:!1,include:t};return dt(ne.list(s),async()=>e.getScores(s),{enabled:!!s})}const ln=w.div`
|
|
21
|
+
padding: ${g["--ll-spacing-small"]} ${g["--ll-spacing-medium"]};
|
|
22
|
+
background-color: ${g["--ll-color-surface"]};
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
flex: 1;
|
|
27
|
+
`,un=w.div`
|
|
28
|
+
display: grid;
|
|
29
|
+
grid-template-columns: min-content 1fr;
|
|
30
|
+
grid-gap: ${g["--ll-spacing-medium"]};
|
|
31
|
+
margin-bottom: ${g["--ll-spacing-medium"]};
|
|
32
|
+
`,dn=w.div`
|
|
33
|
+
overflow: auto;
|
|
34
|
+
|
|
35
|
+
&:not(:empty) {
|
|
36
|
+
margin-top: ${g["--ll-spacing-medium"]};
|
|
37
|
+
}
|
|
38
|
+
`,pn=Et({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),fn=Et({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),hn=w(oe)`
|
|
39
|
+
margin: 0;
|
|
40
|
+
`,Ft=w(ie)`
|
|
41
|
+
background: none;
|
|
42
|
+
border: none;
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
width: 100%;
|
|
46
|
+
padding: ${g["--ll-spacing-x-small"]} 0;
|
|
47
|
+
`,gn=w(re)`
|
|
48
|
+
background-color: ${g["--ll-color-surface"]};
|
|
49
|
+
position: relative;
|
|
50
|
+
z-index: 1;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
margin-left: calc(-1 * ${g["--ll-spacing-medium"]});
|
|
53
|
+
margin-right: calc(-1 * ${g["--ll-spacing-medium"]});
|
|
54
|
+
|
|
55
|
+
[data-state="open"] & {
|
|
56
|
+
animation: ${pn} 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[data-state="closed"] & {
|
|
60
|
+
animation: ${fn} 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
61
|
+
}
|
|
62
|
+
`,mn=w.div`
|
|
63
|
+
padding: ${g["--ll-spacing-medium"]};
|
|
64
|
+
`,vn=w.span`
|
|
65
|
+
${Ft}[data-state=open] & {
|
|
66
|
+
transform: rotate(90deg);
|
|
67
|
+
} ;
|
|
68
|
+
`;w.div`
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: flex-start;
|
|
71
|
+
justify-content: space-between;
|
|
72
|
+
`;const ht=w.div`
|
|
73
|
+
margin: ${g["--ll-spacing-small"]} 0;
|
|
74
|
+
`,yn=w.div`
|
|
75
|
+
margin-top: ${g["--ll-spacing-large"]};
|
|
76
|
+
|
|
77
|
+
&:empty {
|
|
78
|
+
margin: 0;
|
|
79
|
+
}
|
|
80
|
+
`,Wt=O.memo(({result:t,poi:e})=>{const{activePOI:n,setActivePOI:o,hoveredPOI:i,setHoveredPOI:s}=E(),{mapRef:c,mapPadding:l}=Nt();return!t.data||!t.data[e]?null:a(Z.Content,{options:{value:e},children:a(Tt.Root,{options:{type:"poi",data:t.data[e],activePOI:n,hoveredPOI:i},onChange:r=>{var u;if(r.type==="poi-click"){const d=r.data;o(d);const p=window.innerWidth-l.left,h=window.innerWidth/2,f=p/2+l.left-h;d&&((u=c.current)==null||u.flyTo({zoom:18,center:[d.lng,d.lat],duration:1e3,offset:[f,0]}))}r.type==="poi-hover"&&s(r.data)}})},e)});Wt.displayName="POI";const gt=O.memo(({include:t})=>{const e=Zt();return e.isLoading&&t.length?a(et,{children:[...Array(10)].map((n,o)=>a(ht,{children:a(nt,{height:"34px",width:"100%"})},o))}):e.data?L(Z.Root,{options:{include:t},children:[a(Z.Tabs,{}),t.map(n=>a(Wt,{poi:n,result:e},n))]}):null});gt.displayName="POIs";const Ut=({score:t})=>{const{data:e,isLoading:n}=Vt(),{activePOI:o,setActivePOI:i,hoveredPOI:s,setHoveredPOI:c}=E(),{mapRef:l,mapPadding:r}=Nt();return n?a(et,{children:[...Array(10)].map(u=>a(ht,{children:a(nt,{height:"34px",width:"100%"})},u))}):e?a(Tt.Root,{options:{type:"school",data:e==null?void 0:e[t],activePOI:o,hoveredPOI:s},onChange:u=>{var d;if(u.type==="poi-click"){const p=u.data;i(p);const h=window.innerWidth-r.left,f=window.innerWidth/2,m=h/2+r.left-f;p&&((d=l.current)==null||d.easeTo({zoom:18,center:[p.lng,p.lat],duration:1e3,offset:[m,0]}))}u.type==="poi-hover"&&c(u.data)}}):null},{scorePois:At}=Z.Constants,xn=()=>{const{activeCategory:t,activeScore:e,showMobileList:n}=E(),o=F.find(l=>l.value===t),{data:i,isLoading:s}=ft(o.scores),c=l=>!n||!At[l].length?null:l==="high_schools"||l==="primary_schools"?a(Ut,{score:l}):a(gt,{include:At[l]});return e&&(i==null?void 0:i.location[e])?s?a("div",{children:"Loading"}):a(I.Root,{options:{score:e,data:i},children:L(ln,{children:[L(un,{children:[a(I.Badge,{}),a(I.BarChart,{})]}),a(I.Description,{}),a(dn,{children:c(e)})]})}):null},bn=w.div`
|
|
81
|
+
display: flex;
|
|
82
|
+
overflow-x: scroll;
|
|
83
|
+
padding: ${g["--ll-spacing-x-small"]} ${g["--ll-spacing-medium"]};
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
position: relative;
|
|
86
|
+
`,wn=w.button`
|
|
87
|
+
position: relative;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
align-items: center;
|
|
91
|
+
background: none;
|
|
92
|
+
border: none;
|
|
93
|
+
min-width: 60px;
|
|
94
|
+
padding: 0;
|
|
95
|
+
margin: 0 8px;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
|
|
98
|
+
&:first-child {
|
|
99
|
+
margin-left: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:last-child {
|
|
103
|
+
margin-right: 0;
|
|
104
|
+
}
|
|
105
|
+
`,Mn=w.div`
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: -6px;
|
|
108
|
+
right: 4px;
|
|
109
|
+
border: 2px solid ${g["--ll-color-background"]};
|
|
110
|
+
border-radius: 6px;
|
|
111
|
+
`,Cn=w.div`
|
|
112
|
+
flex: 1;
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
`,$n=w.div`
|
|
116
|
+
margin: 0 2px;
|
|
117
|
+
`,Sn=({category:t})=>{const{data:e,isLoading:n,isFetching:o}=ft(t.scores),{activeScore:i,setActiveScore:s,setActiveCategory:c,setShowMobileList:l}=E();return a(bn,{children:t.scores.map(r=>{const u=r===i,d=u?"--ll-color-primary":"--ll-color-disabled";return n||o?a($n,{children:a(nt,{height:"44px",width:"60px"})},r):a(I.Root,{options:{score:r,data:e},children:L(wn,{onClick:()=>{l(!1),c(t.value),s(r)},children:[a(I.Icon,{options:{color:d,height:28,width:28}}),a(Cn,{children:a(I.Title,{options:{variant:"caption1",color:d,noWrap:!0,noMargin:!0,weight:"--ll-font-weight-bold"}})}),a(Mn,{children:a(I.Badge,{options:{variant:"small",isPrimary:u}})})]})},r)})})},Pn=w.div`
|
|
118
|
+
display: flex;
|
|
119
|
+
padding: ${g["--ll-spacing-x-small"]} ${g["--ll-spacing-medium"]} ${g["--ll-spacing-xx-small"]} ${g["--ll-spacing-medium"]};
|
|
120
|
+
`,Ln=w.div`
|
|
121
|
+
position: absolute;
|
|
122
|
+
top: 0;
|
|
123
|
+
left: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
bottom: ${({showMobileList:t})=>t&&0};
|
|
126
|
+
z-index: 3;
|
|
127
|
+
box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
|
|
128
|
+
background-color: #fff;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
background-color: ${g["--ll-color-background"]};
|
|
133
|
+
border: 1px solid ${g["--ll-color-border"]};
|
|
134
|
+
`,Kt=O.forwardRef(({showMobileList:t},e)=>{const{activeCategory:n,setActiveCategory:o}=E();return L(Ln,{ref:e,showMobileList:t,children:[a(Pn,{children:L(U.Root,{value:n,onValueChange:i=>o(i),children:[a(U.Trigger,{size:"large",children:a(K.Root,{options:{scoreCategory:n},children:a(K.Title,{options:{color:"inherit",noMargin:!0,variant:"h6",lineHeight:1}})},n)}),a(U.Content,{children:F.map(i=>a(K.Root,{options:{scoreCategory:i.value},children:a(U.Item,{value:i.value,children:a(K.Title,{options:{color:"inherit",noMargin:!0,variant:"h6"}})})},i.value))})]})}),a(Sn,{category:F.find(i=>i.value===n)}),a(xn,{})]})});Kt.displayName="MobileScores";const{scorePois:kn}=Z.Constants,Qt=O.memo(({score:t,isLoading:e,data:n})=>e?a(ht,{children:a(nt,{height:"34px",width:"100%"},t)}):a(se,{value:t,children:L(I.Root,{options:{score:t,data:n},children:[a(hn,{children:L(Ft,{children:[a(vn,{children:a(fe,{SVGElement:ae,fill:g["--ll-color-on-background-variant1"]})}),a(D,{spacing:"--ll-spacing-small"}),a(I.Icon,{}),a(D,{spacing:"--ll-spacing-small"}),a(I.Title,{}),a(D,{}),a(I.Badge,{})]})}),a(gn,{children:L(mn,{children:[a(I.Description,{}),a(D,{vertical:!0,spacing:"--ll-spacing-small"}),a(I.BarChart,{}),a(yn,{children:t==="high_schools"||t==="primary_schools"?a(Ut,{score:t}):a(gt,{include:kn[t]})})]})})]})},t));Qt.displayName="Score";const In=w.div`
|
|
135
|
+
padding: ${g["--ll-spacing-small"]} ${g["--ll-spacing-medium"]};
|
|
136
|
+
`,_n=w.div`
|
|
137
|
+
display: flex;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
align-items: center;
|
|
140
|
+
`,Yt=O.memo(({data:t,isLoading:e,isFetching:n,tabContent:o})=>{const{translations:i}=he();return L(In,{children:[L(_n,{children:[a(Q.Title,{options:{variant:"h4",noMargin:!0,weight:"--ll-font-weight-medium"}}),n&&!e&&a(ge,{size:"small"})]}),a(D,{spacing:"--ll-spacing-small",vertical:!0}),!n&&!Object.keys((t==null?void 0:t.location)||{}).length&&a(me,{color:"--ll-color-on-background-variant1",children:i.EMPTY_TEXT}),o.scores.map(s=>a(Qt,{score:s,data:t,isLoading:e},s))]})});Yt.displayName="ScoreCategory";const Jt=O.memo(({tabContent:t})=>{q();const{data:e,isLoading:n,isFetching:o}=ft(t.scores),{activeScore:i,setActiveScore:s}=E();return a(ce,{value:i,onValueChange:c=>{s(c)},type:"single",collapsible:!0,children:a(Yt,{data:e,isLoading:n,isFetching:o,tabContent:t})})});Jt.displayName="ScoreCategoryAccordion";const An=w.div`
|
|
141
|
+
overflow-y: auto;
|
|
142
|
+
`,On=w.div`
|
|
143
|
+
position: absolute;
|
|
144
|
+
top: ${g["--ll-spacing-medium"]};
|
|
145
|
+
left: ${g["--ll-spacing-medium"]};
|
|
146
|
+
width: 360px;
|
|
147
|
+
max-height: calc(100% - 2 * ${g["--ll-spacing-medium"]});
|
|
148
|
+
z-index: 1;
|
|
149
|
+
border-radius: ${g["--ll-border-radius-medium"]};
|
|
150
|
+
box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 8px;
|
|
151
|
+
background-color: #fff;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
background-color: ${g["--ll-color-background"]};
|
|
156
|
+
border: 1px solid ${g["--ll-color-border"]};
|
|
157
|
+
`;w.div`
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
padding: ${g["--ll-spacing-small"]};
|
|
161
|
+
`;const En=w.div`
|
|
162
|
+
padding: ${g["--ll-spacing-x-small"]};
|
|
163
|
+
border-bottom: 1px solid ${g["--ll-color-border"]};
|
|
164
|
+
`,Tn=w.div`
|
|
165
|
+
display: flex;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
padding: ${g["--ll-spacing-small"]};
|
|
168
|
+
background-color: ${g["--ll-color-background"]};
|
|
169
|
+
`,Xt=()=>a(Tn,{children:a(ve.Root,{})}),qt=O.forwardRef((t,e)=>{const{activeCategory:n,setActiveCategory:o,setShowMobileList:i}=E();return a(Q.Root,{options:{currentTab:n},onChange:s=>{o(s.data)},children:L(On,{ref:e,children:[a(En,{children:a(Q.Tabs,{})}),a(An,{children:F.map(s=>a(Q.Content,{options:{value:s.value},children:a(Jt,{tabContent:s},s.value)},s.value))}),a(Xt,{})]})})});qt.displayName="DesktopScores";const zn=w.div`
|
|
170
|
+
position: relative;
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
height: 100vh;
|
|
174
|
+
`,Rn=w.div`
|
|
175
|
+
position: absolute;
|
|
176
|
+
bottom: 86px;
|
|
177
|
+
right: 10px;
|
|
178
|
+
background-color: ${g["--ll-color-background"]};
|
|
179
|
+
z-index: 3;
|
|
180
|
+
border-radius: 50%;
|
|
181
|
+
`,Hn=w(ye)`
|
|
182
|
+
box-shadow: ${g["--ll-shadow-medium"]};
|
|
183
|
+
`,{scorePois:at}=Z.Constants,Zn=()=>{var T,j,mt;const{sdkState:t,setSdkState:e}=tt(),{activeScore:n,activePOI:o,setActivePOI:i,hoveredPOI:s,showMobileList:c,setShowMobileList:l}=E(),r=Be(),u=Zt(),d=Vt(),p=((j=(T=t==null?void 0:t.globalOptions)==null?void 0:T.appearance)==null?void 0:j.theme)==="night"?"basic-v2-dark":"600d69cb-288d-445e-9839-3dfe4d76b31a",[h,f]=y.exports.useState(!1),m=y.exports.useMemo(()=>{var P;return(n==="high_schools"||n==="primary_schools")&&!d.isFetching?{[n]:((P=d==null?void 0:d.data)==null?void 0:P[n])||[]}:!(n&&at[n]&&at[n].length)&&!u.isFetching?{[n]:[]}:u.data},[u.data,d.data,n]),x=y.exports.useMemo(()=>m?Object.entries(m).map(([z,R])=>R.map(A=>bt([A.lng,A.lat],{poi:A,type:z}))).flat().filter((z,R,A)=>A.findIndex(ot=>["lat","lng","name"].every(N=>ot.properties.poi[N]===z.properties.poi[N]))===R):[],[m]),b=y.exports.useMemo(()=>{var z,R,A;const P=((z=t==null?void 0:t.options)==null?void 0:z.marker)&&bt([(R=t==null?void 0:t.options)==null?void 0:R.marker.lng,(A=t==null?void 0:t.options)==null?void 0:A.marker.lat]);return[...x,...P?[P]:[]]},[x,(mt=t==null?void 0:t.options)==null?void 0:mt.marker]),v=y.exports.useRef(),[k,C]=Ce(),S=y.exports.useMemo(()=>({top:25+C.height,bottom:25,left:25,right:25}),[C.height]),$=y.exports.useMemo(()=>({top:50,bottom:50,left:C.width+32+50,right:50}),[C.width]),M=r?S:$,_=P=>{e({...t,options:{...t.options,lat:P.viewState.latitude,lng:P.viewState.longitude,zoom:P.viewState.zoom,bearing:P.viewState.bearing,pitch:P.viewState.pitch}})};return y.exports.useEffect(()=>{var N,vt;if(!b.length||!((N=t.options)!=null&&N.marker))return;const P=we(b.map(({geometry:yt})=>[yt.coordinates[1],yt.coordinates[0]])),[z,R,A,ot]=ct(P);(vt=v==null?void 0:v.current)==null||vt.fitBounds([[R,z],[ot,A]],{maxZoom:17,padding:M,duration:1e3})},[b,M]),t.options?a(Fe,{mapRef:v,mapPadding:M,children:L(zn,{children:[L(le,{ref:v,mapLib:ue,latitude:t.options.lat,longitude:t.options.lng,zoom:t.options.zoom,pitch:t.options.pitch,bearing:t.options.bearing,style:{flex:1,width:"100vw"},mapStyle:`https://api.maptiler.com/maps/${p}/style.json?key=9jNGatuzs05Q1oNlctEs`,onMove:_,cooperativeGestures:t.options.cooperativeGestures,onMoveStart:()=>f(!0),onMoveEnd:()=>f(!1),children:[a(de,{showCompass:!0,style:{marginTop:r?16+C.height:16,marginRight:16}}),t.options.marker&&a(pe,{marker:t.options.marker}),a(Gt,{rect:C,zoom:t.options.zoom,mapRef:v,points:x,isMobile:r,activePOI:o,hoveredPOI:s,isMapMoving:h,setActivePOI:i}),r?a(Kt,{ref:k,showMobileList:c}):a(qt,{ref:k})]}),r&&L(et,{children:[a(Rn,{children:a(Hn,{size:"large",SVGElement:De,onClick:()=>l(P=>!P),disabled:!(n&&!!at[n].length)})}),a(Xt,{})]})]})}):a("div",{children:"No options provided."})},Nn=()=>a(be,{children:a(Zn,{})});export{Nn as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o={RADIUS:"Radius",LIMIT:"Limit",EXPORT:"Export"},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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={RADIUS:"Rayon",LIMIT:"Limite",EXPORT:"Exporter"},o={LOCATION:"Emplacement",SCORES:"Scores",POIS:"Points d'inter\xEAt",SCHOOLS:"\xC9coles",DEMOGRAPHICS:"D\xE9mographique",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};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import{f as fa,b as la,h as ca,e as ha,S as pa,c as Be,u as ke,a as da,s as ga,p as ma,g as ya,m as va,N as wa,P as xa}from"./chevron_right.4d3152f8.js";import{R as Sa,a as $n,r as ge,j as w,c as L,x as T,U as qn,d as W,o as Nn,Q as _a,O as Ea,u as Ie,l as Pe,n as ba,T as ct,t as Wn,V as Ra,F as Gt,g as Un,W as Ta,X as jn,Y as De}from"./index.fb8ba143.js";const Yn=Sa.createContext({}),me=()=>ge.exports.useContext(Yn),Ca=({children:l})=>{var h,E;const{sdkState:y}=$n(),[d,v]=ge.exports.useReducer((k,P)=>({...k,...P}),{location:{lat:((h=y.options)==null?void 0:h.lat)||43.661337,lng:((E=y.options)==null?void 0:E.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=ge.exports.useMemo(()=>({dataExplorerState:d,setDataExplorerState:v}),[d,v]);return w(Yn.Provider,{value:m,children:l})},Aa=L.div`
|
|
2
|
+
height: 100vh;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
`,Oa=L(fa)`
|
|
7
|
+
overflow-y: auto;
|
|
8
|
+
padding: ${T["--ll-spacing-medium"]};
|
|
9
|
+
`,Fa=qn({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),La=qn({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),Ba=L.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
`,Da=L.div`
|
|
13
|
+
height: 20px;
|
|
14
|
+
width: 20px;
|
|
15
|
+
border: 2px solid ${T["--ll-color-primary"]};
|
|
16
|
+
color: ${T["--ll-color-primary"]};
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
margin-right: ${T["--ll-spacing-small"]};
|
|
22
|
+
font-size: ${T["--ll-font-size-p"]};
|
|
23
|
+
`,zt=L(la)`
|
|
24
|
+
all: unset;
|
|
25
|
+
flex: 1;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
font-family: ${T["--ll-font-family"]};
|
|
29
|
+
`,ka=L.div`
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
align-items: center;
|
|
33
|
+
margin: ${T["--ll-spacing-x-small"]} 0;
|
|
34
|
+
`,Ia=L(ca)`
|
|
35
|
+
background-color: ${T["--ll-color-surface"]};
|
|
36
|
+
position: relative;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
margin-left: calc(-1 * ${T["--ll-spacing-medium"]});
|
|
40
|
+
margin-right: calc(-1 * ${T["--ll-spacing-medium"]});
|
|
41
|
+
|
|
42
|
+
[data-state="open"] & {
|
|
43
|
+
animation: ${Fa} 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-state="closed"] & {
|
|
47
|
+
animation: ${La} 300ms cubic-bezier(0.87, 0, 0.13, 1);
|
|
48
|
+
}
|
|
49
|
+
`,Pa=L.div`
|
|
50
|
+
padding: ${T["--ll-spacing-medium"]};
|
|
51
|
+
`,Ma=L.span`
|
|
52
|
+
margin-left: ${T["--ll-spacing-x-small"]};
|
|
53
|
+
${zt}[data-state=open] & {
|
|
54
|
+
transform: rotate(90deg);
|
|
55
|
+
} ;
|
|
56
|
+
`,Na=L.div`
|
|
57
|
+
display: flex;
|
|
58
|
+
`,Ua=({title:l,description:y,children:d,value:v,number:m})=>{const{dataExplorerState:h,setDataExplorerState:E}=me();return w(ha,{value:v,children:W(Ba,{children:[W(ka,{children:[W(zt,{children:[w(Da,{children:m}),w(Nn,{variant:"h6",noMargin:!0,weight:"--ll-font-weight-medium",children:l})]}),W(Na,{children:["checked"in h[v]&&w(_a,{checked:h[v].checked,onCheckedChange:k=>E({[v]:{...h[v],checked:k}})}),w(zt,{children:w(Ma,{children:w(Ea,{SVGElement:pa,fill:T["--ll-color-on-background-variant1"]})})})]})]}),w(Ia,{children:W(Pa,{children:[w(Nn,{color:"--ll-color-on-background-variant1",children:y}),d]})})]})})};var de={exports:{}};(function(l,y){(function(d,v){v(y)})(Be,function(d){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 E(t){return t._maxListeners===void 0?h.defaultMaxListeners:t._maxListeners}h.prototype.getMaxListeners=function(){return E(this)};function k(t,e,r){if(e)t.call(r);else for(var n=t.length,i=ae(t,n),s=0;s<n;++s)i[s].call(r)}function P(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,s=ae(t,i),o=0;o<i;++o)s[o].call(r,n)}function ye(t,e,r,n,i){if(e)t.call(r,n,i);else for(var s=t.length,o=ae(t,s),a=0;a<s;++a)o[a].call(r,n,i)}function V(t,e,r,n,i,s){if(e)t.call(r,n,i,s);else for(var o=t.length,a=ae(t,o),f=0;f<o;++f)a[f].call(r,n,i,s)}function ve(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,s=ae(t,i),o=0;o<i;++o)s[o].apply(r,n)}h.prototype.emit=function(e){var r,n,i,s,o,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 g=typeof n=="function";switch(i=arguments.length,i){case 1:k(n,g,this);break;case 2:P(n,g,this,arguments[1]);break;case 3:ye(n,g,this,arguments[1],arguments[2]);break;case 4:V(n,g,this,arguments[1],arguments[2],arguments[3]);break;default:for(s=new Array(i-1),o=1;o<i;o++)s[o-1]=arguments[o];ve(n,g,this,s)}return!0};function J(t,e,r,n){var i,s,o;if(typeof r!="function")throw new TypeError('"listener" argument must be a function');if(s=t._events,s?(s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),o=s[e]):(s=t._events=new m,t._eventsCount=0),!o)o=s[e]=r,++t._eventsCount;else if(typeof o=="function"?o=s[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),!o.warned&&(i=E(t),i&&i>0&&o.length>i)){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=o.length,Re(a)}return t}function Re(t){typeof console.warn=="function"?console.warn(t):console.log(t)}h.prototype.addListener=function(e,r){return J(this,e,r,!1)},h.prototype.on=h.prototype.addListener,h.prototype.prependListener=function(e,r){return J(this,e,r,!0)};function Me(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,Me(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,Me(this,e,r)),this},h.prototype.removeListener=function(e,r){var n,i,s,o,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(s=-1,o=n.length;o-- >0;)if(n[o]===r||n[o].listener&&n[o].listener===r){a=n[o].listener,s=o;break}if(s<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 ht(n,s);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),s=0,o;s<i.length;++s)o=i[s],o!=="removeListener"&&this.removeAllListeners(o);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=pt(r):n=[]):n=[],n},h.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):Ne.call(t,e)},h.prototype.listenerCount=Ne;function Ne(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 ht(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 ae(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}function pt(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}var M=typeof Be!="undefined"?Be:typeof self!="undefined"?self:typeof window!="undefined"?window:{},N=[],F=[],B=typeof Uint8Array!="undefined"?Uint8Array:Array,A=!1;function I(){A=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;e<r;++e)N[e]=t[e],F[t.charCodeAt(e)]=e;F["-".charCodeAt(0)]=62,F["_".charCodeAt(0)]=63}function K(t){A||I();var e,r,n,i,s,o,a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s=t[a-2]==="="?2:t[a-1]==="="?1:0,o=new B(a*3/4-s),n=s>0?a-4:a;var f=0;for(e=0,r=0;e<n;e+=4,r+=3)i=F[t.charCodeAt(e)]<<18|F[t.charCodeAt(e+1)]<<12|F[t.charCodeAt(e+2)]<<6|F[t.charCodeAt(e+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=i&255;return s===2?(i=F[t.charCodeAt(e)]<<2|F[t.charCodeAt(e+1)]>>4,o[f++]=i&255):s===1&&(i=F[t.charCodeAt(e)]<<10|F[t.charCodeAt(e+1)]<<4|F[t.charCodeAt(e+2)]>>2,o[f++]=i>>8&255,o[f++]=i&255),o}function te(t){return N[t>>18&63]+N[t>>12&63]+N[t>>6&63]+N[t&63]}function dt(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(te(n));return i.join("")}function Ue(t){A||I();for(var e,r=t.length,n=r%3,i="",s=[],o=16383,a=0,f=r-n;a<f;a+=o)s.push(dt(t,a,a+o>f?f:a+o));return n===1?(e=t[r-1],i+=N[e>>2],i+=N[e<<4&63],i+="=="):n===2&&(e=(t[r-2]<<8)+t[r-1],i+=N[e>>10],i+=N[e>>4&63],i+=N[e<<2&63],i+="="),s.push(i),s.join("")}function je(t,e,r,n,i){var s,o,a=i*8-n-1,f=(1<<a)-1,c=f>>1,p=-7,g=r?i-1:0,b=r?-1:1,_=t[e+g];for(g+=b,s=_&(1<<-p)-1,_>>=-p,p+=a;p>0;s=s*256+t[e+g],g+=b,p-=8);for(o=s&(1<<-p)-1,s>>=-p,p+=n;p>0;o=o*256+t[e+g],g+=b,p-=8);if(s===0)s=1-c;else{if(s===f)return o?NaN:(_?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(_?-1:1)*o*Math.pow(2,s-n)}function Kt(t,e,r,n,i,s){var o,a,f,c=s*8-i-1,p=(1<<c)-1,g=p>>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:s-1,G=n?1:-1,Le=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=p):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+g>=1?e+=b/f:e+=b*Math.pow(2,1-g),e*f>=2&&(o++,f/=2),o+g>=p?(a=0,o=p):o+g>=1?(a=(e*f-1)*Math.pow(2,i),o=o+g):(a=e*Math.pow(2,g-1)*Math.pow(2,i),o=0));i>=8;t[r+_]=a&255,_+=G,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;t[r+_]=o&255,_+=G,o/=256,c-=8);t[r+_-G]|=Le*128}var Hn={}.toString,Xt=Array.isArray||function(t){return Hn.call(t)=="[object Array]"},zn=50;u.TYPED_ARRAY_SUPPORT=M.TYPED_ARRAY_SUPPORT!==void 0?M.TYPED_ARRAY_SUPPORT:!0;function gt(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function X(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 Qt(this,t,e,r)}u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t};function Qt(t,e,r,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?Xn(t,e,r,n):typeof e=="string"?Kn(t,e,r):Qn(t,e)}u.from=function(t,e,r){return Qt(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array);function Zt(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 Gn(t,e,r,n){return Zt(e),e<=0?X(t,e):r!==void 0?typeof n=="string"?X(t,e).fill(r,n):X(t,e).fill(r):X(t,e)}u.alloc=function(t,e,r){return Gn(null,t,e,r)};function mt(t,e){if(Zt(e),t=X(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 Kn(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=er(e,r)|0;t=X(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=X(t,r);for(var n=0;n<r;n+=1)t[n]=e[n]&255;return t}function Xn(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 Qn(t,e){if(H(e)){var r=vt(e.length)|0;return t=X(t,r),t.length===0||e.copy(t,0,0,r),t}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||yi(e.length)?X(t,0):yt(t,e);if(e.type==="Buffer"&&Xt(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=lr;function H(t){return!!(t!=null&&t._isBuffer)}u.compare=function(e,r){if(!H(e)||!H(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,s=0,o=Math.min(n,i);s<o;++s)if(e[s]!==r[s]){n=e[s],i=r[s];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(!Xt(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),s=0;for(n=0;n<e.length;++n){var o=e[n];if(!H(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,s),s+=o.length}return i};function er(t,e){if(H(t))return t.length;if(typeof ArrayBuffer!="undefined"&&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 We(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return fr(t).length;default:if(n)return We(t).length;e=(""+e).toLowerCase(),n=!0}}u.byteLength=er;function Zn(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 fi(this,e,r);case"utf8":case"utf-8":return ir(this,e,r);case"ascii":return ai(this,e,r);case"latin1":case"binary":return ui(this,e,r);case"base64":return si(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return li(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}u.prototype._isBuffer=!0;function ue(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)ue(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)ue(this,r,r+3),ue(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)ue(this,r,r+7),ue(this,r+1,r+6),ue(this,r+2,r+5),ue(this,r+3,r+4);return this},u.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?ir(this,0,e):Zn.apply(this,arguments)},u.prototype.equals=function(e){if(!H(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=zn;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,s){if(!H(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),s===void 0&&(s=this.length),r<0||n>e.length||i<0||s>this.length)throw new RangeError("out of range index");if(i>=s&&r>=n)return 0;if(i>=s)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,s>>>=0,this===e)return 0;for(var o=s-i,a=n-r,f=Math.min(o,a),c=this.slice(i,s),p=e.slice(r,n),g=0;g<f;++g)if(c[g]!==p[g]){o=c[g],a=p[g];break}return o<a?-1:a<o?1:0};function tr(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)),H(e))return e.length===0?-1:rr(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):rr(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function rr(t,e,r,n,i){var s=1,o=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;s=2,o/=2,a/=2,r/=2}function f(_,G){return s===1?_[G]:_.readUInt16BE(G*s)}var c;if(i){var p=-1;for(c=r;c<o;c++)if(f(t,c)===f(e,p===-1?0:c-p)){if(p===-1&&(p=c),c-p+1===a)return p*s}else p!==-1&&(c-=c-p),p=-1}else for(r+a>o&&(r=o-a),c=r;c>=0;c--){for(var g=!0,b=0;b<a;b++)if(f(t,c+b)!==f(e,b)){g=!1;break}if(g)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 tr(this,e,r,n,!0)},u.prototype.lastIndexOf=function(e,r,n){return tr(this,e,r,n,!1)};function ei(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var s=e.length;if(s%2!==0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(o*2,2),16);if(isNaN(a))return o;t[r+o]=a}return o}function ti(t,e,r,n){return Ye(We(e,t.length-r),t,r,n)}function nr(t,e,r,n){return Ye(gi(e),t,r,n)}function ri(t,e,r,n){return nr(t,e,r,n)}function ni(t,e,r,n){return Ye(fr(e),t,r,n)}function ii(t,e,r,n){return Ye(mi(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 s=this.length-r;if((n===void 0||n>s)&&(n=s),e.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return ei(this,e,r,n);case"utf8":case"utf-8":return ti(this,e,r,n);case"ascii":return nr(this,e,r,n);case"latin1":case"binary":return ri(this,e,r,n);case"base64":return ni(this,e,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ii(this,e,r,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function si(t,e,r){return e===0&&r===t.length?Ue(t):Ue(t.slice(e,r))}function ir(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(i+a<=r){var f,c,p,g;switch(a){case 1:s<128&&(o=s);break;case 2:f=t[i+1],(f&192)===128&&(g=(s&31)<<6|f&63,g>127&&(o=g));break;case 3:f=t[i+1],c=t[i+2],(f&192)===128&&(c&192)===128&&(g=(s&15)<<12|(f&63)<<6|c&63,g>2047&&(g<55296||g>57343)&&(o=g));break;case 4:f=t[i+1],c=t[i+2],p=t[i+3],(f&192)===128&&(c&192)===128&&(p&192)===128&&(g=(s&15)<<18|(f&63)<<12|(c&63)<<6|p&63,g>65535&&g<1114112&&(o=g))}}o===null?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=a}return oi(n)}var sr=4096;function oi(t){var e=t.length;if(e<=sr)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=sr));return r}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]&127);return n}function ui(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 fi(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=e;s<r;++s)i+=di(t[s]);return i}function li(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+n[s+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 s=r-e;i=new u(s,void 0);for(var o=0;o<s;++o)i[o]=this[o+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],s=1,o=0;++o<r&&(s*=256);)i+=this[e+o]*s;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],s=1;r>0&&(s*=256);)i+=this[e+--r]*s;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],s=1,o=0;++o<r&&(s*=256);)i+=this[e+o]*s;return s*=128,i>=s&&(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,s=1,o=this[e+--i];i>0&&(s*=256);)o+=this[e+--i]*s;return s*=128,o>=s&&(o-=Math.pow(2,8*r)),o},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),je(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,r){return r||C(e,4,this.length),je(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,r){return r||C(e,8,this.length),je(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,r){return r||C(e,8,this.length),je(this,e,!1,52,8)};function D(t,e,r,n,i,s){if(!H(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)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 s=Math.pow(2,8*n)-1;D(this,e,r,n,s,0)}var o=1,a=0;for(this[r]=e&255;++a<n&&(o*=256);)this[r+a]=e/o&255;return r+n},u.prototype.writeUIntBE=function(e,r,n,i){if(e=+e,r=r|0,n=n|0,!i){var s=Math.pow(2,8*n)-1;D(this,e,r,n,s,0)}var o=n-1,a=1;for(this[r+o]=e&255;--o>=0&&(a*=256);)this[r+o]=e/a&255;return r+n},u.prototype.writeUInt8=function(e,r,n){return e=+e,r=r|0,n||D(this,e,r,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=e&255,r+1};function $e(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-r,2);i<s;++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||D(this,e,r,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):$e(this,e,r,!0),r+2},u.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=r|0,n||D(this,e,r,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):$e(this,e,r,!1),r+2};function qe(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-r,4);i<s;++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||D(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):qe(this,e,r,!0),r+4},u.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=r|0,n||D(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):qe(this,e,r,!1),r+4},u.prototype.writeIntLE=function(e,r,n,i){if(e=+e,r=r|0,!i){var s=Math.pow(2,8*n-1);D(this,e,r,n,s-1,-s)}var o=0,a=1,f=0;for(this[r]=e&255;++o<n&&(a*=256);)e<0&&f===0&&this[r+o-1]!==0&&(f=1),this[r+o]=(e/a>>0)-f&255;return r+n},u.prototype.writeIntBE=function(e,r,n,i){if(e=+e,r=r|0,!i){var s=Math.pow(2,8*n-1);D(this,e,r,n,s-1,-s)}var o=n-1,a=1,f=0;for(this[r+o]=e&255;--o>=0&&(a*=256);)e<0&&f===0&&this[r+o+1]!==0&&(f=1),this[r+o]=(e/a>>0)-f&255;return r+n},u.prototype.writeInt8=function(e,r,n){return e=+e,r=r|0,n||D(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||D(this,e,r,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[r]=e&255,this[r+1]=e>>>8):$e(this,e,r,!0),r+2},u.prototype.writeInt16BE=function(e,r,n){return e=+e,r=r|0,n||D(this,e,r,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=e&255):$e(this,e,r,!1),r+2},u.prototype.writeInt32LE=function(e,r,n){return e=+e,r=r|0,n||D(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):qe(this,e,r,!0),r+4},u.prototype.writeInt32BE=function(e,r,n){return e=+e,r=r|0,n||D(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):qe(this,e,r,!1),r+4};function or(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ar(t,e,r,n,i){return i||or(t,e,r,4),Kt(t,e,r,n,23,4),r+4}u.prototype.writeFloatLE=function(e,r,n){return ar(this,e,r,!0,n)},u.prototype.writeFloatBE=function(e,r,n){return ar(this,e,r,!1,n)};function ur(t,e,r,n,i){return i||or(t,e,r,8),Kt(t,e,r,n,52,8),r+8}u.prototype.writeDoubleLE=function(e,r,n){return ur(this,e,r,!0,n)},u.prototype.writeDoubleBE=function(e,r,n){return ur(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 s=i-n,o;if(this===e&&n<r&&r<i)for(o=s-1;o>=0;--o)e[o+r]=this[o+n];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),r);return s},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 s=e.charCodeAt(0);s<256&&(e=s)}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 o;if(typeof e=="number")for(o=r;o<n;++o)this[o]=e;else{var a=H(e)?e:We(new u(e,i).toString()),f=a.length;for(o=0;o<n-r;++o)this[o+r]=a[o%f]}return this};var ci=/[^+\/0-9A-Za-z-_]/g;function hi(t){if(t=pi(t).replace(ci,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function pi(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function di(t){return t<16?"0"+t.toString(16):t.toString(16)}function We(t,e){e=e||1/0;for(var r,n=t.length,i=null,s=[],o=0;o<n;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function gi(t){for(var e=[],r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function mi(t,e){for(var r,n,i,s=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function fr(t){return K(hi(t))}function Ye(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 yi(t){return t!==t}function lr(t){return t!=null&&(!!t._isBuffer||cr(t)||vi(t))}function cr(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function vi(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&cr(t.slice(0,0))}function hr(){throw new Error("setTimeout has not been defined")}function pr(){throw new Error("clearTimeout has not been defined")}var re=hr,ne=pr;typeof M.setTimeout=="function"&&(re=setTimeout),typeof M.clearTimeout=="function"&&(ne=clearTimeout);function dr(t){if(re===setTimeout)return setTimeout(t,0);if((re===hr||!re)&&setTimeout)return re=setTimeout,setTimeout(t,0);try{return re(t,0)}catch{try{return re.call(null,t,0)}catch{return re.call(this,t,0)}}}function wi(t){if(ne===clearTimeout)return clearTimeout(t);if((ne===pr||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(t);try{return ne(t)}catch{try{return ne.call(null,t)}catch{return ne.call(this,t)}}}var Q=[],we=!1,fe,Ve=-1;function xi(){!we||!fe||(we=!1,fe.length?Q=fe.concat(Q):Ve=-1,Q.length&&gr())}function gr(){if(!we){var t=dr(xi);we=!0;for(var e=Q.length;e;){for(fe=Q,Q=[];++Ve<e;)fe&&fe[Ve].run();Ve=-1,e=Q.length}fe=null,we=!1,wi(t)}}function U(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];Q.push(new mr(t,e)),Q.length===1&&!we&&dr(gr)}function mr(t,e){this.fun=t,this.array=e}mr.prototype.run=function(){this.fun.apply(null,this.array)};var Te=M.performance||{};Te.now||Te.mozNow||Te.msNow||Te.oNow||Te.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 xe=wt,Si=/%[sdj%]/g;function _i(t){if(!bt(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(ie(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,i=n.length,s=String(t).replace(Si,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{return"[Circular]"}default:return a}}),o=n[r];r<i;o=n[++r])Et(o)||!Ce(o)?s+=" "+o:s+=" "+ie(o);return s}function yr(t,e){if(se(M.process))return function(){return yr(t,e).apply(this,arguments)};var r=!1;function n(){return r||(console.error(e),r=!0),t.apply(this,arguments)}return n}var Je={},xt;function Ei(t){if(se(xt)&&(xt=""),t=t.toUpperCase(),!Je[t])if(new RegExp("\\b"+t+"\\b","i").test(xt)){var e=0;Je[t]=function(){var r=_i.apply(null,arguments);console.error("%s %d: %s",t,e,r)}}else Je[t]=function(){};return Je[t]}function ie(t,e){var r={seen:[],stylize:Ri};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),vr(e)?r.showHidden=e:e&&Bi(r,e),se(r.showHidden)&&(r.showHidden=!1),se(r.depth)&&(r.depth=2),se(r.colors)&&(r.colors=!1),se(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=bi),He(r,t,r.depth)}ie.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]},ie.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function bi(t,e){var r=ie.styles[e];return r?"\x1B["+ie.colors[r][0]+"m"+t+"\x1B["+ie.colors[r][1]+"m":t}function Ri(t,e){return t}function Ti(t){var e={};return t.forEach(function(r,n){e[r]=!0}),e}function He(t,e,r){if(t.customInspect&&e&&Ct(e.inspect)&&e.inspect!==ie&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(r,t);return bt(n)||(n=He(t,n,r)),n}var i=Ci(t,e);if(i)return i;var s=Object.keys(e),o=Ti(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),Tt(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return St(e);if(s.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(wr(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Tt(e))return St(e)}var f="",c=!1,p=["{","}"];if(Fi(e)&&(c=!0,p=["[","]"]),Ct(e)){var g=e.name?": "+e.name:"";f=" [Function"+g+"]"}if(Rt(e)&&(f=" "+RegExp.prototype.toString.call(e)),wr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),Tt(e)&&(f=" "+St(e)),s.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 b;return c?b=Ai(t,e,r,o,s):b=s.map(function(_){return _t(t,e,r,o,_,c)}),t.seen.pop(),Oi(b,f,p)}function Ci(t,e){if(se(e))return t.stylize("undefined","undefined");if(bt(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Li(e))return t.stylize(""+e,"number");if(vr(e))return t.stylize(""+e,"boolean");if(Et(e))return t.stylize("null","null")}function St(t){return"["+Error.prototype.toString.call(t)+"]"}function Ai(t,e,r,n,i){for(var s=[],o=0,a=e.length;o<a;++o)xr(e,String(o))?s.push(_t(t,e,r,n,String(o),!0)):s.push("");return i.forEach(function(f){f.match(/^\d+$/)||s.push(_t(t,e,r,n,f,!0))}),s}function _t(t,e,r,n,i,s){var o,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")),xr(n,i)||(o="["+i+"]"),a||(t.seen.indexOf(f.value)<0?(Et(r)?a=He(t,f.value,null):a=He(t,f.value,r-1),a.indexOf(`
|
|
59
|
+
`)>-1&&(s?a=a.split(`
|
|
60
|
+
`).map(function(c){return" "+c}).join(`
|
|
61
|
+
`).substr(2):a=`
|
|
62
|
+
`+a.split(`
|
|
63
|
+
`).map(function(c){return" "+c}).join(`
|
|
64
|
+
`))):a=t.stylize("[Circular]","special")),se(o)){if(s&&i.match(/^\d+$/))return a;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function Oi(t,e,r){var n=t.reduce(function(i,s){return s.indexOf(`
|
|
65
|
+
`)>=0,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(e===""?"":e+`
|
|
66
|
+
`)+" "+t.join(`,
|
|
67
|
+
`)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function Fi(t){return Array.isArray(t)}function vr(t){return typeof t=="boolean"}function Et(t){return t===null}function Li(t){return typeof t=="number"}function bt(t){return typeof t=="string"}function se(t){return t===void 0}function Rt(t){return Ce(t)&&At(t)==="[object RegExp]"}function Ce(t){return typeof t=="object"&&t!==null}function wr(t){return Ce(t)&&At(t)==="[object Date]"}function Tt(t){return Ce(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 Bi(t,e){if(!e||!Ce(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}function xr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function le(){this.head=null,this.tail=null,this.length=0}le.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},le.prototype.unshift=function(t){var e={data:t,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length},le.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}},le.prototype.clear=function(){this.head=this.tail=null,this.length=0},le.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},le.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 Di=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 ki(t){if(t&&!Di(t))throw new Error("Unknown encoding: "+t)}function Ae(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),ki(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Pi;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Mi;break;default:this.write=Ii;return}this.charBuffer=new u(6),this.charReceived=0,this.charLength=0}Ae.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 s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),t.copy(this.charBuffer,0,0,s),e.substring(0,n)}return e},Ae.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},Ae.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 Ii(t){return t.toString(this.encoding)}function Pi(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}R.ReadableState=Sr;var S=Ei("stream");xe(R,h);function Ni(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 Ui(t,e){return t.listeners(e).length}function Sr(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof j&&(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 le,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Ae(t.encoding),this.encoding=t.encoding)}function R(t){if(!(this instanceof R))return new R(t);this._readableState=new Sr(t,this),this.readable=!0,t&&typeof t.read=="function"&&(this._read=t.read),h.call(this)}R.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="")),_r(this,r,t,e,!1)},R.prototype.unshift=function(t){var e=this._readableState;return _r(this,e,t,"",!0)},R.prototype.isPaused=function(){return this._readableState.flowing===!1};function _r(t,e,r,n,i){var s=qi(e,r);if(s)t.emit("error",s);else if(r===null)e.reading=!1,Wi(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var o=new Error("stream.push() after EOF");t.emit("error",o)}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&&ze(t))),Yi(t,e)}else i||(e.reading=!1);return ji(e)}function ji(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}R.prototype.setEncoding=function(t){return this._readableState.decoder=new Ae(t),this._readableState.encoding=t,this};var Er=8388608;function $i(t){return t>=Er?t=Er:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function br(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=$i(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}R.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):ze(this),null;if(t=br(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=br(r,e)));var i;return t>0?i=Tr(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 qi(t,e){var r=null;return!lr(e)&&typeof e!="string"&&e!==null&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Wi(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,ze(t)}}function ze(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(S("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?U(Rr,t):Rr(t))}function Rr(t){S("emit readable"),t.emit("readable"),Ot(t)}function Yi(t,e){e.readingMore||(e.readingMore=!0,U(Vi,t,e))}function Vi(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}R.prototype._read=function(t){this.emit("error",new Error("not implemented"))},R.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,s=i?a:p;n.endEmitted?U(s):r.once("end",s),t.on("unpipe",o);function o(Ee){S("onunpipe"),Ee===r&&p()}function a(){S("onend"),t.end()}var f=Ji(r);t.on("drain",f);var c=!1;function p(){S("cleanup"),t.removeListener("close",G),t.removeListener("finish",Le),t.removeListener("drain",f),t.removeListener("error",_),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",p),r.removeListener("data",b),c=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&f()}var g=!1;r.on("data",b);function b(Ee){S("ondata"),g=!1;var ua=t.write(Ee);ua===!1&&!g&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Cr(n.pipes,t)!==-1)&&!c&&(S("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,g=!0),r.pause())}function _(Ee){S("onerror",Ee),Ht(),t.removeListener("error",_),Ui(t,"error")===0&&t.emit("error",Ee)}Ni(t,"error",_);function G(){t.removeListener("finish",Le),Ht()}t.once("close",G);function Le(){S("onfinish"),t.removeListener("close",G),Ht()}t.once("finish",Le);function Ht(){S("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(S("pipe resume"),r.resume()),t};function Ji(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))}}R.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 s=Cr(e.pipes,t);return s===-1?this:(e.pipes.splice(s,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},R.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&&ze(this):U(Hi,this))}return r},R.prototype.addListener=R.prototype.on;function Hi(t){S("readable nexttick read 0"),t.read(0)}R.prototype.resume=function(){var t=this._readableState;return t.flowing||(S("resume"),t.flowing=!0,zi(this,t)),this};function zi(t,e){e.resumeScheduled||(e.resumeScheduled=!0,U(Gi,t,e))}function Gi(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)}R.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;);}R.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 o=e.decoder.end();o&&o.length&&n.push(o)}n.push(null)}),t.on("data",function(o){if(S("wrapped data"),e.decoder&&(o=e.decoder.write(o)),!(e.objectMode&&o==null)&&!(!e.objectMode&&(!o||!o.length))){var a=n.push(o);a||(r=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(o){return function(){return t[o].apply(t,arguments)}}(i));var s=["error","close","destroy","pause","resume"];return es(s,function(o){t.on(o,n.emit.bind(n,o))}),n._read=function(o){S("wrapped _read",o),r&&(r=!1,t.resume())},n},R._fromList=Tr;function Tr(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=Ki(t,e.buffer,e.decoder),r}function Ki(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?Xi(t,e):Qi(t,e),n}function Xi(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(o===s.length?i+=s:i+=s.slice(0,t),t-=o,t===0){o===s.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++n}return e.length-=n,i}function Qi(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 s=n.data,o=t>s.length?s.length:t;if(s.copy(r,r.length-t,0,o),t-=o,t===0){o===s.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=s.slice(o));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,U(Zi,e,t))}function Zi(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function es(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}function Cr(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}O.WritableState=Lt,xe(O,h);function ts(){}function rs(t,e,r){this.chunk=t,this.encoding=e,this.callback=r,this.next=null}function Lt(t,e){Object.defineProperty(this,"buffer",{get:yr(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof j&&(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(s){fs(e,s)},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 Dr(this)}Lt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};function O(t){if(!(this instanceof O)&&!(this instanceof j))return new O(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)}O.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function ns(t,e){var r=new Error("write after end");t.emit("error",r),U(e,r)}function is(t,e,r,n){var i=!0,s=!1;return r===null?s=new TypeError("May not write null values to stream"):!u.isBuffer(r)&&typeof r!="string"&&r!==void 0&&!e.objectMode&&(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),U(n,s),i=!1),i}O.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=ts),n.ended?ns(this,r):is(this,n,t,r)&&(n.pendingcb++,i=os(this,n,t,e,r)),i},O.prototype.cork=function(){var t=this._writableState;t.corked++},O.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest&&Or(this,t))},O.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 ss(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=u.from(e,r)),e}function os(t,e,r,n,i){r=ss(e,r,n),u.isBuffer(r)&&(n="buffer");var s=e.objectMode?1:r.length;e.length+=s;var o=e.length<e.highWaterMark;if(o||(e.needDrain=!0),e.writing||e.corked){var a=e.lastBufferedRequest;e.lastBufferedRequest=new rs(r,n,i),a?a.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Bt(t,e,!1,s,r,n,i);return o}function Bt(t,e,r,n,i,s,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function as(t,e,r,n,i){--e.pendingcb,r?U(i,n):i(n),t._writableState.errorEmitted=!0,t.emit("error",n)}function us(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function fs(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(us(r),e)as(t,r,n,e,i);else{var s=Fr(r);!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Or(t,r),n?U(Ar,t,r,s,i):Ar(t,r,s,i)}}function Ar(t,e,r,n){r||ls(t,e),e.pendingcb--,n(),Br(t,e)}function ls(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Or(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var o=0;r;)i[o]=r,r=r.next,o+=1;Bt(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Dr(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}O.prototype._write=function(t,e,r){r(new Error("not implemented"))},O.prototype._writev=null,O.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&&cs(this,n,r)};function Fr(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Lr(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function Br(t,e){var r=Fr(e);return r&&(e.pendingcb===0?(Lr(t,e),e.finished=!0,t.emit("finish")):Lr(t,e)),r}function cs(t,e,r){e.ending=!0,Br(t,e),r&&(e.finished?U(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Dr(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}}xe(j,R);for(var kr=Object.keys(O.prototype),Dt=0;Dt<kr.length;Dt++){var kt=kr[Dt];j.prototype[kt]||(j.prototype[kt]=O.prototype[kt])}function j(t){if(!(this instanceof j))return new j(t);R.call(this,t),O.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",hs)}function hs(){this.allowHalfOpen||this._writableState.ended||U(ps,this)}function ps(t){t.end()}xe(z,j);function ds(t){this.afterTransform=function(e,r){return gs(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function gs(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 s=t._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&t._read(s.highWaterMark)}function z(t){if(!(this instanceof z))return new z(t);j.call(this,t),this._transformState=new ds(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){Ir(e,r)}):Ir(e)})}z.prototype.push=function(t,e){return this._transformState.needTransform=!1,j.prototype.push.call(this,t,e)},z.prototype._transform=function(t,e,r){throw new Error("Not implemented")},z.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)}},z.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 Ir(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)}xe(Oe,z);function Oe(t){if(!(this instanceof Oe))return new Oe(t);z.call(this,t)}Oe.prototype._transform=function(t,e,r){r(null,t)},xe($,h),$.Readable=R,$.Writable=O,$.Duplex=j,$.Transform=z,$.PassThrough=Oe,$.Stream=$;function $(){h.call(this)}$.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",o),r.on("close",a));var s=!1;function o(){s||(s=!0,t.end())}function a(){s||(s=!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",o),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 Z(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z=function(e){return typeof e}:Z=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(t)}function Ge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pr(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 Ke(t,e,r){return e&&Pr(t.prototype,e),r&&Pr(t,r),t}function Xe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mr(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){Xe(t,i,r[i])})}return t}function Nr(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 Qe(t){return Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Qe(t)}function It(t,e){return It=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},It(t,e)}function ms(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ur(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:ms(t)}function jr(t){return ws(t)||$r(t)||Ss()}function ys(t){return vs(t)||$r(t)||xs()}function vs(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 ws(t){if(Array.isArray(t))return t}function $r(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function xs(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Ss(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var Ze;function _s(){if(typeof Ze=="undefined"){var t=new ArrayBuffer(2),e=new Uint8Array(t),r=new Uint16Array(t);if(e[0]=1,e[1]=2,r[0]===258)Ze="BE";else if(r[0]===513)Ze="LE";else throw new Error("unable to figure out endianess")}return Ze}function Es(){return typeof M.location!="undefined"?M.location.hostname:""}function bs(){return[]}function Rs(){return 0}function Ts(){return Number.MAX_VALUE}function Cs(){return Number.MAX_VALUE}function As(){return[]}function Os(){return"Browser"}function Fs(){return typeof M.navigator!="undefined"?M.navigator.appVersion:""}function Ls(){}function Bs(){}function qr(){return"/tmp"}var Ds=qr,ks=`
|
|
68
|
+
`,Is={EOL:ks,tmpdir:Ds,tmpDir:qr,networkInterfaces:Ls,getNetworkInterfaces:Bs,release:Fs,type:Os,cpus:As,totalmem:Cs,freemem:Ts,uptime:Rs,loadavg:bs,hostname:Es,endianness:_s},et=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof Be!="undefined"?Be:typeof self!="undefined"?self:{},Ps="Expected a function",Wr="__lodash_hash_undefined__",Yr=1/0,Ms="[object Function]",Ns="[object GeneratorFunction]",Us="[object Symbol]",js=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$s=/^\w*$/,qs=/^\./,Ws=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ys=/[\\^$.*+?()[\]{}|]/g,Vs=/\\(\\)?/g,Js=/^\[object .+?Constructor\]$/,Hs=typeof et=="object"&&et&&et.Object===Object&&et,zs=typeof self=="object"&&self&&self.Object===Object&&self,Pt=Hs||zs||Function("return this")();function Gs(t,e){return t==null?void 0:t[e]}function Ks(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var Xs=Array.prototype,Qs=Function.prototype,Vr=Object.prototype,Mt=Pt["__core-js_shared__"],Jr=function(){var t=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Hr=Qs.toString,Nt=Vr.hasOwnProperty,zr=Vr.toString,Zs=RegExp("^"+Hr.call(Nt).replace(Ys,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=Pt.Symbol,eo=Xs.splice,to=Qr(Pt,"Map"),Fe=Qr(Object,"create"),Kr=Gr?Gr.prototype:void 0,Xr=Kr?Kr.toString:void 0;function ce(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 ro(){this.__data__=Fe?Fe(null):{}}function no(t){return this.has(t)&&delete this.__data__[t]}function io(t){var e=this.__data__;if(Fe){var r=e[t];return r===Wr?void 0:r}return Nt.call(e,t)?e[t]:void 0}function so(t){var e=this.__data__;return Fe?e[t]!==void 0:Nt.call(e,t)}function oo(t,e){var r=this.__data__;return r[t]=Fe&&e===void 0?Wr:e,this}ce.prototype.clear=ro,ce.prototype.delete=no,ce.prototype.get=io,ce.prototype.has=so,ce.prototype.set=oo;function Se(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 ao(){this.__data__=[]}function uo(t){var e=this.__data__,r=tt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():eo.call(e,r,1),!0}function fo(t){var e=this.__data__,r=tt(e,t);return r<0?void 0:e[r][1]}function lo(t){return tt(this.__data__,t)>-1}function co(t,e){var r=this.__data__,n=tt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}Se.prototype.clear=ao,Se.prototype.delete=uo,Se.prototype.get=fo,Se.prototype.has=lo,Se.prototype.set=co;function he(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 ho(){this.__data__={hash:new ce,map:new(to||Se),string:new ce}}function po(t){return rt(this,t).delete(t)}function go(t){return rt(this,t).get(t)}function mo(t){return rt(this,t).has(t)}function yo(t,e){return rt(this,t).set(t,e),this}he.prototype.clear=ho,he.prototype.delete=po,he.prototype.get=go,he.prototype.has=mo,he.prototype.set=yo;function tt(t,e){for(var r=t.length;r--;)if(Ao(t[r][0],e))return r;return-1}function vo(t,e){e=_o(e,t)?[e]:So(e);for(var r=0,n=e.length;t!=null&&r<n;)t=t[To(e[r++])];return r&&r==n?t:void 0}function wo(t){if(!en(t)||bo(t))return!1;var e=Oo(t)||Ks(t)?Zs:Js;return e.test(Co(t))}function xo(t){if(typeof t=="string")return t;if(jt(t))return Xr?Xr.call(t):"";var e=t+"";return e=="0"&&1/t==-Yr?"-0":e}function So(t){return Zr(t)?t:Ro(t)}function rt(t,e){var r=t.__data__;return Eo(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Qr(t,e){var r=Gs(t,e);return wo(r)?r:void 0}function _o(t,e){if(Zr(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||jt(t)?!0:$s.test(t)||!js.test(t)||e!=null&&t in Object(e)}function Eo(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function bo(t){return!!Jr&&Jr in t}var Ro=Ut(function(t){t=Lo(t);var e=[];return qs.test(t)&&e.push(""),t.replace(Ws,function(r,n,i,s){e.push(i?s.replace(Vs,"$1"):n||r)}),e});function To(t){if(typeof t=="string"||jt(t))return t;var e=t+"";return e=="0"&&1/t==-Yr?"-0":e}function Co(t){if(t!=null){try{return Hr.call(t)}catch{}try{return t+""}catch{}}return""}function Ut(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(Ps);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,n);return r.cache=s.set(i,o),o};return r.cache=new(Ut.Cache||he),r}Ut.Cache=he;function Ao(t,e){return t===e||t!==t&&e!==e}var Zr=Array.isArray;function Oo(t){var e=en(t)?zr.call(t):"";return e==Ms||e==Ns}function en(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Fo(t){return!!t&&typeof t=="object"}function jt(t){return typeof t=="symbol"||Fo(t)&&zr.call(t)==Us}function Lo(t){return t==null?"":xo(t)}function Bo(t,e,r){var n=t==null?void 0:vo(t,e);return n===void 0?r:n}var $t=Bo;function Do(t,e,r){return t[e]===void 0?r:t[e]}function tn(t,e,r){var n=Array.isArray(e)?e:e.split("."),i=jr(n),s=i[0],o=i.slice(1);return Mr({},t,Xe({},s,n.length>1?tn(t[s]||{},o,r):r))}function rn(t,e){var r=Array.isArray(e)?e:e.split("."),n=jr(r),i=n[0],s=n.slice(1);return Z(t[i])!=="object"?t:r.length===1?Object.keys(t).filter(function(o){return o!==i}).reduce(function(o,a){return Object.assign(o,Xe({},a,t[a]))},{}):Object.keys(t).reduce(function(o,a){return Mr({},o,Xe({},a,a!==i?t[a]:rn(t[i],s)))},{})}function ko(t,e){try{return t.push.apply(t,ys(e)),t}catch{return t.concat(e)}}function Io(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 ee={getProp:Do,setProp:tn,unsetProp:rn,fastJoin:Io,flattenReducer:ko},nn=ee.getProp,sn=ee.fastJoin,Po=ee.flattenReducer,Mo=function(){function t(e){Ge(this,t),this.opts=this.preprocessOpts(e)}return Ke(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||Is.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 nn(f,i,n.opts.defaultValue)}};if(Z(i)==="object"){var s="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,s)}:function(f){return nn(f,i.value,s)}};if(typeof i.value=="function"){var o=i.label||i.value.name||"",a={label:o,default:s};return{label:o,value:function(c){var p=i.value(c,a);return p==null?s:p}}}}throw new Error("Invalid field info option. "+JSON.stringify(i))})}},{key:"getHeader",value:function(){var r=this;return sn(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(s){return i(s)}).reduce(Po,[])},[r])}},{key:"processRow",value:function(r){var n=this;if(!!r){var i=this.opts.fields.map(function(s){return n.processCell(r,s)});if(!(!this.opts.includeEmptyRows&&i.every(function(s){return s===void 0})))return sn(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=Z(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=Mo,No=ee.fastJoin,Uo=ee.flattenReducer,jo=function(t){Nr(e,t);function e(r){var n;return Ge(this,e),n=Ur(this,Qe(e).call(this,r)),n.opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields)),n}return Ke(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 s=this.opts.header?this.getHeader():"",o=this.processData(i),a=(this.opts.withBOM?"\uFEFF":"")+s+(s&&o?this.opts.eol:"")+o;return a}},{key:"preprocessData",value:function(n){var i=this,s=Array.isArray(n)?n:[n];if(!this.opts.fields&&(s.length===0||Z(s[0])!=="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?s:s.map(function(o){return i.preprocessRow(o)}).reduce(Uo,[])}},{key:"processData",value:function(n){var i=this;return No(n.map(function(s){return i.processRow(s)}).filter(function(s){return s}),this.opts.eol)}}]),e}(qt),on=jo,x={},an=x.LEFT_BRACE=1,nt=x.RIGHT_BRACE=2,un=x.LEFT_BRACKET=3,Wt=x.RIGHT_BRACKET=4,it=x.COLON=5,st=x.COMMA=6,fn=x.TRUE=7,ln=x.FALSE=8,cn=x.NULL=9,ot=x.STRING=10,hn=x.NUMBER=11,pe=x.START=17,pn=x.STOP=18,dn=x.TRUE1=33,gn=x.TRUE2=34,mn=x.TRUE3=35,yn=x.FALSE1=49,vn=x.FALSE2=50,wn=x.FALSE3=51,xn=x.FALSE4=52,Sn=x.NULL1=65,_n=x.NULL2=66,En=x.NULL3=67,bn=x.NUMBER1=81,Yt=x.NUMBER3=83,Y=x.STRING1=97,Rn=x.STRING2=98,Tn=x.STRING3=99,$o=x.STRING4=100,qo=x.STRING5=101,Cn=x.STRING6=102,_e=x.VALUE=113,Vt=x.KEY=114,at=x.OBJECT=129,ut=x.ARRAY=130,Wo="\\".charCodeAt(0),Yo="/".charCodeAt(0),Vo="\b".charCodeAt(0),Jo="\f".charCodeAt(0),Ho=`
|
|
69
|
+
`.charCodeAt(0),zo="\r".charCodeAt(0),Go=" ".charCodeAt(0),ft=64*1024;function oe(){this.tState=pe,this.value=void 0,this.string=void 0,this.stringBuffer=u.alloc?u.alloc(ft):new u(ft),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=_e,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}oe.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 q=oe.prototype;q.onError=function(t){throw t},q.charError=function(t,e){this.tState=pn,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(t[e]))+" at position "+e+" in state "+oe.toknam(this.tState)))},q.appendStringChar=function(t){this.stringBufferOffset>=ft&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t},q.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>ft&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,r),this.stringBufferOffset+=n},q.write=function(t){typeof t=="string"&&(t=new u(t));for(var e,r=0,n=t.length;r<n;r++)if(this.tState===pe){if(e=t[r],this.offset++,e===123)this.onToken(an,"{");else if(e===125)this.onToken(nt,"}");else if(e===91)this.onToken(un,"[");else if(e===93)this.onToken(Wt,"]");else if(e===58)this.onToken(it,":");else if(e===44)this.onToken(st,",");else if(e===116)this.tState=dn;else if(e===102)this.tState=yn;else if(e===110)this.tState=Sn;else if(e===34)this.string="",this.stringBufferOffset=0,this.tState=Y;else if(e===45)this.string="-",this.tState=bn;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===Y)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 "+oe.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 s=0;s<=t.length-1-r;s++)this.temp_buffs[this.bytes_in_sequence][s]=t[r+s];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=pe,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(ot,this.string),this.offset+=u.byteLength(this.string,"utf8")+1,this.string=void 0;else if(e===92)this.tState=Rn;else if(e>=32)this.appendStringChar(e);else return this.charError(t,r);else if(this.tState===Rn)if(e=t[r],e===34)this.appendStringChar(e),this.tState=Y;else if(e===92)this.appendStringChar(Wo),this.tState=Y;else if(e===47)this.appendStringChar(Yo),this.tState=Y;else if(e===98)this.appendStringChar(Vo),this.tState=Y;else if(e===102)this.appendStringChar(Jo),this.tState=Y;else if(e===110)this.appendStringChar(Ho),this.tState=Y;else if(e===114)this.appendStringChar(zo),this.tState=Y;else if(e===116)this.appendStringChar(Go),this.tState=Y;else if(e===117)this.unicode="",this.tState=Tn;else return this.charError(t,r);else if(this.tState===Tn||this.tState===$o||this.tState===qo||this.tState===Cn)if(e=t[r],e>=48&&e<64||e>64&&e<=70||e>96&&e<=102){if(this.unicode+=String.fromCharCode(e),this.tState++===Cn){var o=parseInt(this.unicode,16);this.unicode=void 0,this.highSurrogate!==void 0&&o>=56320&&o<57343+1?(this.appendStringBuf(new u(String.fromCharCode(this.highSurrogate,o))),this.highSurrogate=void 0):this.highSurrogate===void 0&&o>=55296&&o<56319+1?this.highSurrogate=o:(this.highSurrogate!==void 0&&(this.appendStringBuf(new u(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new u(String.fromCharCode(o)))),this.tState=Y}}else return this.charError(t,r);else if(this.tState===bn||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=pe;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(ot,this.string):this.onToken(hn,a),this.offset+=this.string.length-1,this.string=void 0,r--;break}else if(this.tState===dn)if(t[r]===114)this.tState=gn;else return this.charError(t,r);else if(this.tState===gn)if(t[r]===117)this.tState=mn;else return this.charError(t,r);else if(this.tState===mn)if(t[r]===101)this.tState=pe,this.onToken(fn,!0),this.offset+=3;else return this.charError(t,r);else if(this.tState===yn)if(t[r]===97)this.tState=vn;else return this.charError(t,r);else if(this.tState===vn)if(t[r]===108)this.tState=wn;else return this.charError(t,r);else if(this.tState===wn)if(t[r]===115)this.tState=xn;else return this.charError(t,r);else if(this.tState===xn)if(t[r]===101)this.tState=pe,this.onToken(ln,!1),this.offset+=4;else return this.charError(t,r);else if(this.tState===Sn)if(t[r]===117)this.tState=_n;else return this.charError(t,r);else if(this.tState===_n)if(t[r]===108)this.tState=En;else return this.charError(t,r);else if(this.tState===En)if(t[r]===108)this.tState=pe,this.onToken(cn,null),this.offset+=3;else return this.charError(t,r)},q.onToken=function(t,e){},q.parseError=function(t,e){this.tState=pn,this.onError(new Error("Unexpected "+oe.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+oe.toknam(this.state)))},q.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},q.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=_e)},q.emit=function(t){this.mode&&(this.state=st),this.onValue(t)},q.onValue=function(t){},q.onToken=function(t,e){if(this.state===_e)if(t===ot||t===hn||t===fn||t===ln||t===cn)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===an)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Vt,this.mode=at;else if(t===un)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=ut,this.state=_e;else if(t===nt)if(this.mode===at)this.pop();else return this.parseError(t,e);else if(t===Wt)if(this.mode===ut)this.pop();else return this.parseError(t,e);else return this.parseError(t,e);else if(this.state===Vt)if(t===ot)this.key=e,this.state=it;else if(t===nt)this.pop();else return this.parseError(t,e);else if(this.state===it)if(t===it)this.state=_e;else return this.parseError(t,e);else if(this.state===st)if(t===st)this.mode===ut?(this.key++,this.state=_e):this.mode===at&&(this.state=Vt);else if(t===Wt&&this.mode===ut||t===nt&&this.mode===at)this.pop();else return this.parseError(t,e);else return this.parseError(t,e)},oe.C=x;var lt=oe,Ko=$.Transform,Xo=function(t){Nr(e,t);function e(r,n){var i;return Ge(this,e),i=Ur(this,Qe(e).call(this,n)),Object.getOwnPropertyNames(qt.prototype).forEach(function(s){return i[s]=qt.prototype[s]}),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 Ke(e,[{key:"initObjectModeParse",value:function(){var n=this;this.parser={write:function(s){n.pushLine(s)},getPendingData:function(){}}}},{key:"initNDJSONParse",value:function(){var n=this;this.parser={_data:"",write:function(s){this._data+=s.toString();var o=this._data.split(`
|
|
70
|
+
`).map(function(f){return f.trim()}).filter(function(f){return f!==""}),a=!1;o.forEach(function(f,c){try{n.pushLine(JSON.parse(f))}catch(p){c===o.length-1?a=!0:(p.message="Invalid JSON (".concat(f,")"),n.emit("error",p))}}),this._data=a?this._data.slice(this._data.lastIndexOf(`
|
|
71
|
+
`)):""},getPendingData:function(){return this._data}}}},{key:"initJSONParser",value:function(){var n=this;this.parser=new lt,this.parser.onValue=function(i){this.stack.length===this.depthToEmit&&n.pushLine(i)},this.parser._onToken=this.parser.onToken,this.parser.onToken=function(i,s){n.parser._onToken(i,s),this.stack.length===0&&!n.opts.fields&&this.mode!==lt.C.ARRAY&&this.mode!==lt.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===lt.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,s){this.parser.write(n),s()}},{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,s=this.preprocessRow(n);this._hasWritten||(this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(Object.keys(s[0])),this.pushHeader()),s.forEach(function(o){var a=i.processRow(o,i.opts);a!==void 0&&(i.emit("line",a),i.push(i._hasWritten?i.opts.eol+a:a),i._hasWritten=!0)})}}]),e}(Ko),An=Xo,Qo=$.Transform,Zo=ee.fastJoin,ea=function(){function t(e,r){Ge(this,t),this.input=new Qo(r),this.input._read=function(){},this.transform=new An(e,r),this.processor=this.input.pipe(this.transform)}return Ke(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,s){if(!n){r.processor.on("finish",function(){return i()}).on("error",function(a){return s(a)});return}var o=[];r.processor.on("data",function(a){return o.push(a.toString())}).on("finish",function(){return i(Zo(o,""))}).on("error",function(a){return s(a)})})}}]),t}(),On=ea;function ta(){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,s=t.separator,o=s===void 0?".":s;function a(f,c,p){return Object.keys(f).forEach(function(g){var b=p?"".concat(p).concat(o).concat(g):g,_=f[g];if(r&&Z(_)==="object"&&_!==null&&!Array.isArray(_)&&Object.prototype.toString.call(_.toJSON)!=="[object Function]"&&Object.keys(_).length){a(_,c,b);return}if(i&&Array.isArray(_)){a(_,c,b);return}c[b]=_}),c}return function(f){return a(f,{})}}var ra=ta,na=ee.setProp,ia=ee.unsetProp,Fn=ee.flattenReducer;function Jt(t,e){return Object.keys(t).reduce(function(r,n){var i=e?"".concat(e,".").concat(n):n,s=t[n];return Z(s)==="object"&&s!==null&&!Array.isArray(s)&&Object.prototype.toString.call(s.toJSON)!=="[object Function]"&&Object.keys(s).length?r=r.concat(Jt(s,i)):Array.isArray(s)&&(r.push(i),r=r.concat(s.map(function(o){return Jt(o,i)}).reduce(Fn,[]).filter(function(o,a,f){return f.indexOf(o)!==a}))),r},[])}function sa(){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 s(o,a){return o.map(function(f){var c=$t(f,a);return Array.isArray(c)?c.length?c.map(function(p,g){var b=i&&g>0?{}:f;return na(b,a,p)}):ia(f,a):f}).reduce(Fn,[])}return r=Array.isArray(r)?r:r?[r]:void 0,function(o){return(r||Jt(o)).reduce(s,[o])}}var oa=sa,Ln=$.Readable,Bn=on,Dn=On,kn=An,In=function(e,r){return new on(r).parse(e)},Pn=function(e,r,n){try{e instanceof Ln||(n=Object.assign({},n,{objectMode:!0}));var i=new On(r,n),s=i.promise();return Array.isArray(e)?(e.forEach(function(o){return i.input.push(o)}),i.input.push(null)):e instanceof Ln?i.fromInput(e):(i.input.push(e),i.input.push(null)),s}catch(o){return Promise.reject(o)}},Mn={flatten:ra,unwind:oa},aa={Parser:Bn,AsyncParser:Dn,Transform:kn,parse:In,parseAsync:Pn,transforms:Mn};d.AsyncParser=Dn,d.Parser=Bn,d.Transform=kn,d.default=aa,d.parse=In,d.parseAsync=Pn,d.transforms=Mn,Object.defineProperty(d,"__esModule",{value:!0})})})(de,de.exports);const be=({data:l,fileName:y,fileType:d})=>{const v=`text/${d}`,m=new Blob([l],{type:v}),h=document.createElement("a");h.download=`${y}.${d}`,h.href=window.URL.createObjectURL(m);const E=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});h.dispatchEvent(E),h.remove()};function ja({lat:l,lng:y,include:d,enabled:v}){const{client:m}=Ie(),h={lat:l,lng:y,geographyLevels:["10","30"],locationScoresRounding:!1,include:d};return ke(da.list(h),async()=>m.getScores(h),{enabled:!!h&&v})}function $a({lat:l,lng:y,enabled:d,limit:v,radius:m}){const{client:h}=Ie(),E={lat:l,lng:y,limit:v,radius:m};return ke(ga.list(E),async()=>h.getSchools(E),{enabled:!!E&&d})}function qa({lat:l,lng:y,enabled:d,include:v,limit:m,radius:h}){const{client:E}=Ie(),k={lat:l,lng:y,limit:m,radius:h,include:v};return ke(ma.list(k),async()=>E.getPois(k),{enabled:!!k&&d})}const Vn={all:()=>["demographics"],list:l=>[...Vn.all(),l]};function Wa({lat:l,lng:y,enabled:d,radius:v}){const{client:m}=Ie(),h={lat:l,lng:y,radius:v};return ke(Vn.list(h),async()=>m.getDemographics(h),{enabled:!!h&&d})}const Ya=L.div`
|
|
72
|
+
padding: ${T["--ll-spacing-medium"]};
|
|
73
|
+
display: flex;
|
|
74
|
+
background-color: ${T["--ll-color-surface"]};
|
|
75
|
+
box-shadow: ${T["--ll-shadow-medium"]};
|
|
76
|
+
justify-content: flex-end;
|
|
77
|
+
border-top: 1px solid ${T["--ll-color-border"]};
|
|
78
|
+
`,Va=L.div`
|
|
79
|
+
height: 40px;
|
|
80
|
+
display: flex;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
align-items: center;
|
|
83
|
+
margin-right: ${T["--ll-spacing-medium"]};
|
|
84
|
+
`,Jn={all:()=>["profiles"],list:l=>[...Jn.all(),l]};function Ja({lat:l,lng:y,enabled:d}){const{client:v}=Ie(),m={lat:l,lng:y};return ke(Jn.list(m),async()=>v.getProfiles(m),{enabled:!!m&&d})}const Ha=()=>{const{dataExplorerState:l}=me(),{translations:y}=Pe(),{data:d,isFetching:v}=ja({lat:l.location.lat,lng:l.location.lng,enabled:l.scores.checked,include:l.scores.include}),{data:m,isFetching:h}=qa({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:E,isFetching:k}=$a({lat:l.location.lat,lng:l.location.lng,enabled:l.schools.checked,limit:l.pois.limit,radius:l.pois.radius}),{data:P,isFetching:ye}=Wa({lat:l.location.lat,lng:l.location.lng,enabled:l.demographics.checked,radius:l.demographics.radius}),{data:V,isFetching:ve}=Ja({lat:l.location.lat,lng:l.location.lng,enabled:l.profiles.checked}),J=ge.exports.useMemo(()=>({...d&&l.scores.checked&&{scores:d},...m&&l.pois.checked&&{pois:m},...E&&l.schools.checked&&{schools:E},...P&&l.demographics.checked&&{demographics:P},...V&&l.profiles.checked&&{profiles:V}}),[m,d,E,V,P,l]),Re=v||h||k||ye||ve,Me=B=>{B.preventDefault(),be({data:JSON.stringify(J),fileName:"local-logic-data",fileType:"json"})},Ne=()=>{if(!d)return;((A,I)=>{const K=Object.entries(A).map(([dt,Ue])=>({score:dt,...Ue})),te=de.exports.parse(K);!te||be({data:te,fileName:I,fileType:"csv"})})(d.location,"scores")},ht=()=>{if(!m)return;const B=Object.entries(m).map(([I,K])=>K.map(te=>({poi:I,...te}))).flat(),A=de.exports.parse(B);!A||be({data:A,fileName:"pois",fileType:"csv"})},ae=()=>{if(!E)return;const B=Object.entries(E).map(([I,K])=>K.map(te=>({school:I,...te}))).flat(),A=de.exports.parse(B);!A||be({data:A,fileName:"schools",fileType:"csv"})},pt=()=>{if(!P)return;const B=Object.entries(P).map(([I,K])=>({demographic:I,...K})),A=de.exports.parse(B);!A||be({data:A,fileName:"demographics",fileType:"csv"})},M=()=>{if(!V)return;const B=[V],A=["id","intro","name","profiles.character","profiles.housing","profiles.services","profiles.transport"],I=de.exports.parse(B,{fields:A});!I||be({data:I,fileName:"profiles",fileType:"csv"})},N=B=>{B.preventDefault(),Ne(),ht(),ae(),pt(),M()},F=Object.keys(J).length;return W(Ya,{children:[Re&&w(Va,{children:w(ba,{})}),W(ct,{variant:"contained",onClick:Me,disabled:!Object.keys(J).length||Re,children:[y.EXPORT," JSON"]}),w(Wn,{spacing:"--ll-spacing-xx-small"}),W(ct,{variant:"contained",onClick:N,disabled:!F||Re,children:[y.EXPORT," CSV (",F,")"]})]})},za=L.div`
|
|
85
|
+
height: 400px;
|
|
86
|
+
display: flex;
|
|
87
|
+
border: 2px solid ${T["--ll-color-on-background"]};
|
|
88
|
+
`,Ga=()=>{var P,ye,V,ve;const{dataExplorerState:l,setDataExplorerState:y}=me(),{sdkState:d}=$n(),[v,m]=ge.exports.useState(!1),h=ge.exports.useRef(),E=ge.exports.useRef(!1),k=((ye=(P=d==null?void 0:d.globalOptions)==null?void 0:P.appearance)==null?void 0:ye.theme)==="night"?"basic-v2-dark":"600d69cb-288d-445e-9839-3dfe4d76b31a";return w(za,{children:W(ya,{mapLib:va,mapStyle:`https://api.maptiler.com/maps/${k}/style.json?key=9jNGatuzs05Q1oNlctEs`,initialViewState:{longitude:(V=d.options)==null?void 0:V.lng,latitude:(ve=d.options)==null?void 0:ve.lat,zoom:10},onMouseDown:J=>{h.current=setTimeout(()=>{E.current||m(!0)},1e3)},onMouseUp:J=>{v&&y({location:{lat:J.lngLat.lat,lng:J.lngLat.lng}}),clearTimeout(h.current),m(!1)},onDragStart:()=>{E.current=!0},onDragEnd:()=>{E.current=!1},children:[w(wa,{showCompass:!0,style:{marginTop:16,marginRight:16}}),w(xa,{marker:l.location})]})})},Ka=L.div`
|
|
89
|
+
margin: 2px;
|
|
90
|
+
display: inline-block;
|
|
91
|
+
`,Xa=()=>{const{dataExplorerState:l,setDataExplorerState:y}=me(),d=Object.keys(Ra).filter(v=>Number.isNaN(Number(v)));return w(Gt,{children:d.map(v=>{const m=l.scores.include.includes(v);return w(Ka,{children:w(Un.Root,{options:{score:v,data:void 0},children:w(ct,{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(Un.Title,{options:{isRawText:!0}})})})},v)})})},Qa=L.div`
|
|
92
|
+
margin: 2px;
|
|
93
|
+
display: inline-block;
|
|
94
|
+
`,Za=()=>{const{translations:l}=Pe(),{dataExplorerState:y,setDataExplorerState:d}=me(),v=Object.keys(Ta).filter(m=>Number.isNaN(Number(m)));return W(Gt,{children:[v.map(m=>{const h=y.pois.include.includes(m);return w(Qa,{children:w(jn.Root,{options:{poi:m},children:w(ct,{size:"small",variant:h?"contained":"outlined",onClick:()=>{if(h){d({pois:{...y.pois,include:y.pois.include.filter(E=>E!==m)}});return}d({pois:{...y.pois,include:[...y.pois.include,m]}})},children:w(jn.Title,{options:{isRawText:!0}})})})},m)}),w(De,{showValue:!0,label:`${l.RADIUS} (m)`,min:100,max:25e3,step:100,value:[y.pois.radius],onValueChange:m=>{d({pois:{...y.pois,radius:m[0]}})}}),w(De,{showValue:!0,label:l.LIMIT,min:1,max:30,step:1,value:[y.pois.limit],onValueChange:m=>{d({pois:{...y.pois,limit:m[0]}})}})]})},eu=()=>{const{translations:l}=Pe(),{dataExplorerState:y,setDataExplorerState:d}=me();return W(Gt,{children:[w(De,{showValue:!0,label:`${l.RADIUS} (m)`,min:100,max:25e3,step:100,value:[y.schools.radius],onValueChange:v=>{d({schools:{...y.schools,radius:v[0]}})}}),w(De,{showValue:!0,label:l.LIMIT,min:1,max:30,step:1,value:[y.schools.limit],onValueChange:v=>{d({schools:{...y.schools,limit:v[0]}})}})]})},tu=()=>{const{translations:l}=Pe(),{dataExplorerState:y,setDataExplorerState:d}=me();return w(De,{showValue:!0,label:`${l.RADIUS} (m)`,min:500,max:5e3,step:100,value:[y.demographics.radius],onValueChange:v=>{d({demographics:{...y.demographics,radius:v[0]}})}})},iu=()=>{const{translations:l}=Pe(),y=[{title:l.LOCATION,description:l.LOCATION_TEXT,value:"location",number:1,children:w(Ga,{})},{title:l.SCORES,description:l.SCORES_TEXT,value:"scores",number:2,children:w(Xa,{})},{title:l.POIS,description:l.POIS_TEXT,value:"pois",number:3,children:w(Za,{})},{title:l.SCHOOLS,description:l.SCHOOLS_TEXT,value:"schools",number:4,children:w(eu,{})},{title:l.DEMOGRAPHICS,description:l.DEMOGRAPHICS_TEXT,value:"demographics",number:5,children:w(tu,{})},{title:l.PROFILES,description:l.PROFILES_TEXT,value:"profiles",number:6}];return w(Ca,{children:W(Aa,{children:[w(Oa,{type:"single",defaultValue:"location",collapsible:!0,children:y.map(d=>w(Ua,{title:d.title,description:d.description,value:d.value,number:d.number,children:d.children},d.value))}),w(Wn,{vertical:!0}),w(Ha,{})]})})};export{iu as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={EMPTY_TEXT:"Aucune donn\xE9e disponible pour cet emplacement."};export{e as translations};
|