diff --git a/dist/aframe-street-component.js b/dist/aframe-street-component.js index 50fe69799..7114bff39 100644 --- a/dist/aframe-street-component.js +++ b/dist/aframe-street-component.js @@ -13,4 +13,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ -var n,i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{t.exports.segmentVariants={sidewalk:["empty","sparse","normal","dense"],"sidewalk-wayfinding":["large"],"sidewalk-bench":["left","right","center"],"sidewalk-bike-rack":["left|sidewalk-parallel","right|sidewalk-parallel","left|sidewalk","right|sidewalk"],"sidewalk-tree":["big","palm-tree"],utilities:["left","right"],"sidewalk-lamp":["right|modern","both|modern","left|modern","right|traditional","both|traditional","left|traditional","right|pride","both|pride","left|pride"],parklet:["left","right"],"outdoor-dining":["empty|sidewalk","empty|road"],bikeshare:["left|road","right|road","left|sidewalk","right|sidewalk"],"bike-lane":["inbound|green|sidewalk","inbound|green|road","outbound|green|sidewalk","outbound|green|road","inbound|regular|sidewalk","inbound|regular|road","outbound|regular|sidewalk","outbound|regular|road","inbound|red|sidewalk","inbound|red|road","outbound|red|sidewalk","outbound|red|road"],scooter:["inbound|regular","inbound|green","inbound|red","outbound|regular","outbound|green","outbound|red"],"bus-lane":["inbound|colored|typical","outbound|colored|typical","inbound|regular|typical","outbound|regular|typical","inbound|red|typical","outbound|red|typical"],"drive-lane":["inbound|car","outbound|car","inbound|truck","outbound|truck","outbound|av","inbound|av","outbound|pedestrian","inbound|pedestrian","inbound|sharrow","outbound|sharrow"],"turn-lane":["inbound|left","inbound|right","inbound|left-right-straight","inbound|shared","inbound|both","inbound|left-straight","inbound|right-straight","inbound|straight","outbound|left","outbound|right","outbound|left-right-straight","outbound|shared","outbound|both","outbound|left-straight","outbound|right-straight","outbound|straight"],"parking-lane":["sideways|right","sideways|left","inbound|right","inbound|left","outbound|left","outbound|right","angled-front-left|left","angled-front-right|left","angled-rear-left|left","angled-rear-right|left","angled-front-left|right","angled-front-right|right","angled-rear-left|right","angled-rear-right|right"],"food-truck":["left","right"],"flex-zone":["taxi|inbound|right","taxi|inbound|left","taxi|outbound|right","taxi|outbound|left","rideshare|outbound|right","rideshare|outbound|right","rideshare|inbound|right","rideshare|inbound|left"],streetcar:["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"light-rail":["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"brt-station":["center"],"transit-shelter":["left|street-level","right|street-level","right|light-rail","left|light-rail"],divider:["buffer","flowers","planting-strip","planter-box","palm-tree","big-tree","bush","dome","bollard","striped-buffer"],temporary:["barricade","traffic-cone","jersey-barrier-plastic","jersey-barrier-concrete"],"magic-carpet":["aladdin"]}},4578:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var r={Setback:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},tree:{type:"divider",variantString:"palm-tree"},Benchs:{type:"sidewalk-bench",variantStringAdd:"side"}},Walkways:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},pedestrian:{type:"sidewalk",variantString:"dense"},Benchs:{type:"sidewalk-bench",variantStringAdd:"side"},Tables:{type:"outdoor-dining",variantString:"occupied|sidewalk"}},Furniture:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},season_tree:{type:"sidewalk-tree",variantString:"big"},Shelters:{type:"transit-shelter",variantString:"street-level",variantStringAdd:"side|variantString"},Pedestrian:{type:"sidewalk",variantString:"dense"}},Curbside:{"":{type:"sidewalk",variantString:"empty"},Lights:{type:"sidewalk-lamp",tagToVariantMap:{"Historic Lights":"traditional","Regular Lights":"modern"},variantStringAdd:"side|variantString"},Poles:{type:"utilities",variantStringAdd:"side"},BikeRacks:{type:"sidewalk-bike-rack",nameToVariantMap:{"Sideview Modern":"sidewalk-parallel",Sideview:"sidewalk-parallel","NYC Bike Rack":"sidewalk"},variantStringAdd:"side|variantString"}},BikesPaths:{"":{type:"bike-lane",variantString:"sidewalk"},Bikes:{type:"bike-lane",variantString:"sidewalk",variantStringAdd:"direction|material|variantString"}},Gutter:{"":{type:"divider",variantString:"median"},Gutter:{type:"divider",variantString:"median"}},Transit:{"":{tag:"Bus Vehicles",type:"bus-lane",variantString:"typical",variantStringAdd:"direction|material|variantString"},Transit:[{tag:"Rail Vehicles",type:"streetcar",names:["StreetCar Yellow","StreetCar Blue","StreetCar Red 1","StreetCar Red 2"],variantStringAdd:"direction|material"},{tag:"Rail Vehicles",type:"light-rail",names:["UTA LightRail"],variantStringAdd:"direction|material"},{tag:"Rail Vehicles Reversed",type:"light-rail",variantStringAdd:"direction|material"},{tag:"Bus Vehicles",type:"bus-lane",variantString:"typical",variantStringAdd:"direction|material|variantString"}]},Cars:{"":{type:"drive-lane",variantString:"car",variantStringAdd:"direction|variantString"},Autos:{type:"drive-lane",variantString:"car",variantStringAdd:"direction|variantString"},Truck:{type:"drive-lane",variantString:"truck",variantStringAdd:"direction|variantString"}},Parking:{"":{tag:"Parking - Parallel",type:"parking-lane",variantStringAdd:"direction|side"},Parallel:{tag:"Parking - Parallel",type:"parking-lane",variantStringAdd:"direction|side"},AngleNormal:{tag:"Parking - Angle",type:"parking-lane",nameToVariantMap:{"Away, L. Park, Head In":"angled-rear-left","Toward, R. Park, Head In":"angled-front-right","Toward, L. Park, Head In":"angled-front-left","Away, R. Park, Head In":"angled-rear-right"},variantStringAdd:"side"},Perpendicular:{type:"parking-lane",variantString:"sideways",variantStringAdd:"variantString|side"}},Buffers:{"":{type:"divider",variantString:"median"},Trees:{type:"divider",variantString:"big-tree"},tree:{type:"divider",variantString:"palm-tree"},season_tree:{type:"divider",variantString:"big-tree"},median:{type:"divider",variantString:"planting-strip"},planter:{type:"divider",variantString:"planting-strip"}}};r.Buffers.AngleNormal=r.Parking.AngleNormal,r.Buffers.Autos=r.Cars.Autos,r.Buffers.Purpendicular=r.Parking.Perpendicular,r["Median/Buffer"]=r.Buffers,r.Setback.tree=r.Buffers.tree,r.Setback.Trees=r.Buffers.Trees,r.Setback.season_tree=r.Buffers.season_tree,r.Parking.Purpendicular=r.Parking.Perpendicular,r.Setback.Purpendicular=r.Parking.Perpendicular,r.Setback.AngleNormal=r.Parking.AngleNormal,r.Setback.planter=r.Buffers.planter,r.Setback.BikeRacks=r.Curbside.BikeRacks,r.Setback.Tables=r.Walkways.Tables,r.Setback.Poles=r.Curbside.Poles,r.Curbside.Shelters=r.Furniture.Shelters,r.Curbside.Benchs=r.Walkways.Benchs,r.Furniture.planter=r.Buffers.planter,r.Furniture.Benchs=r.Walkways.Benchs,r.Furniture.BikeRacks=r.Curbside.BikeRacks,r.Furniture.Tables=r.Walkways.Tables;var n={Coming:"inbound",Going:"outbound",Both:"both",NA:""},i={"Asphalt Black":"regular","Asphalt Blue":"blue","Asphalt Red 1":"red","Asphalt Red 2":"red","Asphalt Green":"green","Asphalt Old":"regular",Grass:"grass","Grass Dead":"grass"};function a(t,e){return t.split("|").map((function(t){return e[t]})).join("|")}t.exports.convertSegment=function(t){var o={},s=t.Type,c=t.Subtype,l=r[s];if(o.elevation=t.MaterialH/.5,o.width=t.width,o.direction=n[t.Direction],t.side&&(o.side=t.side),t.Material&&(o.material=i[t.Material]),l){var u=l[c];u?o=function(t,r,n){if("string"==typeof t)r.type=t;else if(Array.isArray(t)){var i=t.find((function(t){var e=t.tag===n["O1-Tags"];return e&&t.names?t.names.includes(n["O1-Name"]):e}));r.variantString="";var o=i.variantString;o&&"string"==typeof o&&(r.variantString=o),r.type=i.type;var s=i.variantStringAdd;s&&(r.variantString=a(s,r))}else if("object"===e(t)){r.type=t.type,r.variantString="";var c=t.variantString;c&&"string"==typeof c&&(r.variantString=c);var l=t.nameToVariantMap;l&&l[n["O1-Name"]]&&(r.variantString=l[n["O1-Name"]]);var u=t.tagToVariantMap;u&&u[n["O1-Tags"]]&&(r.variantString=u[n["O1-Tags"]]);var d=t.variantStringAdd;d&&(r.variantString=a(d,r))}return r}(u,o,t):(o.type=s,console.log("The '".concat(c,"' subtype of StreetPlan segment '").concat(s,"' is not yet supported in 3DStreet")))}else o.type=s,console.log("The '".concat(s,"' StreetPlan segment type is not yet supported in 3DStreet"));return o}},9879:(t,e,r)=>{mappingUtils=r(4578),t.exports.convertStreetStruct=function(t){var e,r={},n=Object.keys(t)[0],i=Object.keys(t[n])[0];return r.name=n,r.altName=i,r.segments=Object.values(t[n][i].segments),r.segments.forEach((function(t){t.width*=.3048})),r.segments=(e=r.segments,e.map(mappingUtils.convertSegment)).filter((function(t){return!["Buildings","setback"].includes(t.type)})),console.log("TEST. Converted JSON structure: ",r),r}},5199:t=>{t.exports.isSidewalk=function(t){return t.startsWith("sidewalk")||["utilities","scooter-drop-zone","bikeshare","flex-zone-curb","transit-shelter","brt-station","street-vendor"].includes(t)},t.exports.createBuildingsArray=function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:150,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow";if("narrow"===n||"wide"===n)t=[{id:"SM3D_Bld_Mixed_4fl",width:5.251},{id:"SM3D_Bld_Mixed_Double_5fl",width:10.9041},{id:"SM3D_Bld_Mixed_4fl_2",width:5.309},{id:"SM3D_Bld_Mixed_5fl",width:5.903},{id:"SM3D_Bld_Mixed_Corner_4fl",width:5.644}],e="41431323432402434130303230234102402341";else if("residential"===n)t=[{id:"SM_Bld_House_Preset_03_1800",width:20},{id:"SM_Bld_House_Preset_08_1809",width:20},{id:"SM_Bld_House_Preset_09_1845",width:20}],e="12021201210101212021201012012021201210";else{if("arcade"!==n)return[];t=[{id:"arched-building-01",width:9.191},{id:"arched-building-02",width:11.19},{id:"arched-building-03",width:13.191},{id:"arched-building-04",width:15.191}],e="03120223130210321203123023103201232013"}for(var i=0,a=0,o=[];a{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},r=document.createElement(t.tag);delete t.tag;for(var n=0,i=Object.entries(t);n1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e,r){t.appendChild(n(e))})),t}},5394:t=>{t.exports.streetmixUserToAPI=function(t){var e=new URL(t).pathname.split("/"),r=e[1],n=e[2];return"-"===r?"https://streetmix.net/api/v1/streets?namespacedId="+n:"https://streetmix.net/api/v1/streets?namespacedId="+n+"&creatorId="+r},t.exports.pathStartsWithAPI=function(t){var e=document.createElement("a");return e.href=t,"api"===e.pathname.split("/")[1]},t.exports.streetmixAPIToUser=function(t){function e(t,e){for(var r=t.split("&"),n=0;n{"use strict";t.exports=JSON.parse('{"status":true,"project":{"My Street":{"Boulevard Alt 1":{"segments":{"1":{"Type":"Buildings","Subtype":"Commercial","SegPos":1,"width":30,"title":"Building Blue 4floors","side":"left","Direction":"NA","Material":"Building Blue 4floors","MaterialH":"0","Markings":"Standard Concrete","O1-Name":"Building Blue 4floors","O1-Tags":"4-Story,4-Story","O2-Name":"","O2-Tags":"","O3-Name":"","O3-Tags":""},"2":{"id":2478438,"Type":"setback","Subtype":"AngleNormal","SegPos":2,"width":3,"title":"Toward, R. Park, Head In","side":"left","Direction":"NA","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Setback Small","O1-Name":"Toward, R. Park, Head In","O1-Tags":"Parking - Angle","O2-Name":"Empty place holder","O2-Tags":"Business Signs","O3-Name":"","O3-Tags":""},"3":{"id":2478439,"Type":"Walkways","Subtype":"pedestrian","SegPos":3,"width":6,"title":"3 people","side":"left","Direction":"Both","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"3 people","O1-Tags":"Many People","O2-Name":"Empty place holder","O2-Tags":"Many People","O3-Name":"","O3-Tags":""},"4":{"id":2478440,"Type":"Furniture","Subtype":"BikeRacks","SegPos":4,"width":7,"title":"NYC Bike Rack","side":"left","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"NYC Bike Rack","O1-Tags":"Bike Racks","O2-Name":"Empty place holder","O2-Tags":"Trees, Fall","O3-Name":"Empty place holder","O3-Tags":"Trees, Fall"},"5":{"id":2478441,"Type":"BikesPaths","Subtype":"Bikes","SegPos":5,"width":4.5,"title":"Casual woman 2","side":"left","Direction":"Coming","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Painted BufferNone NoEdge","O1-Name":"Casual woman 2","O1-Tags":"Miscellaneous","O2-Name":"Empty place holder","O2-Tags":"Parking - Reverse Angle","O3-Name":"","O3-Tags":""},"6":{"id":2478442,"Type":"Curbside","Subtype":"","SegPos":6,"width":6,"title":"Empty place holder","side":"left","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Empty place holder","O1-Tags":"Markings - Transit Options","O2-Name":"Shelter","O2-Tags":"0 mph","O3-Name":"","O3-Tags":""},"7":{"id":2478443,"Type":"Gutter","Subtype":"Gutter","SegPos":7,"width":2.5,"title":"Gutter Std. 2.5 ft, Left","side":"left","Direction":"NA","Material":"Standard Concrete","MaterialH":"0.5","Markings":"Blank","O1-Name":"Gutter Std. 2.5 ft, Left","O1-Tags":"Gutters","O2-Name":"Empty place holder","O2-Tags":"Markings - Transit Options","O3-Name":"Empty place holder","O3-Tags":"Markings - Transit Options"},"8":{"id":2478540,"Type":"Parking","Subtype":"Purpendicular","SegPos":8,"width":19,"title":"Purpendicular Right side, Blue","side":"left","Direction":"Coming","Material":"Asphalt Black","MaterialH":"0","Markings":"Parking Left","O1-Name":"Purpendicular Right side, Blue","O1-Tags":"Private Parking","O2-Name":"","O2-Tags":"Markings - Transit Options","O3-Name":"","O3-Tags":""},"9":{"id":2478444,"Type":"Transit","Subtype":"Transit","SegPos":9,"width":11,"title":"UTA bus","side":"left","Direction":"Coming","Material":"Asphalt Red 2","MaterialH":"0","Markings":"Thru Only","O1-Name":"UTA bus","O1-Tags":"Bus Vehicles","O2-Name":"Yellow Sedan","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"10":{"id":2478445,"Type":"Cars","Subtype":"","SegPos":10,"width":10,"title":"Empty place holder","side":"left","Direction":"Coming","Material":"Asphalt Black","MaterialH":"0","Markings":"Thru Only","O1-Name":"Empty place holder","O1-Tags":"SUVs/Pickups Reversed","O2-Name":"","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"11":{"id":2478446,"Type":"Median/Buffer","Subtype":"season_tree","SegPos":11,"width":14,"title":"Japanese Zelkova","side":"median","Direction":"median","Material":"Asphalt Black","MaterialH":"0","Markings":"Center Median","O1-Name":"Japanese Zelkova","O1-Tags":"Trees, Summer","O2-Name":"TallPlantBox (12ft)","O2-Tags":"Low-Water Xeriscape","O3-Name":"","O3-Tags":""},"12":{"id":2478447,"Type":"Cars","Subtype":"Truck","SegPos":12,"width":10,"title":"Blue Truck","side":"right","Direction":"Going","Material":"Asphalt Black","MaterialH":"0","Markings":"Thru Only","O1-Name":"Blue Truck","O1-Tags":"Miscellaneous","O2-Name":"","O2-Tags":"Low-Water Xeriscape","O3-Name":"","O3-Tags":""},"13":{"id":2478448,"Type":"Transit","Subtype":"Transit","SegPos":13,"width":11,"title":"StreetCar Yellow","side":"right","Direction":"Going","Material":"Grass","MaterialH":"0","Markings":"Thru Only","O1-Name":"StreetCar Yellow","O1-Tags":"Rail Vehicles","O2-Name":"White Sedan","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"14":{"id":2478449,"Type":"Gutter","Subtype":"Gutter","SegPos":14,"width":2.5,"title":"Gutter Std. 2.5 ft, Right","side":"right","Direction":"NA","Material":"Standard Concrete","MaterialH":"0.5","Markings":"Blank","O1-Name":"Gutter Std. 2.5 ft, Right","O1-Tags":"Gutters","O2-Name":"Empty place holder","O2-Tags":"Markings - Transit Options","O3-Name":"Empty place holder","O3-Tags":"Markings - Transit Options"},"15":{"id":2478450,"Type":"Curbside","Subtype":"Lights","SegPos":15,"width":2,"title":"Streetlight solar banners 1","side":"right","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Streetlight solar banners 1","O1-Tags":"Historic Lights","O2-Name":"BikeRack Bollard","O2-Tags":"30 mph","O3-Name":"","O3-Tags":""},"16":{"id":2478451,"Type":"BikesPaths","Subtype":"Bikes","SegPos":16,"width":4.5,"title":"Man Go","side":"right","Direction":"Going","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Painted BufferNone NoEdge","O1-Name":"Man Go","O1-Tags":"Miscellaneous","O2-Name":"","O2-Tags":"Bike Racks","O3-Name":"","O3-Tags":""},"17":{"id":2478452,"Type":"Furniture","Subtype":"Tables","SegPos":17,"width":7,"title":"Table","side":"right","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Table","O1-Tags":"Miscellaneous","O2-Name":"Table","O2-Tags":"Miscellaneous","O3-Name":"Empty place holder","O3-Tags":"Trees, Fall"},"18":{"id":2478453,"Type":"Walkways","Subtype":"pedestrian","SegPos":18,"width":6,"title":"3 people","side":"right","Direction":"Both","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"3 people","O1-Tags":"Many People","O2-Name":"Empty place holder","O2-Tags":"Many People","O3-Name":"","O3-Tags":""},"19":{"id":2478454,"Type":"setback","Subtype":"Paths","SegPos":19,"width":3,"title":"Empty place holder","side":"right","Direction":"NA","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Setback Small","O1-Name":"Empty place holder","O1-Tags":"Business Signs","O2-Name":"Empty place holder","O2-Tags":"Business Signs","O3-Name":"","O3-Tags":""},"20":{"Type":"Buildings","Subtype":"Commercial","SegPos":20,"width":30,"title":"Building Yellow 4floors","side":"right","Direction":"NA","Material":"Building Yellow 4floors","MaterialH":"0","Markings":"Standard Concrete","O1-Name":"Building Yellow 4floors","O1-Tags":"4-Story,4-Story","O2-Name":"","O2-Tags":"","O3-Name":"","O3-Tags":""}}}}}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);return(()=>{function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=200&&this.status<400){var t,n=JSON.parse(this.response),a=i.convertStreetValues(n.data.street),o=a.segments,s=n.name;console.log("streetmixName",s),r.setAttribute("streetmix-loader","name",s),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",s),console.log("therefore setting metadata sceneTitle as streetmixName",s)),r.setAttribute("data-layer-name","Streetmix • "+s),e.showBuildings&&(r.setAttribute("street","right",a.rightBuildingVariant),r.setAttribute("street","left",a.leftBuildingVariant)),r.setAttribute("street","type","streetmixSegmentsMetric"),r.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsMetric:o})),r.emit("streetmix-loader-street-loaded")}else console.log("[streetmix-loader]","Loading Error: We reached the target server, but it returned an error")},n.onerror=function(){console.log("[streetmix-loader]","Loading Error: There was a connection error of some sort")},n.send()}else{if(e.streetmixStreetURL.length>0){var a=i.streetmixUserToAPI(e.streetmixStreetURL);return console.log("[streetmix-loader]","setting `streetmixAPIURL` to",a),void r.setAttribute("streetmix-loader","streetmixAPIURL",a)}console.log("[streetmix-loader]","Neither `streetmixAPIURL` nor `streetmixStreetURL` properties provided, please provide at least one.")}}}),AFRAME.registerComponent("intersection",{schema:{dimensions:{type:"string",default:"20 20"},sidewalk:{type:"string",default:"0 0 0 0"},northeastcurb:{type:"string",default:"0 0"},southwestcurb:{type:"string",default:"0 0"},southeastcurb:{type:"string",default:"0 0"},northwestcurb:{type:"string",default:"0 0"},stopsign:{type:"string",default:"0 0 0 0"},trafficsignal:{type:"string",default:"0 0 0 0"},crosswalk:{type:"string",default:"0 0 0 0"}},init:function(){for(var e=this.data,r=this.el;r.firstChild;)r.removeChild(r.lastChild);var n=e.dimensions.split(" ").map((function(t){return Number(t)})),i=[this.el.getAttribute("position").x,this.el.getAttribute("position").y,this.el.getAttribute("position").z],a=e.sidewalk.split(" ").map((function(t){return Number(t)})),o=e.northeastcurb.split(" ").map((function(t){return Number(t)})),s=e.southwestcurb.split(" ").map((function(t){return Number(t)})),c=e.southeastcurb.split(" ").map((function(t){return Number(t)})),l=e.northwestcurb.split(" ").map((function(t){return Number(t)})),u=e.stopsign.split(" ").map((function(t){return Number(t)})),d=e.trafficsignal.split(" ").map((function(t){return Number(t)})),f=e.crosswalk.split(" ").map((function(t){return Number(t)})),p=n[0],h=n[1];function m(t){var e=t.length,n=t.width,i=t.positionVec,a=t.scaleVec,o=void 0===a?{x:1,y:1,z:1}:a,s=t.rotationVec,c=document.createElement("a-entity"),l=[];l[0]=n/2,l[1]=parseInt(e/2),c.setAttribute("geometry","primitive","box"),c.setAttribute("geometry","height: 0.4"),c.setAttribute("position",i),c.setAttribute("scale",o),c.setAttribute("geometry","depth",e),c.setAttribute("geometry","width",n),c.setAttribute("rotation",s),c.setAttribute("mixin","sidewalk"),c.setAttribute("material","repeat: ".concat(l[0]," ").concat(l[1])),r.appendChild(c)}this.el.setAttribute("geometry","primitive:box; width: ".concat(p,"; height: ").concat(h,"; depth:0.2")),this.el.setAttribute("position",{x:i[0],y:-.1,z:i[2]}),this.el.setAttribute("rotation","-90 0 0"),this.el.setAttribute("material","src: #asphalt-texture; repeat:5 5; roughness:1");var g={west:{positionVec:{x:p/2-a[0]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:a[0]},east:{positionVec:{x:-p/2+a[1]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:a[1]},north:{positionVec:{y:-h/2+a[2]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-a[1]-a[0],width:a[2]},south:{positionVec:{y:h/2-a[3]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-a[1]-a[0],width:a[3]}};Object.keys(g).filter((function(t,e){return a[e]})).forEach((function(t,e){m(g[t])}));for(var v={northeast:{positionVec:{x:p/2-o[0]/2,y:h/2-o[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:o[0],width:o[1]},southwest:{positionVec:{x:-p/2+s[0]/2,y:-h/2+s[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:s[0],width:s[1]},southeast:{positionVec:{x:p/2-c[0]/2,y:-h/2+c[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:c[0],width:c[1]},northwest:{positionVec:{x:-p/2+l[0]/2,y:h/2-l[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:l[0],width:l[1]}},y=0,b=Object.entries(v);y{t.exports.segmentVariants={sidewalk:["empty","sparse","normal","dense"],"sidewalk-wayfinding":["large"],"sidewalk-bench":["left","right","center"],"sidewalk-bike-rack":["left|sidewalk-parallel","right|sidewalk-parallel","left|sidewalk","right|sidewalk"],"sidewalk-tree":["big","palm-tree"],utilities:["left","right"],"sidewalk-lamp":["right|modern","both|modern","left|modern","right|traditional","both|traditional","left|traditional","right|pride","both|pride","left|pride"],parklet:["left","right"],"outdoor-dining":["empty|sidewalk","empty|road"],bikeshare:["left|road","right|road","left|sidewalk","right|sidewalk"],"bike-lane":["inbound|green|sidewalk","inbound|green|road","outbound|green|sidewalk","outbound|green|road","inbound|regular|sidewalk","inbound|regular|road","outbound|regular|sidewalk","outbound|regular|road","inbound|red|sidewalk","inbound|red|road","outbound|red|sidewalk","outbound|red|road"],scooter:["inbound|regular","inbound|green","inbound|red","outbound|regular","outbound|green","outbound|red"],"bus-lane":["inbound|colored|typical","outbound|colored|typical","inbound|regular|typical","outbound|regular|typical","inbound|red|typical","outbound|red|typical"],"drive-lane":["inbound|car","outbound|car","inbound|truck","outbound|truck","outbound|av","inbound|av","outbound|pedestrian","inbound|pedestrian","inbound|sharrow","outbound|sharrow"],"turn-lane":["inbound|left","inbound|right","inbound|left-right-straight","inbound|shared","inbound|both","inbound|left-straight","inbound|right-straight","inbound|straight","outbound|left","outbound|right","outbound|left-right-straight","outbound|shared","outbound|both","outbound|left-straight","outbound|right-straight","outbound|straight"],"parking-lane":["sideways|right","sideways|left","inbound|right","inbound|left","outbound|left","outbound|right","angled-front-left|left","angled-front-right|left","angled-rear-left|left","angled-rear-right|left","angled-front-left|right","angled-front-right|right","angled-rear-left|right","angled-rear-right|right"],"food-truck":["left","right"],"flex-zone":["taxi|inbound|right","taxi|inbound|left","taxi|outbound|right","taxi|outbound|left","rideshare|outbound|right","rideshare|outbound|right","rideshare|inbound|right","rideshare|inbound|left"],streetcar:["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"light-rail":["inbound|regular","inbound|colored","inbound|grass","outbound|regular","outbound|colored","outbound|grass"],"brt-station":["center"],"transit-shelter":["left|street-level","right|street-level","right|light-rail","left|light-rail"],divider:["buffer","flowers","planting-strip","planter-box","palm-tree","big-tree","bush","dome","bollard","striped-buffer"],temporary:["barricade","traffic-cone","jersey-barrier-plastic","jersey-barrier-concrete"],"magic-carpet":["aladdin"]}},4578:t=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}var r={Setback:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},tree:{type:"divider",variantString:"palm-tree"},Benchs:{type:"sidewalk-bench",variantStringAdd:"side"}},Walkways:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},pedestrian:{type:"sidewalk",variantString:"dense"},Benchs:{type:"sidewalk-bench",variantStringAdd:"side"},Tables:{type:"outdoor-dining",variantString:"occupied|sidewalk"}},Furniture:{"":{type:"sidewalk",variantString:"empty"},Trees:{type:"sidewalk-tree",variantString:"big"},season_tree:{type:"sidewalk-tree",variantString:"big"},Shelters:{type:"transit-shelter",variantString:"street-level",variantStringAdd:"side|variantString"},Pedestrian:{type:"sidewalk",variantString:"dense"}},Curbside:{"":{type:"sidewalk",variantString:"empty"},Lights:{type:"sidewalk-lamp",tagToVariantMap:{"Historic Lights":"traditional","Regular Lights":"modern"},variantStringAdd:"side|variantString"},Poles:{type:"utilities",variantStringAdd:"side"},BikeRacks:{type:"sidewalk-bike-rack",nameToVariantMap:{"Sideview Modern":"sidewalk-parallel",Sideview:"sidewalk-parallel","NYC Bike Rack":"sidewalk"},variantStringAdd:"side|variantString"}},BikesPaths:{"":{type:"bike-lane",variantString:"sidewalk"},Bikes:{type:"bike-lane",variantString:"sidewalk",variantStringAdd:"direction|material|variantString"}},Gutter:{"":{type:"divider",variantString:"median"},Gutter:{type:"divider",variantString:"median"}},Transit:{"":{tag:"Bus Vehicles",type:"bus-lane",variantString:"typical",variantStringAdd:"direction|material|variantString"},Transit:[{tag:"Rail Vehicles",type:"streetcar",names:["StreetCar Yellow","StreetCar Blue","StreetCar Red 1","StreetCar Red 2"],variantStringAdd:"direction|material"},{tag:"Rail Vehicles",type:"light-rail",names:["UTA LightRail"],variantStringAdd:"direction|material"},{tag:"Rail Vehicles Reversed",type:"light-rail",variantStringAdd:"direction|material"},{tag:"Bus Vehicles",type:"bus-lane",variantString:"typical",variantStringAdd:"direction|material|variantString"}]},Cars:{"":{type:"drive-lane",variantString:"car",variantStringAdd:"direction|variantString"},Autos:{type:"drive-lane",variantString:"car",variantStringAdd:"direction|variantString"},Truck:{type:"drive-lane",variantString:"truck",variantStringAdd:"direction|variantString"}},Parking:{"":{tag:"Parking - Parallel",type:"parking-lane",variantStringAdd:"direction|side"},Parallel:{tag:"Parking - Parallel",type:"parking-lane",variantStringAdd:"direction|side"},AngleNormal:{tag:"Parking - Angle",type:"parking-lane",nameToVariantMap:{"Away, L. Park, Head In":"angled-rear-left","Toward, R. Park, Head In":"angled-front-right","Toward, L. Park, Head In":"angled-front-left","Away, R. Park, Head In":"angled-rear-right"},variantStringAdd:"side"},Perpendicular:{type:"parking-lane",variantString:"sideways",variantStringAdd:"variantString|side"}},Buffers:{"":{type:"divider",variantString:"median"},Trees:{type:"divider",variantString:"big-tree"},tree:{type:"divider",variantString:"palm-tree"},season_tree:{type:"divider",variantString:"big-tree"},median:{type:"divider",variantString:"planting-strip"},planter:{type:"divider",variantString:"planting-strip"}}};r.Buffers.AngleNormal=r.Parking.AngleNormal,r.Buffers.Autos=r.Cars.Autos,r.Buffers.Purpendicular=r.Parking.Perpendicular,r["Median/Buffer"]=r.Buffers,r.Setback.tree=r.Buffers.tree,r.Setback.Trees=r.Buffers.Trees,r.Setback.season_tree=r.Buffers.season_tree,r.Parking.Purpendicular=r.Parking.Perpendicular,r.Setback.Purpendicular=r.Parking.Perpendicular,r.Setback.AngleNormal=r.Parking.AngleNormal,r.Setback.planter=r.Buffers.planter,r.Setback.BikeRacks=r.Curbside.BikeRacks,r.Setback.Tables=r.Walkways.Tables,r.Setback.Poles=r.Curbside.Poles,r.Curbside.Shelters=r.Furniture.Shelters,r.Curbside.Benchs=r.Walkways.Benchs,r.Furniture.planter=r.Buffers.planter,r.Furniture.Benchs=r.Walkways.Benchs,r.Furniture.BikeRacks=r.Curbside.BikeRacks,r.Furniture.Tables=r.Walkways.Tables;var n={Coming:"inbound",Going:"outbound",Both:"both",NA:""},i={"Asphalt Black":"regular","Asphalt Blue":"blue","Asphalt Red 1":"red","Asphalt Red 2":"red","Asphalt Green":"green","Asphalt Old":"regular",Grass:"grass","Grass Dead":"grass"};function a(t,e){return t.split("|").map((function(t){return e[t]})).join("|")}t.exports.convertSegment=function(t){var o={},s=t.Type,c=t.Subtype,l=r[s];if(o.elevation=t.MaterialH/.5,o.width=t.width,o.direction=n[t.Direction],t.side&&(o.side=t.side),t.Material&&(o.material=i[t.Material]),l){var u=l[c];u?o=function(t,r,n){if("string"==typeof t)r.type=t;else if(Array.isArray(t)){var i=t.find((function(t){var e=t.tag===n["O1-Tags"];return e&&t.names?t.names.includes(n["O1-Name"]):e}));r.variantString="";var o=i.variantString;o&&"string"==typeof o&&(r.variantString=o),r.type=i.type;var s=i.variantStringAdd;s&&(r.variantString=a(s,r))}else if("object"===e(t)){r.type=t.type,r.variantString="";var c=t.variantString;c&&"string"==typeof c&&(r.variantString=c);var l=t.nameToVariantMap;l&&l[n["O1-Name"]]&&(r.variantString=l[n["O1-Name"]]);var u=t.tagToVariantMap;u&&u[n["O1-Tags"]]&&(r.variantString=u[n["O1-Tags"]]);var d=t.variantStringAdd;d&&(r.variantString=a(d,r))}return r}(u,o,t):(o.type=s,console.log("The '".concat(c,"' subtype of StreetPlan segment '").concat(s,"' is not yet supported in 3DStreet")))}else o.type=s,console.log("The '".concat(s,"' StreetPlan segment type is not yet supported in 3DStreet"));return o}},9879:(t,e,r)=>{mappingUtils=r(4578),t.exports.convertStreetStruct=function(t){var e,r={},n=Object.keys(t)[0],i=Object.keys(t[n])[0];return r.name=n,r.altName=i,r.segments=Object.values(t[n][i].segments),r.segments.forEach((function(t){t.width*=.3048})),r.segments=(e=r.segments,e.map(mappingUtils.convertSegment)).filter((function(t){return!["Buildings","setback"].includes(t.type)})),console.log("TEST. Converted JSON structure: ",r),r}},5199:t=>{t.exports.isSidewalk=function(t){return t.startsWith("sidewalk")||["utilities","scooter-drop-zone","bikeshare","flex-zone-curb","transit-shelter","brt-station","street-vendor"].includes(t)},t.exports.createBuildingsArray=function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:150,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"narrow";if("narrow"===n||"wide"===n)t=[{id:"SM3D_Bld_Mixed_4fl",width:5.251},{id:"SM3D_Bld_Mixed_Double_5fl",width:10.9041},{id:"SM3D_Bld_Mixed_4fl_2",width:5.309},{id:"SM3D_Bld_Mixed_5fl",width:5.903},{id:"SM3D_Bld_Mixed_Corner_4fl",width:5.644}],e="41431323432402434130303230234102402341";else if("residential"===n)t=[{id:"SM_Bld_House_Preset_03_1800",width:20},{id:"SM_Bld_House_Preset_08_1809",width:20},{id:"SM_Bld_House_Preset_09_1845",width:20}],e="12021201210101212021201012012021201210";else{if("arcade"!==n)return[];t=[{id:"arched-building-01",width:9.191},{id:"arched-building-02",width:11.19},{id:"arched-building-03",width:13.191},{id:"arched-building-04",width:15.191}],e="03120223130210321203123023103201232013"}for(var i=0,a=0,o=[];a{function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},r=document.createElement(t.tag);delete t.tag;for(var n=0,i=Object.entries(t);n1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(e,r){t.appendChild(n(e))})),t}},5394:t=>{t.exports.streetmixUserToAPI=function(t){var e=new URL(t).pathname.split("/"),r=e[1],n=e[2];return"-"===r?"https://streetmix.net/api/v1/streets?namespacedId="+n:"https://streetmix.net/api/v1/streets?namespacedId="+n+"&creatorId="+r},t.exports.pathStartsWithAPI=function(t){var e=document.createElement("a");return e.href=t,"api"===e.pathname.split("/")[1]},t.exports.streetmixAPIToUser=function(t){function e(t,e){for(var r=t.split("&"),n=0;n{"use strict";t.exports=JSON.parse('{"status":true,"project":{"My Street":{"Boulevard Alt 1":{"segments":{"1":{"Type":"Buildings","Subtype":"Commercial","SegPos":1,"width":30,"title":"Building Blue 4floors","side":"left","Direction":"NA","Material":"Building Blue 4floors","MaterialH":"0","Markings":"Standard Concrete","O1-Name":"Building Blue 4floors","O1-Tags":"4-Story,4-Story","O2-Name":"","O2-Tags":"","O3-Name":"","O3-Tags":""},"2":{"id":2478438,"Type":"setback","Subtype":"AngleNormal","SegPos":2,"width":3,"title":"Toward, R. Park, Head In","side":"left","Direction":"NA","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Setback Small","O1-Name":"Toward, R. Park, Head In","O1-Tags":"Parking - Angle","O2-Name":"Empty place holder","O2-Tags":"Business Signs","O3-Name":"","O3-Tags":""},"3":{"id":2478439,"Type":"Walkways","Subtype":"pedestrian","SegPos":3,"width":6,"title":"3 people","side":"left","Direction":"Both","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"3 people","O1-Tags":"Many People","O2-Name":"Empty place holder","O2-Tags":"Many People","O3-Name":"","O3-Tags":""},"4":{"id":2478440,"Type":"Furniture","Subtype":"BikeRacks","SegPos":4,"width":7,"title":"NYC Bike Rack","side":"left","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"NYC Bike Rack","O1-Tags":"Bike Racks","O2-Name":"Empty place holder","O2-Tags":"Trees, Fall","O3-Name":"Empty place holder","O3-Tags":"Trees, Fall"},"5":{"id":2478441,"Type":"BikesPaths","Subtype":"Bikes","SegPos":5,"width":4.5,"title":"Casual woman 2","side":"left","Direction":"Coming","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Painted BufferNone NoEdge","O1-Name":"Casual woman 2","O1-Tags":"Miscellaneous","O2-Name":"Empty place holder","O2-Tags":"Parking - Reverse Angle","O3-Name":"","O3-Tags":""},"6":{"id":2478442,"Type":"Curbside","Subtype":"","SegPos":6,"width":6,"title":"Empty place holder","side":"left","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Empty place holder","O1-Tags":"Markings - Transit Options","O2-Name":"Shelter","O2-Tags":"0 mph","O3-Name":"","O3-Tags":""},"7":{"id":2478443,"Type":"Gutter","Subtype":"Gutter","SegPos":7,"width":2.5,"title":"Gutter Std. 2.5 ft, Left","side":"left","Direction":"NA","Material":"Standard Concrete","MaterialH":"0.5","Markings":"Blank","O1-Name":"Gutter Std. 2.5 ft, Left","O1-Tags":"Gutters","O2-Name":"Empty place holder","O2-Tags":"Markings - Transit Options","O3-Name":"Empty place holder","O3-Tags":"Markings - Transit Options"},"8":{"id":2478540,"Type":"Parking","Subtype":"Purpendicular","SegPos":8,"width":19,"title":"Purpendicular Right side, Blue","side":"left","Direction":"Coming","Material":"Asphalt Black","MaterialH":"0","Markings":"Parking Left","O1-Name":"Purpendicular Right side, Blue","O1-Tags":"Private Parking","O2-Name":"","O2-Tags":"Markings - Transit Options","O3-Name":"","O3-Tags":""},"9":{"id":2478444,"Type":"Transit","Subtype":"Transit","SegPos":9,"width":11,"title":"UTA bus","side":"left","Direction":"Coming","Material":"Asphalt Red 2","MaterialH":"0","Markings":"Thru Only","O1-Name":"UTA bus","O1-Tags":"Bus Vehicles","O2-Name":"Yellow Sedan","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"10":{"id":2478445,"Type":"Cars","Subtype":"","SegPos":10,"width":10,"title":"Empty place holder","side":"left","Direction":"Coming","Material":"Asphalt Black","MaterialH":"0","Markings":"Thru Only","O1-Name":"Empty place holder","O1-Tags":"SUVs/Pickups Reversed","O2-Name":"","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"11":{"id":2478446,"Type":"Median/Buffer","Subtype":"season_tree","SegPos":11,"width":14,"title":"Japanese Zelkova","side":"median","Direction":"median","Material":"Asphalt Black","MaterialH":"0","Markings":"Center Median","O1-Name":"Japanese Zelkova","O1-Tags":"Trees, Summer","O2-Name":"TallPlantBox (12ft)","O2-Tags":"Low-Water Xeriscape","O3-Name":"","O3-Tags":""},"12":{"id":2478447,"Type":"Cars","Subtype":"Truck","SegPos":12,"width":10,"title":"Blue Truck","side":"right","Direction":"Going","Material":"Asphalt Black","MaterialH":"0","Markings":"Thru Only","O1-Name":"Blue Truck","O1-Tags":"Miscellaneous","O2-Name":"","O2-Tags":"Low-Water Xeriscape","O3-Name":"","O3-Tags":""},"13":{"id":2478448,"Type":"Transit","Subtype":"Transit","SegPos":13,"width":11,"title":"StreetCar Yellow","side":"right","Direction":"Going","Material":"Grass","MaterialH":"0","Markings":"Thru Only","O1-Name":"StreetCar Yellow","O1-Tags":"Rail Vehicles","O2-Name":"White Sedan","O2-Tags":"Miscellaneous","O3-Name":"","O3-Tags":""},"14":{"id":2478449,"Type":"Gutter","Subtype":"Gutter","SegPos":14,"width":2.5,"title":"Gutter Std. 2.5 ft, Right","side":"right","Direction":"NA","Material":"Standard Concrete","MaterialH":"0.5","Markings":"Blank","O1-Name":"Gutter Std. 2.5 ft, Right","O1-Tags":"Gutters","O2-Name":"Empty place holder","O2-Tags":"Markings - Transit Options","O3-Name":"Empty place holder","O3-Tags":"Markings - Transit Options"},"15":{"id":2478450,"Type":"Curbside","Subtype":"Lights","SegPos":15,"width":2,"title":"Streetlight solar banners 1","side":"right","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Streetlight solar banners 1","O1-Tags":"Historic Lights","O2-Name":"BikeRack Bollard","O2-Tags":"30 mph","O3-Name":"","O3-Tags":""},"16":{"id":2478451,"Type":"BikesPaths","Subtype":"Bikes","SegPos":16,"width":4.5,"title":"Man Go","side":"right","Direction":"Going","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Painted BufferNone NoEdge","O1-Name":"Man Go","O1-Tags":"Miscellaneous","O2-Name":"","O2-Tags":"Bike Racks","O3-Name":"","O3-Tags":""},"17":{"id":2478452,"Type":"Furniture","Subtype":"Tables","SegPos":17,"width":7,"title":"Table","side":"right","Direction":"NA","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"Table","O1-Tags":"Miscellaneous","O2-Name":"Table","O2-Tags":"Miscellaneous","O3-Name":"Empty place holder","O3-Tags":"Trees, Fall"},"18":{"id":2478453,"Type":"Walkways","Subtype":"pedestrian","SegPos":18,"width":6,"title":"3 people","side":"right","Direction":"Both","Material":"Pavers Tan","MaterialH":"0.5","Markings":"Blank","O1-Name":"3 people","O1-Tags":"Many People","O2-Name":"Empty place holder","O2-Tags":"Many People","O3-Name":"","O3-Tags":""},"19":{"id":2478454,"Type":"setback","Subtype":"Paths","SegPos":19,"width":3,"title":"Empty place holder","side":"right","Direction":"NA","Material":"Asphalt Blue","MaterialH":"0.5","Markings":"Setback Small","O1-Name":"Empty place holder","O1-Tags":"Business Signs","O2-Name":"Empty place holder","O2-Tags":"Business Signs","O3-Name":"","O3-Tags":""},"20":{"Type":"Buildings","Subtype":"Commercial","SegPos":20,"width":30,"title":"Building Yellow 4floors","side":"right","Direction":"NA","Material":"Building Yellow 4floors","MaterialH":"0","Markings":"Standard Concrete","O1-Name":"Building Yellow 4floors","O1-Tags":"4-Story,4-Story","O2-Name":"","O2-Tags":"","O3-Name":"","O3-Tags":""}}}}}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);return(()=>{function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=200&&this.status<400){var t,n=JSON.parse(this.response),a=i.convertStreetValues(n.data.street),o=a.segments,s=n.name;console.log("streetmixName",s),r.setAttribute("streetmix-loader","name",s),AFRAME.scenes[0]&&AFRAME.scenes[0].getAttribute("metadata")&&(t=AFRAME.scenes[0].getAttribute("metadata").sceneTitle),t||(AFRAME.scenes[0].setAttribute("metadata","sceneTitle",s),console.log("therefore setting metadata sceneTitle as streetmixName",s)),r.setAttribute("data-layer-name","Streetmix • "+s),e.showBuildings&&(r.setAttribute("street","right",a.rightBuildingVariant),r.setAttribute("street","left",a.leftBuildingVariant)),r.setAttribute("street","type","streetmixSegmentsMetric"),r.setAttribute("street","JSON",JSON.stringify({streetmixSegmentsMetric:o})),r.emit("streetmix-loader-street-loaded")}else console.log("[streetmix-loader]","Loading Error: We reached the target server, but it returned an error")},n.onerror=function(){console.log("[streetmix-loader]","Loading Error: There was a connection error of some sort")},n.send()}else{if(e.streetmixStreetURL.length>0){var a=i.streetmixUserToAPI(e.streetmixStreetURL);return console.log("[streetmix-loader]","setting `streetmixAPIURL` to",a),void r.setAttribute("streetmix-loader","streetmixAPIURL",a)}console.log("[streetmix-loader]","Neither `streetmixAPIURL` nor `streetmixStreetURL` properties provided, please provide at least one.")}}}),AFRAME.registerComponent("intersection",{schema:{dimensions:{type:"string",default:"20 20"},sidewalk:{type:"string",default:"0 0 0 0"},northeastcurb:{type:"string",default:"0 0"},southwestcurb:{type:"string",default:"0 0"},southeastcurb:{type:"string",default:"0 0"},northwestcurb:{type:"string",default:"0 0"},stopsign:{type:"string",default:"0 0 0 0"},trafficsignal:{type:"string",default:"0 0 0 0"},crosswalk:{type:"string",default:"0 0 0 0"}},init:function(){for(var e=this.data,r=this.el;r.firstChild;)r.removeChild(r.lastChild);var n=e.dimensions.split(" ").map((function(t){return Number(t)})),i=[this.el.getAttribute("position").x,this.el.getAttribute("position").y,this.el.getAttribute("position").z],a=e.sidewalk.split(" ").map((function(t){return Number(t)})),o=e.northeastcurb.split(" ").map((function(t){return Number(t)})),s=e.southwestcurb.split(" ").map((function(t){return Number(t)})),c=e.southeastcurb.split(" ").map((function(t){return Number(t)})),l=e.northwestcurb.split(" ").map((function(t){return Number(t)})),u=e.stopsign.split(" ").map((function(t){return Number(t)})),d=e.trafficsignal.split(" ").map((function(t){return Number(t)})),f=e.crosswalk.split(" ").map((function(t){return Number(t)})),p=n[0],h=n[1];function m(t){var e=t.length,n=t.width,i=t.positionVec,a=t.scaleVec,o=void 0===a?{x:1,y:1,z:1}:a,s=t.rotationVec,c=document.createElement("a-entity"),l=[];l[0]=n/2,l[1]=parseInt(e/2),c.setAttribute("geometry","primitive","box"),c.setAttribute("geometry","height: 0.4"),c.setAttribute("position",i),c.setAttribute("scale",o),c.setAttribute("geometry","depth",e),c.setAttribute("geometry","width",n),c.setAttribute("rotation",s),c.setAttribute("mixin","sidewalk"),c.setAttribute("material","repeat: ".concat(l[0]," ").concat(l[1])),r.appendChild(c)}this.el.setAttribute("geometry","primitive:box; width: ".concat(p,"; height: ").concat(h,"; depth:0.2")),this.el.setAttribute("position",{x:i[0],y:-.1,z:i[2]}),this.el.setAttribute("rotation","-90 0 0"),this.el.setAttribute("material","src: #asphalt-texture; repeat:5 5; roughness:1");var g={west:{positionVec:{x:p/2-a[0]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:a[0]},east:{positionVec:{x:-p/2+a[1]/2,z:.1},rotationVec:{x:90,y:0,z:0},length:h,width:a[1]},north:{positionVec:{y:-h/2+a[2]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-a[1]-a[0],width:a[2]},south:{positionVec:{y:h/2-a[3]/2,x:a[1]/2-a[0]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:p-a[1]-a[0],width:a[3]}};Object.keys(g).filter((function(t,e){return a[e]})).forEach((function(t,e){m(g[t])}));for(var v={northeast:{positionVec:{x:p/2-o[0]/2,y:h/2-o[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:o[0],width:o[1]},southwest:{positionVec:{x:-p/2+s[0]/2,y:-h/2+s[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:s[0],width:s[1]},southeast:{positionVec:{x:p/2-c[0]/2,y:-h/2+c[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:c[0],width:c[1]},northwest:{positionVec:{x:-p/2+l[0]/2,y:h/2-l[1]/2,z:.1},rotationVec:{x:0,y:90,z:-90},length:l[0],width:l[1]}},y=0,b=Object.entries(v);y